@chift/chift-nodejs 1.0.17 → 1.0.18
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/package.json +5 -2
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -25
- package/.github/workflows/ci.yml +0 -75
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -1
- package/.prettierrc.json +0 -7
- package/CHANGELOG.md +0 -108
- package/dist/src/helpers/openapi.d.ts +0 -3
- package/dist/src/helpers/openapi.js +0 -18
- package/dist/src/helpers/settings.d.ts +0 -4
- package/dist/src/helpers/settings.js +0 -5
- package/dist/src/index.d.ts +0 -1
- package/dist/src/modules/accounting.d.ts +0 -68
- package/dist/src/modules/accounting.js +0 -326
- package/dist/src/modules/api.d.ts +0 -18351
- package/dist/src/modules/api.js +0 -36
- package/dist/src/modules/consumer.d.ts +0 -3622
- package/dist/src/modules/consumer.js +0 -142
- package/dist/src/modules/consumers.d.ts +0 -18237
- package/dist/src/modules/consumers.js +0 -51
- package/dist/src/modules/custom.d.ts +0 -8
- package/dist/src/modules/custom.js +0 -36
- package/dist/src/modules/datastores.d.ts +0 -18
- package/dist/src/modules/datastores.js +0 -23
- package/dist/src/modules/ecommerce.d.ts +0 -24
- package/dist/src/modules/ecommerce.js +0 -97
- package/dist/src/modules/flow.d.ts +0 -15
- package/dist/src/modules/flow.js +0 -156
- package/dist/src/modules/integrations.d.ts +0 -23
- package/dist/src/modules/integrations.js +0 -23
- package/dist/src/modules/internalApi.d.ts +0 -24
- package/dist/src/modules/internalApi.js +0 -175
- package/dist/src/modules/invoicing.d.ts +0 -20
- package/dist/src/modules/invoicing.js +0 -90
- package/dist/src/modules/payment.d.ts +0 -14
- package/dist/src/modules/payment.js +0 -41
- package/dist/src/modules/pms.d.ts +0 -15
- package/dist/src/modules/pms.js +0 -47
- package/dist/src/modules/pos.d.ts +0 -26
- package/dist/src/modules/pos.js +0 -101
- package/dist/src/modules/sync.d.ts +0 -14654
- package/dist/src/modules/sync.js +0 -73
- package/dist/src/modules/syncs.d.ts +0 -11
- package/dist/src/modules/syncs.js +0 -39
- package/dist/src/modules/webhooks.d.ts +0 -58
- package/dist/src/modules/webhooks.js +0 -53
- package/dist/src/types/api.d.ts +0 -29
- package/dist/src/types/api.js +0 -2
- package/dist/src/types/consumers.d.ts +0 -8
- package/dist/src/types/consumers.js +0 -2
- package/dist/src/types/public-api/mappings.d.ts +0 -21
- package/dist/src/types/public-api/mappings.js +0 -2
- package/dist/src/types/sync.d.ts +0 -37
- package/dist/src/types/sync.js +0 -2
- package/dist/test/modules/accounting.test.d.ts +0 -1
- package/dist/test/modules/accounting.test.js +0 -590
- package/dist/test/modules/consumer.test.d.ts +0 -1
- package/dist/test/modules/consumer.test.js +0 -89
- package/dist/test/modules/consumers.test.d.ts +0 -1
- package/dist/test/modules/consumers.test.js +0 -109
- package/dist/test/modules/ecommerce.test.d.ts +0 -1
- package/dist/test/modules/ecommerce.test.js +0 -224
- package/dist/test/modules/integrations.test.d.ts +0 -1
- package/dist/test/modules/integrations.test.js +0 -54
- package/dist/test/modules/invoicing.test.d.ts +0 -1
- package/dist/test/modules/invoicing.test.js +0 -115
- package/dist/test/modules/payment.test.d.ts +0 -1
- package/dist/test/modules/payment.test.js +0 -88
- package/dist/test/modules/pms.test.d.ts +0 -1
- package/dist/test/modules/pms.test.js +0 -90
- package/dist/test/modules/pos.test.d.ts +0 -1
- package/dist/test/modules/pos.test.js +0 -179
- package/dist/test/modules/sync.test.d.ts +0 -1
- package/dist/test/modules/sync.test.js +0 -93
- package/dist/test/modules/syncs.test.d.ts +0 -1
- package/dist/test/modules/syncs.test.js +0 -53
- package/dist/test/modules/webhooks.test.d.ts +0 -1
- package/dist/test/modules/webhooks.test.js +0 -120
- package/jest.config.ts +0 -195
- package/src/helpers/openapi.ts +0 -22
- package/src/helpers/settings.ts +0 -3
- package/src/index.ts +0 -1
- package/src/modules/accounting.ts +0 -510
- package/src/modules/api.ts +0 -35
- package/src/modules/consumer.ts +0 -216
- package/src/modules/consumers.ts +0 -82
- package/src/modules/custom.ts +0 -36
- package/src/modules/datastores.ts +0 -19
- package/src/modules/ecommerce.ts +0 -129
- package/src/modules/flow.ts +0 -168
- package/src/modules/integrations.ts +0 -24
- package/src/modules/internalApi.ts +0 -182
- package/src/modules/invoicing.ts +0 -118
- package/src/modules/payment.ts +0 -59
- package/src/modules/pms.ts +0 -67
- package/src/modules/pos.ts +0 -144
- package/src/modules/sync.ts +0 -77
- package/src/modules/syncs.ts +0 -59
- package/src/modules/webhooks.ts +0 -86
- package/test/data/accounting_invoice.pdf +0 -0
- package/test/modules/accounting.test.ts +0 -647
- package/test/modules/consumer.test.ts +0 -68
- package/test/modules/consumers.test.ts +0 -85
- package/test/modules/ecommerce.test.ts +0 -213
- package/test/modules/integrations.test.ts +0 -22
- package/test/modules/invoicing.test.ts +0 -98
- package/test/modules/payment.test.ts +0 -65
- package/test/modules/pms.test.ts +0 -69
- package/test/modules/pos.test.ts +0 -164
- package/test/modules/sync.test.ts +0 -74
- package/test/modules/syncs.test.ts +0 -23
- package/test/modules/webhooks.test.ts +0 -92
- package/tsconfig.json +0 -107
package/dist/src/modules/api.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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;
|