@chift/chift-nodejs 1.0.9 → 1.0.11
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 +27 -24
- package/dist/src/modules/accounting.js +76 -31
- package/dist/src/modules/api.d.ts +2447 -28202
- package/dist/src/modules/consumer.d.ts +478 -98
- package/dist/src/modules/consumer.js +10 -0
- package/dist/src/modules/consumers.d.ts +2475 -555
- 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/integrations.d.ts +4 -2
- package/dist/src/modules/integrations.js +2 -2
- package/dist/src/modules/pos.d.ts +3 -1
- package/dist/src/modules/pos.js +7 -0
- package/dist/src/modules/sync.d.ts +1950 -414
- package/dist/src/modules/syncs.d.ts +8 -27677
- package/dist/src/modules/syncs.js +10 -0
- package/{src → dist/src}/types/public-api/schema.d.ts +1030 -1071
- package/dist/src/types/public-api/schema.js +6 -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 +1 -1
- package/src/types/public-api/schema.ts +11275 -0
- package/dist/test/modules/flow.test.d.ts +0 -1
- package/dist/test/modules/flow.test.js +0 -69
|
@@ -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;
|