@chift/chift-nodejs 1.0.6 → 1.0.7
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 +38 -38
- package/CHANGELOG.md +18 -0
- package/dist/src/modules/accounting.d.ts +6 -6
- package/dist/src/modules/accounting.js +17 -11
- package/dist/src/modules/api.d.ts +1673 -27960
- package/dist/src/modules/consumer.d.ts +320 -46
- package/dist/src/modules/consumer.js +10 -0
- package/dist/src/modules/consumers.d.ts +1650 -260
- package/dist/src/modules/ecommerce.d.ts +8 -0
- package/dist/src/modules/ecommerce.js +28 -0
- package/dist/src/modules/flow.js +1 -1
- package/dist/src/modules/pos.d.ts +3 -1
- package/dist/src/modules/pos.js +7 -0
- package/dist/src/modules/sync.d.ts +1321 -209
- package/dist/src/modules/syncs.d.ts +8 -27677
- package/dist/src/modules/syncs.js +10 -0
- package/dist/test/modules/accounting.test.js +0 -11
- package/dist/test/modules/ecommerce.test.js +34 -7
- package/dist/test/modules/pos.test.js +10 -5
- package/package.json +2 -2
- package/src/modules/accounting.ts +25 -13
- package/src/modules/api.ts +2 -2
- package/src/modules/consumer.ts +21 -0
- package/src/modules/ecommerce.ts +52 -0
- package/src/modules/flow.ts +1 -1
- package/src/modules/pos.ts +15 -1
- package/src/modules/syncs.ts +32 -1
- package/src/types/public-api/schema.d.ts +3624 -2621
- package/test/modules/accounting.test.ts +0 -14
- package/test/modules/ecommerce.test.ts +34 -3
- package/test/modules/pos.test.ts +11 -5
- 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/test/modules/flow.test.d.ts +0 -1
- package/dist/test/modules/flow.test.js +0 -69
package/.github/workflows/ci.yml
CHANGED
|
@@ -3,56 +3,56 @@ name: Test and publish
|
|
|
3
3
|
on:
|
|
4
4
|
workflow_dispatch: {}
|
|
5
5
|
push:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- feature/**
|
|
9
|
+
tags:
|
|
10
|
+
- v[0-9]+.[0-9]+.[0-9]+*
|
|
11
11
|
pull_request:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
- feature/**
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
17
|
test:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
if: false
|
|
19
|
+
name: Test
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v3
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
- name: Use Node.js 16.x
|
|
26
|
+
uses: actions/setup-node@v3
|
|
27
|
+
with:
|
|
28
|
+
node-version: 16.x
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm install
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
- name: Test
|
|
34
|
+
run: npm test --coverage && ./node_modules/coveralls/bin/coveralls.js < coverage/lcov.info
|
|
35
|
+
env:
|
|
36
|
+
CHIFT_BASE_URL: ${{ secrets.CHIFT_BASE_URL }}
|
|
37
|
+
CHIFT_CLIENT_ID: ${{ secrets.CHIFT_CLIENT_ID }}
|
|
38
|
+
CHIFT_CLIENT_SECRET: ${{ secrets.CHIFT_CLIENT_SECRET }}
|
|
39
|
+
CHIFT_ACCOUNT_ID: ${{ secrets.CHIFT_ACCOUNT_ID }}
|
|
40
|
+
CHIFT_ODOO_CONSUMER_ID: ${{ secrets.CHIFT_ODOO_CONSUMER_ID }}
|
|
41
|
+
CHIFT_WOOCOMMERCE_CONSUMER_ID: ${{ secrets.CHIFT_WOOCOMMERCE_CONSUMER_ID }}
|
|
42
|
+
CHIFT_AXONAUT_CONSUMER_ID: ${{ secrets.CHIFT_AXONAUT_CONSUMER_ID }}
|
|
43
|
+
CHIFT_CASHPAD_CONSUMER_ID: ${{ secrets.CHIFT_CASHPAD_CONSUMER_ID }}
|
|
44
|
+
CHIFT_LIGHTSPEED_CONSUMER_ID: ${{ secrets.CHIFT_LIGHTSPEED_CONSUMER_ID }}
|
|
45
|
+
CHIFT_POPINA_CONSUMER_ID: ${{ secrets.CHIFT_POPINA_CONSUMER_ID }}
|
|
46
|
+
CHIFT_TEST_SYNC_ID: ${{ secrets.CHIFT_TEST_SYNC_ID }}
|
|
47
|
+
CHIFT_SYNC_CONSUMER_ID: ${{ secrets.CHIFT_SYNC_CONSUMER_ID }}
|
|
48
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
- name: Report Coveralls
|
|
51
|
+
uses: coverallsapp/github-action@v2
|
|
50
52
|
|
|
51
53
|
publish:
|
|
52
54
|
name: Publish
|
|
53
|
-
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
|
|
54
55
|
runs-on: ubuntu-latest
|
|
55
|
-
needs: test
|
|
56
56
|
steps:
|
|
57
57
|
- name: Checkout
|
|
58
58
|
uses: actions/checkout@v3
|
package/CHANGELOG.md
CHANGED
|
@@ -31,3 +31,21 @@
|
|
|
31
31
|
## 1.0.6 - 2023-11-24
|
|
32
32
|
|
|
33
33
|
- Update models & add new POS Routes
|
|
34
|
+
|
|
35
|
+
## 1.0.7 - 2024-03-26
|
|
36
|
+
|
|
37
|
+
- [ACCOUNTING] Remove getAnalyticLinesOfAccount
|
|
38
|
+
- [ACCOUNTING] Deprecate/Replace Create Journal Entry
|
|
39
|
+
- [ACCOUNTING] Update create misc operation params
|
|
40
|
+
- [ACCOUNTING] Update get misc operation params
|
|
41
|
+
- [ACCOUNTING] Update get balance of accounts params
|
|
42
|
+
- [ACCOUNTING] Update get employees params
|
|
43
|
+
- [POS] Add getAccountingCategories
|
|
44
|
+
- [POS] Fix getProductCategories type
|
|
45
|
+
- [ECOMMERCE] Add getPaymentMethods
|
|
46
|
+
- [ECOMMERCE] Add getProductCategories
|
|
47
|
+
- [ECOMMERCE] Add getCountries
|
|
48
|
+
- [ECOMMERCE] Add getTaxes
|
|
49
|
+
- [SYNC] Add create sync
|
|
50
|
+
- [SYNC] Add update sync
|
|
51
|
+
- [CONSUMER] Add enable consumer flow
|
|
@@ -31,25 +31,25 @@ declare const accountingFactory: {
|
|
|
31
31
|
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
32
32
|
updateAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
33
33
|
getAnalyticAccountsWithMultiplePlans(): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans'][]>;
|
|
34
|
-
getAnalyticLinesOfAccount(analytic_account_id: string): RequestData<components['schemas']['AnalyticAccountLineItemOut'][]>;
|
|
35
34
|
getJournalEntries(params: getJournalEntriesParams): RequestData<components['schemas']['JournalEntryMonoAnalyticPlan'][]>;
|
|
36
35
|
getJournalEntriesWithMultiplePlans(params: getJournalEntriesWithMultiplePlansParams): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan'][]>;
|
|
37
36
|
getPaymentsByInvoiceId(invoice_id: string): RequestData<components['schemas']['Payment'][]>;
|
|
38
37
|
getJournals(): RequestData<components['schemas']['Journal'][]>;
|
|
39
38
|
getVatCodes(): RequestData<components['schemas']['app__routers__accounting__VatCode'][]>;
|
|
40
39
|
getMiscOperations(params: getMiscOperationsParams): RequestData<components['schemas']['MiscellaneousOperationOut'][]>;
|
|
41
|
-
createMiscOperation(operation: components['schemas']['MiscellaneousOperationIn']): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
42
|
-
getMiscOperation(operation_id: string): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
40
|
+
createMiscOperation(operation: components['schemas']['MiscellaneousOperationIn'], params: operations['accounting_create_miscellaneous_operation']['parameters']['query']): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
41
|
+
getMiscOperation(operation_id: string, params: operations['accounting_get_miscellaneous_operation']['parameters']['query']): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
43
42
|
attachPDF(invoice_id: string, attachment: components['schemas']['AttachmentItem'], params: operations['accounting_add_attachment']['parameters']['query']): RequestData<operations['accounting_add_attachment']['responses'][201]>;
|
|
44
43
|
getChartOfAccounts(params: getChartOfAccountsParams): RequestData<components['schemas']['AccountItem'][]>;
|
|
45
|
-
getBalanceOfAccounts(filter: components['schemas']['AccountBalanceFilter']): RequestData<components['schemas']['AccountBalance'][]>;
|
|
46
|
-
getEmployees(): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
44
|
+
getBalanceOfAccounts(filter: components['schemas']['AccountBalanceFilter'], params: operations['accounting_get_accounts_balances']['parameters']['query']): RequestData<components['schemas']['AccountBalance'][]>;
|
|
45
|
+
getEmployees(params: operations['accounting_get_employees']['parameters']['query']): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
47
46
|
getOutstandings(params: getOutstandingsParams): RequestData<components['schemas']['OutstandingItem'][]>;
|
|
48
47
|
/**
|
|
49
48
|
* @deprecated replaced by createFinancialEntry
|
|
50
49
|
*/
|
|
51
50
|
createFinancialEntryOld(financial_entry: components['schemas']['FinancialEntryItemInOld'], params: operations['accounting_create_financial_entry']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOutOld']>;
|
|
52
51
|
createFinancialEntry(financial_entry: components['schemas']['FinancialEntryItemIn'], params: operations['accounting_create_financial_entries']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOut'][]>;
|
|
53
|
-
|
|
52
|
+
createJournalEntryOld(journal_entry: components['schemas']['JournalEntryIn']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
53
|
+
createJournalEntry(journal_entry: components['schemas']['GenericJournalEntry'], params: operations['accounting_create_generic_journal_entry']['parameters']['query']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
54
54
|
};
|
|
55
55
|
export { accountingFactory };
|
|
@@ -158,12 +158,6 @@ const accountingFactory = {
|
|
|
158
158
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans',
|
|
159
159
|
};
|
|
160
160
|
},
|
|
161
|
-
getAnalyticLinesOfAccount(analytic_account_id) {
|
|
162
|
-
return {
|
|
163
|
-
method: 'get',
|
|
164
|
-
url: `/consumers/{consumer_id}/accounting/analytic-account-lines/account/${analytic_account_id}`,
|
|
165
|
-
};
|
|
166
|
-
},
|
|
167
161
|
getJournalEntries(params) {
|
|
168
162
|
return {
|
|
169
163
|
params,
|
|
@@ -203,15 +197,17 @@ const accountingFactory = {
|
|
|
203
197
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
204
198
|
};
|
|
205
199
|
},
|
|
206
|
-
createMiscOperation(operation) {
|
|
200
|
+
createMiscOperation(operation, params) {
|
|
207
201
|
return {
|
|
202
|
+
params,
|
|
208
203
|
method: 'post',
|
|
209
204
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
210
205
|
body: operation,
|
|
211
206
|
};
|
|
212
207
|
},
|
|
213
|
-
getMiscOperation(operation_id) {
|
|
208
|
+
getMiscOperation(operation_id, params) {
|
|
214
209
|
return {
|
|
210
|
+
params,
|
|
215
211
|
method: 'get',
|
|
216
212
|
url: `/consumers/{consumer_id}/accounting/miscellaneous-operation/${operation_id}`,
|
|
217
213
|
};
|
|
@@ -231,15 +227,17 @@ const accountingFactory = {
|
|
|
231
227
|
url: '/consumers/{consumer_id}/accounting/chart-of-accounts',
|
|
232
228
|
};
|
|
233
229
|
},
|
|
234
|
-
getBalanceOfAccounts(filter) {
|
|
230
|
+
getBalanceOfAccounts(filter, params) {
|
|
235
231
|
return {
|
|
232
|
+
params,
|
|
236
233
|
method: 'post',
|
|
237
234
|
url: '/consumers/{consumer_id}/accounting/chart-of-accounts/balance',
|
|
238
235
|
body: filter,
|
|
239
236
|
};
|
|
240
237
|
},
|
|
241
|
-
getEmployees() {
|
|
238
|
+
getEmployees(params) {
|
|
242
239
|
return {
|
|
240
|
+
params,
|
|
243
241
|
method: 'get',
|
|
244
242
|
url: '/consumers/{consumer_id}/accounting/employees',
|
|
245
243
|
};
|
|
@@ -270,12 +268,20 @@ const accountingFactory = {
|
|
|
270
268
|
body: financial_entry,
|
|
271
269
|
};
|
|
272
270
|
},
|
|
273
|
-
|
|
271
|
+
createJournalEntryOld(journal_entry) {
|
|
274
272
|
return {
|
|
275
273
|
method: 'post',
|
|
276
274
|
url: '/consumers/{consumer_id}/accounting/journal/entries',
|
|
277
275
|
body: journal_entry,
|
|
278
276
|
};
|
|
279
277
|
},
|
|
278
|
+
createJournalEntry(journal_entry, params) {
|
|
279
|
+
return {
|
|
280
|
+
params,
|
|
281
|
+
method: 'post',
|
|
282
|
+
url: '/consumers/{consumer_id}/accounting/journal-entries',
|
|
283
|
+
body: journal_entry,
|
|
284
|
+
};
|
|
285
|
+
},
|
|
280
286
|
};
|
|
281
287
|
exports.accountingFactory = accountingFactory;
|