@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.
Files changed (114) hide show
  1. package/package.json +5 -2
  2. package/.eslintignore +0 -1
  3. package/.eslintrc.json +0 -25
  4. package/.github/workflows/ci.yml +0 -75
  5. package/.husky/pre-commit +0 -4
  6. package/.prettierignore +0 -1
  7. package/.prettierrc.json +0 -7
  8. package/CHANGELOG.md +0 -108
  9. package/dist/src/helpers/openapi.d.ts +0 -3
  10. package/dist/src/helpers/openapi.js +0 -18
  11. package/dist/src/helpers/settings.d.ts +0 -4
  12. package/dist/src/helpers/settings.js +0 -5
  13. package/dist/src/index.d.ts +0 -1
  14. package/dist/src/modules/accounting.d.ts +0 -68
  15. package/dist/src/modules/accounting.js +0 -326
  16. package/dist/src/modules/api.d.ts +0 -18351
  17. package/dist/src/modules/api.js +0 -36
  18. package/dist/src/modules/consumer.d.ts +0 -3622
  19. package/dist/src/modules/consumer.js +0 -142
  20. package/dist/src/modules/consumers.d.ts +0 -18237
  21. package/dist/src/modules/consumers.js +0 -51
  22. package/dist/src/modules/custom.d.ts +0 -8
  23. package/dist/src/modules/custom.js +0 -36
  24. package/dist/src/modules/datastores.d.ts +0 -18
  25. package/dist/src/modules/datastores.js +0 -23
  26. package/dist/src/modules/ecommerce.d.ts +0 -24
  27. package/dist/src/modules/ecommerce.js +0 -97
  28. package/dist/src/modules/flow.d.ts +0 -15
  29. package/dist/src/modules/flow.js +0 -156
  30. package/dist/src/modules/integrations.d.ts +0 -23
  31. package/dist/src/modules/integrations.js +0 -23
  32. package/dist/src/modules/internalApi.d.ts +0 -24
  33. package/dist/src/modules/internalApi.js +0 -175
  34. package/dist/src/modules/invoicing.d.ts +0 -20
  35. package/dist/src/modules/invoicing.js +0 -90
  36. package/dist/src/modules/payment.d.ts +0 -14
  37. package/dist/src/modules/payment.js +0 -41
  38. package/dist/src/modules/pms.d.ts +0 -15
  39. package/dist/src/modules/pms.js +0 -47
  40. package/dist/src/modules/pos.d.ts +0 -26
  41. package/dist/src/modules/pos.js +0 -101
  42. package/dist/src/modules/sync.d.ts +0 -14654
  43. package/dist/src/modules/sync.js +0 -73
  44. package/dist/src/modules/syncs.d.ts +0 -11
  45. package/dist/src/modules/syncs.js +0 -39
  46. package/dist/src/modules/webhooks.d.ts +0 -58
  47. package/dist/src/modules/webhooks.js +0 -53
  48. package/dist/src/types/api.d.ts +0 -29
  49. package/dist/src/types/api.js +0 -2
  50. package/dist/src/types/consumers.d.ts +0 -8
  51. package/dist/src/types/consumers.js +0 -2
  52. package/dist/src/types/public-api/mappings.d.ts +0 -21
  53. package/dist/src/types/public-api/mappings.js +0 -2
  54. package/dist/src/types/sync.d.ts +0 -37
  55. package/dist/src/types/sync.js +0 -2
  56. package/dist/test/modules/accounting.test.d.ts +0 -1
  57. package/dist/test/modules/accounting.test.js +0 -590
  58. package/dist/test/modules/consumer.test.d.ts +0 -1
  59. package/dist/test/modules/consumer.test.js +0 -89
  60. package/dist/test/modules/consumers.test.d.ts +0 -1
  61. package/dist/test/modules/consumers.test.js +0 -109
  62. package/dist/test/modules/ecommerce.test.d.ts +0 -1
  63. package/dist/test/modules/ecommerce.test.js +0 -224
  64. package/dist/test/modules/integrations.test.d.ts +0 -1
  65. package/dist/test/modules/integrations.test.js +0 -54
  66. package/dist/test/modules/invoicing.test.d.ts +0 -1
  67. package/dist/test/modules/invoicing.test.js +0 -115
  68. package/dist/test/modules/payment.test.d.ts +0 -1
  69. package/dist/test/modules/payment.test.js +0 -88
  70. package/dist/test/modules/pms.test.d.ts +0 -1
  71. package/dist/test/modules/pms.test.js +0 -90
  72. package/dist/test/modules/pos.test.d.ts +0 -1
  73. package/dist/test/modules/pos.test.js +0 -179
  74. package/dist/test/modules/sync.test.d.ts +0 -1
  75. package/dist/test/modules/sync.test.js +0 -93
  76. package/dist/test/modules/syncs.test.d.ts +0 -1
  77. package/dist/test/modules/syncs.test.js +0 -53
  78. package/dist/test/modules/webhooks.test.d.ts +0 -1
  79. package/dist/test/modules/webhooks.test.js +0 -120
  80. package/jest.config.ts +0 -195
  81. package/src/helpers/openapi.ts +0 -22
  82. package/src/helpers/settings.ts +0 -3
  83. package/src/index.ts +0 -1
  84. package/src/modules/accounting.ts +0 -510
  85. package/src/modules/api.ts +0 -35
  86. package/src/modules/consumer.ts +0 -216
  87. package/src/modules/consumers.ts +0 -82
  88. package/src/modules/custom.ts +0 -36
  89. package/src/modules/datastores.ts +0 -19
  90. package/src/modules/ecommerce.ts +0 -129
  91. package/src/modules/flow.ts +0 -168
  92. package/src/modules/integrations.ts +0 -24
  93. package/src/modules/internalApi.ts +0 -182
  94. package/src/modules/invoicing.ts +0 -118
  95. package/src/modules/payment.ts +0 -59
  96. package/src/modules/pms.ts +0 -67
  97. package/src/modules/pos.ts +0 -144
  98. package/src/modules/sync.ts +0 -77
  99. package/src/modules/syncs.ts +0 -59
  100. package/src/modules/webhooks.ts +0 -86
  101. package/test/data/accounting_invoice.pdf +0 -0
  102. package/test/modules/accounting.test.ts +0 -647
  103. package/test/modules/consumer.test.ts +0 -68
  104. package/test/modules/consumers.test.ts +0 -85
  105. package/test/modules/ecommerce.test.ts +0 -213
  106. package/test/modules/integrations.test.ts +0 -22
  107. package/test/modules/invoicing.test.ts +0 -98
  108. package/test/modules/payment.test.ts +0 -65
  109. package/test/modules/pms.test.ts +0 -69
  110. package/test/modules/pos.test.ts +0 -164
  111. package/test/modules/sync.test.ts +0 -74
  112. package/test/modules/syncs.test.ts +0 -23
  113. package/test/modules/webhooks.test.ts +0 -92
  114. 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;