@snapp-store/snapp-box-sdk
Version:
A javascript sdk for snapp box api
25 lines (24 loc) • 1.03 kB
JavaScript
;
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(apiKey, mode = 'staging') {
this.request = new AxiosHttpRequest_1.AxiosHttpRequest({
BASE: mode === 'production'
? 'https://customer.snapp-box.com'
: 'https://customer-stg.snapp-box.com',
VERSION: '0.1.5',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: apiKey,
});
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;