@chift/chift-nodejs 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/helpers/openapi.d.ts +3 -0
- package/dist/src/helpers/openapi.js +18 -0
- package/dist/src/helpers/settings.d.ts +4 -0
- package/dist/src/helpers/settings.js +5 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/modules/accounting.d.ts +68 -0
- package/dist/src/modules/accounting.js +326 -0
- package/dist/src/modules/api.d.ts +18351 -0
- package/dist/src/modules/api.js +36 -0
- package/dist/src/modules/consumer.d.ts +3622 -0
- package/dist/src/modules/consumer.js +142 -0
- package/dist/src/modules/consumers.d.ts +18237 -0
- package/dist/src/modules/consumers.js +51 -0
- package/dist/src/modules/custom.d.ts +8 -0
- package/dist/src/modules/custom.js +36 -0
- package/dist/src/modules/datastores.d.ts +18 -0
- package/dist/src/modules/datastores.js +23 -0
- package/dist/src/modules/ecommerce.d.ts +24 -0
- package/dist/src/modules/ecommerce.js +97 -0
- package/dist/src/modules/flow.d.ts +15 -0
- package/dist/src/modules/flow.js +156 -0
- package/dist/src/modules/integrations.d.ts +23 -0
- package/dist/src/modules/integrations.js +23 -0
- package/dist/src/modules/internalApi.d.ts +24 -0
- package/dist/src/modules/internalApi.js +175 -0
- package/dist/src/modules/invoicing.d.ts +20 -0
- package/dist/src/modules/invoicing.js +90 -0
- package/dist/src/modules/payment.d.ts +14 -0
- package/dist/src/modules/payment.js +41 -0
- package/dist/src/modules/pms.d.ts +15 -0
- package/dist/src/modules/pms.js +47 -0
- package/dist/src/modules/pos.d.ts +26 -0
- package/dist/src/modules/pos.js +101 -0
- package/dist/src/modules/sync.d.ts +14654 -0
- package/dist/src/modules/sync.js +73 -0
- package/dist/src/modules/syncs.d.ts +11 -0
- package/dist/src/modules/syncs.js +39 -0
- package/dist/src/modules/webhooks.d.ts +58 -0
- package/dist/src/modules/webhooks.js +53 -0
- package/{src/types/api.ts → dist/src/types/api.d.ts} +4 -12
- package/dist/src/types/api.js +2 -0
- package/{src/types/consumers.ts → dist/src/types/consumers.d.ts} +0 -1
- package/dist/src/types/consumers.js +2 -0
- package/dist/src/types/public-api/mappings.js +2 -0
- package/dist/src/types/public-api/schema.d.ts +15294 -0
- package/{src/types/sync.ts → dist/src/types/sync.d.ts} +5 -6
- package/dist/src/types/sync.js +2 -0
- package/dist/test/modules/accounting.test.d.ts +1 -0
- package/dist/test/modules/accounting.test.js +590 -0
- package/dist/test/modules/consumer.test.d.ts +1 -0
- package/dist/test/modules/consumer.test.js +89 -0
- package/dist/test/modules/consumers.test.d.ts +1 -0
- package/dist/test/modules/consumers.test.js +109 -0
- package/dist/test/modules/ecommerce.test.d.ts +1 -0
- package/dist/test/modules/ecommerce.test.js +224 -0
- package/dist/test/modules/integrations.test.d.ts +1 -0
- package/dist/test/modules/integrations.test.js +54 -0
- package/dist/test/modules/invoicing.test.d.ts +1 -0
- package/dist/test/modules/invoicing.test.js +115 -0
- package/dist/test/modules/payment.test.d.ts +1 -0
- package/dist/test/modules/payment.test.js +88 -0
- package/dist/test/modules/pms.test.d.ts +1 -0
- package/dist/test/modules/pms.test.js +90 -0
- package/dist/test/modules/pos.test.d.ts +1 -0
- package/dist/test/modules/pos.test.js +179 -0
- package/dist/test/modules/sync.test.d.ts +1 -0
- package/dist/test/modules/sync.test.js +93 -0
- package/dist/test/modules/syncs.test.d.ts +1 -0
- package/dist/test/modules/syncs.test.js +53 -0
- package/dist/test/modules/webhooks.test.d.ts +1 -0
- package/dist/test/modules/webhooks.test.js +120 -0
- package/package.json +3 -2
- /package/{src/types/public-api/mappings.ts → dist/src/types/public-api/mappings.d.ts} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.API = void 0;
|
|
13
|
+
const internalApi_1 = require("./internalApi");
|
|
14
|
+
const consumers_1 = require("./consumers");
|
|
15
|
+
const syncs_1 = require("./syncs");
|
|
16
|
+
const integrations_1 = require("./integrations");
|
|
17
|
+
const webhooks_1 = require("./webhooks");
|
|
18
|
+
const datastores_1 = require("./datastores");
|
|
19
|
+
class API {
|
|
20
|
+
constructor(auth) {
|
|
21
|
+
this._setup = () => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
if (!this.auth.clientId || !this.auth.clientSecret || !this.auth.accountId) {
|
|
23
|
+
throw new Error('Missing mandatory auth parameters');
|
|
24
|
+
}
|
|
25
|
+
this.internalApi = new internalApi_1.InternalAPI(this.auth);
|
|
26
|
+
});
|
|
27
|
+
this.auth = auth;
|
|
28
|
+
this._setup();
|
|
29
|
+
this.Consumers = (0, consumers_1.Consumers)(this.internalApi);
|
|
30
|
+
this.Syncs = (0, syncs_1.Syncs)(this.internalApi);
|
|
31
|
+
this.Integrations = (0, integrations_1.Integrations)(this.internalApi);
|
|
32
|
+
this.Webhooks = (0, webhooks_1.Webhooks)(this.internalApi);
|
|
33
|
+
this.DataStores = (0, datastores_1.DataStores)(this.internalApi);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.API = API;
|