UNPKG

@snapp-store/snapp-box-sdk

Version:
28 lines (27 loc) 1.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SnappBox = void 0; const AxiosHttpRequest_1 = require("./core/AxiosHttpRequest"); const MethodsService_1 = require("./services/MethodsService"); const PullingService_1 = require("./services/PullingService"); const WebhooksService_1 = require("./services/WebhooksService"); class SnappBox { constructor(config, HttpRequest = AxiosHttpRequest_1.AxiosHttpRequest) { var _a, _b, _c, _d; this.request = new HttpRequest({ BASE: (_a = config === null || config === void 0 ? void 0 : config.BASE) !== null && _a !== void 0 ? _a : 'https://customer.snapp-box.com', VERSION: (_b = config === null || config === void 0 ? void 0 : config.VERSION) !== null && _b !== void 0 ? _b : '0.1.5', WITH_CREDENTIALS: (_c = config === null || config === void 0 ? void 0 : config.WITH_CREDENTIALS) !== null && _c !== void 0 ? _c : false, CREDENTIALS: (_d = config === null || config === void 0 ? void 0 : config.CREDENTIALS) !== null && _d !== void 0 ? _d : 'include', TOKEN: config === null || config === void 0 ? void 0 : config.TOKEN, USERNAME: config === null || config === void 0 ? void 0 : config.USERNAME, PASSWORD: config === null || config === void 0 ? void 0 : config.PASSWORD, HEADERS: config === null || config === void 0 ? void 0 : config.HEADERS, ENCODE_PATH: config === null || config === void 0 ? void 0 : config.ENCODE_PATH, }); this.methods = new MethodsService_1.MethodsService(this.request); this.pulling = new PullingService_1.PullingService(this.request); this.webhooks = new WebhooksService_1.WebhooksService(this.request); } } exports.SnappBox = SnappBox;