@chift/chift-nodejs 1.0.17 → 1.0.18
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/package.json +5 -2
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -25
- package/.github/workflows/ci.yml +0 -75
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -1
- package/.prettierrc.json +0 -7
- package/CHANGELOG.md +0 -108
- package/dist/src/helpers/openapi.d.ts +0 -3
- package/dist/src/helpers/openapi.js +0 -18
- package/dist/src/helpers/settings.d.ts +0 -4
- package/dist/src/helpers/settings.js +0 -5
- package/dist/src/index.d.ts +0 -1
- package/dist/src/modules/accounting.d.ts +0 -68
- package/dist/src/modules/accounting.js +0 -326
- package/dist/src/modules/api.d.ts +0 -18351
- package/dist/src/modules/api.js +0 -36
- package/dist/src/modules/consumer.d.ts +0 -3622
- package/dist/src/modules/consumer.js +0 -142
- package/dist/src/modules/consumers.d.ts +0 -18237
- package/dist/src/modules/consumers.js +0 -51
- package/dist/src/modules/custom.d.ts +0 -8
- package/dist/src/modules/custom.js +0 -36
- package/dist/src/modules/datastores.d.ts +0 -18
- package/dist/src/modules/datastores.js +0 -23
- package/dist/src/modules/ecommerce.d.ts +0 -24
- package/dist/src/modules/ecommerce.js +0 -97
- package/dist/src/modules/flow.d.ts +0 -15
- package/dist/src/modules/flow.js +0 -156
- package/dist/src/modules/integrations.d.ts +0 -23
- package/dist/src/modules/integrations.js +0 -23
- package/dist/src/modules/internalApi.d.ts +0 -24
- package/dist/src/modules/internalApi.js +0 -175
- package/dist/src/modules/invoicing.d.ts +0 -20
- package/dist/src/modules/invoicing.js +0 -90
- package/dist/src/modules/payment.d.ts +0 -14
- package/dist/src/modules/payment.js +0 -41
- package/dist/src/modules/pms.d.ts +0 -15
- package/dist/src/modules/pms.js +0 -47
- package/dist/src/modules/pos.d.ts +0 -26
- package/dist/src/modules/pos.js +0 -101
- package/dist/src/modules/sync.d.ts +0 -14654
- package/dist/src/modules/sync.js +0 -73
- package/dist/src/modules/syncs.d.ts +0 -11
- package/dist/src/modules/syncs.js +0 -39
- package/dist/src/modules/webhooks.d.ts +0 -58
- package/dist/src/modules/webhooks.js +0 -53
- package/dist/src/types/api.d.ts +0 -29
- package/dist/src/types/api.js +0 -2
- package/dist/src/types/consumers.d.ts +0 -8
- package/dist/src/types/consumers.js +0 -2
- package/dist/src/types/public-api/mappings.d.ts +0 -21
- package/dist/src/types/public-api/mappings.js +0 -2
- package/dist/src/types/sync.d.ts +0 -37
- package/dist/src/types/sync.js +0 -2
- package/dist/test/modules/accounting.test.d.ts +0 -1
- package/dist/test/modules/accounting.test.js +0 -590
- package/dist/test/modules/consumer.test.d.ts +0 -1
- package/dist/test/modules/consumer.test.js +0 -89
- package/dist/test/modules/consumers.test.d.ts +0 -1
- package/dist/test/modules/consumers.test.js +0 -109
- package/dist/test/modules/ecommerce.test.d.ts +0 -1
- package/dist/test/modules/ecommerce.test.js +0 -224
- package/dist/test/modules/integrations.test.d.ts +0 -1
- package/dist/test/modules/integrations.test.js +0 -54
- package/dist/test/modules/invoicing.test.d.ts +0 -1
- package/dist/test/modules/invoicing.test.js +0 -115
- package/dist/test/modules/payment.test.d.ts +0 -1
- package/dist/test/modules/payment.test.js +0 -88
- package/dist/test/modules/pms.test.d.ts +0 -1
- package/dist/test/modules/pms.test.js +0 -90
- package/dist/test/modules/pos.test.d.ts +0 -1
- package/dist/test/modules/pos.test.js +0 -179
- package/dist/test/modules/sync.test.d.ts +0 -1
- package/dist/test/modules/sync.test.js +0 -93
- package/dist/test/modules/syncs.test.d.ts +0 -1
- package/dist/test/modules/syncs.test.js +0 -53
- package/dist/test/modules/webhooks.test.d.ts +0 -1
- package/dist/test/modules/webhooks.test.js +0 -120
- package/jest.config.ts +0 -195
- package/src/helpers/openapi.ts +0 -22
- package/src/helpers/settings.ts +0 -3
- package/src/index.ts +0 -1
- package/src/modules/accounting.ts +0 -510
- package/src/modules/api.ts +0 -35
- package/src/modules/consumer.ts +0 -216
- package/src/modules/consumers.ts +0 -82
- package/src/modules/custom.ts +0 -36
- package/src/modules/datastores.ts +0 -19
- package/src/modules/ecommerce.ts +0 -129
- package/src/modules/flow.ts +0 -168
- package/src/modules/integrations.ts +0 -24
- package/src/modules/internalApi.ts +0 -182
- package/src/modules/invoicing.ts +0 -118
- package/src/modules/payment.ts +0 -59
- package/src/modules/pms.ts +0 -67
- package/src/modules/pos.ts +0 -144
- package/src/modules/sync.ts +0 -77
- package/src/modules/syncs.ts +0 -59
- package/src/modules/webhooks.ts +0 -86
- package/test/data/accounting_invoice.pdf +0 -0
- package/test/modules/accounting.test.ts +0 -647
- package/test/modules/consumer.test.ts +0 -68
- package/test/modules/consumers.test.ts +0 -85
- package/test/modules/ecommerce.test.ts +0 -213
- package/test/modules/integrations.test.ts +0 -22
- package/test/modules/invoicing.test.ts +0 -98
- package/test/modules/payment.test.ts +0 -65
- package/test/modules/pms.test.ts +0 -69
- package/test/modules/pos.test.ts +0 -164
- package/test/modules/sync.test.ts +0 -74
- package/test/modules/syncs.test.ts +0 -23
- package/test/modules/webhooks.test.ts +0 -92
- package/tsconfig.json +0 -107
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.accountingFactory = void 0;
|
|
4
|
-
const accountingFactory = {
|
|
5
|
-
getAnalyticPlans(params) {
|
|
6
|
-
return {
|
|
7
|
-
params,
|
|
8
|
-
method: 'get',
|
|
9
|
-
url: '/consumers/{consumer_id}/accounting/analytic-plans',
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
getClients(params) {
|
|
13
|
-
return {
|
|
14
|
-
params,
|
|
15
|
-
method: 'get',
|
|
16
|
-
url: '/consumers/{consumer_id}/accounting/clients',
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
createClient(client, params) {
|
|
20
|
-
return {
|
|
21
|
-
params,
|
|
22
|
-
method: 'post',
|
|
23
|
-
url: '/consumers/{consumer_id}/accounting/clients',
|
|
24
|
-
body: client,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
getClient(clientId, params) {
|
|
28
|
-
return {
|
|
29
|
-
params,
|
|
30
|
-
method: 'get',
|
|
31
|
-
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
updateClient(clientId, client, params) {
|
|
35
|
-
return {
|
|
36
|
-
params,
|
|
37
|
-
method: 'patch',
|
|
38
|
-
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
39
|
-
body: client,
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
getSuppliers(params) {
|
|
43
|
-
return {
|
|
44
|
-
params,
|
|
45
|
-
method: 'get',
|
|
46
|
-
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
createSupplier(supplier, params) {
|
|
50
|
-
return {
|
|
51
|
-
params,
|
|
52
|
-
method: 'post',
|
|
53
|
-
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
54
|
-
body: supplier,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
getSupplier(supplierId, params) {
|
|
58
|
-
return {
|
|
59
|
-
params,
|
|
60
|
-
method: 'get',
|
|
61
|
-
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
62
|
-
};
|
|
63
|
-
},
|
|
64
|
-
updateSupplier(supplierId, supplier, params) {
|
|
65
|
-
return {
|
|
66
|
-
params,
|
|
67
|
-
method: 'patch',
|
|
68
|
-
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
69
|
-
body: supplier,
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
createInvoice(invoice, params) {
|
|
73
|
-
return {
|
|
74
|
-
params,
|
|
75
|
-
method: 'post',
|
|
76
|
-
url: '/consumers/{consumer_id}/accounting/invoices',
|
|
77
|
-
body: invoice,
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
createInvoiceWithMultiplePlans(invoice, params) {
|
|
81
|
-
return {
|
|
82
|
-
params,
|
|
83
|
-
method: 'post',
|
|
84
|
-
url: '/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans',
|
|
85
|
-
body: invoice,
|
|
86
|
-
};
|
|
87
|
-
},
|
|
88
|
-
getInvoicesByType(invoice_type, params) {
|
|
89
|
-
return {
|
|
90
|
-
params,
|
|
91
|
-
method: 'get',
|
|
92
|
-
url: `/consumers/{consumer_id}/accounting/invoices/type/${invoice_type}`,
|
|
93
|
-
};
|
|
94
|
-
},
|
|
95
|
-
getInvoice(invoiceId, params) {
|
|
96
|
-
return {
|
|
97
|
-
params,
|
|
98
|
-
method: 'get',
|
|
99
|
-
url: `/consumers/{consumer_id}/accounting/invoices/${invoiceId}`,
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
getInvoiceWithMultiplePlans(invoiceId, params) {
|
|
103
|
-
return {
|
|
104
|
-
params,
|
|
105
|
-
method: 'get',
|
|
106
|
-
url: `/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans/${invoiceId}`,
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
getInvoicesByTypeWithMultiplePlans(invoice_type, params) {
|
|
110
|
-
return {
|
|
111
|
-
params,
|
|
112
|
-
method: 'get',
|
|
113
|
-
url: `/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans/type/${invoice_type}`,
|
|
114
|
-
};
|
|
115
|
-
},
|
|
116
|
-
createAnalyticAccount(analyticAccount, params) {
|
|
117
|
-
return {
|
|
118
|
-
params,
|
|
119
|
-
method: 'post',
|
|
120
|
-
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
121
|
-
body: analyticAccount,
|
|
122
|
-
};
|
|
123
|
-
},
|
|
124
|
-
getAnalyticAccounts(params) {
|
|
125
|
-
return {
|
|
126
|
-
params,
|
|
127
|
-
method: 'get',
|
|
128
|
-
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
129
|
-
};
|
|
130
|
-
},
|
|
131
|
-
createAnalyticAccountWithMultiplePlans(analytic_plan, analyticAccount, params) {
|
|
132
|
-
return {
|
|
133
|
-
params,
|
|
134
|
-
method: 'post',
|
|
135
|
-
url: `/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans/${analytic_plan}`,
|
|
136
|
-
body: analyticAccount,
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
getAnalyticAccount(analytic_account_id, params) {
|
|
140
|
-
return {
|
|
141
|
-
params,
|
|
142
|
-
method: 'get',
|
|
143
|
-
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
updateAnalyticAccount(analytic_account_id, analyticAccount, params) {
|
|
147
|
-
return {
|
|
148
|
-
params,
|
|
149
|
-
method: 'patch',
|
|
150
|
-
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
151
|
-
body: analyticAccount,
|
|
152
|
-
};
|
|
153
|
-
},
|
|
154
|
-
getAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, params) {
|
|
155
|
-
return {
|
|
156
|
-
params,
|
|
157
|
-
method: 'get',
|
|
158
|
-
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}/multi-analytic-plans/${analytic_plan}`,
|
|
159
|
-
};
|
|
160
|
-
},
|
|
161
|
-
updateAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, analyticAccount, params) {
|
|
162
|
-
return {
|
|
163
|
-
params,
|
|
164
|
-
method: 'patch',
|
|
165
|
-
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}/multi-analytic-plans/${analytic_plan}`,
|
|
166
|
-
body: analyticAccount,
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
getAnalyticAccountsWithMultiplePlans(params) {
|
|
170
|
-
return {
|
|
171
|
-
params,
|
|
172
|
-
method: 'get',
|
|
173
|
-
url: '/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans',
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
|
-
getJournalEntries(params) {
|
|
177
|
-
return {
|
|
178
|
-
params,
|
|
179
|
-
method: 'get',
|
|
180
|
-
url: `/consumers/{consumer_id}/accounting/journal/entries`,
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
getJournalEntriesWithMultiplePlans(params) {
|
|
184
|
-
return {
|
|
185
|
-
params,
|
|
186
|
-
method: 'get',
|
|
187
|
-
url: `/consumers/{consumer_id}/accounting/journal/entries/multi-analytic-plans`,
|
|
188
|
-
};
|
|
189
|
-
},
|
|
190
|
-
getPaymentsByInvoiceId(invoice_id, params) {
|
|
191
|
-
return {
|
|
192
|
-
params,
|
|
193
|
-
method: 'get',
|
|
194
|
-
url: `/consumers/{consumer_id}/accounting/invoices/id/${invoice_id}/payments`,
|
|
195
|
-
};
|
|
196
|
-
},
|
|
197
|
-
getJournals(params) {
|
|
198
|
-
return {
|
|
199
|
-
params,
|
|
200
|
-
method: 'get',
|
|
201
|
-
url: `/consumers/{consumer_id}/accounting/journals`,
|
|
202
|
-
};
|
|
203
|
-
},
|
|
204
|
-
getVatCodes(params) {
|
|
205
|
-
return {
|
|
206
|
-
params,
|
|
207
|
-
method: 'get',
|
|
208
|
-
url: `/consumers/{consumer_id}/accounting/vat-codes`,
|
|
209
|
-
};
|
|
210
|
-
},
|
|
211
|
-
getMiscOperations(params) {
|
|
212
|
-
return {
|
|
213
|
-
params,
|
|
214
|
-
method: 'get',
|
|
215
|
-
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
216
|
-
};
|
|
217
|
-
},
|
|
218
|
-
createMiscOperation(operation, params) {
|
|
219
|
-
return {
|
|
220
|
-
params,
|
|
221
|
-
method: 'post',
|
|
222
|
-
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
223
|
-
body: operation,
|
|
224
|
-
};
|
|
225
|
-
},
|
|
226
|
-
getMiscOperation(operation_id, params) {
|
|
227
|
-
return {
|
|
228
|
-
params,
|
|
229
|
-
method: 'get',
|
|
230
|
-
url: `/consumers/{consumer_id}/accounting/miscellaneous-operation/${operation_id}`,
|
|
231
|
-
};
|
|
232
|
-
},
|
|
233
|
-
attachPDF(invoice_id, attachment, params) {
|
|
234
|
-
return {
|
|
235
|
-
params,
|
|
236
|
-
method: 'post',
|
|
237
|
-
url: `/consumers/{consumer_id}/accounting/invoices/pdf/${invoice_id}`,
|
|
238
|
-
body: attachment,
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
getAttachments(params) {
|
|
242
|
-
return {
|
|
243
|
-
params,
|
|
244
|
-
method: 'get',
|
|
245
|
-
url: `/consumers/{consumer_id}/accounting/attachments`,
|
|
246
|
-
};
|
|
247
|
-
},
|
|
248
|
-
getChartOfAccounts(params) {
|
|
249
|
-
return {
|
|
250
|
-
params,
|
|
251
|
-
method: 'get',
|
|
252
|
-
url: '/consumers/{consumer_id}/accounting/chart-of-accounts',
|
|
253
|
-
};
|
|
254
|
-
},
|
|
255
|
-
getBalanceOfAccounts(filter, params) {
|
|
256
|
-
return {
|
|
257
|
-
params,
|
|
258
|
-
method: 'post',
|
|
259
|
-
url: '/consumers/{consumer_id}/accounting/chart-of-accounts/balance',
|
|
260
|
-
body: filter,
|
|
261
|
-
};
|
|
262
|
-
},
|
|
263
|
-
getEmployees(params) {
|
|
264
|
-
return {
|
|
265
|
-
params,
|
|
266
|
-
method: 'get',
|
|
267
|
-
url: '/consumers/{consumer_id}/accounting/employees',
|
|
268
|
-
};
|
|
269
|
-
},
|
|
270
|
-
getOutstandings(params) {
|
|
271
|
-
return {
|
|
272
|
-
params,
|
|
273
|
-
method: 'get',
|
|
274
|
-
url: '/consumers/{consumer_id}/accounting/outstandings',
|
|
275
|
-
};
|
|
276
|
-
},
|
|
277
|
-
/**
|
|
278
|
-
* @deprecated replaced by createFinancialEntry
|
|
279
|
-
*/
|
|
280
|
-
createFinancialEntryOld(financial_entry, params) {
|
|
281
|
-
return {
|
|
282
|
-
params,
|
|
283
|
-
method: 'post',
|
|
284
|
-
url: '/consumers/{consumer_id}/accounting/financial-entry',
|
|
285
|
-
body: financial_entry,
|
|
286
|
-
};
|
|
287
|
-
},
|
|
288
|
-
createFinancialEntry(financial_entry, params) {
|
|
289
|
-
return {
|
|
290
|
-
params,
|
|
291
|
-
method: 'post',
|
|
292
|
-
url: '/consumers/{consumer_id}/accounting/financial-entries',
|
|
293
|
-
body: financial_entry,
|
|
294
|
-
};
|
|
295
|
-
},
|
|
296
|
-
createJournalEntryOld(journal_entry) {
|
|
297
|
-
return {
|
|
298
|
-
method: 'post',
|
|
299
|
-
url: '/consumers/{consumer_id}/accounting/journal/entries',
|
|
300
|
-
body: journal_entry,
|
|
301
|
-
};
|
|
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
|
-
},
|
|
325
|
-
};
|
|
326
|
-
exports.accountingFactory = accountingFactory;
|