@chift/chift-nodejs 1.0.6 → 1.0.8
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 +42 -0
- package/dist/src/modules/accounting.d.ts +27 -24
- package/dist/src/modules/accounting.js +76 -31
- package/dist/src/modules/api.d.ts +2119 -28031
- package/dist/src/modules/consumer.d.ts +413 -64
- package/dist/src/modules/consumer.js +10 -0
- package/dist/src/modules/consumers.d.ts +2130 -365
- 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 +1710 -298
- package/dist/src/modules/syncs.d.ts +8 -27677
- package/dist/src/modules/syncs.js +10 -0
- package/dist/test/modules/accounting.test.js +28 -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 +120 -35
- 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 +31 -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
|
+
name: Test
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v3
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
- name: Use Node.js 16.x
|
|
25
|
+
uses: actions/setup-node@v3
|
|
26
|
+
with:
|
|
27
|
+
node-version: 16.x
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: npm install
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
- name: Test
|
|
33
|
+
run: npm test --coverage && ./node_modules/coveralls/bin/coveralls.js < coverage/lcov.info
|
|
34
|
+
env:
|
|
35
|
+
CHIFT_BASE_URL: ${{ secrets.CHIFT_BASE_URL }}
|
|
36
|
+
CHIFT_CLIENT_ID: ${{ secrets.CHIFT_CLIENT_ID }}
|
|
37
|
+
CHIFT_CLIENT_SECRET: ${{ secrets.CHIFT_CLIENT_SECRET }}
|
|
38
|
+
CHIFT_ACCOUNT_ID: ${{ secrets.CHIFT_ACCOUNT_ID }}
|
|
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 }}
|
|
45
|
+
CHIFT_TEST_SYNC_ID: ${{ secrets.CHIFT_TEST_SYNC_ID }}
|
|
46
|
+
CHIFT_SYNC_CONSUMER_ID: ${{ secrets.CHIFT_SYNC_CONSUMER_ID }}
|
|
47
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
- name: Report Coveralls
|
|
50
|
+
uses: coverallsapp/github-action@v2
|
|
50
51
|
|
|
51
52
|
publish:
|
|
52
53
|
name: Publish
|
|
53
|
-
if:
|
|
54
|
+
if: 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,45 @@
|
|
|
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
|
|
52
|
+
|
|
53
|
+
## 1.0.8 - 2024-04-04
|
|
54
|
+
|
|
55
|
+
- [ACCOUNTING] Add params to getAnalyticPlans
|
|
56
|
+
- [ACCOUNTING] Add params to getClients
|
|
57
|
+
- [ACCOUNTING] Add params to getClient
|
|
58
|
+
- [ACCOUNTING] Add params to updateClient
|
|
59
|
+
- [ACCOUNTING] Add params to getSuppliers
|
|
60
|
+
- [ACCOUNTING] Add params to getSupplier
|
|
61
|
+
- [ACCOUNTING] Add params to updateSupplier
|
|
62
|
+
- [ACCOUNTING] Add params to createAnalyticAccount
|
|
63
|
+
- [ACCOUNTING] Add params to getAnalyticAccounts
|
|
64
|
+
- [ACCOUNTING] Add params to createAnalyticAccountWithMultiplePlans
|
|
65
|
+
- [ACCOUNTING] Add params to getAnalyticAccount
|
|
66
|
+
- [ACCOUNTING] Add params to updateAnalyticAccount
|
|
67
|
+
- [ACCOUNTING] Add params to getAnalyticAccountWithMultiplePlans
|
|
68
|
+
- [ACCOUNTING] Add params to getAnalyticAccountsWithMultiplePlans
|
|
69
|
+
- [ACCOUNTING] Add params to updateAnalyticAccountWithMultiplePlans
|
|
70
|
+
- [ACCOUNTING] Add params to getPaymentsByInvoiceId
|
|
71
|
+
- [ACCOUNTING] Add params to getJournals
|
|
72
|
+
- [ACCOUNTING] Add params to getVatCodes
|
|
73
|
+
- [ACCOUNTING] Add route getAttachments
|
|
74
|
+
- [ACCOUNTING] Add route matchEntries
|
|
75
|
+
- [ACCOUNTING] Add route getFolders
|
|
@@ -8,48 +8,51 @@ type getInvoicesByTypeWithMultiplePlansParams = Omit<operations['accounting_get_
|
|
|
8
8
|
type getInvoicesByTypeParams = Omit<operations['accounting_get_invoices_by_type']['parameters']['query'], 'page' | 'size'>;
|
|
9
9
|
type getOutstandingsParams = Omit<operations['accounting_get_outstandings']['parameters']['query'], 'page' | 'size'>;
|
|
10
10
|
declare const accountingFactory: {
|
|
11
|
-
getAnalyticPlans(): RequestData<components['schemas']['AnalyticPlanItem'][]>;
|
|
12
|
-
getClients(): RequestData<components['schemas']['ClientItemOut'][]>;
|
|
11
|
+
getAnalyticPlans(params: operations['accounting_get_analytic_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticPlanItem'][]>;
|
|
12
|
+
getClients(params: operations['accounting_get_clients']['parameters']['query']): RequestData<components['schemas']['ClientItemOut'][]>;
|
|
13
13
|
createClient(client: components['schemas']['ClientItemIn'], params: operations['accounting_create_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
14
|
-
getClient(clientId: string): RequestData<components['schemas']['ClientItemOut']>;
|
|
15
|
-
updateClient(clientId: string, client: components['schemas']['ClientItemUpdate']): RequestData<components['schemas']['ClientItemOut']>;
|
|
16
|
-
getSuppliers(): RequestData<components['schemas']['SupplierItemOut'][]>;
|
|
14
|
+
getClient(clientId: string, params: operations['accounting_get_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
15
|
+
updateClient(clientId: string, client: components['schemas']['ClientItemUpdate'], params: operations['accounting_update_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
16
|
+
getSuppliers(params: operations['accounting_get_suppliers']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut'][]>;
|
|
17
17
|
createSupplier(supplier: components['schemas']['SupplierItemIn'], params: operations['accounting_create_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
18
|
-
getSupplier(supplierId: string): RequestData<components['schemas']['SupplierItemOut']>;
|
|
19
|
-
updateSupplier(supplierId: string, supplier: components['schemas']['SupplierItemUpdate']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
18
|
+
getSupplier(supplierId: string, params: operations['accounting_get_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
19
|
+
updateSupplier(supplierId: string, supplier: components['schemas']['SupplierItemUpdate'], params: operations['accounting_update_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
20
20
|
createInvoice(invoice: components['schemas']['InvoiceItemInMonoAnalyticPlan'], params: operations['accounting_create_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
21
21
|
createInvoiceWithMultiplePlans(invoice: components['schemas']['InvoiceItemInMultiAnalyticPlans'], params: operations['accounting_create_invoice_multiple_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
22
22
|
getInvoicesByType(invoice_type: components['schemas']['app__routers__accounting__InvoiceType'], params: getInvoicesByTypeParams): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan'][]>;
|
|
23
23
|
getInvoice(invoiceId: string, params: operations['accounting_get_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
24
24
|
getInvoiceWithMultiplePlans(invoiceId: string, params: operations['accounting_get_invoice_multi_analytic_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
25
25
|
getInvoicesByTypeWithMultiplePlans(invoice_type: components['schemas']['app__routers__accounting__InvoiceType'], params: getInvoicesByTypeWithMultiplePlansParams): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans'][]>;
|
|
26
|
-
createAnalyticAccount(analyticAccount: components['schemas']['AnalyticAccountItemIn']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
27
|
-
getAnalyticAccounts(): RequestData<components['schemas']['AnalyticAccountItemOut'][]>;
|
|
28
|
-
createAnalyticAccountWithMultiplePlans(analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemIn']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
29
|
-
getAnalyticAccount(analytic_account_id: string): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
30
|
-
updateAnalyticAccount(analytic_account_id: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
31
|
-
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
32
|
-
updateAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
33
|
-
getAnalyticAccountsWithMultiplePlans(): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans'][]>;
|
|
34
|
-
getAnalyticLinesOfAccount(analytic_account_id: string): RequestData<components['schemas']['AnalyticAccountLineItemOut'][]>;
|
|
26
|
+
createAnalyticAccount(analyticAccount: components['schemas']['AnalyticAccountItemIn'], params: operations['accounting_create_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
27
|
+
getAnalyticAccounts(params: operations['accounting_get_analytic_accounts']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut'][]>;
|
|
28
|
+
createAnalyticAccountWithMultiplePlans(analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemIn'], params: operations['accounting_create_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
29
|
+
getAnalyticAccount(analytic_account_id: string, params: operations['accounting_get_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
30
|
+
updateAnalyticAccount(analytic_account_id: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate'], params: operations['accounting_update_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
31
|
+
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, params: operations['accounting_get_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
32
|
+
updateAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate'], params: operations['accounting_update_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
33
|
+
getAnalyticAccountsWithMultiplePlans(params: operations['accounting_get_analytic_accounts_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans'][]>;
|
|
35
34
|
getJournalEntries(params: getJournalEntriesParams): RequestData<components['schemas']['JournalEntryMonoAnalyticPlan'][]>;
|
|
36
35
|
getJournalEntriesWithMultiplePlans(params: getJournalEntriesWithMultiplePlansParams): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan'][]>;
|
|
37
|
-
getPaymentsByInvoiceId(invoice_id: string): RequestData<components['schemas']['Payment'][]>;
|
|
38
|
-
getJournals(): RequestData<components['schemas']['Journal'][]>;
|
|
39
|
-
getVatCodes(): RequestData<components['schemas']['app__routers__accounting__VatCode'][]>;
|
|
36
|
+
getPaymentsByInvoiceId(invoice_id: string, params: operations['accounting_get_payments_by_invoice']['parameters']['query']): RequestData<components['schemas']['Payment'][]>;
|
|
37
|
+
getJournals(params: operations['accounting_get_journals']['parameters']['query']): RequestData<components['schemas']['Journal'][]>;
|
|
38
|
+
getVatCodes(params: operations['accounting_get_vat_codes']['parameters']['query']): 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]>;
|
|
43
|
+
getAttachments(params: operations['accounting_get_attachments']['parameters']['query']): RequestData<components['schemas']['AttachmentItem'][]>;
|
|
44
44
|
getChartOfAccounts(params: getChartOfAccountsParams): RequestData<components['schemas']['AccountItem'][]>;
|
|
45
|
-
getBalanceOfAccounts(filter: components['schemas']['AccountBalanceFilter']): RequestData<components['schemas']['AccountBalance'][]>;
|
|
46
|
-
getEmployees(): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
45
|
+
getBalanceOfAccounts(filter: components['schemas']['AccountBalanceFilter'], params: operations['accounting_get_accounts_balances']['parameters']['query']): RequestData<components['schemas']['AccountBalance'][]>;
|
|
46
|
+
getEmployees(params: operations['accounting_get_employees']['parameters']['query']): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
47
47
|
getOutstandings(params: getOutstandingsParams): RequestData<components['schemas']['OutstandingItem'][]>;
|
|
48
48
|
/**
|
|
49
49
|
* @deprecated replaced by createFinancialEntry
|
|
50
50
|
*/
|
|
51
51
|
createFinancialEntryOld(financial_entry: components['schemas']['FinancialEntryItemInOld'], params: operations['accounting_create_financial_entry']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOutOld']>;
|
|
52
52
|
createFinancialEntry(financial_entry: components['schemas']['FinancialEntryItemIn'], params: operations['accounting_create_financial_entries']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOut'][]>;
|
|
53
|
-
|
|
53
|
+
createJournalEntryOld(journal_entry: components['schemas']['JournalEntryIn']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
54
|
+
createJournalEntry(journal_entry: components['schemas']['GenericJournalEntry'], params: operations['accounting_create_generic_journal_entry']['parameters']['query']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
55
|
+
matchEntries(body: components['schemas']['MatchingIn'], params: operations['accounting_match_entries']['parameters']['query']): RequestData<components['schemas']['MatchingOut']>;
|
|
56
|
+
getFolders(): RequestData<components['schemas']['FolderItem'][]>;
|
|
54
57
|
};
|
|
55
58
|
export { accountingFactory };
|
|
@@ -2,61 +2,68 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.accountingFactory = void 0;
|
|
4
4
|
const accountingFactory = {
|
|
5
|
-
getAnalyticPlans() {
|
|
5
|
+
getAnalyticPlans(params) {
|
|
6
6
|
return {
|
|
7
|
+
params,
|
|
7
8
|
method: 'get',
|
|
8
9
|
url: '/consumers/{consumer_id}/accounting/analytic-plans',
|
|
9
10
|
};
|
|
10
11
|
},
|
|
11
|
-
getClients() {
|
|
12
|
+
getClients(params) {
|
|
12
13
|
return {
|
|
14
|
+
params,
|
|
13
15
|
method: 'get',
|
|
14
16
|
url: '/consumers/{consumer_id}/accounting/clients',
|
|
15
17
|
};
|
|
16
18
|
},
|
|
17
19
|
createClient(client, params) {
|
|
18
20
|
return {
|
|
21
|
+
params,
|
|
19
22
|
method: 'post',
|
|
20
23
|
url: '/consumers/{consumer_id}/accounting/clients',
|
|
21
24
|
body: client,
|
|
22
|
-
params: params,
|
|
23
25
|
};
|
|
24
26
|
},
|
|
25
|
-
getClient(clientId) {
|
|
27
|
+
getClient(clientId, params) {
|
|
26
28
|
return {
|
|
29
|
+
params,
|
|
27
30
|
method: 'get',
|
|
28
31
|
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
29
32
|
};
|
|
30
33
|
},
|
|
31
|
-
updateClient(clientId, client) {
|
|
34
|
+
updateClient(clientId, client, params) {
|
|
32
35
|
return {
|
|
36
|
+
params,
|
|
33
37
|
method: 'patch',
|
|
34
38
|
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
35
39
|
body: client,
|
|
36
40
|
};
|
|
37
41
|
},
|
|
38
|
-
getSuppliers() {
|
|
42
|
+
getSuppliers(params) {
|
|
39
43
|
return {
|
|
44
|
+
params,
|
|
40
45
|
method: 'get',
|
|
41
46
|
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
42
47
|
};
|
|
43
48
|
},
|
|
44
49
|
createSupplier(supplier, params) {
|
|
45
50
|
return {
|
|
51
|
+
params,
|
|
46
52
|
method: 'post',
|
|
47
53
|
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
48
54
|
body: supplier,
|
|
49
|
-
params: params,
|
|
50
55
|
};
|
|
51
56
|
},
|
|
52
|
-
getSupplier(supplierId) {
|
|
57
|
+
getSupplier(supplierId, params) {
|
|
53
58
|
return {
|
|
59
|
+
params,
|
|
54
60
|
method: 'get',
|
|
55
61
|
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
56
62
|
};
|
|
57
63
|
},
|
|
58
|
-
updateSupplier(supplierId, supplier) {
|
|
64
|
+
updateSupplier(supplierId, supplier, params) {
|
|
59
65
|
return {
|
|
66
|
+
params,
|
|
60
67
|
method: 'patch',
|
|
61
68
|
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
62
69
|
body: supplier,
|
|
@@ -106,64 +113,66 @@ const accountingFactory = {
|
|
|
106
113
|
url: `/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans/type/${invoice_type}`,
|
|
107
114
|
};
|
|
108
115
|
},
|
|
109
|
-
createAnalyticAccount(analyticAccount) {
|
|
116
|
+
createAnalyticAccount(analyticAccount, params) {
|
|
110
117
|
return {
|
|
118
|
+
params,
|
|
111
119
|
method: 'post',
|
|
112
120
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
113
121
|
body: analyticAccount,
|
|
114
122
|
};
|
|
115
123
|
},
|
|
116
|
-
getAnalyticAccounts() {
|
|
124
|
+
getAnalyticAccounts(params) {
|
|
117
125
|
return {
|
|
126
|
+
params,
|
|
118
127
|
method: 'get',
|
|
119
128
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
120
129
|
};
|
|
121
130
|
},
|
|
122
|
-
createAnalyticAccountWithMultiplePlans(analytic_plan, analyticAccount) {
|
|
131
|
+
createAnalyticAccountWithMultiplePlans(analytic_plan, analyticAccount, params) {
|
|
123
132
|
return {
|
|
133
|
+
params,
|
|
124
134
|
method: 'post',
|
|
125
135
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans/${analytic_plan}`,
|
|
126
136
|
body: analyticAccount,
|
|
127
137
|
};
|
|
128
138
|
},
|
|
129
|
-
getAnalyticAccount(analytic_account_id) {
|
|
139
|
+
getAnalyticAccount(analytic_account_id, params) {
|
|
130
140
|
return {
|
|
141
|
+
params,
|
|
131
142
|
method: 'get',
|
|
132
143
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
133
144
|
};
|
|
134
145
|
},
|
|
135
|
-
updateAnalyticAccount(analytic_account_id, analyticAccount) {
|
|
146
|
+
updateAnalyticAccount(analytic_account_id, analyticAccount, params) {
|
|
136
147
|
return {
|
|
148
|
+
params,
|
|
137
149
|
method: 'patch',
|
|
138
150
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
139
151
|
body: analyticAccount,
|
|
140
152
|
};
|
|
141
153
|
},
|
|
142
|
-
getAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan) {
|
|
154
|
+
getAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, params) {
|
|
143
155
|
return {
|
|
156
|
+
params,
|
|
144
157
|
method: 'get',
|
|
145
158
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}/multi-analytic-plans/${analytic_plan}`,
|
|
146
159
|
};
|
|
147
160
|
},
|
|
148
|
-
updateAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, analyticAccount) {
|
|
161
|
+
updateAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, analyticAccount, params) {
|
|
149
162
|
return {
|
|
163
|
+
params,
|
|
150
164
|
method: 'patch',
|
|
151
165
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}/multi-analytic-plans/${analytic_plan}`,
|
|
152
166
|
body: analyticAccount,
|
|
153
167
|
};
|
|
154
168
|
},
|
|
155
|
-
getAnalyticAccountsWithMultiplePlans() {
|
|
169
|
+
getAnalyticAccountsWithMultiplePlans(params) {
|
|
156
170
|
return {
|
|
171
|
+
params,
|
|
157
172
|
method: 'get',
|
|
158
173
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans',
|
|
159
174
|
};
|
|
160
175
|
},
|
|
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
176
|
getJournalEntries(params) {
|
|
168
177
|
return {
|
|
169
178
|
params,
|
|
@@ -178,20 +187,23 @@ const accountingFactory = {
|
|
|
178
187
|
url: `/consumers/{consumer_id}/accounting/journal/entries/multi-analytic-plans`,
|
|
179
188
|
};
|
|
180
189
|
},
|
|
181
|
-
getPaymentsByInvoiceId(invoice_id) {
|
|
190
|
+
getPaymentsByInvoiceId(invoice_id, params) {
|
|
182
191
|
return {
|
|
192
|
+
params,
|
|
183
193
|
method: 'get',
|
|
184
194
|
url: `/consumers/{consumer_id}/accounting/invoices/id/${invoice_id}/payments`,
|
|
185
195
|
};
|
|
186
196
|
},
|
|
187
|
-
getJournals() {
|
|
197
|
+
getJournals(params) {
|
|
188
198
|
return {
|
|
199
|
+
params,
|
|
189
200
|
method: 'get',
|
|
190
201
|
url: `/consumers/{consumer_id}/accounting/journals`,
|
|
191
202
|
};
|
|
192
203
|
},
|
|
193
|
-
getVatCodes() {
|
|
204
|
+
getVatCodes(params) {
|
|
194
205
|
return {
|
|
206
|
+
params,
|
|
195
207
|
method: 'get',
|
|
196
208
|
url: `/consumers/{consumer_id}/accounting/vat-codes`,
|
|
197
209
|
};
|
|
@@ -203,15 +215,17 @@ const accountingFactory = {
|
|
|
203
215
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
204
216
|
};
|
|
205
217
|
},
|
|
206
|
-
createMiscOperation(operation) {
|
|
218
|
+
createMiscOperation(operation, params) {
|
|
207
219
|
return {
|
|
220
|
+
params,
|
|
208
221
|
method: 'post',
|
|
209
222
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
210
223
|
body: operation,
|
|
211
224
|
};
|
|
212
225
|
},
|
|
213
|
-
getMiscOperation(operation_id) {
|
|
226
|
+
getMiscOperation(operation_id, params) {
|
|
214
227
|
return {
|
|
228
|
+
params,
|
|
215
229
|
method: 'get',
|
|
216
230
|
url: `/consumers/{consumer_id}/accounting/miscellaneous-operation/${operation_id}`,
|
|
217
231
|
};
|
|
@@ -224,6 +238,13 @@ const accountingFactory = {
|
|
|
224
238
|
body: attachment,
|
|
225
239
|
};
|
|
226
240
|
},
|
|
241
|
+
getAttachments(params) {
|
|
242
|
+
return {
|
|
243
|
+
params,
|
|
244
|
+
method: 'get',
|
|
245
|
+
url: `/consumers/{consumer_id}/accounting/attachments`,
|
|
246
|
+
};
|
|
247
|
+
},
|
|
227
248
|
getChartOfAccounts(params) {
|
|
228
249
|
return {
|
|
229
250
|
params,
|
|
@@ -231,15 +252,17 @@ const accountingFactory = {
|
|
|
231
252
|
url: '/consumers/{consumer_id}/accounting/chart-of-accounts',
|
|
232
253
|
};
|
|
233
254
|
},
|
|
234
|
-
getBalanceOfAccounts(filter) {
|
|
255
|
+
getBalanceOfAccounts(filter, params) {
|
|
235
256
|
return {
|
|
257
|
+
params,
|
|
236
258
|
method: 'post',
|
|
237
259
|
url: '/consumers/{consumer_id}/accounting/chart-of-accounts/balance',
|
|
238
260
|
body: filter,
|
|
239
261
|
};
|
|
240
262
|
},
|
|
241
|
-
getEmployees() {
|
|
263
|
+
getEmployees(params) {
|
|
242
264
|
return {
|
|
265
|
+
params,
|
|
243
266
|
method: 'get',
|
|
244
267
|
url: '/consumers/{consumer_id}/accounting/employees',
|
|
245
268
|
};
|
|
@@ -270,12 +293,34 @@ const accountingFactory = {
|
|
|
270
293
|
body: financial_entry,
|
|
271
294
|
};
|
|
272
295
|
},
|
|
273
|
-
|
|
296
|
+
createJournalEntryOld(journal_entry) {
|
|
274
297
|
return {
|
|
275
298
|
method: 'post',
|
|
276
299
|
url: '/consumers/{consumer_id}/accounting/journal/entries',
|
|
277
300
|
body: journal_entry,
|
|
278
301
|
};
|
|
279
302
|
},
|
|
303
|
+
createJournalEntry(journal_entry, params) {
|
|
304
|
+
return {
|
|
305
|
+
params,
|
|
306
|
+
method: 'post',
|
|
307
|
+
url: '/consumers/{consumer_id}/accounting/journal-entries',
|
|
308
|
+
body: journal_entry,
|
|
309
|
+
};
|
|
310
|
+
},
|
|
311
|
+
matchEntries(body, params) {
|
|
312
|
+
return {
|
|
313
|
+
params,
|
|
314
|
+
body,
|
|
315
|
+
method: 'post',
|
|
316
|
+
url: '/consumers/{consumer_id}/accounting/matching',
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
getFolders() {
|
|
320
|
+
return {
|
|
321
|
+
method: 'get',
|
|
322
|
+
url: '/consumers/{consumer_id}/accounting/folders',
|
|
323
|
+
};
|
|
324
|
+
},
|
|
280
325
|
};
|
|
281
326
|
exports.accountingFactory = accountingFactory;
|