@chift/chift-nodejs 1.0.16 → 1.0.17
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/.github/workflows/ci.yml +10 -10
- package/CHANGELOG.md +12 -2
- package/README.md +3 -3
- package/dist/src/modules/accounting.d.ts +3 -3
- package/dist/src/modules/api.d.ts +4322 -2766
- package/dist/src/modules/consumer.d.ts +821 -512
- package/dist/src/modules/consumer.js +3 -0
- package/dist/src/modules/consumers.d.ts +4349 -2796
- package/dist/src/modules/datastores.d.ts +2 -2
- package/dist/src/modules/ecommerce.d.ts +2 -2
- package/dist/src/modules/integrations.d.ts +6 -6
- package/dist/src/modules/invoicing.d.ts +3 -3
- package/dist/src/modules/payment.d.ts +14 -0
- package/dist/src/modules/payment.js +41 -0
- package/dist/src/modules/sync.d.ts +3471 -2231
- package/dist/src/modules/sync.js +1 -1
- package/dist/src/modules/webhooks.d.ts +4 -1
- package/dist/src/types/sync.d.ts +22 -5
- package/dist/test/modules/accounting.test.js +58 -50
- package/dist/test/modules/consumer.test.js +4 -4
- package/dist/test/modules/consumers.test.js +4 -4
- package/dist/test/modules/ecommerce.test.js +23 -19
- package/dist/test/modules/integrations.test.js +4 -4
- package/dist/test/modules/invoicing.test.js +16 -9
- 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.js +31 -34
- package/dist/test/modules/sync.test.js +31 -19
- package/dist/test/modules/syncs.test.js +4 -4
- package/dist/test/modules/webhooks.test.js +4 -4
- package/package.json +1 -1
- package/src/modules/accounting.ts +3 -3
- package/src/modules/consumer.ts +4 -1
- package/src/modules/ecommerce.ts +4 -2
- package/src/modules/invoicing.ts +7 -3
- package/src/modules/payment.ts +59 -0
- package/src/modules/sync.ts +1 -1
- package/src/types/public-api/schema.d.ts +4071 -850
- package/src/types/sync.ts +20 -5
- package/test/modules/accounting.test.ts +69 -50
- package/test/modules/consumer.test.ts +5 -5
- package/test/modules/consumers.test.ts +4 -4
- package/test/modules/ecommerce.test.ts +25 -20
- package/test/modules/integrations.test.ts +4 -4
- package/test/modules/invoicing.test.ts +20 -10
- package/test/modules/payment.test.ts +65 -0
- package/test/modules/pms.test.ts +69 -0
- package/test/modules/pos.test.ts +32 -34
- package/test/modules/sync.test.ts +33 -19
- package/test/modules/syncs.test.ts +4 -4
- package/test/modules/webhooks.test.ts +4 -4
- package/.eslintcache +0 -1
- package/coverage/clover.xml +0 -1645
- package/coverage/coverage-final.json +0 -19
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/helpers/index.html +0 -131
- package/coverage/lcov-report/src/helpers/openapi.ts.html +0 -151
- package/coverage/lcov-report/src/helpers/settings.ts.html +0 -94
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -88
- package/coverage/lcov-report/src/modules/accounting.ts.html +0 -1156
- package/coverage/lcov-report/src/modules/api.ts.html +0 -190
- package/coverage/lcov-report/src/modules/consumer.ts.html +0 -616
- package/coverage/lcov-report/src/modules/consumers.ts.html +0 -331
- package/coverage/lcov-report/src/modules/custom.ts.html +0 -193
- package/coverage/lcov-report/src/modules/datastores.ts.html +0 -142
- package/coverage/lcov-report/src/modules/ecommerce.ts.html +0 -331
- package/coverage/lcov-report/src/modules/flow.ts.html +0 -589
- package/coverage/lcov-report/src/modules/index.html +0 -326
- package/coverage/lcov-report/src/modules/integrations.ts.html +0 -151
- package/coverage/lcov-report/src/modules/internalApi.ts.html +0 -586
- package/coverage/lcov-report/src/modules/invoicing.ts.html +0 -391
- package/coverage/lcov-report/src/modules/pos.ts.html +0 -421
- package/coverage/lcov-report/src/modules/sync.ts.html +0 -316
- package/coverage/lcov-report/src/modules/syncs.ts.html +0 -169
- package/coverage/lcov-report/src/modules/webhooks.ts.html +0 -343
- package/coverage/lcov.info +0 -1976
- package/dist/src/types/public-api/schema.d.ts +0 -12003
- package/dist/src/types/public-api/schema.js +0 -6
- package/src/types/public-api/schema.ts +0 -12073
- package/test/set_envs.sh +0 -14
package/.github/workflows/ci.yml
CHANGED
|
@@ -32,18 +32,18 @@ jobs:
|
|
|
32
32
|
- name: Test
|
|
33
33
|
run: npm test --coverage && ./node_modules/coveralls/bin/coveralls.js < coverage/lcov.info
|
|
34
34
|
env:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
CHIFT_ODOO_CONSUMER_ID: ${{ secrets.CHIFT_ODOO_CONSUMER_ID }}
|
|
40
|
-
CHIFT_WOOCOMMERCE_CONSUMER_ID: ${{ secrets.CHIFT_WOOCOMMERCE_CONSUMER_ID }}
|
|
41
|
-
CHIFT_AXONAUT_CONSUMER_ID: ${{ secrets.CHIFT_AXONAUT_CONSUMER_ID }}
|
|
42
|
-
CHIFT_CASHPAD_CONSUMER_ID: ${{ secrets.CHIFT_CASHPAD_CONSUMER_ID }}
|
|
43
|
-
CHIFT_LIGHTSPEED_CONSUMER_ID: ${{ secrets.CHIFT_LIGHTSPEED_CONSUMER_ID }}
|
|
44
|
-
CHIFT_POPINA_CONSUMER_ID: ${{ secrets.CHIFT_POPINA_CONSUMER_ID }}
|
|
35
|
+
CHIFT_BACKBONE_API: ${{ secrets.CHIFT_BACKBONE_API }}
|
|
36
|
+
CHIFT_TESTING_CLIENTID: ${{ secrets.CHIFT_TESTING_CLIENTID }}
|
|
37
|
+
CHIFT_TESTING_CLIENTSECRET: ${{ secrets.CHIFT_TESTING_CLIENTSECRET }}
|
|
38
|
+
CHIFT_TESTING_ACCOUNTID: ${{ secrets.CHIFT_TESTING_ACCOUNTID }}
|
|
45
39
|
CHIFT_TEST_SYNC_ID: ${{ secrets.CHIFT_TEST_SYNC_ID }}
|
|
46
40
|
CHIFT_SYNC_CONSUMER_ID: ${{ secrets.CHIFT_SYNC_CONSUMER_ID }}
|
|
41
|
+
CHIFT_ACCOUNTING_CONSUMER_ID: ${{ secrets.CHIFT_ACCOUNTING_CONSUMER_ID }}
|
|
42
|
+
CHIFT_ECOMMERCE_CONSUMER_ID: ${{ secrets.CHIFT_ECOMMERCE_CONSUMER_ID }}
|
|
43
|
+
CHIFT_POS_CONSUMER_ID: ${{ secrets.CHIFT_POS_CONSUMER_ID }}
|
|
44
|
+
CHIFT_INVOICING_CONSUMER_ID: ${{ secrets.CHIFT_INVOICING_CONSUMER_ID }}
|
|
45
|
+
CHIFT_PAYMENT_CONSUMER_ID: ${{ secrets.CHIFT_PAYMENT_CONSUMER_ID }}
|
|
46
|
+
CHIFT_PMS_CONSUMER_ID: ${{ secrets.CHIFT_PMS_CONSUMER_ID }}
|
|
47
47
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
48
48
|
|
|
49
49
|
- name: Report Coveralls
|
package/CHANGELOG.md
CHANGED
|
@@ -89,10 +89,20 @@
|
|
|
89
89
|
- Add X-Chift-IntegrationId header
|
|
90
90
|
|
|
91
91
|
## 1.0.14 - 2024-05-21
|
|
92
|
-
|
|
92
|
+
|
|
93
|
+
- Enhance auto-pagination
|
|
93
94
|
|
|
94
95
|
## 1.0.15 - 2024-05-23
|
|
96
|
+
|
|
95
97
|
- Support PMS vertical
|
|
96
98
|
|
|
97
99
|
## 1.0.16 - 2024-05-31
|
|
98
|
-
|
|
100
|
+
|
|
101
|
+
- Update model - Get integrations
|
|
102
|
+
|
|
103
|
+
## 1.0.17 - 2024-09-20
|
|
104
|
+
|
|
105
|
+
- Update models
|
|
106
|
+
- Add payment API
|
|
107
|
+
- Add payment API tests
|
|
108
|
+
- Add PMS API tests
|
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@ yarn add @chift/chift-nodejs
|
|
|
31
31
|
```typescript
|
|
32
32
|
const chift = require('@chift/chift-nodejs');
|
|
33
33
|
const client = new chift.API({
|
|
34
|
-
clientId: process.env.
|
|
35
|
-
clientSecret: process.env.
|
|
36
|
-
accountId: process.env.
|
|
34
|
+
clientId: process.env.CHIFT_TESTING_CLIENTID,
|
|
35
|
+
clientSecret: process.env.CHIFT_TESTING_CLIENTSECRET,
|
|
36
|
+
accountId: process.env.CHIFT_TESTING_ACCOUNTID,
|
|
37
37
|
});
|
|
38
38
|
const consumers = await client.Consumers.getConsumers();
|
|
39
39
|
// my first consumer has a POS connection
|
|
@@ -29,10 +29,10 @@ declare const accountingFactory: {
|
|
|
29
29
|
updateSupplier(supplierId: string, supplier: components['schemas']['SupplierItemUpdate'], params?: operations['accounting_update_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
30
30
|
createInvoice(invoice: components['schemas']['InvoiceItemInMonoAnalyticPlan'], params?: operations['accounting_create_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
31
31
|
createInvoiceWithMultiplePlans(invoice: components['schemas']['InvoiceItemInMultiAnalyticPlans'], params?: operations['accounting_create_invoice_multiple_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
32
|
-
getInvoicesByType(invoice_type: components['schemas']['
|
|
32
|
+
getInvoicesByType(invoice_type: components['schemas']['backbone_api__app__routers__accounting__InvoiceType'], params?: GetInvoicesByTypeParams): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan'][]>;
|
|
33
33
|
getInvoice(invoiceId: string, params?: operations['accounting_get_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
34
34
|
getInvoiceWithMultiplePlans(invoiceId: string, params?: operations['accounting_get_invoice_multi_analytic_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
35
|
-
getInvoicesByTypeWithMultiplePlans(invoice_type: components['schemas']['
|
|
35
|
+
getInvoicesByTypeWithMultiplePlans(invoice_type: components['schemas']['backbone_api__app__routers__accounting__InvoiceType'], params?: GetInvoicesByTypeWithMultiplePlansParams): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans'][]>;
|
|
36
36
|
createAnalyticAccount(analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
37
37
|
getAnalyticAccounts(params?: GetAnalyticAccountsParams): RequestData<components['schemas']['AnalyticAccountItemOut'][]>;
|
|
38
38
|
createAnalyticAccountWithMultiplePlans(analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
@@ -45,7 +45,7 @@ declare const accountingFactory: {
|
|
|
45
45
|
getJournalEntriesWithMultiplePlans(params: GetJournalEntriesWithMultiplePlansParams): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan'][]>;
|
|
46
46
|
getPaymentsByInvoiceId(invoice_id: string, params?: operations['accounting_get_payments_by_invoice']['parameters']['query']): RequestData<components['schemas']['Payment'][]>;
|
|
47
47
|
getJournals(params?: GetJournalsParams): RequestData<components['schemas']['Journal'][]>;
|
|
48
|
-
getVatCodes(params?: GetVatCodesParams): RequestData<components['schemas']['
|
|
48
|
+
getVatCodes(params?: GetVatCodesParams): RequestData<components['schemas']['backbone_api__app__routers__accounting__VatCode'][]>;
|
|
49
49
|
getMiscOperations(params?: GetMiscOperationsParams): RequestData<components['schemas']['MiscellaneousOperationOut'][]>;
|
|
50
50
|
createMiscOperation(operation: components['schemas']['MiscellaneousOperationIn'], params?: operations['accounting_create_miscellaneous_operation']['parameters']['query']): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
51
51
|
getMiscOperation(operation_id: string, params?: operations['accounting_get_miscellaneous_operation']['parameters']['query']): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|