@chift/chift-nodejs 1.0.24 → 1.0.26
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 +3 -5
- package/dist/src/modules/accounting.js +26 -21
- package/dist/src/modules/api.d.ts +1689 -593
- package/dist/src/modules/consumer.d.ts +320 -101
- package/dist/src/modules/consumers.d.ts +1688 -593
- package/dist/src/modules/integrations.d.ts +1 -0
- package/dist/src/modules/internalApi.js +3 -0
- package/dist/src/modules/invoicing.d.ts +5 -0
- package/dist/src/modules/invoicing.js +24 -0
- package/dist/src/modules/pos.d.ts +1 -0
- package/dist/src/modules/pos.js +8 -0
- package/dist/src/modules/sync.d.ts +1361 -485
- package/dist/src/types/api.d.ts +1 -0
- package/dist/src/types/public-api/schema.d.ts +3111 -869
- package/dist/test/modules/accounting.test.js +1 -29
- package/package.json +1 -2
- package/src/types/public-api/schema.d.ts +3111 -869
|
@@ -589,35 +589,6 @@ let miscOperations;
|
|
|
589
589
|
(0, globals_1.expect)(financialEntry).toBeTruthy();
|
|
590
590
|
(0, globals_1.expect)(financialEntry).toHaveProperty('journal_id', journal.id);
|
|
591
591
|
}));
|
|
592
|
-
/**
|
|
593
|
-
* @deprecated replaced by createFinancialEntry
|
|
594
|
-
*/
|
|
595
|
-
(0, globals_1.test)('createFinancialEntryOld', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
596
|
-
var _f;
|
|
597
|
-
const journal = journals.find((journal) => journal.journal_type === 'financial_operation');
|
|
598
|
-
if (!journal) {
|
|
599
|
-
throw new Error('No journal with type "financial_operation" found to create financial entry');
|
|
600
|
-
}
|
|
601
|
-
if (!((_f = clients === null || clients === void 0 ? void 0 : clients[0]) === null || _f === void 0 ? void 0 : _f.account_number)) {
|
|
602
|
-
throw new Error('[DEPRECATED] No client account_number found to create financial entry');
|
|
603
|
-
}
|
|
604
|
-
const financialEntry = yield consumer.accounting.createFinancialEntryOld({
|
|
605
|
-
date: '2022-01-01',
|
|
606
|
-
journal_id: journal.id,
|
|
607
|
-
currency: 'EUR',
|
|
608
|
-
currency_exchange_rate: 1,
|
|
609
|
-
items: [
|
|
610
|
-
{
|
|
611
|
-
type: 'customer_account',
|
|
612
|
-
account_number: clients[0].account_number,
|
|
613
|
-
partner_id: clients[0].id,
|
|
614
|
-
amount: 10,
|
|
615
|
-
},
|
|
616
|
-
],
|
|
617
|
-
});
|
|
618
|
-
(0, globals_1.expect)(financialEntry).toBeTruthy();
|
|
619
|
-
(0, globals_1.expect)(financialEntry).toHaveProperty('journal_id', journal.id);
|
|
620
|
-
}));
|
|
621
592
|
let folders = [];
|
|
622
593
|
(0, globals_1.test)('getFolders', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
623
594
|
folders = yield consumer.accounting.getFolders();
|
|
@@ -654,6 +625,7 @@ globals_1.test.skip('matchEntries', () => __awaiter(void 0, void 0, void 0, func
|
|
|
654
625
|
const body = {
|
|
655
626
|
name: 'sdk test',
|
|
656
627
|
number: '1324',
|
|
628
|
+
type: 'other',
|
|
657
629
|
};
|
|
658
630
|
const ledgerAccount = yield consumer.accounting.createLedgerAccount(body);
|
|
659
631
|
(0, globals_1.expect)(ledgerAccount).toBeTruthy();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chift/chift-nodejs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
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",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"@types/node": "^18.15.11",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
24
24
|
"chokidar-cli": "^3.0.0",
|
|
25
|
-
"coveralls": "^3.1.1",
|
|
26
25
|
"eslint": "^8.34.0",
|
|
27
26
|
"eslint-config-prettier": "^8.6.0",
|
|
28
27
|
"eslint-config-standard-with-typescript": "^34.0.0",
|