@chift/chift-nodejs 1.0.20 → 1.0.21
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/modules/accounting.d.ts +7 -4
- package/dist/src/modules/accounting.js +15 -0
- package/dist/src/modules/api.d.ts +2059 -169
- package/dist/src/modules/consumer.d.ts +387 -22
- package/dist/src/modules/consumer.js +10 -0
- package/dist/src/modules/consumers.d.ts +2028 -163
- package/dist/src/modules/datastores.d.ts +17 -0
- package/dist/src/modules/datastores.js +19 -0
- package/dist/src/modules/ecommerce.d.ts +2 -2
- package/dist/src/modules/flow.d.ts +6 -0
- package/dist/src/modules/flow.js +5 -0
- package/dist/src/modules/integrations.d.ts +2 -1
- package/dist/src/modules/integrations.js +5 -0
- package/dist/src/modules/invoicing.d.ts +6 -4
- package/dist/src/modules/invoicing.js +12 -0
- package/dist/src/modules/pms.d.ts +4 -0
- package/dist/src/modules/pms.js +14 -0
- package/dist/src/modules/sync.d.ts +1680 -143
- package/dist/src/modules/sync.js +15 -0
- package/dist/src/modules/syncs.d.ts +3 -0
- package/dist/src/modules/syncs.js +15 -0
- package/dist/src/modules/webhooks.d.ts +2 -0
- package/dist/src/types/public-api/schema.d.ts +1755 -779
- package/dist/src/types/public-api/schema.js +6 -0
- package/dist/test/modules/accounting.test.js +4 -0
- package/dist/test/modules/invoicing.test.js +15 -0
- package/dist/test/modules/pms.test.js +17 -0
- package/package.json +1 -1
- package/src/types/public-api/schema.d.ts +1755 -779
|
@@ -588,3 +588,7 @@ globals_1.test.skip('matchEntries', () => __awaiter(void 0, void 0, void 0, func
|
|
|
588
588
|
(0, globals_1.expect)(match).toHaveProperty('matching_number', globals_1.expect.any(String));
|
|
589
589
|
(0, globals_1.expect)(match).toHaveProperty('balance', globals_1.expect.any(Number));
|
|
590
590
|
}));
|
|
591
|
+
(0, globals_1.test)('getBookyears', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
592
|
+
const bookyears = yield consumer.accounting.getBookyears();
|
|
593
|
+
(0, globals_1.expect)(bookyears).toBeInstanceOf(Array);
|
|
594
|
+
}));
|
|
@@ -113,3 +113,18 @@ let contacts;
|
|
|
113
113
|
const contact = yield consumer.invoicing.getContactById(contacts[0].id);
|
|
114
114
|
(0, globals_1.expect)(contact).toHaveProperty('id', globals_1.expect.any(String));
|
|
115
115
|
}));
|
|
116
|
+
(0, globals_1.test)('getPayments', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
117
|
+
const payments = yield consumer.invoicing.getPayments();
|
|
118
|
+
(0, globals_1.expect)(payments).toBeInstanceOf(Array);
|
|
119
|
+
(0, globals_1.expect)(payments.length).toBeGreaterThan(0);
|
|
120
|
+
(0, globals_1.expect)(payments[0]).toHaveProperty('id', globals_1.expect.any(String));
|
|
121
|
+
(0, globals_1.expect)(payments[0]).toHaveProperty('date', globals_1.expect.any(String));
|
|
122
|
+
(0, globals_1.expect)(payments[0]).toHaveProperty('amount', globals_1.expect.any(Number));
|
|
123
|
+
}));
|
|
124
|
+
(0, globals_1.test)('getPaymentMethods', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
125
|
+
const paymentMethods = yield consumer.invoicing.getPaymentMethods();
|
|
126
|
+
(0, globals_1.expect)(paymentMethods).toBeInstanceOf(Array);
|
|
127
|
+
(0, globals_1.expect)(paymentMethods.length).toBeGreaterThan(0);
|
|
128
|
+
(0, globals_1.expect)(paymentMethods[0]).toHaveProperty('id', globals_1.expect.any(String));
|
|
129
|
+
(0, globals_1.expect)(paymentMethods[0]).toHaveProperty('name', globals_1.expect.any(String));
|
|
130
|
+
}));
|
|
@@ -88,3 +88,20 @@ globals_1.test.skip('getAccountingCategories', () => __awaiter(void 0, void 0, v
|
|
|
88
88
|
(0, globals_1.expect)(accountingCategories.length).toBeGreaterThan(0);
|
|
89
89
|
(0, globals_1.expect)(accountingCategories[0]).toHaveProperty('id', globals_1.expect.any(String));
|
|
90
90
|
}));
|
|
91
|
+
globals_1.test.skip('getCustomers', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
|
+
const customers = yield consumer.pms.getCustomers();
|
|
93
|
+
(0, globals_1.expect)(customers).toBeInstanceOf(Array);
|
|
94
|
+
(0, globals_1.expect)(customers.length).toBeGreaterThan(0);
|
|
95
|
+
(0, globals_1.expect)(customers[0]).toHaveProperty('id', globals_1.expect.any(String));
|
|
96
|
+
(0, globals_1.expect)(customers[0]).toHaveProperty('source_ref');
|
|
97
|
+
(0, globals_1.expect)(customers[0]).toHaveProperty('account_number');
|
|
98
|
+
}));
|
|
99
|
+
globals_1.test.skip('getInvoices', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
|
+
const invoices = yield consumer.pms.getInvoices({
|
|
101
|
+
date_from: '2023-01-01',
|
|
102
|
+
date_to: '2023-01-31',
|
|
103
|
+
});
|
|
104
|
+
(0, globals_1.expect)(invoices).toBeInstanceOf(Array);
|
|
105
|
+
(0, globals_1.expect)(invoices.length).toBeGreaterThan(0);
|
|
106
|
+
(0, globals_1.expect)(invoices[0]).toHaveProperty('id', globals_1.expect.any(String));
|
|
107
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chift/chift-nodejs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "The Chift NodeJS library provides convenient access to the Chift API from applications written in the NodeJS language (Javascript/Typescript).",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|