You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
4.9 KiB

  1. {"ast":null,"code":"\"use strict\";\n\nvar _apollo = _interopRequireDefault(require(\"../../lib/apollo.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nasync function GetDetailProduct(id, token = \"\") {\n var res = await _apollo.default.query(`\n query($input: ID!){\n products(where:{id:$input})\n {\n name\n price\n description\n img{\n url\n }\n overview\n specification\n film\n stock\n }\n }\t`, token, {\n \"input\": id\n });\n return res;\n}\n\nasync function GetProductMatic(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"matic\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMaxi(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"maxi\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductNaked(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"naked\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductSport(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"sport\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductOffRoad(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"offroad\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMoped(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"moped\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMonsterEnergy(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"monsterenergy\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductCBU(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"cbu\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductATV(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"atv\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductPowerProduct(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"powerproduct\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductSuzuki(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"2\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHonda(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"3\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHino(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"4\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nmodule.exports = {\n //yamaha\n GetProductMatic: GetProductMatic,\n GetProductMaxi: GetProductMaxi,\n GetProductNaked: GetProductNaked,\n GetProductSport: GetProductSport,\n GetProductOffRoad: GetProductOffRoad,\n GetProductMoped: GetProductMoped,\n GetProductMonsterEnergy: GetProductMonsterEnergy,\n GetProductCBU: GetProductCBU,\n GetProductATV: GetProductATV,\n GetProductPowerProduct: GetProductPowerProduct,\n //suzuki\n GetProductSuzuki: GetProductSuzuki,\n //honda\n GetProductHonda: GetProductHonda,\n //hino\n GetProductHino: GetProductHino,\n //detail\n GetDetailProduct: GetDetailProduct\n};","map":null,"metadata":{},"sourceType":"script"}