{"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 id\n name\n price\n description\n spesifikasi_mesin\n spesifikasi_dimensi\n spesifikasi_rangka\n spesifikasi_kelistrikan\n film\n stock\n img{\n url\n }\n overview1\n img_overview1{\n url\n }\n overview2\n img_overview2{\n url\n }\n overview3\n img_overview3{\n url\n }\n overview4\n img_overview4{\n url\n }\n overview5\n img_overview5{\n url\n }\n overview6\n img_overview6{\n url\n }\n overview7\n img_overview7{\n url\n }\n overview8\n img_overview8{\n url\n }\n overview9\n img_overview9{\n url\n }\n overview10\n img_overview10{\n url\n }\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":{"version":3,"sources":["E:/Project/tbg-ecomm-nextjs/api/product/product.js"],"names":["GetDetailProduct","id","token","res","apollo","query","GetProductMatic","GetProductMaxi","GetProductNaked","GetProductSport","GetProductOffRoad","GetProductMoped","GetProductMonsterEnergy","GetProductCBU","GetProductATV","GetProductPowerProduct","GetProductSuzuki","GetProductHonda","GetProductHino","module","exports"],"mappings":";;AAAA;;;;AAEA,eAAeA,gBAAf,CAAgCC,EAAhC,EAAoCC,KAAK,GAAG,EAA5C,EAAgD;AAC9C,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OA3DkB,EA4DdH,KA5Dc,EA4DP;AACL,aAASD;AADJ,GA5DO,CAAhB;AAgEA,SAAOE,GAAP;AACD;;AAED,eAAeG,eAAf,CAA+BJ,KAAK,GAAG,EAAvC,EAA2C;AACzC,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAXkB,EAYdH,KAZc,CAAhB;AAcA,SAAOC,GAAP;AACD;;AAED,eAAeI,cAAf,CAA8BL,KAAK,GAAG,EAAtC,EAA0C;AACxC,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAXkB,EAYdH,KAZc,CAAhB;AAcA,SAAOC,GAAP;AACD;;AAED,eAAeK,eAAf,CAA+BN,KAAK,GAAG,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A,eAPF;AAQfC,EAAAA,uBAAuB,EAAEA,uBARV;AASfC,EAAAA,aAAa,EAAEA,aATA;AAUfC,EAAAA,aAAa,EAAEA,aAVA;AAWfC,EAAAA,sBAAsB,EAAEA,sBAXT;AAaf;AACAC,EAAAA,gBAAgB,EAACA,gBAdF;AAgBf;AACAC,EAAAA,eAAe,EAACA,eAjBD;AAmBf;AACAC,EAAAA,cAAc,EAACA,cApBA;AAsBf;AACAlB,EAAAA,gBAAgB,EAAEA;AAvBH,CAAjB","sourcesContent":["import apollo from \"../../lib/apollo.js\";\r\n\r\nasync function GetDetailProduct(id, token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query($input: ID!){\r\n products(where:{id:$input})\r\n {\r\n id\r\n name\r\n price\r\n description\r\n spesifikasi_mesin\r\n spesifikasi_dimensi\r\n spesifikasi_rangka\r\n spesifikasi_kelistrikan\r\n film\r\n stock\r\n img{\r\n url\r\n }\r\n overview1\r\n img_overview1{\r\n url\r\n }\r\n overview2\r\n img_overview2{\r\n url\r\n }\r\n overview3\r\n img_overview3{\r\n url\r\n }\r\n overview4\r\n img_overview4{\r\n url\r\n }\r\n overview5\r\n img_overview5{\r\n url\r\n }\r\n overview6\r\n img_overview6{\r\n url\r\n }\r\n overview7\r\n img_overview7{\r\n url\r\n }\r\n overview8\r\n img_overview8{\r\n url\r\n }\r\n overview9\r\n img_overview9{\r\n url\r\n }\r\n overview10\r\n img_overview10{\r\n url\r\n }\r\n }\r\n }\t`,\r\n token, {\r\n \"input\": id\r\n }\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMatic(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"matic\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMaxi(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"maxi\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductNaked(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"naked\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductSport(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"sport\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductOffRoad(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"offroad\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMoped(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"moped\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMonsterEnergy(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"monsterenergy\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductCBU(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"cbu\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductATV(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"atv\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductPowerProduct(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"powerproduct\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductSuzuki(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { business_partner: \"2\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductHonda(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { business_partner: \"3\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductHino(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { business_partner: \"4\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nmodule.exports = {\r\n //yamaha\r\n GetProductMatic: GetProductMatic,\r\n GetProductMaxi: GetProductMaxi,\r\n GetProductNaked: GetProductNaked,\r\n GetProductSport: GetProductSport,\r\n GetProductOffRoad: GetProductOffRoad,\r\n GetProductMoped: GetProductMoped,\r\n GetProductMonsterEnergy: GetProductMonsterEnergy,\r\n GetProductCBU: GetProductCBU,\r\n GetProductATV: GetProductATV,\r\n GetProductPowerProduct: GetProductPowerProduct,\r\n\r\n //suzuki\r\n GetProductSuzuki:GetProductSuzuki,\r\n\r\n //honda\r\n GetProductHonda:GetProductHonda,\r\n \r\n //hino\r\n GetProductHino:GetProductHino,\r\n \r\n //detail\r\n GetDetailProduct: GetDetailProduct,\r\n};"]},"metadata":{},"sourceType":"script"}