UNPKG

shopifymo

Version:

- Module get product information, customer, order history. - Get customer information by token and authenticate through email login, password

27 lines 1.09 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const shopify_api_1 = require("@shopify/shopify-api"); const _2023_04_1 = require("@shopify/shopify-api/rest/admin/2023-04"); const __1 = __importDefault(require("..")); let main = async () => { let shopifyMo = new __1.default({ domain: 'storename.myshopify.com', apiKey: 'xxx', apiSecretKey: 'xxx', adminApiAccessToken: 'xxx', storefrontAccessToken: 'xxx', scopes: ['read_products'], hostName: 'localhost:3000', apiVersion: shopify_api_1.LATEST_API_VERSION, isEmbeddedApp: true, restResources: _2023_04_1.restResources }); let customer = await shopifyMo.adminRestApi.findCustomer(6941610115353); let ordersHistory = await shopifyMo.adminRestApi.findOrderOnCustomer(6941610115353, 'any'); console.log(customer, ordersHistory); }; main(); //# sourceMappingURL=index.js.map