@nomalism-com/api 1.0.38 → 1.1.2

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 (117) hide show
  1. package/dist/index.d.ts +1929 -2
  2. package/dist/index.js +4243 -0
  3. package/package.json +30 -34
  4. package/dist/index.min.js +0 -1
  5. package/dist/main.d.ts +0 -349
  6. package/dist/modules/document/billOfLading.d.ts +0 -9
  7. package/dist/modules/document/inventario.d.ts +0 -10
  8. package/dist/modules/document/materialEntrance.d.ts +0 -38
  9. package/dist/modules/document/order.d.ts +0 -66
  10. package/dist/modules/document/productionOrder.d.ts +0 -9
  11. package/dist/modules/document/proforma.d.ts +0 -9
  12. package/dist/modules/document/propostaFornecedor.d.ts +0 -9
  13. package/dist/modules/document/propostaSheets.d.ts +0 -27
  14. package/dist/modules/document/providerCreditNoteFromReturn.d.ts +0 -10
  15. package/dist/modules/document/providerFinancialCreditNote.d.ts +0 -10
  16. package/dist/modules/document/providerServiceInvoice.d.ts +0 -9
  17. package/dist/modules/document/purchase.d.ts +0 -17
  18. package/dist/modules/document/quebra.d.ts +0 -16
  19. package/dist/modules/document/returnToProvider.d.ts +0 -16
  20. package/dist/modules/document/transformado.d.ts +0 -11
  21. package/dist/modules/document/upfrontReturn.d.ts +0 -10
  22. package/dist/modules/documentManagement/multimedia.d.ts +0 -12
  23. package/dist/modules/integration/emailLog.d.ts +0 -18
  24. package/dist/modules/integration/emailTemplate.d.ts +0 -18
  25. package/dist/modules/integration/emailTemplateAttachment.d.ts +0 -12
  26. package/dist/modules/integration/emailVerification.d.ts +0 -11
  27. package/dist/modules/integration/googleFilePermission.d.ts +0 -14
  28. package/dist/modules/integration/googleSheets.d.ts +0 -21
  29. package/dist/modules/integration/observation.d.ts +0 -19
  30. package/dist/modules/integration/observationType.d.ts +0 -18
  31. package/dist/modules/integration/projectInfo.d.ts +0 -10
  32. package/dist/modules/integration/settings.d.ts +0 -17
  33. package/dist/modules/print/npc.d.ts +0 -12
  34. package/dist/modules/print/printer.d.ts +0 -14
  35. package/dist/modules/print/schedulePrintJob.d.ts +0 -13
  36. package/dist/modules/stock/chat.d.ts +0 -15
  37. package/dist/modules/stock/chatRapidMessage.d.ts +0 -13
  38. package/dist/modules/stock/dashboard.d.ts +0 -9
  39. package/dist/modules/stock/file.d.ts +0 -15
  40. package/dist/modules/stock/location.d.ts +0 -25
  41. package/dist/modules/stock/prison.d.ts +0 -22
  42. package/dist/modules/stock/productGoogleSheets.d.ts +0 -32
  43. package/dist/modules/stock/productImage.d.ts +0 -26
  44. package/dist/modules/stock/promotion.d.ts +0 -27
  45. package/dist/modules/stock/promotionAssoc.d.ts +0 -24
  46. package/dist/modules/stock/queryList.d.ts +0 -23
  47. package/dist/modules/stock/queryParameter.d.ts +0 -20
  48. package/dist/modules/stock/recurrentTasks.d.ts +0 -10
  49. package/dist/modules/stock/returnReason.d.ts +0 -15
  50. package/dist/modules/stock/savedEmPicking.d.ts +0 -12
  51. package/dist/modules/stock/savedProviderProposal.d.ts +0 -15
  52. package/dist/modules/stock/schedule.d.ts +0 -20
  53. package/dist/modules/stock/sideMenu.d.ts +0 -17
  54. package/dist/modules/stock/stockMovement.d.ts +0 -25
  55. package/dist/modules/stock/task.d.ts +0 -14
  56. package/dist/modules/stock/taskMessage.d.ts +0 -11
  57. package/dist/modules/stock/taskRead.d.ts +0 -10
  58. package/dist/modules/stock/typeOfLocation.d.ts +0 -26
  59. package/dist/modules/stock/unitOfMeasure.d.ts +0 -26
  60. package/dist/modules/stock/vatTax.d.ts +0 -26
  61. package/dist/modules/stock/vatTaxZone.d.ts +0 -27
  62. package/dist/modules/supply/documentHeader.d.ts +0 -59
  63. package/dist/modules/supply/documentLine.d.ts +0 -29
  64. package/dist/modules/supply/documentLineAssoc.d.ts +0 -20
  65. package/dist/modules/supply/documentLineMt.d.ts +0 -10
  66. package/dist/modules/supply/documentLineNote.d.ts +0 -14
  67. package/dist/modules/supply/documentLineRm.d.ts +0 -10
  68. package/dist/modules/supply/documentSet.d.ts +0 -19
  69. package/dist/modules/supply/documentType.d.ts +0 -26
  70. package/dist/modules/supply/externalDocumentHeader.d.ts +0 -30
  71. package/dist/modules/supply/externalDocumentType.d.ts +0 -13
  72. package/dist/modules/supply/orderManagement.d.ts +0 -13
  73. package/dist/modules/supply/payment.d.ts +0 -48
  74. package/dist/modules/supply/preSale.d.ts +0 -27
  75. package/dist/modules/supply/preSaleProduct.d.ts +0 -11
  76. package/dist/modules/supply/startDocumentHeaderLastUpdate.d.ts +0 -10
  77. package/dist/modules/supply/vatValidation.d.ts +0 -10
  78. package/dist/modules/supply/workflow.d.ts +0 -21
  79. package/dist/modules/tickets/channel.d.ts +0 -19
  80. package/dist/modules/tickets/clt.d.ts +0 -18
  81. package/dist/modules/tickets/language.d.ts +0 -18
  82. package/dist/modules/tickets/tickets.d.ts +0 -19
  83. package/dist/modules/user/bankData.d.ts +0 -24
  84. package/dist/modules/user/chatSubscriber.d.ts +0 -15
  85. package/dist/modules/user/clientType.d.ts +0 -24
  86. package/dist/modules/user/clients.d.ts +0 -32
  87. package/dist/modules/user/commissioner.d.ts +0 -28
  88. package/dist/modules/user/country.d.ts +0 -25
  89. package/dist/modules/user/deliveryMethods.d.ts +0 -19
  90. package/dist/modules/user/favorites.d.ts +0 -16
  91. package/dist/modules/user/groupPermission.d.ts +0 -16
  92. package/dist/modules/user/language.d.ts +0 -24
  93. package/dist/modules/user/logout.d.ts +0 -8
  94. package/dist/modules/user/maturityDates.d.ts +0 -19
  95. package/dist/modules/user/password.d.ts +0 -12
  96. package/dist/modules/user/paymentMethods.d.ts +0 -19
  97. package/dist/modules/user/permission.d.ts +0 -16
  98. package/dist/modules/user/persona.d.ts +0 -26
  99. package/dist/modules/user/provider.d.ts +0 -31
  100. package/dist/modules/user/providerType.d.ts +0 -24
  101. package/dist/modules/user/purchaseCondition.d.ts +0 -22
  102. package/dist/modules/user/reasonForExemption.d.ts +0 -24
  103. package/dist/modules/user/refreshToken.d.ts +0 -11
  104. package/dist/modules/user/segmentsArea.d.ts +0 -24
  105. package/dist/modules/user/sessions.d.ts +0 -11
  106. package/dist/modules/user/shippings.d.ts +0 -23
  107. package/dist/modules/user/storeOperator.d.ts +0 -31
  108. package/dist/modules/user/swift.d.ts +0 -24
  109. package/dist/modules/user/tenant.d.ts +0 -15
  110. package/dist/modules/user/theme.d.ts +0 -11
  111. package/dist/modules/user/user.d.ts +0 -31
  112. package/dist/modules/user/userPermission.d.ts +0 -15
  113. package/dist/modules/user/userPositions.d.ts +0 -24
  114. package/dist/modules/user/vehicles.d.ts +0 -15
  115. package/dist/modules/user/zipCode.d.ts +0 -13
  116. package/dist/modules/view/adminPanel.d.ts +0 -9
  117. package/dist/modules/view/errorLog.d.ts +0 -9
package/dist/index.js ADDED
@@ -0,0 +1,4243 @@
1
+ import axios, { AxiosHeaders } from 'axios';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (target, all) => {
5
+ for (var name in all)
6
+ __defProp(target, name, { get: all[name], enumerable: true });
7
+ };
8
+
9
+ // src/main.ts
10
+ var main_exports = {};
11
+ __export(main_exports, {
12
+ API: () => API,
13
+ AdminPanelClass: () => adminPanel_exports,
14
+ BankData: () => bankData_exports,
15
+ Channel: () => channel_exports,
16
+ ChatRapidMessageClass: () => chatRapidMessage_exports,
17
+ ChatSubscriberClass: () => chatSubscriber_exports,
18
+ Client: () => clients_exports,
19
+ ClientType: () => clientType_exports,
20
+ Clt: () => clt_exports,
21
+ Commissioner: () => commissioner_exports,
22
+ Country: () => country_exports,
23
+ DashboardClass: () => dashboard_exports,
24
+ DeliveryMethods: () => deliveryMethods_exports,
25
+ DocumentHeader: () => documentHeader_exports,
26
+ DocumentLine: () => documentLine_exports,
27
+ DocumentLineAssoc: () => documentLineAssoc_exports,
28
+ DocumentLineMtClass: () => documentLineMt_exports,
29
+ DocumentLineNote: () => documentLineNote_exports,
30
+ DocumentLineRmClass: () => documentLineRm_exports,
31
+ DocumentSet: () => documentSet_exports,
32
+ DocumentType: () => documentType_exports,
33
+ EmailLog: () => emailLog_exports,
34
+ EmailTemplate: () => emailTemplate_exports,
35
+ EmailTemplateAttachment: () => emailTemplateAttachment_exports,
36
+ EmailVerification: () => emailVerification_exports,
37
+ ErrorLogClass: () => errorLog_exports,
38
+ ExternalDocumentHeader: () => externalDocumentHeader_exports,
39
+ ExternalDocumentType: () => externalDocumentType_exports,
40
+ Favorites: () => favorites_exports,
41
+ File: () => file_exports,
42
+ GoogleFilePermission: () => googleFilePermission_exports,
43
+ GoogleSheets: () => googleSheets_exports,
44
+ GroupPermissions: () => groupPermission_exports,
45
+ Inventario: () => inventario_exports,
46
+ Language: () => language_exports,
47
+ Location: () => location_exports,
48
+ Logout: () => logout_exports,
49
+ MaterialEntrance: () => materialEntrance_exports,
50
+ MaturityDates: () => maturityDates_exports,
51
+ Multimedia: () => multimedia_exports,
52
+ Npc: () => npc_exports,
53
+ Observation: () => observation_exports,
54
+ ObservationType: () => observationType_exports,
55
+ Order: () => order_exports,
56
+ OrderManagement: () => orderManagement_exports,
57
+ Password: () => password_exports,
58
+ Payment: () => payment_exports,
59
+ PaymentMethods: () => paymentMethods_exports,
60
+ Permissions: () => permission_exports,
61
+ Persona: () => persona_exports,
62
+ PreSale: () => preSale_exports,
63
+ PreSaleProduct: () => preSaleProduct_exports,
64
+ Printer: () => printer_exports,
65
+ Prison: () => prison_exports,
66
+ ProductGoogleSheets: () => productGoogleSheets_exports,
67
+ ProductImage: () => productImage_exports,
68
+ ProjectInfo: () => projectInfo_exports,
69
+ Promotion: () => promotion_exports,
70
+ PromotionAssoc: () => promotionAssoc_exports,
71
+ PropostaSheets: () => propostaSheets_exports,
72
+ ProviderType: () => providerType_exports,
73
+ Providers: () => provider_exports,
74
+ Purchase: () => purchase_exports,
75
+ PurchaseConditions: () => purchaseCondition_exports,
76
+ Quebra: () => quebra_exports,
77
+ QueryList: () => queryList_exports,
78
+ QueryParameter: () => queryParameter_exports,
79
+ ReasonForExemption: () => reasonForExemption_exports,
80
+ RecurrentTasks: () => recurrentTasks_exports,
81
+ RefreshToken: () => refreshToken_exports,
82
+ ReturnReason: () => returnReason_exports,
83
+ ReturnToProvider: () => returnToProvider_exports,
84
+ SavedEmPicking: () => savedEmPicking_exports,
85
+ SavedProviderProposal: () => savedProviderProposal_exports,
86
+ Schedule: () => schedule_exports,
87
+ SchedulePrintJob: () => schedulePrintJob_exports,
88
+ SegmentsArea: () => segmentsArea_exports,
89
+ Sessions: () => sessions_exports,
90
+ Settings: () => settings_exports,
91
+ Shippings: () => shippings_exports,
92
+ SideMenuClass: () => sideMenu_exports,
93
+ StartDocumentHeaderLastUpdate: () => startDocumentHeaderLastUpdate_exports,
94
+ StockMovement: () => stockMovement_exports,
95
+ StoreOperator: () => storeOperator_exports,
96
+ Swift: () => swift_exports,
97
+ Task: () => task_exports,
98
+ TaskMessage: () => taskMessage_exports,
99
+ TaskReadClass: () => taskRead_exports,
100
+ Tenant: () => tenant_exports,
101
+ ThemeClass: () => theme_exports,
102
+ Tickets: () => tickets_exports,
103
+ TicketsLanguage: () => language_exports2,
104
+ Transformado: () => transformado_exports,
105
+ TypeOfLocation: () => typeOfLocation_exports,
106
+ UnitOfMeasure: () => unitOfMeasure_exports,
107
+ UpfrontReturn: () => upfrontReturn_exports,
108
+ UserPermissions: () => userPermission_exports,
109
+ UserPositions: () => userPositions_exports,
110
+ Users: () => user_exports,
111
+ VatTax: () => vatTax_exports,
112
+ VatTaxZone: () => vatTaxZone_exports,
113
+ VatValidation: () => vatValidation_exports,
114
+ Vehicles: () => vehicles_exports,
115
+ Workflow: () => workflow_exports,
116
+ ZipCode: () => zipCode_exports
117
+ });
118
+
119
+ // src/modules/user/bankData.ts
120
+ var bankData_exports = {};
121
+ __export(bankData_exports, {
122
+ default: () => Repository
123
+ });
124
+ var Repository = class {
125
+ constructor({ api, route, publicRoute }) {
126
+ this.api = api;
127
+ this.route = route;
128
+ this.publicRoute = publicRoute;
129
+ }
130
+ async find(params) {
131
+ const response = await this.api.get(`${this.route}`, { params });
132
+ return response.data;
133
+ }
134
+ async findPaginated(params) {
135
+ const response = await this.api.get(`${this.route}paginated`, { params });
136
+ return response.data;
137
+ }
138
+ async findByOwnerId(params) {
139
+ const response = await this.api.get(`${this.route}by_owner`, {
140
+ params
141
+ });
142
+ return response.data;
143
+ }
144
+ async findById(selector) {
145
+ const response = await this.api.get(`${this.route}${selector.id}`);
146
+ return response.data;
147
+ }
148
+ async create(body) {
149
+ const response = await this.api.post(`${this.route}`, body);
150
+ return response.data;
151
+ }
152
+ async update(selector, body) {
153
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
154
+ return response.data;
155
+ }
156
+ async deleteOne(selector) {
157
+ const response = await this.api.delete(`${this.route}${selector.id}`);
158
+ return response.data;
159
+ }
160
+ };
161
+
162
+ // src/modules/user/clients.ts
163
+ var clients_exports = {};
164
+ __export(clients_exports, {
165
+ default: () => Repository2
166
+ });
167
+ var Repository2 = class {
168
+ constructor({ api, route, publicRoute }) {
169
+ this.api = api;
170
+ this.route = route;
171
+ this.publicRoute = publicRoute;
172
+ }
173
+ async findByQuery(data) {
174
+ const response = await this.api.post(`${this.route}query`, data);
175
+ return response.data;
176
+ }
177
+ async find(params) {
178
+ const response = await this.api.get(`${this.route}`, { params });
179
+ return response.data;
180
+ }
181
+ async findPaginated(params) {
182
+ const response = await this.api.get(`${this.route}paginated`, { params });
183
+ return response.data;
184
+ }
185
+ async findMinified(params) {
186
+ const response = await this.api.get(`${this.route}minified`, {
187
+ params
188
+ });
189
+ return response.data;
190
+ }
191
+ async findByOwnerId(params) {
192
+ const response = await this.api.get(`${this.route}by_owner`, {
193
+ params
194
+ });
195
+ return response.data;
196
+ }
197
+ async findById(selector) {
198
+ const response = await this.api.get(`${this.route}${selector.id}`);
199
+ return response.data;
200
+ }
201
+ async create(body) {
202
+ const response = await this.api.post(`${this.route}`, body);
203
+ return response.data;
204
+ }
205
+ async createOrUpdate(body) {
206
+ const response = await this.api.post(`${this.route}create_or_update`, body);
207
+ return response.data;
208
+ }
209
+ async update(selector, body) {
210
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
211
+ return response.data;
212
+ }
213
+ async deleteOne(selector) {
214
+ const response = await this.api.delete(`${this.route}${selector.id}`);
215
+ return response.data;
216
+ }
217
+ };
218
+
219
+ // src/modules/user/clientType.ts
220
+ var clientType_exports = {};
221
+ __export(clientType_exports, {
222
+ default: () => Repository3
223
+ });
224
+ var Repository3 = class {
225
+ constructor({ api, route, publicRoute }) {
226
+ this.api = api;
227
+ this.route = route;
228
+ this.publicRoute = publicRoute;
229
+ }
230
+ async find(params) {
231
+ const response = await this.api.get(`${this.route}`, { params });
232
+ return response.data;
233
+ }
234
+ async findPaginated(params) {
235
+ const response = await this.api.get(`${this.route}paginated`, { params });
236
+ return response.data;
237
+ }
238
+ async findMinified(params) {
239
+ const response = await this.api.get(`${this.route}minified`, {
240
+ params
241
+ });
242
+ return response.data;
243
+ }
244
+ async findById(selector) {
245
+ const response = await this.api.get(`${this.route}${selector.id}`);
246
+ return response.data;
247
+ }
248
+ async create(body) {
249
+ const response = await this.api.post(`${this.route}`, body);
250
+ return response.data;
251
+ }
252
+ async update(selector, body) {
253
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
254
+ return response.data;
255
+ }
256
+ async deleteOne(selector) {
257
+ const response = await this.api.delete(`${this.route}${selector.id}`);
258
+ return response.data;
259
+ }
260
+ };
261
+
262
+ // src/modules/stock/chat.ts
263
+ var Repository4 = class {
264
+ constructor({ api, route, publicRoute }) {
265
+ this.api = api;
266
+ this.route = route;
267
+ this.publicRoute = publicRoute;
268
+ }
269
+ async findActiveByOwnerId(params) {
270
+ const response = await this.api.get(`${this.route}active`, {
271
+ params
272
+ });
273
+ return response.data;
274
+ }
275
+ async create(body) {
276
+ const response = await this.api.post(`${this.route}`, body);
277
+ return response.data;
278
+ }
279
+ async update(selector, body) {
280
+ await this.api.put(`${this.route}${selector.id}`, body);
281
+ }
282
+ async deleteOne(selector) {
283
+ await this.api.delete(`${this.route}${selector.id}`);
284
+ }
285
+ async resendLast({ owner_id }) {
286
+ await this.api.post(`${this.route}resend_last/${owner_id}`);
287
+ }
288
+ async markAllAsRead(selector) {
289
+ await this.api.put(`${this.route}mark_all_as_read/${selector.owner_id}`);
290
+ }
291
+ async markAllAsUnread(selector) {
292
+ await this.api.put(`${this.route}mark_all_as_unread/${selector.owner_id}`);
293
+ }
294
+ };
295
+
296
+ // src/modules/user/commissioner.ts
297
+ var commissioner_exports = {};
298
+ __export(commissioner_exports, {
299
+ default: () => Repository5
300
+ });
301
+ var Repository5 = class {
302
+ constructor({ api, route, publicRoute }) {
303
+ this.api = api;
304
+ this.route = route;
305
+ this.publicRoute = publicRoute;
306
+ }
307
+ async find(params) {
308
+ const response = await this.api.get(`${this.route}`, { params });
309
+ return response.data;
310
+ }
311
+ async findPaginated(params) {
312
+ const response = await this.api.get(`${this.route}paginated`, { params });
313
+ return response.data;
314
+ }
315
+ async findMinified(params) {
316
+ const response = await this.api.get(`${this.route}minified`, {
317
+ params
318
+ });
319
+ return response.data;
320
+ }
321
+ async findByOwnerId(params) {
322
+ const response = await this.api.get(`${this.route}by_owner`, {
323
+ params
324
+ });
325
+ return response.data;
326
+ }
327
+ async findById(selector) {
328
+ const response = await this.api.get(`${this.route}${selector.id}`);
329
+ return response.data;
330
+ }
331
+ async create(body) {
332
+ const response = await this.api.post(`${this.route}`, body);
333
+ return response.data;
334
+ }
335
+ async update(selector, body) {
336
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
337
+ return response.data;
338
+ }
339
+ async deleteOne(selector) {
340
+ const response = await this.api.delete(`${this.route}${selector.id}`);
341
+ return response.data;
342
+ }
343
+ };
344
+
345
+ // src/modules/user/country.ts
346
+ var country_exports = {};
347
+ __export(country_exports, {
348
+ default: () => Repository6
349
+ });
350
+ var Repository6 = class {
351
+ constructor({ api, route, publicRoute }) {
352
+ this.api = api;
353
+ this.route = route;
354
+ this.publicRoute = publicRoute;
355
+ }
356
+ async find(params) {
357
+ const response = await this.api.get(`${this.route}`, { params });
358
+ return response.data;
359
+ }
360
+ async findPaginated(params) {
361
+ const response = await this.api.get(`${this.route}paginated`, { params });
362
+ return response.data;
363
+ }
364
+ async findMinified(params) {
365
+ const response = await this.api.get(`${this.route}minified`, {
366
+ params
367
+ });
368
+ return response.data;
369
+ }
370
+ async findByAlpha2(params) {
371
+ const response = await this.api.get(`${this.route}alpha2`, {
372
+ params
373
+ });
374
+ return response.data;
375
+ }
376
+ async findById(selector) {
377
+ const response = await this.api.get(`${this.route}${selector.id}`);
378
+ return response.data;
379
+ }
380
+ async create(body) {
381
+ const response = await this.api.post(`${this.route}`, body);
382
+ return response.data;
383
+ }
384
+ async update(selector, body) {
385
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
386
+ return response.data;
387
+ }
388
+ async deleteOne(selector) {
389
+ const response = await this.api.delete(`${this.route}${selector.id}`);
390
+ return response.data;
391
+ }
392
+ };
393
+
394
+ // src/modules/supply/documentHeader.ts
395
+ var documentHeader_exports = {};
396
+ __export(documentHeader_exports, {
397
+ default: () => Repository7
398
+ });
399
+ var Repository7 = class {
400
+ constructor({ api, route, publicRoute }) {
401
+ this.api = api;
402
+ this.route = route;
403
+ this.publicRoute = publicRoute;
404
+ }
405
+ async findOne(selector) {
406
+ const response = await this.api.get(`${this.route}${selector.id}`);
407
+ return response.data;
408
+ }
409
+ async findStart(selector) {
410
+ const response = await this.api.get(`${this.route}start/${selector.id}`);
411
+ return response.data;
412
+ }
413
+ async findStartVirtual(selector) {
414
+ const response = await this.api.get(`${this.route}start_virtual/${selector.id}`);
415
+ return response.data;
416
+ }
417
+ async findByBasicSearch(params) {
418
+ const response = await this.api.get(`${this.route}basic_search`, {
419
+ params
420
+ });
421
+ return response.data;
422
+ }
423
+ async findByType(params) {
424
+ const response = await this.api.get(`${this.route}by_type`, { params });
425
+ return response.data;
426
+ }
427
+ async find(params) {
428
+ const response = await this.api.get(`${this.route}`, { params });
429
+ return response.data;
430
+ }
431
+ async findClientUnpaidCredit(params) {
432
+ const response = await this.api.get(`${this.route}unpaid_credit`, {
433
+ params
434
+ });
435
+ return response.data;
436
+ }
437
+ async findClientUnpaidDebit(params) {
438
+ const response = await this.api.get(`${this.route}unpaid_debit`, {
439
+ params
440
+ });
441
+ return response.data;
442
+ }
443
+ async findUnpaidCommissions(params) {
444
+ const response = await this.api.get(`${this.route}unpaid_commissions`, {
445
+ params
446
+ });
447
+ return response.data;
448
+ }
449
+ async create(body) {
450
+ const response = await this.api.post(`${this.route}`, body);
451
+ return response.data;
452
+ }
453
+ async createFromHeader(body) {
454
+ const response = await this.api.post(`${this.route}from_header`, body);
455
+ return response.data;
456
+ }
457
+ async update(selector, body) {
458
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
459
+ return response.data;
460
+ }
461
+ async deleteOne(selector) {
462
+ await this.api.delete(`${this.route}${selector.id}`);
463
+ }
464
+ async getActions(selector) {
465
+ const response = await this.api.get(`${this.route}get_actions/${selector.id}`);
466
+ return response.data;
467
+ }
468
+ async transferClientOwnership(data) {
469
+ await this.api.put(`${this.route}transfer_client_ownership`, data);
470
+ }
471
+ async updateManyWithPersona(data) {
472
+ await this.api.put(`${this.route}update_many_with_persona`, data);
473
+ }
474
+ async sendClientNotification({ id }, data) {
475
+ await this.api.post(`${this.route}${id}/send_client_notification`, data);
476
+ }
477
+ async markUnsentClientNotification({ id }) {
478
+ await this.api.post(`${this.route}${id}/mark_unsent_client_notification`);
479
+ }
480
+ async documentPdf({ id }) {
481
+ const result = await this.api.post(`${this.route}document_pdf/${id}`);
482
+ return result.data;
483
+ }
484
+ getDocumentPdfUrl({ id }, data) {
485
+ const qs = new URLSearchParams();
486
+ if (data?.token) {
487
+ qs.set("token", data.token);
488
+ }
489
+ return `${this.route}document_pdf/${id}?${qs.toString()}`;
490
+ }
491
+ async documentThermalPrint({ id }) {
492
+ const result = await this.api.get(`${this.route}document_thermal_print/${id}`);
493
+ return result.data;
494
+ }
495
+ async documentList({
496
+ id
497
+ }) {
498
+ const result = await this.api.post(`${this.route}document_list/${id}`);
499
+ return result.data;
500
+ }
501
+ async getAllRelatedDocumentHeaderIds({
502
+ id
503
+ }) {
504
+ const result = await this.api.get(`${this.route}related/${id}`);
505
+ return result.data;
506
+ }
507
+ async findStartDocumentHeaderSiblings({
508
+ id
509
+ }) {
510
+ const result = await this.api.get(`${this.route}siblings/${id}`);
511
+ return result.data;
512
+ }
513
+ async findRmOpenDocuments() {
514
+ const response = await this.api.get(`${this.route}rm_open_documents`);
515
+ return response.data;
516
+ }
517
+ async regularizarMultiplosDocumentos(data) {
518
+ await this.api.post(`${this.route}multiple_documents`, {
519
+ data
520
+ });
521
+ }
522
+ };
523
+
524
+ // src/modules/document/billOfLading.ts
525
+ var Repository8 = class {
526
+ constructor({ api, route, publicRoute }) {
527
+ this.api = api;
528
+ this.route = route;
529
+ this.publicRoute = publicRoute;
530
+ }
531
+ async create(body) {
532
+ const response = await this.api.post(`${this.route}bill_of_lading`, body);
533
+ return response.data;
534
+ }
535
+ };
536
+
537
+ // src/modules/document/productionOrder.ts
538
+ var Repository9 = class {
539
+ constructor({ api, route, publicRoute }) {
540
+ this.api = api;
541
+ this.route = route;
542
+ this.publicRoute = publicRoute;
543
+ }
544
+ async createProductionOrder(body) {
545
+ await this.api.post(`${this.route}production_order`, body);
546
+ }
547
+ };
548
+
549
+ // src/modules/document/proforma.ts
550
+ var Repository10 = class {
551
+ constructor({ api, route, publicRoute }) {
552
+ this.api = api;
553
+ this.route = route;
554
+ this.publicRoute = publicRoute;
555
+ }
556
+ async create(data) {
557
+ const result = await this.api.post(`${this.route}pro_forma`, data);
558
+ return result.data;
559
+ }
560
+ };
561
+
562
+ // src/modules/document/propostaFornecedor.ts
563
+ var Repository11 = class {
564
+ constructor({ api, route, publicRoute }) {
565
+ this.api = api;
566
+ this.route = route;
567
+ this.publicRoute = publicRoute;
568
+ }
569
+ async createProviderProposal(data) {
570
+ const result = await this.api.post(`${this.route}provider_proposal`, data);
571
+ return result.data;
572
+ }
573
+ };
574
+
575
+ // src/modules/document/providerCreditNoteFromReturn.ts
576
+ var Repository12 = class {
577
+ constructor({ api, route, publicRoute }) {
578
+ this.api = api;
579
+ this.route = route;
580
+ this.publicRoute = publicRoute;
581
+ }
582
+ async findProviderReturn(params) {
583
+ const response = await this.api.get(`${this.route}provider_return`, {
584
+ params
585
+ });
586
+ return response.data;
587
+ }
588
+ async createProviderCreditNoteFromReturn(data) {
589
+ await this.api.post(`${this.route}provider_credit_note_from_return`, data);
590
+ }
591
+ };
592
+
593
+ // src/modules/document/providerFinancialCreditNote.ts
594
+ var Repository13 = class {
595
+ constructor({ api, route, publicRoute }) {
596
+ this.api = api;
597
+ this.route = route;
598
+ this.publicRoute = publicRoute;
599
+ }
600
+ async findProviderInvoice(params) {
601
+ const response = await this.api.get(`${this.route}provider_invoice`, {
602
+ params
603
+ });
604
+ return response.data;
605
+ }
606
+ async createProviderFinancialCreditNote(data) {
607
+ await this.api.post(`${this.route}provider_financial_credit_note`, data);
608
+ }
609
+ };
610
+
611
+ // src/modules/document/providerServiceInvoice.ts
612
+ var Repository14 = class {
613
+ constructor({ api, route, publicRoute }) {
614
+ this.api = api;
615
+ this.route = route;
616
+ this.publicRoute = publicRoute;
617
+ }
618
+ async createProviderServiceInvoice(data) {
619
+ await this.api.post(`${this.route}provider_service_invoice`, data);
620
+ }
621
+ };
622
+
623
+ // src/modules/supply/documentLine.ts
624
+ var documentLine_exports = {};
625
+ __export(documentLine_exports, {
626
+ default: () => Repository15
627
+ });
628
+ var Repository15 = class {
629
+ constructor({ api, route, publicRoute }) {
630
+ this.api = api;
631
+ this.route = route;
632
+ this.publicRoute = publicRoute;
633
+ }
634
+ async create(body) {
635
+ const response = await this.api.post(`${this.route}`, body);
636
+ return response.data;
637
+ }
638
+ async update(selector, body) {
639
+ await this.api.put(`${this.route}${selector.id}`, body);
640
+ }
641
+ async updateIndexes(document_line_ids) {
642
+ await this.api.put(`${this.route}update_indexes`, document_line_ids);
643
+ }
644
+ async updateData(data) {
645
+ const response = await this.api.post(`${this.route}update_data`, data);
646
+ return response.data;
647
+ }
648
+ async updateMany(data) {
649
+ const response = await this.api.post(`${this.route}update_many`, data);
650
+ return response.data;
651
+ }
652
+ async updateManyByDocumentHeader(params, data) {
653
+ await this.api.post(`${this.route}update_many_by_document_header_id`, data, { params });
654
+ }
655
+ async deleteMany(document_line_ids) {
656
+ await this.api.delete(`${this.route}`, { data: document_line_ids });
657
+ }
658
+ printLabelToPdfUrl({ document_line_ids }, token) {
659
+ const qs = new URLSearchParams();
660
+ qs.set("token", token);
661
+ return `${this.route}print_label_pdf/${document_line_ids}?${qs.toString()}`;
662
+ }
663
+ printGroupLabelToPdfUrl({ document_line_ids }, token) {
664
+ const qs = new URLSearchParams();
665
+ qs.set("token", token);
666
+ return `${this.route}print_group_label_pdf/${document_line_ids}?${qs.toString()}`;
667
+ }
668
+ };
669
+
670
+ // src/modules/supply/documentLineAssoc.ts
671
+ var documentLineAssoc_exports = {};
672
+ __export(documentLineAssoc_exports, {
673
+ default: () => Repository16
674
+ });
675
+ var Repository16 = class {
676
+ constructor({ api, route, publicRoute }) {
677
+ this.api = api;
678
+ this.route = route;
679
+ this.publicRoute = publicRoute;
680
+ }
681
+ async findByOwnerId(params) {
682
+ const response = await this.api.get(`${this.route}by_owner`, { params });
683
+ return response.data;
684
+ }
685
+ async findVirtualsByOwnerId(params) {
686
+ const response = await this.api.get(`${this.route}virtuals_by_owner`, {
687
+ params
688
+ });
689
+ return response.data;
690
+ }
691
+ async findHistoryByLineId(params) {
692
+ const response = await this.api.get(`${this.route}history_by_line_id`, {
693
+ params
694
+ });
695
+ return response.data;
696
+ }
697
+ async create(body) {
698
+ const response = await this.api.post(`${this.route}`, body);
699
+ return response.data;
700
+ }
701
+ async update(selector, body) {
702
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
703
+ return response.data;
704
+ }
705
+ };
706
+
707
+ // src/modules/supply/documentType.ts
708
+ var documentType_exports = {};
709
+ __export(documentType_exports, {
710
+ default: () => Repository17
711
+ });
712
+ var Repository17 = class {
713
+ constructor({ api, route, publicRoute }) {
714
+ this.api = api;
715
+ this.route = route;
716
+ this.publicRoute = publicRoute;
717
+ }
718
+ async find(params) {
719
+ const response = await this.api.get(`${this.route}`, { params });
720
+ return response.data;
721
+ }
722
+ async findMinified(params) {
723
+ const response = await this.api.get(`${this.route}minified`, { params });
724
+ return response.data;
725
+ }
726
+ async findDetailed(params) {
727
+ const response = await this.api.get(`${this.route}detailed`, { params });
728
+ return response.data;
729
+ }
730
+ async create(body) {
731
+ const response = await this.api.post(`${this.route}`, body);
732
+ return response.data;
733
+ }
734
+ async update(selector, body) {
735
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
736
+ return response.data;
737
+ }
738
+ async deleteOne(selector) {
739
+ const response = await this.api.delete(`${this.route}${selector.id}`);
740
+ return response.data;
741
+ }
742
+ };
743
+
744
+ // src/modules/user/favorites.ts
745
+ var favorites_exports = {};
746
+ __export(favorites_exports, {
747
+ default: () => Repository18
748
+ });
749
+ var Repository18 = class {
750
+ constructor({ api, route, publicRoute }) {
751
+ this.api = api;
752
+ this.route = route;
753
+ this.publicRoute = publicRoute;
754
+ }
755
+ async findByUrl(params) {
756
+ const response = await this.api.get(`${this.route}`, { params });
757
+ return response.data;
758
+ }
759
+ async list() {
760
+ const response = await this.api.get(`${this.route}list`);
761
+ return response.data;
762
+ }
763
+ async create(body) {
764
+ const response = await this.api.post(`${this.route}`, body);
765
+ return response.data;
766
+ }
767
+ async deleteOne(params) {
768
+ const response = await this.api.delete(`${this.route}`, { params });
769
+ return response.data;
770
+ }
771
+ };
772
+
773
+ // src/modules/stock/file.ts
774
+ var file_exports = {};
775
+ __export(file_exports, {
776
+ default: () => Repository19
777
+ });
778
+ var Repository19 = class {
779
+ constructor({ api, route, publicRoute }) {
780
+ this.api = api;
781
+ this.route = route;
782
+ this.publicRoute = publicRoute;
783
+ }
784
+ async findByOwnerId(params) {
785
+ const response = await this.api.get(`${this.route}by_owner`, {
786
+ params
787
+ });
788
+ return response.data;
789
+ }
790
+ async create(body) {
791
+ const response = await this.api.post(`${this.publicRoute}`, body);
792
+ return response.data;
793
+ }
794
+ async update({ id }, body) {
795
+ await this.api.put(`${this.publicRoute}${id}`, body);
796
+ }
797
+ async deleteOne(selector) {
798
+ const response = await this.api.delete(`${this.route}${selector.id}`);
799
+ return response.data;
800
+ }
801
+ };
802
+
803
+ // src/modules/integration/googleSheets.ts
804
+ var googleSheets_exports = {};
805
+ __export(googleSheets_exports, {
806
+ default: () => Repository20
807
+ });
808
+ var Repository20 = class {
809
+ constructor({ api, route, publicRoute }) {
810
+ this.api = api;
811
+ this.route = route;
812
+ this.publicRoute = publicRoute;
813
+ }
814
+ async clone(selector, params) {
815
+ const response = await this.api.get(`${this.route}clone/${selector.id}`, {
816
+ params
817
+ });
818
+ return response.data;
819
+ }
820
+ async export(params) {
821
+ const response = await this.api.get(`${this.route}export`, { params });
822
+ return response.data;
823
+ }
824
+ async getData(selector) {
825
+ const response = await this.api.get(`${this.route}${selector.id}`);
826
+ return response.data;
827
+ }
828
+ async update(selector, data) {
829
+ await this.api.put(`${this.route}${selector.id}`, data);
830
+ }
831
+ };
832
+
833
+ // src/modules/user/groupPermission.ts
834
+ var groupPermission_exports = {};
835
+ __export(groupPermission_exports, {
836
+ default: () => Repository21
837
+ });
838
+ var Repository21 = class {
839
+ constructor({ api, route, publicRoute }) {
840
+ this.api = api;
841
+ this.route = route;
842
+ this.publicRoute = publicRoute;
843
+ }
844
+ async find() {
845
+ const response = await this.api.get(`${this.route}`);
846
+ return response.data;
847
+ }
848
+ async findMinified(params) {
849
+ const response = await this.api.get(`${this.route}minified`, {
850
+ params
851
+ });
852
+ return response.data;
853
+ }
854
+ async create(body) {
855
+ const response = await this.api.post(`${this.route}`, body);
856
+ return response.data;
857
+ }
858
+ async deleteOne(selector) {
859
+ const response = await this.api.delete(`${this.route}${selector.id}`);
860
+ return response.data;
861
+ }
862
+ };
863
+
864
+ // src/modules/user/language.ts
865
+ var language_exports = {};
866
+ __export(language_exports, {
867
+ default: () => Repository22
868
+ });
869
+ var Repository22 = class {
870
+ constructor({ api, route, publicRoute }) {
871
+ this.api = api;
872
+ this.route = route;
873
+ this.publicRoute = publicRoute;
874
+ }
875
+ async find(params) {
876
+ const response = await this.api.get(`${this.route}`, { params });
877
+ return response.data;
878
+ }
879
+ async findPaginated(params) {
880
+ const response = await this.api.get(`${this.route}paginated`, { params });
881
+ return response.data;
882
+ }
883
+ async findMinified(params) {
884
+ const response = await this.api.get(`${this.route}minified`, {
885
+ params
886
+ });
887
+ return response.data;
888
+ }
889
+ async findById(selector) {
890
+ const response = await this.api.get(`${this.route}${selector.id}`);
891
+ return response.data;
892
+ }
893
+ async create(body) {
894
+ const response = await this.api.post(`${this.route}`, body);
895
+ return response.data;
896
+ }
897
+ async update(selector, body) {
898
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
899
+ return response.data;
900
+ }
901
+ async deleteOne(selector) {
902
+ const response = await this.api.delete(`${this.route}${selector.id}`);
903
+ return response.data;
904
+ }
905
+ };
906
+
907
+ // src/modules/stock/location.ts
908
+ var location_exports = {};
909
+ __export(location_exports, {
910
+ default: () => Repository23
911
+ });
912
+ var Repository23 = class {
913
+ constructor({ api, route, publicRoute }) {
914
+ this.api = api;
915
+ this.route = route;
916
+ this.publicRoute = publicRoute;
917
+ }
918
+ async find(params) {
919
+ const response = await this.api.get(`${this.route}`, { params });
920
+ return response.data;
921
+ }
922
+ async findPaginated(params) {
923
+ const response = await this.api.get(`${this.route}paginated`, { params });
924
+ return response.data;
925
+ }
926
+ async findMinified(params) {
927
+ const response = await this.api.get(`${this.route}minified`, {
928
+ params
929
+ });
930
+ return response.data;
931
+ }
932
+ async findByOwnerId(params) {
933
+ const response = await this.api.get(`${this.route}by_owner`, {
934
+ params
935
+ });
936
+ return response.data;
937
+ }
938
+ async findById(selector) {
939
+ const response = await this.api.get(`${this.route}${selector.id}`);
940
+ return response.data;
941
+ }
942
+ async create(body) {
943
+ const response = await this.api.post(`${this.route}`, body);
944
+ return response.data;
945
+ }
946
+ async update(selector, body) {
947
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
948
+ return response.data;
949
+ }
950
+ async deleteOne(selector) {
951
+ const response = await this.api.delete(`${this.route}${selector.id}`);
952
+ return response.data;
953
+ }
954
+ };
955
+
956
+ // src/modules/user/logout.ts
957
+ var logout_exports = {};
958
+ __export(logout_exports, {
959
+ default: () => Repository24
960
+ });
961
+ var Repository24 = class {
962
+ constructor({ api, route, publicRoute }) {
963
+ this.api = api;
964
+ this.route = route;
965
+ this.publicRoute = publicRoute;
966
+ }
967
+ async logout() {
968
+ await this.api.post(`${this.route}`);
969
+ }
970
+ };
971
+
972
+ // src/modules/documentManagement/multimedia.ts
973
+ var multimedia_exports = {};
974
+ __export(multimedia_exports, {
975
+ default: () => Repository25
976
+ });
977
+ var Repository25 = class {
978
+ constructor({ api, route, publicRoute }) {
979
+ this.api = api;
980
+ this.route = route;
981
+ this.publicRoute = publicRoute;
982
+ }
983
+ getUrl(multimediaId, download = false) {
984
+ const qs = new URLSearchParams();
985
+ if (download) qs.set("download", download.toString());
986
+ return `${this.publicRoute}${multimediaId}?${qs.toString()}`;
987
+ }
988
+ async create(multipartFormData, headers) {
989
+ const response = await this.api.post(`${this.publicRoute}upload`, multipartFormData, {
990
+ headers: {
991
+ ...headers || {},
992
+ "content-type": "multipart/form-data"
993
+ },
994
+ maxBodyLength: Infinity,
995
+ maxContentLength: Infinity
996
+ });
997
+ return response.data;
998
+ }
999
+ };
1000
+
1001
+ // src/modules/integration/observation.ts
1002
+ var observation_exports = {};
1003
+ __export(observation_exports, {
1004
+ default: () => Repository26
1005
+ });
1006
+ var Repository26 = class {
1007
+ constructor({ api, route, publicRoute }) {
1008
+ this.api = api;
1009
+ this.route = route;
1010
+ this.publicRoute = publicRoute;
1011
+ }
1012
+ async findByOwnerId(params) {
1013
+ const response = await this.api.get(`${this.route}`, {
1014
+ params
1015
+ });
1016
+ return response.data;
1017
+ }
1018
+ async findByOwnerIds(body) {
1019
+ const response = await this.api.post(`${this.route}by_owners`, body);
1020
+ return response.data;
1021
+ }
1022
+ async create(body) {
1023
+ const response = await this.api.post(`${this.route}`, body);
1024
+ return response.data;
1025
+ }
1026
+ async update(selector, body) {
1027
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1028
+ return response.data;
1029
+ }
1030
+ async deleteOne(selector) {
1031
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1032
+ return response.data;
1033
+ }
1034
+ };
1035
+
1036
+ // src/modules/integration/observationType.ts
1037
+ var observationType_exports = {};
1038
+ __export(observationType_exports, {
1039
+ default: () => Repository27
1040
+ });
1041
+ var Repository27 = class {
1042
+ constructor({ api, route, publicRoute }) {
1043
+ this.api = api;
1044
+ this.route = route;
1045
+ this.publicRoute = publicRoute;
1046
+ }
1047
+ async find() {
1048
+ const response = await this.api.get(`${this.route}`);
1049
+ return response.data;
1050
+ }
1051
+ async findMinified(params) {
1052
+ const response = await this.api.get(`${this.route}minified`, {
1053
+ params
1054
+ });
1055
+ return response.data;
1056
+ }
1057
+ async create(body) {
1058
+ const response = await this.api.post(`${this.route}`, body);
1059
+ return response.data;
1060
+ }
1061
+ async update(selector, body) {
1062
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1063
+ return response.data;
1064
+ }
1065
+ async deleteOne(selector) {
1066
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1067
+ return response.data;
1068
+ }
1069
+ };
1070
+
1071
+ // src/modules/user/password.ts
1072
+ var password_exports = {};
1073
+ __export(password_exports, {
1074
+ default: () => Repository28
1075
+ });
1076
+ var Repository28 = class {
1077
+ constructor({ api, route, publicRoute }) {
1078
+ this.api = api;
1079
+ this.route = route;
1080
+ this.publicRoute = publicRoute;
1081
+ }
1082
+ async forgotPassword(body) {
1083
+ await this.api.post(`${this.publicRoute}forgot`, body);
1084
+ }
1085
+ async resetPassword(body) {
1086
+ await this.api.post(`${this.publicRoute}reset`, body);
1087
+ }
1088
+ };
1089
+
1090
+ // src/modules/user/permission.ts
1091
+ var permission_exports = {};
1092
+ __export(permission_exports, {
1093
+ default: () => Repository29
1094
+ });
1095
+ var Repository29 = class {
1096
+ constructor({ api, route, publicRoute }) {
1097
+ this.api = api;
1098
+ this.route = route;
1099
+ this.publicRoute = publicRoute;
1100
+ }
1101
+ async find() {
1102
+ const response = await this.api.get(`${this.route}`);
1103
+ return response.data;
1104
+ }
1105
+ async findMinified(params) {
1106
+ const response = await this.api.get(`${this.route}minified`, {
1107
+ params
1108
+ });
1109
+ return response.data;
1110
+ }
1111
+ async create(body) {
1112
+ const response = await this.api.post(`${this.route}`, body);
1113
+ return response.data;
1114
+ }
1115
+ async deleteOne(selector) {
1116
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1117
+ return response.data;
1118
+ }
1119
+ };
1120
+
1121
+ // src/modules/stock/productImage.ts
1122
+ var productImage_exports = {};
1123
+ __export(productImage_exports, {
1124
+ default: () => Repository30
1125
+ });
1126
+ var Repository30 = class {
1127
+ constructor({ api, route, publicRoute }) {
1128
+ this.api = api;
1129
+ this.route = route;
1130
+ this.publicRoute = publicRoute;
1131
+ }
1132
+ async find(params) {
1133
+ const response = await this.api.get(`${this.route}`, { params });
1134
+ return response.data;
1135
+ }
1136
+ async findPaginated(params) {
1137
+ const response = await this.api.get(`${this.route}paginated`, { params });
1138
+ return response.data;
1139
+ }
1140
+ async findByOwnerId(params) {
1141
+ const response = await this.api.get(`${this.route}by_owner`, {
1142
+ params
1143
+ });
1144
+ return response.data;
1145
+ }
1146
+ async findById(selector) {
1147
+ const response = await this.api.get(`${this.route}${selector.id}`);
1148
+ return response.data;
1149
+ }
1150
+ async create(body) {
1151
+ const response = await this.api.post(`${this.route}`, body);
1152
+ return response.data;
1153
+ }
1154
+ async update(selector, body) {
1155
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1156
+ return response.data;
1157
+ }
1158
+ async deleteOne(selector) {
1159
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1160
+ return response.data;
1161
+ }
1162
+ };
1163
+
1164
+ // src/modules/stock/promotion.ts
1165
+ var promotion_exports = {};
1166
+ __export(promotion_exports, {
1167
+ default: () => Repository31
1168
+ });
1169
+ var Repository31 = class {
1170
+ constructor({ api, route, publicRoute }) {
1171
+ this.api = api;
1172
+ this.route = route;
1173
+ this.publicRoute = publicRoute;
1174
+ }
1175
+ async find(params) {
1176
+ const response = await this.api.get(`${this.route}`, { params });
1177
+ return response.data;
1178
+ }
1179
+ async findPaginated(params) {
1180
+ const response = await this.api.get(`${this.route}paginated`, { params });
1181
+ return response.data;
1182
+ }
1183
+ async findMinified(params) {
1184
+ const response = await this.api.get(`${this.route}minified`, {
1185
+ params
1186
+ });
1187
+ return response.data;
1188
+ }
1189
+ async findByOwnerId(params) {
1190
+ const response = await this.api.get(`${this.route}by_owner`, {
1191
+ params
1192
+ });
1193
+ return response.data;
1194
+ }
1195
+ async findById(selector) {
1196
+ const response = await this.api.get(`${this.route}${selector.id}`);
1197
+ return response.data;
1198
+ }
1199
+ async create(body) {
1200
+ const response = await this.api.post(`${this.route}`, body);
1201
+ return response.data;
1202
+ }
1203
+ async update(selector, body) {
1204
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1205
+ return response.data;
1206
+ }
1207
+ async deleteOne(selector) {
1208
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1209
+ return response.data;
1210
+ }
1211
+ getBestDiscount(promotions, discount, location_id, client_id, product_no_discount) {
1212
+ const highestPromoDiscount = promotions.filter((promotion) => {
1213
+ const locationEligible = promotion.exclusive_to_location_id ? promotion.exclusive_to_location_id === location_id : true;
1214
+ const clientEligible = promotion.exclusive_to_client_id ? promotion.exclusive_to_client_id === client_id : true;
1215
+ return locationEligible && clientEligible;
1216
+ }).reduce(
1217
+ (highest, promotion) => promotion.discount > highest ? promotion.discount : highest,
1218
+ 0
1219
+ );
1220
+ const clientDiscount = product_no_discount ? 0 : discount || 0;
1221
+ return highestPromoDiscount > clientDiscount ? highestPromoDiscount : clientDiscount;
1222
+ }
1223
+ };
1224
+
1225
+ // src/modules/stock/promotionAssoc.ts
1226
+ var promotionAssoc_exports = {};
1227
+ __export(promotionAssoc_exports, {
1228
+ default: () => Repository32
1229
+ });
1230
+ var Repository32 = class {
1231
+ constructor({ api, route, publicRoute }) {
1232
+ this.api = api;
1233
+ this.route = route;
1234
+ this.publicRoute = publicRoute;
1235
+ }
1236
+ async find(params) {
1237
+ const response = await this.api.get(`${this.route}`, { params });
1238
+ return response.data;
1239
+ }
1240
+ async findPaginated(params) {
1241
+ const response = await this.api.get(`${this.route}paginated`, { params });
1242
+ return response.data;
1243
+ }
1244
+ async findByOwnerId(params) {
1245
+ const response = await this.api.get(`${this.route}by_owner`, {
1246
+ params
1247
+ });
1248
+ return response.data;
1249
+ }
1250
+ async findById(selector) {
1251
+ const response = await this.api.get(`${this.route}${selector.id}`);
1252
+ return response.data;
1253
+ }
1254
+ async create(body) {
1255
+ const response = await this.api.post(`${this.route}`, body);
1256
+ return response.data;
1257
+ }
1258
+ async update(selector, body) {
1259
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1260
+ return response.data;
1261
+ }
1262
+ async deleteOne(selector) {
1263
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1264
+ return response.data;
1265
+ }
1266
+ };
1267
+
1268
+ // src/modules/user/provider.ts
1269
+ var provider_exports = {};
1270
+ __export(provider_exports, {
1271
+ default: () => Repository33
1272
+ });
1273
+ var Repository33 = class {
1274
+ constructor({ api, route, publicRoute }) {
1275
+ this.api = api;
1276
+ this.route = route;
1277
+ this.publicRoute = publicRoute;
1278
+ }
1279
+ async findByQuery(data) {
1280
+ const response = await this.api.post(`${this.route}query`, data);
1281
+ return response.data;
1282
+ }
1283
+ async find(params) {
1284
+ const response = await this.api.get(`${this.route}`, { params });
1285
+ return response.data;
1286
+ }
1287
+ async findPaginated(params) {
1288
+ const response = await this.api.get(`${this.route}paginated`, { params });
1289
+ return response.data;
1290
+ }
1291
+ async findMinified(params) {
1292
+ const response = await this.api.get(`${this.route}minified`, {
1293
+ params
1294
+ });
1295
+ return response.data;
1296
+ }
1297
+ async findMinifiedManufacturer(params) {
1298
+ const response = await this.api.get(`${this.route}minified_manufacturer`, {
1299
+ params
1300
+ });
1301
+ return response.data;
1302
+ }
1303
+ async findByOwnerId(params) {
1304
+ const response = await this.api.get(`${this.route}by_owner`, {
1305
+ params
1306
+ });
1307
+ return response.data;
1308
+ }
1309
+ async findById(selector) {
1310
+ const response = await this.api.get(`${this.route}${selector.id}`);
1311
+ return response.data;
1312
+ }
1313
+ async create(body) {
1314
+ const response = await this.api.post(`${this.route}`, body);
1315
+ return response.data;
1316
+ }
1317
+ async update(selector, body) {
1318
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1319
+ return response.data;
1320
+ }
1321
+ async deleteOne(selector) {
1322
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1323
+ return response.data;
1324
+ }
1325
+ };
1326
+
1327
+ // src/modules/user/providerType.ts
1328
+ var providerType_exports = {};
1329
+ __export(providerType_exports, {
1330
+ default: () => Repository34
1331
+ });
1332
+ var Repository34 = class {
1333
+ constructor({ api, route, publicRoute }) {
1334
+ this.api = api;
1335
+ this.route = route;
1336
+ this.publicRoute = publicRoute;
1337
+ }
1338
+ async find(params) {
1339
+ const response = await this.api.get(`${this.route}`, { params });
1340
+ return response.data;
1341
+ }
1342
+ async findPaginated(params) {
1343
+ const response = await this.api.get(`${this.route}paginated`, { params });
1344
+ return response.data;
1345
+ }
1346
+ async findMinified(params) {
1347
+ const response = await this.api.get(`${this.route}minified`, {
1348
+ params
1349
+ });
1350
+ return response.data;
1351
+ }
1352
+ async findById(selector) {
1353
+ const response = await this.api.get(`${this.route}${selector.id}`);
1354
+ return response.data;
1355
+ }
1356
+ async create(body) {
1357
+ const response = await this.api.post(`${this.route}`, body);
1358
+ return response.data;
1359
+ }
1360
+ async update(selector, body) {
1361
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1362
+ return response.data;
1363
+ }
1364
+ async deleteOne(selector) {
1365
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1366
+ return response.data;
1367
+ }
1368
+ };
1369
+
1370
+ // src/modules/user/purchaseCondition.ts
1371
+ var purchaseCondition_exports = {};
1372
+ __export(purchaseCondition_exports, {
1373
+ default: () => Repository35
1374
+ });
1375
+ var Repository35 = class {
1376
+ constructor({ api, route, publicRoute }) {
1377
+ this.api = api;
1378
+ this.route = route;
1379
+ this.publicRoute = publicRoute;
1380
+ }
1381
+ async find(params) {
1382
+ const response = await this.api.get(`${this.route}`, { params });
1383
+ return response.data;
1384
+ }
1385
+ async findPaginated(params) {
1386
+ const response = await this.api.get(`${this.route}paginated`, { params });
1387
+ return response.data;
1388
+ }
1389
+ async findByOwnerId(params) {
1390
+ const response = await this.api.get(`${this.route}by_owner`, {
1391
+ params
1392
+ });
1393
+ return response.data;
1394
+ }
1395
+ async findById(selector) {
1396
+ const response = await this.api.get(`${this.route}${selector.id}`);
1397
+ return response.data;
1398
+ }
1399
+ async create(body) {
1400
+ const response = await this.api.post(`${this.route}`, body);
1401
+ return response.data;
1402
+ }
1403
+ async update(selector, body) {
1404
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1405
+ return response.data;
1406
+ }
1407
+ async deleteOne(selector) {
1408
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1409
+ return response.data;
1410
+ }
1411
+ };
1412
+
1413
+ // src/modules/user/reasonForExemption.ts
1414
+ var reasonForExemption_exports = {};
1415
+ __export(reasonForExemption_exports, {
1416
+ default: () => Repository36
1417
+ });
1418
+ var Repository36 = class {
1419
+ constructor({ api, route, publicRoute }) {
1420
+ this.api = api;
1421
+ this.route = route;
1422
+ this.publicRoute = publicRoute;
1423
+ }
1424
+ async find(params) {
1425
+ const response = await this.api.get(`${this.route}`, { params });
1426
+ return response.data;
1427
+ }
1428
+ async findPaginated(params) {
1429
+ const response = await this.api.get(`${this.route}paginated`, { params });
1430
+ return response.data;
1431
+ }
1432
+ async findMinified(params) {
1433
+ const response = await this.api.get(`${this.route}minified`, {
1434
+ params
1435
+ });
1436
+ return response.data;
1437
+ }
1438
+ async findById(selector) {
1439
+ const response = await this.api.get(`${this.route}${selector.id}`);
1440
+ return response.data;
1441
+ }
1442
+ async create(body) {
1443
+ const response = await this.api.post(`${this.route}`, body);
1444
+ return response.data;
1445
+ }
1446
+ async update(selector, body) {
1447
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1448
+ return response.data;
1449
+ }
1450
+ async deleteOne(selector) {
1451
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1452
+ return response.data;
1453
+ }
1454
+ };
1455
+
1456
+ // src/modules/user/refreshToken.ts
1457
+ var refreshToken_exports = {};
1458
+ __export(refreshToken_exports, {
1459
+ default: () => Repository37
1460
+ });
1461
+ var Repository37 = class {
1462
+ constructor({ api, route, publicRoute }) {
1463
+ this.api = api;
1464
+ this.route = route;
1465
+ this.publicRoute = publicRoute;
1466
+ }
1467
+ async create(body) {
1468
+ const response = await this.api.post(`${this.publicRoute}`, body);
1469
+ return response.data;
1470
+ }
1471
+ };
1472
+
1473
+ // src/modules/user/segmentsArea.ts
1474
+ var segmentsArea_exports = {};
1475
+ __export(segmentsArea_exports, {
1476
+ default: () => Repository38
1477
+ });
1478
+ var Repository38 = class {
1479
+ constructor({ api, route, publicRoute }) {
1480
+ this.api = api;
1481
+ this.route = route;
1482
+ this.publicRoute = publicRoute;
1483
+ }
1484
+ async find(params) {
1485
+ const response = await this.api.get(`${this.route}`, { params });
1486
+ return response.data;
1487
+ }
1488
+ async findPaginated(params) {
1489
+ const response = await this.api.get(`${this.route}paginated`, { params });
1490
+ return response.data;
1491
+ }
1492
+ async findMinified(params) {
1493
+ const response = await this.api.get(`${this.route}minified`, {
1494
+ params
1495
+ });
1496
+ return response.data;
1497
+ }
1498
+ async findById(selector) {
1499
+ const response = await this.api.get(`${this.route}${selector.id}`);
1500
+ return response.data;
1501
+ }
1502
+ async create(body) {
1503
+ const response = await this.api.post(`${this.route}`, body);
1504
+ return response.data;
1505
+ }
1506
+ async update(selector, body) {
1507
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1508
+ return response.data;
1509
+ }
1510
+ async deleteOne(selector) {
1511
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1512
+ return response.data;
1513
+ }
1514
+ };
1515
+
1516
+ // src/modules/user/sessions.ts
1517
+ var sessions_exports = {};
1518
+ __export(sessions_exports, {
1519
+ default: () => Repository39
1520
+ });
1521
+ var Repository39 = class {
1522
+ constructor({ api, route, publicRoute }) {
1523
+ this.api = api;
1524
+ this.route = route;
1525
+ this.publicRoute = publicRoute;
1526
+ }
1527
+ async create(body) {
1528
+ const response = await this.api.post(`${this.publicRoute}`, body);
1529
+ return response.data;
1530
+ }
1531
+ };
1532
+
1533
+ // src/modules/user/shippings.ts
1534
+ var shippings_exports = {};
1535
+ __export(shippings_exports, {
1536
+ default: () => Repository40
1537
+ });
1538
+ var Repository40 = class {
1539
+ constructor({ api, route, publicRoute }) {
1540
+ this.api = api;
1541
+ this.route = route;
1542
+ this.publicRoute = publicRoute;
1543
+ }
1544
+ async find(params) {
1545
+ const response = await this.api.get(`${this.route}`, { params });
1546
+ return response.data;
1547
+ }
1548
+ async findPaginated(params) {
1549
+ const response = await this.api.get(`${this.route}paginated`, { params });
1550
+ return response.data;
1551
+ }
1552
+ async findByOwnerId(params) {
1553
+ const response = await this.api.get(`${this.route}by_owner`, {
1554
+ params
1555
+ });
1556
+ return response.data;
1557
+ }
1558
+ async findById(selector) {
1559
+ const response = await this.api.get(`${this.route}${selector.id}`);
1560
+ return response.data;
1561
+ }
1562
+ async create(body) {
1563
+ const response = await this.api.post(`${this.route}`, body);
1564
+ return response.data;
1565
+ }
1566
+ async update(selector, body) {
1567
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1568
+ return response.data;
1569
+ }
1570
+ async deleteOne(selector) {
1571
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1572
+ return response.data;
1573
+ }
1574
+ };
1575
+
1576
+ // src/modules/user/storeOperator.ts
1577
+ var storeOperator_exports = {};
1578
+ __export(storeOperator_exports, {
1579
+ default: () => Repository41
1580
+ });
1581
+ var Repository41 = class {
1582
+ constructor({ api, route, publicRoute }) {
1583
+ this.api = api;
1584
+ this.route = route;
1585
+ this.publicRoute = publicRoute;
1586
+ }
1587
+ async find() {
1588
+ const response = await this.api.get(`${this.route}`);
1589
+ return response.data;
1590
+ }
1591
+ async findPaginated(params) {
1592
+ const response = await this.api.get(`${this.route}paginated`, { params });
1593
+ return response.data;
1594
+ }
1595
+ async findMinified(params) {
1596
+ const response = await this.api.get(`${this.route}minified`, {
1597
+ params
1598
+ });
1599
+ return response.data;
1600
+ }
1601
+ async create(body) {
1602
+ const response = await this.api.post(`${this.route}`, body);
1603
+ return response.data;
1604
+ }
1605
+ async update(selector, body) {
1606
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1607
+ return response.data;
1608
+ }
1609
+ async deleteOne(selector) {
1610
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1611
+ return response.data;
1612
+ }
1613
+ };
1614
+
1615
+ // src/modules/user/swift.ts
1616
+ var swift_exports = {};
1617
+ __export(swift_exports, {
1618
+ default: () => Repository42
1619
+ });
1620
+ var Repository42 = class {
1621
+ constructor({ api, route, publicRoute }) {
1622
+ this.api = api;
1623
+ this.route = route;
1624
+ this.publicRoute = publicRoute;
1625
+ }
1626
+ async find(params) {
1627
+ const response = await this.api.get(`${this.route}`, { params });
1628
+ return response.data;
1629
+ }
1630
+ async findPaginated(params) {
1631
+ const response = await this.api.get(`${this.route}paginated`, { params });
1632
+ return response.data;
1633
+ }
1634
+ async findMinified(params) {
1635
+ const response = await this.api.get(`${this.route}minified`, {
1636
+ params
1637
+ });
1638
+ return response.data;
1639
+ }
1640
+ async findById(selector) {
1641
+ const response = await this.api.get(`${this.route}${selector.id}`);
1642
+ return response.data;
1643
+ }
1644
+ async create(body) {
1645
+ const response = await this.api.post(`${this.route}`, body);
1646
+ return response.data;
1647
+ }
1648
+ async update(selector, body) {
1649
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1650
+ return response.data;
1651
+ }
1652
+ async deleteOne(selector) {
1653
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1654
+ return response.data;
1655
+ }
1656
+ };
1657
+
1658
+ // src/modules/stock/typeOfLocation.ts
1659
+ var typeOfLocation_exports = {};
1660
+ __export(typeOfLocation_exports, {
1661
+ default: () => Repository43
1662
+ });
1663
+ var Repository43 = class {
1664
+ constructor({ api, route, publicRoute }) {
1665
+ this.api = api;
1666
+ this.route = route;
1667
+ this.publicRoute = publicRoute;
1668
+ }
1669
+ async find(params) {
1670
+ const response = await this.api.get(`${this.route}`, { params });
1671
+ return response.data;
1672
+ }
1673
+ async findPaginated(params) {
1674
+ const response = await this.api.get(`${this.route}paginated`, { params });
1675
+ return response.data;
1676
+ }
1677
+ async findMinified(params) {
1678
+ const response = await this.api.get(`${this.route}minified`, {
1679
+ params
1680
+ });
1681
+ return response.data;
1682
+ }
1683
+ async findByOwnerId(params) {
1684
+ const response = await this.api.get(`${this.route}by_owner`, {
1685
+ params
1686
+ });
1687
+ return response.data;
1688
+ }
1689
+ async findById(selector) {
1690
+ const response = await this.api.get(`${this.route}${selector.id}`);
1691
+ return response.data;
1692
+ }
1693
+ async create(body) {
1694
+ const response = await this.api.post(`${this.route}`, body);
1695
+ return response.data;
1696
+ }
1697
+ async update(selector, body) {
1698
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1699
+ return response.data;
1700
+ }
1701
+ async deleteOne(selector) {
1702
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1703
+ return response.data;
1704
+ }
1705
+ };
1706
+
1707
+ // src/modules/stock/unitOfMeasure.ts
1708
+ var unitOfMeasure_exports = {};
1709
+ __export(unitOfMeasure_exports, {
1710
+ default: () => Repository44
1711
+ });
1712
+ var Repository44 = class {
1713
+ constructor({ api, route, publicRoute }) {
1714
+ this.api = api;
1715
+ this.route = route;
1716
+ this.publicRoute = publicRoute;
1717
+ }
1718
+ async find(params) {
1719
+ const response = await this.api.get(`${this.route}`, { params });
1720
+ return response.data;
1721
+ }
1722
+ async findPaginated(params) {
1723
+ const response = await this.api.get(`${this.route}paginated`, { params });
1724
+ return response.data;
1725
+ }
1726
+ async findMinified(params) {
1727
+ const response = await this.api.get(`${this.route}minified`, {
1728
+ params
1729
+ });
1730
+ return response.data;
1731
+ }
1732
+ async findByOwnerId(params) {
1733
+ const response = await this.api.get(`${this.route}by_owner`, {
1734
+ params
1735
+ });
1736
+ return response.data;
1737
+ }
1738
+ async findById(selector) {
1739
+ const response = await this.api.get(`${this.route}${selector.id}`);
1740
+ return response.data;
1741
+ }
1742
+ async create(body) {
1743
+ const response = await this.api.post(`${this.route}`, body);
1744
+ return response.data;
1745
+ }
1746
+ async update(selector, body) {
1747
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1748
+ return response.data;
1749
+ }
1750
+ async deleteOne(selector) {
1751
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1752
+ return response.data;
1753
+ }
1754
+ };
1755
+
1756
+ // src/modules/user/userPermission.ts
1757
+ var userPermission_exports = {};
1758
+ __export(userPermission_exports, {
1759
+ default: () => Repository45
1760
+ });
1761
+ var Repository45 = class {
1762
+ constructor({ api, route, publicRoute }) {
1763
+ this.api = api;
1764
+ this.route = route;
1765
+ this.publicRoute = publicRoute;
1766
+ }
1767
+ async findByOwnerId(params) {
1768
+ const response = await this.api.get(`${this.route}by_owner`, {
1769
+ params
1770
+ });
1771
+ return response.data;
1772
+ }
1773
+ async create(body) {
1774
+ const response = await this.api.post(`${this.route}`, body);
1775
+ return response.data;
1776
+ }
1777
+ async deleteOne(selector) {
1778
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1779
+ return response.data;
1780
+ }
1781
+ };
1782
+
1783
+ // src/modules/user/userPositions.ts
1784
+ var userPositions_exports = {};
1785
+ __export(userPositions_exports, {
1786
+ default: () => Repository46
1787
+ });
1788
+ var Repository46 = class {
1789
+ constructor({ api, route, publicRoute }) {
1790
+ this.api = api;
1791
+ this.route = route;
1792
+ this.publicRoute = publicRoute;
1793
+ }
1794
+ async find(params) {
1795
+ const response = await this.api.get(`${this.route}`, { params });
1796
+ return response.data;
1797
+ }
1798
+ async findPaginated(params) {
1799
+ const response = await this.api.get(`${this.route}paginated`, { params });
1800
+ return response.data;
1801
+ }
1802
+ async findMinified(params) {
1803
+ const response = await this.api.get(`${this.route}minified`, {
1804
+ params
1805
+ });
1806
+ return response.data;
1807
+ }
1808
+ async findById(selector) {
1809
+ const response = await this.api.get(`${this.route}${selector.id}`);
1810
+ return response.data;
1811
+ }
1812
+ async create(body) {
1813
+ const response = await this.api.post(`${this.route}`, body);
1814
+ return response.data;
1815
+ }
1816
+ async update(selector, body) {
1817
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1818
+ return response.data;
1819
+ }
1820
+ async deleteOne(selector) {
1821
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1822
+ return response.data;
1823
+ }
1824
+ };
1825
+
1826
+ // src/modules/user/user.ts
1827
+ var user_exports = {};
1828
+ __export(user_exports, {
1829
+ default: () => Repository47
1830
+ });
1831
+ var Repository47 = class {
1832
+ constructor({ api, route, publicRoute }) {
1833
+ this.api = api;
1834
+ this.route = route;
1835
+ this.publicRoute = publicRoute;
1836
+ }
1837
+ async find(params) {
1838
+ const response = await this.api.get(`${this.route}`, { params });
1839
+ return response.data;
1840
+ }
1841
+ async findPaginated(params) {
1842
+ const response = await this.api.get(`${this.route}paginated`, { params });
1843
+ return response.data;
1844
+ }
1845
+ async findMinified(params) {
1846
+ const response = await this.api.get(`${this.route}minified`, {
1847
+ params
1848
+ });
1849
+ return response.data;
1850
+ }
1851
+ async findById(selector) {
1852
+ const response = await this.api.get(`${this.route}${selector.id}`);
1853
+ return response.data;
1854
+ }
1855
+ async create(body) {
1856
+ const response = await this.api.post(`${this.route}`, body);
1857
+ return response.data;
1858
+ }
1859
+ async update(selector, body) {
1860
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1861
+ return response.data;
1862
+ }
1863
+ async deleteOne(selector) {
1864
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1865
+ return response.data;
1866
+ }
1867
+ async findProvidersWithClientId(body) {
1868
+ const response = await this.api.post(`${this.route}providers`, body);
1869
+ return response.data;
1870
+ }
1871
+ async findFromClientOrProviderId(body) {
1872
+ const response = await this.api.post(`${this.route}from_client_or_provider_id`, body);
1873
+ return response.data;
1874
+ }
1875
+ };
1876
+
1877
+ // src/modules/stock/vatTax.ts
1878
+ var vatTax_exports = {};
1879
+ __export(vatTax_exports, {
1880
+ default: () => Repository48
1881
+ });
1882
+ var Repository48 = class {
1883
+ constructor({ api, route, publicRoute }) {
1884
+ this.api = api;
1885
+ this.route = route;
1886
+ this.publicRoute = publicRoute;
1887
+ }
1888
+ async find(params) {
1889
+ const response = await this.api.get(`${this.route}`, { params });
1890
+ return response.data;
1891
+ }
1892
+ async findPaginated(params) {
1893
+ const response = await this.api.get(`${this.route}paginated`, { params });
1894
+ return response.data;
1895
+ }
1896
+ async findMinified(params) {
1897
+ const response = await this.api.get(`${this.route}minified`, {
1898
+ params
1899
+ });
1900
+ return response.data;
1901
+ }
1902
+ async findByOwnerId(params) {
1903
+ const response = await this.api.get(`${this.route}by_owner`, {
1904
+ params
1905
+ });
1906
+ return response.data;
1907
+ }
1908
+ async findById(selector) {
1909
+ const response = await this.api.get(`${this.route}${selector.id}`);
1910
+ return response.data;
1911
+ }
1912
+ async create(body) {
1913
+ const response = await this.api.post(`${this.route}`, body);
1914
+ return response.data;
1915
+ }
1916
+ async update(selector, body) {
1917
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1918
+ return response.data;
1919
+ }
1920
+ async deleteOne(selector) {
1921
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1922
+ return response.data;
1923
+ }
1924
+ };
1925
+
1926
+ // src/modules/stock/vatTaxZone.ts
1927
+ var vatTaxZone_exports = {};
1928
+ __export(vatTaxZone_exports, {
1929
+ default: () => Repository49
1930
+ });
1931
+ var Repository49 = class {
1932
+ constructor({ api, route, publicRoute }) {
1933
+ this.api = api;
1934
+ this.route = route;
1935
+ this.publicRoute = publicRoute;
1936
+ }
1937
+ async find(params) {
1938
+ const response = await this.api.get(`${this.route}`, { params });
1939
+ return response.data;
1940
+ }
1941
+ async findPaginated(params) {
1942
+ const response = await this.api.get(`${this.route}paginated`, { params });
1943
+ return response.data;
1944
+ }
1945
+ async findMinified(params) {
1946
+ const response = await this.api.get(`${this.route}minified`, {
1947
+ params
1948
+ });
1949
+ return response.data;
1950
+ }
1951
+ async findByOwnerId(params) {
1952
+ const response = await this.api.get(`${this.route}by_owner`, {
1953
+ params
1954
+ });
1955
+ return response.data;
1956
+ }
1957
+ async findById(selector) {
1958
+ const response = await this.api.get(`${this.route}${selector.id}`);
1959
+ return response.data;
1960
+ }
1961
+ async create(body) {
1962
+ const response = await this.api.post(`${this.route}`, body);
1963
+ return response.data;
1964
+ }
1965
+ async update(selector, body) {
1966
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1967
+ return response.data;
1968
+ }
1969
+ async deleteOne(selector) {
1970
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1971
+ return response.data;
1972
+ }
1973
+ };
1974
+
1975
+ // src/modules/supply/workflow.ts
1976
+ var workflow_exports = {};
1977
+ __export(workflow_exports, {
1978
+ default: () => Repository50
1979
+ });
1980
+ var Repository50 = class {
1981
+ constructor({ api, route, publicRoute }) {
1982
+ this.api = api;
1983
+ this.route = route;
1984
+ this.publicRoute = publicRoute;
1985
+ }
1986
+ async find(params) {
1987
+ const response = await this.api.get(`${this.route}`, { params });
1988
+ return response.data;
1989
+ }
1990
+ async findByOwnerId(params) {
1991
+ const response = await this.api.get(`${this.route}by_owner`, { params });
1992
+ return response.data;
1993
+ }
1994
+ async create(body) {
1995
+ const response = await this.api.post(`${this.route}`, body);
1996
+ return response.data;
1997
+ }
1998
+ async update(selector, body) {
1999
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2000
+ return response.data;
2001
+ }
2002
+ async deleteOne(selector) {
2003
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2004
+ return response.data;
2005
+ }
2006
+ };
2007
+
2008
+ // src/modules/user/deliveryMethods.ts
2009
+ var deliveryMethods_exports = {};
2010
+ __export(deliveryMethods_exports, {
2011
+ default: () => Repository51
2012
+ });
2013
+ var Repository51 = class {
2014
+ constructor({ api, route, publicRoute }) {
2015
+ this.api = api;
2016
+ this.route = route;
2017
+ this.publicRoute = publicRoute;
2018
+ }
2019
+ async find() {
2020
+ const response = await this.api.get(`${this.route}`);
2021
+ return response.data;
2022
+ }
2023
+ async findMinified(params) {
2024
+ const response = await this.api.get(`${this.route}minified`, {
2025
+ params
2026
+ });
2027
+ return response.data;
2028
+ }
2029
+ async findById(selector) {
2030
+ const response = await this.api.get(`${this.route}${selector.id}`);
2031
+ return response.data;
2032
+ }
2033
+ async create(body) {
2034
+ const response = await this.api.post(`${this.route}`, body);
2035
+ return response.data;
2036
+ }
2037
+ async update(selector, body) {
2038
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2039
+ return response.data;
2040
+ }
2041
+ async deleteOne(selector) {
2042
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2043
+ return response.data;
2044
+ }
2045
+ };
2046
+
2047
+ // src/modules/user/maturityDates.ts
2048
+ var maturityDates_exports = {};
2049
+ __export(maturityDates_exports, {
2050
+ default: () => Repository52
2051
+ });
2052
+ var Repository52 = class {
2053
+ constructor({ api, route, publicRoute }) {
2054
+ this.api = api;
2055
+ this.route = route;
2056
+ this.publicRoute = publicRoute;
2057
+ }
2058
+ async find() {
2059
+ const response = await this.api.get(`${this.route}`);
2060
+ return response.data;
2061
+ }
2062
+ async findById(selector) {
2063
+ const response = await this.api.get(`${this.route}${selector.id}`);
2064
+ return response.data;
2065
+ }
2066
+ async findMinified(params) {
2067
+ const response = await this.api.get(`${this.route}minified`, {
2068
+ params
2069
+ });
2070
+ return response.data;
2071
+ }
2072
+ async create(body) {
2073
+ const response = await this.api.post(`${this.route}`, body);
2074
+ return response.data;
2075
+ }
2076
+ async update(selector, body) {
2077
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2078
+ return response.data;
2079
+ }
2080
+ async deleteOne(selector) {
2081
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2082
+ return response.data;
2083
+ }
2084
+ };
2085
+
2086
+ // src/modules/user/paymentMethods.ts
2087
+ var paymentMethods_exports = {};
2088
+ __export(paymentMethods_exports, {
2089
+ default: () => Repository53
2090
+ });
2091
+ var Repository53 = class {
2092
+ constructor({ api, route, publicRoute }) {
2093
+ this.api = api;
2094
+ this.route = route;
2095
+ this.publicRoute = publicRoute;
2096
+ }
2097
+ async find() {
2098
+ const response = await this.api.get(`${this.route}`);
2099
+ return response.data;
2100
+ }
2101
+ async findById(selector) {
2102
+ const response = await this.api.get(`${this.route}${selector.id}`);
2103
+ return response.data;
2104
+ }
2105
+ async findMinified(params) {
2106
+ const response = await this.api.get(`${this.route}minified`, {
2107
+ params
2108
+ });
2109
+ return response.data;
2110
+ }
2111
+ async create(body) {
2112
+ const response = await this.api.post(`${this.route}`, body);
2113
+ return response.data;
2114
+ }
2115
+ async update(selector, body) {
2116
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2117
+ return response.data;
2118
+ }
2119
+ async deleteOne(selector) {
2120
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2121
+ return response.data;
2122
+ }
2123
+ };
2124
+
2125
+ // src/modules/user/vehicles.ts
2126
+ var vehicles_exports = {};
2127
+ __export(vehicles_exports, {
2128
+ default: () => Repository54
2129
+ });
2130
+ var Repository54 = class {
2131
+ constructor({ api, route, publicRoute }) {
2132
+ this.api = api;
2133
+ this.route = route;
2134
+ this.publicRoute = publicRoute;
2135
+ }
2136
+ async find() {
2137
+ const response = await this.api.get(`${this.route}`);
2138
+ return response.data;
2139
+ }
2140
+ async create(body) {
2141
+ const response = await this.api.post(`${this.route}`, body);
2142
+ return response.data;
2143
+ }
2144
+ async update(selector, body) {
2145
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2146
+ return response.data;
2147
+ }
2148
+ async deleteOne(selector) {
2149
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2150
+ return response.data;
2151
+ }
2152
+ };
2153
+
2154
+ // src/modules/supply/externalDocumentType.ts
2155
+ var externalDocumentType_exports = {};
2156
+ __export(externalDocumentType_exports, {
2157
+ default: () => Repository55
2158
+ });
2159
+ var Repository55 = class {
2160
+ constructor({ api, route, publicRoute }) {
2161
+ this.api = api;
2162
+ this.route = route;
2163
+ this.publicRoute = publicRoute;
2164
+ }
2165
+ async find() {
2166
+ const response = await this.api.get(`${this.route}`);
2167
+ return response.data;
2168
+ }
2169
+ async findMinified(params) {
2170
+ const response = await this.api.get(`${this.route}minified`, { params });
2171
+ return response.data;
2172
+ }
2173
+ };
2174
+
2175
+ // src/modules/supply/documentSet.ts
2176
+ var documentSet_exports = {};
2177
+ __export(documentSet_exports, {
2178
+ default: () => Repository56
2179
+ });
2180
+ var Repository56 = class {
2181
+ constructor({ api, route, publicRoute }) {
2182
+ this.api = api;
2183
+ this.route = route;
2184
+ this.publicRoute = publicRoute;
2185
+ }
2186
+ async find() {
2187
+ const response = await this.api.get(`${this.route}`);
2188
+ return response.data;
2189
+ }
2190
+ async findById(selector) {
2191
+ const response = await this.api.get(`${this.route}${selector.id}`);
2192
+ return response.data;
2193
+ }
2194
+ async findMinified(params) {
2195
+ const response = await this.api.get(`${this.route}minified`, { params });
2196
+ return response.data;
2197
+ }
2198
+ async create(body) {
2199
+ const response = await this.api.post(`${this.route}`, body);
2200
+ return response.data;
2201
+ }
2202
+ async update(selector, body) {
2203
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2204
+ return response.data;
2205
+ }
2206
+ async deleteOne(selector) {
2207
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2208
+ return response.data;
2209
+ }
2210
+ };
2211
+
2212
+ // src/modules/supply/payment.ts
2213
+ var payment_exports = {};
2214
+ __export(payment_exports, {
2215
+ default: () => Repository57
2216
+ });
2217
+ var Repository57 = class {
2218
+ constructor({ api, route, publicRoute }) {
2219
+ this.api = api;
2220
+ this.route = route;
2221
+ this.publicRoute = publicRoute;
2222
+ }
2223
+ async find(params) {
2224
+ const response = await this.api.get(`${this.route}`, { params });
2225
+ return response.data;
2226
+ }
2227
+ async findPaginated(params) {
2228
+ const response = await this.api.get(`${this.route}paginated`, { params });
2229
+ return response.data;
2230
+ }
2231
+ async findByOwnerId(params) {
2232
+ const response = await this.api.get(`${this.route}by_owner`, {
2233
+ params
2234
+ });
2235
+ return response.data;
2236
+ }
2237
+ async findById(selector) {
2238
+ const response = await this.api.get(`${this.route}${selector.id}`);
2239
+ return response.data;
2240
+ }
2241
+ async deleteBatch(selector) {
2242
+ const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
2243
+ return response.data;
2244
+ }
2245
+ async findCurrentAccountByOwnerId(params) {
2246
+ const response = await this.api.get(`${this.route}current_account`, {
2247
+ params
2248
+ });
2249
+ return response.data;
2250
+ }
2251
+ async findBalanceByOwnerId(params) {
2252
+ const response = await this.api.get(`${this.route}balance`, {
2253
+ params
2254
+ });
2255
+ return response.data;
2256
+ }
2257
+ async findSettledMaterialEntrance(params) {
2258
+ const response = await this.api.get(`${this.route}settled_material_entrance`, {
2259
+ params
2260
+ });
2261
+ return response.data;
2262
+ }
2263
+ async findSettledMaterialEntranceProviders() {
2264
+ const response = await this.api.get(`${this.route}settled_material_entrance_providers`);
2265
+ return response.data;
2266
+ }
2267
+ async createProvidersPayments(body) {
2268
+ const response = await this.api.post(`${this.route}provider`, body);
2269
+ return response.data;
2270
+ }
2271
+ async findPaymentsNotExported(params) {
2272
+ const response = await this.api.get(`${this.route}not_exported`, {
2273
+ params
2274
+ });
2275
+ return response.data;
2276
+ }
2277
+ async findPaymentBatches() {
2278
+ const response = await this.api.get(`${this.route}batches`);
2279
+ return response.data;
2280
+ }
2281
+ async updateDownloadedBatchNumber(params) {
2282
+ await this.api.put(`${this.route}downloaded_batch_number/${params}`);
2283
+ }
2284
+ async exportCurrentAccount(params) {
2285
+ const response = await this.api.get(`${this.publicRoute}export_current_account`, {
2286
+ params
2287
+ });
2288
+ return response.data;
2289
+ }
2290
+ async findSettledMaterialEntranceByDate(params) {
2291
+ const response = await this.api.get(`${this.route}settled_material_entrance_by_date`, {
2292
+ params
2293
+ });
2294
+ return response.data;
2295
+ }
2296
+ async exportPayments(body) {
2297
+ await this.api.post(`${this.route}export_payments`, body);
2298
+ }
2299
+ getExportCurrentAccountUrl({
2300
+ owner_id,
2301
+ start_date,
2302
+ end_date,
2303
+ output,
2304
+ token
2305
+ }) {
2306
+ const qs = new URLSearchParams();
2307
+ qs.set("owner_id", owner_id);
2308
+ qs.set("output", output);
2309
+ if (start_date) qs.set("start_date", start_date.toISOString());
2310
+ if (end_date) qs.set("end_date", end_date.toISOString());
2311
+ qs.set("token", token);
2312
+ return `${this.publicRoute}export_current_account?${qs.toString()}`;
2313
+ }
2314
+ async findCurrentAccountPaginated(params) {
2315
+ const response = await this.api.get(`${this.route}current_account_paginated`, {
2316
+ params
2317
+ });
2318
+ return response.data;
2319
+ }
2320
+ };
2321
+
2322
+ // src/modules/supply/externalDocumentHeader.ts
2323
+ var externalDocumentHeader_exports = {};
2324
+ __export(externalDocumentHeader_exports, {
2325
+ default: () => Repository58
2326
+ });
2327
+ var Repository58 = class {
2328
+ constructor({ api, route, publicRoute }) {
2329
+ this.api = api;
2330
+ this.route = route;
2331
+ this.publicRoute = publicRoute;
2332
+ }
2333
+ async create(body) {
2334
+ const response = await this.api.post(`${this.route}`, body);
2335
+ return response.data;
2336
+ }
2337
+ async update(selector, body) {
2338
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2339
+ return response.data;
2340
+ }
2341
+ async findById(selector) {
2342
+ const response = await this.api.get(`${this.route}${selector.id}`);
2343
+ return response.data;
2344
+ }
2345
+ async findByOwnerId(params) {
2346
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2347
+ return response.data;
2348
+ }
2349
+ async publicFindByOwnerId(params) {
2350
+ const response = await this.api.get(`${this.route}public_by_owner`, {
2351
+ params
2352
+ });
2353
+ return response.data;
2354
+ }
2355
+ async find(params) {
2356
+ const response = await this.api.get(`${this.route}`, { params });
2357
+ return response.data;
2358
+ }
2359
+ async findPaginated(params) {
2360
+ const response = await this.api.get(`${this.route}paginated`, { params });
2361
+ return response.data;
2362
+ }
2363
+ async deleteOne(params) {
2364
+ const response = await this.api.get(`${this.route}`, { params });
2365
+ return response.data;
2366
+ }
2367
+ async sendEmailDocument(body) {
2368
+ await this.api.post(`${this.route}sendEmail`, body);
2369
+ }
2370
+ async createDocumentHeaderNote(data) {
2371
+ const response = await this.api.post(`${this.route}public_document_header_note`, data);
2372
+ return response.data;
2373
+ }
2374
+ async updateDocumentHeaderNote({ id }, data) {
2375
+ const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
2376
+ return response.data;
2377
+ }
2378
+ };
2379
+
2380
+ // src/modules/supply/vatValidation.ts
2381
+ var vatValidation_exports = {};
2382
+ __export(vatValidation_exports, {
2383
+ default: () => Repository59
2384
+ });
2385
+ var Repository59 = class {
2386
+ constructor({ api, route, publicRoute }) {
2387
+ this.api = api;
2388
+ this.route = route;
2389
+ this.publicRoute = publicRoute;
2390
+ }
2391
+ async findByLatest(nif) {
2392
+ const response = await this.api.get(`${this.route}`, {
2393
+ params: {
2394
+ nif
2395
+ }
2396
+ });
2397
+ return response.data;
2398
+ }
2399
+ };
2400
+
2401
+ // src/modules/stock/stockMovement.ts
2402
+ var stockMovement_exports = {};
2403
+ __export(stockMovement_exports, {
2404
+ default: () => Repository60
2405
+ });
2406
+ var Repository60 = class {
2407
+ constructor({ api, route, publicRoute }) {
2408
+ this.api = api;
2409
+ this.route = route;
2410
+ this.publicRoute = publicRoute;
2411
+ }
2412
+ async findByProvider({
2413
+ id
2414
+ }) {
2415
+ const response = await this.api.get(`${this.route}${id}`);
2416
+ return response.data;
2417
+ }
2418
+ async findByOwnerId(params) {
2419
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2420
+ return response.data;
2421
+ }
2422
+ async exportCsv(params) {
2423
+ const response = await this.api.get(`${this.route}csv`, { params });
2424
+ return response.data;
2425
+ }
2426
+ getStockCsvUrl({ date, version, format, token }) {
2427
+ const qs = new URLSearchParams();
2428
+ qs.set("date", date.toISOString());
2429
+ qs.set("version", version);
2430
+ qs.set("format", format);
2431
+ qs.set("token", token);
2432
+ return `${this.publicRoute}csv?${qs.toString()}`;
2433
+ }
2434
+ async findStockMovementPaginated(params) {
2435
+ const response = await this.api.get(`${this.route}stock_movement_paginated`, { params });
2436
+ return response.data;
2437
+ }
2438
+ };
2439
+
2440
+ // src/modules/user/zipCode.ts
2441
+ var zipCode_exports = {};
2442
+ __export(zipCode_exports, {
2443
+ default: () => Repository61
2444
+ });
2445
+ var Repository61 = class {
2446
+ constructor({ api, route, publicRoute }) {
2447
+ this.api = api;
2448
+ this.route = route;
2449
+ this.publicRoute = publicRoute;
2450
+ }
2451
+ async create(body) {
2452
+ await this.api.post(`${this.route}`, body);
2453
+ }
2454
+ async findByPostalCode(params) {
2455
+ const response = await this.api.get(`${this.route}`, { params });
2456
+ return response.data;
2457
+ }
2458
+ };
2459
+
2460
+ // src/modules/user/tenant.ts
2461
+ var tenant_exports = {};
2462
+ __export(tenant_exports, {
2463
+ default: () => Repository62
2464
+ });
2465
+ var Repository62 = class {
2466
+ constructor({ api, route, publicRoute }) {
2467
+ this.api = api;
2468
+ this.route = route;
2469
+ this.publicRoute = publicRoute;
2470
+ }
2471
+ async create(body) {
2472
+ const response = await this.api.post(`${this.route}`, body);
2473
+ return response.data;
2474
+ }
2475
+ async find() {
2476
+ const response = await this.api.get(`${this.route}`);
2477
+ return response.data;
2478
+ }
2479
+ async findById(selector) {
2480
+ const response = await this.api.get(`${this.route}${selector.id}`);
2481
+ return response.data;
2482
+ }
2483
+ async update(selector, body) {
2484
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2485
+ return response.data;
2486
+ }
2487
+ };
2488
+
2489
+ // src/modules/supply/preSale.ts
2490
+ var preSale_exports = {};
2491
+ __export(preSale_exports, {
2492
+ default: () => Repository63
2493
+ });
2494
+ var Repository63 = class {
2495
+ constructor({ api, route, publicRoute }) {
2496
+ this.api = api;
2497
+ this.route = route;
2498
+ this.publicRoute = publicRoute;
2499
+ }
2500
+ async find(selector) {
2501
+ const response = await this.api.get(`${this.route}by_user/${selector.created_by}`);
2502
+ return response.data;
2503
+ }
2504
+ async findById(selector) {
2505
+ const response = await this.api.get(`${this.route}${selector.id}`);
2506
+ return response.data;
2507
+ }
2508
+ async findPending() {
2509
+ const response = await this.api.get(`${this.route}pending`);
2510
+ return response.data;
2511
+ }
2512
+ async create(body) {
2513
+ const response = await this.api.post(`${this.route}`, body);
2514
+ return response.data;
2515
+ }
2516
+ async update(selector, body) {
2517
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2518
+ return response.data;
2519
+ }
2520
+ async updatePreSaleQuantity(selector, body) {
2521
+ const response = await this.api.put(`${this.route}${selector.id}/quantity`, body);
2522
+ return response.data;
2523
+ }
2524
+ async removeProduct(selector, body) {
2525
+ const response = await this.api.put(`${this.route}product/${selector.id}`, body);
2526
+ return response.data;
2527
+ }
2528
+ async importToClientProposal(data) {
2529
+ const response = await this.api.post(`${this.route}client_proposal`, data);
2530
+ return response.data;
2531
+ }
2532
+ };
2533
+
2534
+ // src/modules/supply/preSaleProduct.ts
2535
+ var preSaleProduct_exports = {};
2536
+ __export(preSaleProduct_exports, {
2537
+ default: () => Repository64
2538
+ });
2539
+ var Repository64 = class {
2540
+ constructor({ api, route, publicRoute }) {
2541
+ this.api = api;
2542
+ this.route = route;
2543
+ this.publicRoute = publicRoute;
2544
+ }
2545
+ async find() {
2546
+ const response = await this.api.get(`${this.route}`);
2547
+ return response.data;
2548
+ }
2549
+ async findById(selector) {
2550
+ const response = await this.api.get(`${this.route}${selector.id}`);
2551
+ return response.data;
2552
+ }
2553
+ };
2554
+
2555
+ // src/modules/supply/orderManagement.ts
2556
+ var orderManagement_exports = {};
2557
+ __export(orderManagement_exports, {
2558
+ default: () => Repository65
2559
+ });
2560
+ var Repository65 = class {
2561
+ constructor({ api, route, publicRoute }) {
2562
+ this.api = api;
2563
+ this.route = route;
2564
+ this.publicRoute = publicRoute;
2565
+ }
2566
+ async findProviderProducts(params) {
2567
+ const response = await this.api.get(`${this.route}provider_products`, {
2568
+ params
2569
+ });
2570
+ return response.data;
2571
+ }
2572
+ async findAllProviderProducts() {
2573
+ const response = await this.api.get(`${this.route}all_provider_products`);
2574
+ return response.data;
2575
+ }
2576
+ };
2577
+
2578
+ // src/modules/print/npc.ts
2579
+ var npc_exports = {};
2580
+ __export(npc_exports, {
2581
+ default: () => Repository66
2582
+ });
2583
+ var Repository66 = class {
2584
+ constructor({ api, route, publicRoute }) {
2585
+ this.api = api;
2586
+ this.route = route;
2587
+ this.publicRoute = publicRoute;
2588
+ }
2589
+ async find() {
2590
+ const response = await this.api.get(`${this.route}`);
2591
+ return response.data;
2592
+ }
2593
+ async update(selector, body) {
2594
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2595
+ return response.data;
2596
+ }
2597
+ async findPrintJobsForComputerId(selector) {
2598
+ const response = await this.api.get(
2599
+ `${this.route}find_print_jobs_for_computer_id/${selector.computer_id}`
2600
+ );
2601
+ return response.data;
2602
+ }
2603
+ };
2604
+
2605
+ // src/modules/print/printer.ts
2606
+ var printer_exports = {};
2607
+ __export(printer_exports, {
2608
+ default: () => Repository67
2609
+ });
2610
+ var Repository67 = class {
2611
+ constructor({ api, route, publicRoute }) {
2612
+ this.api = api;
2613
+ this.route = route;
2614
+ this.publicRoute = publicRoute;
2615
+ }
2616
+ async find() {
2617
+ const response = await this.api.get(`${this.route}`);
2618
+ return response.data;
2619
+ }
2620
+ async findByOwnerId(params) {
2621
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2622
+ return response.data;
2623
+ }
2624
+ async update(selector, body) {
2625
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2626
+ return response.data;
2627
+ }
2628
+ async updateMany(body) {
2629
+ await this.api.put(`${this.route}update_many`, body);
2630
+ }
2631
+ async getOrSetPrinters(body) {
2632
+ const response = await this.api.post(`${this.route}get_or_set_printers`, body);
2633
+ return response.data;
2634
+ }
2635
+ };
2636
+
2637
+ // src/modules/print/schedulePrintJob.ts
2638
+ var schedulePrintJob_exports = {};
2639
+ __export(schedulePrintJob_exports, {
2640
+ default: () => Repository68
2641
+ });
2642
+ var Repository68 = class {
2643
+ constructor({ api, route, publicRoute }) {
2644
+ this.api = api;
2645
+ this.route = route;
2646
+ this.publicRoute = publicRoute;
2647
+ }
2648
+ async create(body) {
2649
+ await this.api.post(`${this.route}`, body);
2650
+ }
2651
+ async createMany(body) {
2652
+ await this.api.post(`${this.route}many`, body);
2653
+ }
2654
+ async deleteOne(selector) {
2655
+ await this.api.delete(`${this.route}${selector.id}`);
2656
+ }
2657
+ async dispatchSchedulePrintJob(body) {
2658
+ const response = await this.api.post(`${this.route}dispatch_schedule_print_job`, body);
2659
+ return response.data;
2660
+ }
2661
+ async findByOwner(params) {
2662
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2663
+ return response.data;
2664
+ }
2665
+ };
2666
+
2667
+ // src/modules/stock/queryList.ts
2668
+ var queryList_exports = {};
2669
+ __export(queryList_exports, {
2670
+ default: () => Repository69
2671
+ });
2672
+ var Repository69 = class {
2673
+ constructor({ api, route, publicRoute }) {
2674
+ this.api = api;
2675
+ this.route = route;
2676
+ this.publicRoute = publicRoute;
2677
+ }
2678
+ async find() {
2679
+ const response = await this.api.get(`${this.route}`);
2680
+ return response.data;
2681
+ }
2682
+ async findById(selector) {
2683
+ const response = await this.api.get(`${this.route}${selector.id}`);
2684
+ return response.data;
2685
+ }
2686
+ async create(body) {
2687
+ const response = await this.api.post(`${this.route}`, body);
2688
+ return response.data;
2689
+ }
2690
+ async update(selector, body) {
2691
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2692
+ return response.data;
2693
+ }
2694
+ async deleteOne(selector) {
2695
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2696
+ return response.data;
2697
+ }
2698
+ async execute(params) {
2699
+ const response = await this.api.get(`${this.route}execute`, { params });
2700
+ return response.data;
2701
+ }
2702
+ getQueryExecuteUrl({ query_id, output, token, ...data }) {
2703
+ const qs = new URLSearchParams();
2704
+ qs.set("query_id", query_id);
2705
+ qs.set("output", output);
2706
+ if (token) {
2707
+ qs.set("token", token);
2708
+ }
2709
+ Object.entries(data).forEach(([key, value]) => {
2710
+ if (typeof value === "undefined") return;
2711
+ if (value === null) return;
2712
+ qs.set(key, value.toString());
2713
+ });
2714
+ return `${this.route}execute?${qs.toString()}`;
2715
+ }
2716
+ };
2717
+
2718
+ // src/modules/stock/queryParameter.ts
2719
+ var queryParameter_exports = {};
2720
+ __export(queryParameter_exports, {
2721
+ default: () => Repository70
2722
+ });
2723
+ var Repository70 = class {
2724
+ constructor({ api, route, publicRoute }) {
2725
+ this.api = api;
2726
+ this.route = route;
2727
+ this.publicRoute = publicRoute;
2728
+ }
2729
+ async find() {
2730
+ const response = await this.api.get(`${this.route}`);
2731
+ return response.data;
2732
+ }
2733
+ async findById(selector) {
2734
+ const response = await this.api.get(`${this.route}${selector.id}`);
2735
+ return response.data;
2736
+ }
2737
+ async create(body) {
2738
+ const response = await this.api.post(`${this.route}`, body);
2739
+ return response.data;
2740
+ }
2741
+ async update(selector, body) {
2742
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2743
+ return response.data;
2744
+ }
2745
+ async deleteOne(selector) {
2746
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2747
+ return response.data;
2748
+ }
2749
+ async findByOwnerId(params) {
2750
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2751
+ return response.data;
2752
+ }
2753
+ };
2754
+
2755
+ // src/modules/stock/returnReason.ts
2756
+ var returnReason_exports = {};
2757
+ __export(returnReason_exports, {
2758
+ default: () => Repository71
2759
+ });
2760
+ var Repository71 = class {
2761
+ constructor({ api, route, publicRoute }) {
2762
+ this.api = api;
2763
+ this.route = route;
2764
+ this.publicRoute = publicRoute;
2765
+ }
2766
+ async create(body) {
2767
+ const response = await this.api.post(`${this.route}`, body);
2768
+ return response.data;
2769
+ }
2770
+ async update(selector, body) {
2771
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2772
+ return response.data;
2773
+ }
2774
+ async find() {
2775
+ const response = await this.api.get(`${this.route}`);
2776
+ return response.data;
2777
+ }
2778
+ async deleteOne(selector) {
2779
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2780
+ return response.data;
2781
+ }
2782
+ };
2783
+
2784
+ // src/modules/document/propostaSheets.ts
2785
+ var propostaSheets_exports = {};
2786
+ __export(propostaSheets_exports, {
2787
+ default: () => Repository72
2788
+ });
2789
+ var Repository72 = class {
2790
+ constructor({ api, route, publicRoute }) {
2791
+ this.api = api;
2792
+ this.route = route;
2793
+ this.publicRoute = publicRoute;
2794
+ }
2795
+ async isProcessing(params) {
2796
+ const response = await this.api.get(`${this.route}is_processing`, {
2797
+ params
2798
+ });
2799
+ return response.data;
2800
+ }
2801
+ async importFromSheet(params) {
2802
+ const response = await this.api.post(`${this.route}import_from_sheet`, {
2803
+ params
2804
+ });
2805
+ return response.data;
2806
+ }
2807
+ async createSheetFromDocument(params) {
2808
+ const response = await this.api.post(`${this.route}create_sheet_from_document`, params);
2809
+ return response.data;
2810
+ }
2811
+ async cloneSheetsToNewDocument(params) {
2812
+ const response = await this.api.post(`${this.route}clone_sheet_to_new_document`, params);
2813
+ return response.data;
2814
+ }
2815
+ async conflictAccept(params) {
2816
+ await this.api.post(`${this.route}conflict_accept`, params);
2817
+ }
2818
+ async conflictDelete(data) {
2819
+ await this.api.delete(`${this.route}conflict_delete`, {
2820
+ data
2821
+ });
2822
+ }
2823
+ async conflictFindByOwnerId(params) {
2824
+ const response = await this.api.get(`${this.route}conflict_find_by_owner_id`, {
2825
+ params
2826
+ });
2827
+ return response.data;
2828
+ }
2829
+ async rmGetDataBySheetId(params) {
2830
+ const response = await this.api.get(`${this.route}rm_data_by_sheet_id/${params.id}`);
2831
+ return response.data;
2832
+ }
2833
+ async rmUpdateDataBySheetId(params, body) {
2834
+ await this.api.post(`${this.route}rm_data_by_sheet_id/${params.id}`, body);
2835
+ }
2836
+ };
2837
+
2838
+ // src/modules/stock/schedule.ts
2839
+ var schedule_exports = {};
2840
+ __export(schedule_exports, {
2841
+ default: () => Repository73
2842
+ });
2843
+ var Repository73 = class {
2844
+ constructor({ api, route, publicRoute }) {
2845
+ this.api = api;
2846
+ this.route = route;
2847
+ this.publicRoute = publicRoute;
2848
+ }
2849
+ async runImmediately(selector) {
2850
+ await this.api.post(`${this.route}${selector.scheduleType}`);
2851
+ }
2852
+ };
2853
+
2854
+ // src/modules/integration/googleFilePermission.ts
2855
+ var googleFilePermission_exports = {};
2856
+ __export(googleFilePermission_exports, {
2857
+ default: () => Repository74
2858
+ });
2859
+ var Repository74 = class {
2860
+ constructor({ api, route, publicRoute }) {
2861
+ this.api = api;
2862
+ this.route = route;
2863
+ this.publicRoute = publicRoute;
2864
+ }
2865
+ async create(body) {
2866
+ const response = await this.api.post(`${this.route}`, body);
2867
+ return response.data;
2868
+ }
2869
+ async find() {
2870
+ const response = await this.api.get(`${this.route}`);
2871
+ return response.data;
2872
+ }
2873
+ async findById(selector) {
2874
+ const response = await this.api.get(`${this.route}${selector.id}`);
2875
+ return response.data;
2876
+ }
2877
+ async deleteOne(selector) {
2878
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2879
+ return response.data;
2880
+ }
2881
+ };
2882
+
2883
+ // src/modules/integration/settings.ts
2884
+ var settings_exports = {};
2885
+ __export(settings_exports, {
2886
+ default: () => Repository75
2887
+ });
2888
+ var Repository75 = class {
2889
+ constructor({ api, route, publicRoute }) {
2890
+ this.api = api;
2891
+ this.route = route;
2892
+ this.publicRoute = publicRoute;
2893
+ }
2894
+ async create(body) {
2895
+ const response = await this.api.post(`${this.route}`, body);
2896
+ return response.data;
2897
+ }
2898
+ async findByKey(params) {
2899
+ const response = await this.api.get(`${this.publicRoute}by_key`, {
2900
+ params
2901
+ });
2902
+ return response.data;
2903
+ }
2904
+ async update(body) {
2905
+ const response = await this.api.put(`${this.route}`, body);
2906
+ return response.data;
2907
+ }
2908
+ async deleteOne(selector) {
2909
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2910
+ return response.data;
2911
+ }
2912
+ async find() {
2913
+ const response = await this.api.get(`${this.route}`);
2914
+ return response.data;
2915
+ }
2916
+ };
2917
+
2918
+ // src/modules/tickets/tickets.ts
2919
+ var tickets_exports = {};
2920
+ __export(tickets_exports, {
2921
+ default: () => Repository76
2922
+ });
2923
+ var Repository76 = class {
2924
+ constructor({ api, route, publicRoute }) {
2925
+ this.api = api;
2926
+ this.route = route;
2927
+ this.publicRoute = publicRoute;
2928
+ }
2929
+ async create(body) {
2930
+ const response = await this.api.post(`${this.route}`, body);
2931
+ return response.data;
2932
+ }
2933
+ async findToday() {
2934
+ const response = await this.api.get(`${this.route}find_today`);
2935
+ return response.data;
2936
+ }
2937
+ async update(body) {
2938
+ const response = await this.api.put(`${this.route}`, body);
2939
+ return response.data;
2940
+ }
2941
+ async undoLastCall() {
2942
+ const response = await this.api.put(`${this.route}undo_last_call`);
2943
+ return response.data;
2944
+ }
2945
+ };
2946
+
2947
+ // src/modules/tickets/channel.ts
2948
+ var channel_exports = {};
2949
+ __export(channel_exports, {
2950
+ default: () => Repository77
2951
+ });
2952
+ var Repository77 = class {
2953
+ constructor({ api, route, publicRoute }) {
2954
+ this.api = api;
2955
+ this.route = route;
2956
+ this.publicRoute = publicRoute;
2957
+ }
2958
+ async create(body) {
2959
+ const response = await this.api.post(`${this.route}`, body);
2960
+ return response.data;
2961
+ }
2962
+ async find() {
2963
+ const response = await this.api.get(`${this.route}`);
2964
+ return response.data;
2965
+ }
2966
+ async findMinified(params) {
2967
+ const response = await this.api.get(`${this.route}minified`, {
2968
+ params
2969
+ });
2970
+ return response.data;
2971
+ }
2972
+ async findById(id) {
2973
+ const response = await this.api.get(`${this.route}${id}`);
2974
+ return response.data;
2975
+ }
2976
+ async update(id, body) {
2977
+ await this.api.post(`${this.route}${id}`, body);
2978
+ }
2979
+ async deleteOne(id) {
2980
+ await this.api.delete(`${this.route}${id}`);
2981
+ }
2982
+ };
2983
+
2984
+ // src/modules/tickets/language.ts
2985
+ var language_exports2 = {};
2986
+ __export(language_exports2, {
2987
+ default: () => Repository78
2988
+ });
2989
+ var Repository78 = class {
2990
+ constructor({ api, route, publicRoute }) {
2991
+ this.api = api;
2992
+ this.route = route;
2993
+ this.publicRoute = publicRoute;
2994
+ }
2995
+ async create(body) {
2996
+ const response = await this.api.post(`${this.route}`, body);
2997
+ return response.data;
2998
+ }
2999
+ async find() {
3000
+ const response = await this.api.get(`${this.route}`);
3001
+ return response.data;
3002
+ }
3003
+ async findMinified(params) {
3004
+ const response = await this.api.get(`${this.route}minified`, {
3005
+ params
3006
+ });
3007
+ return response.data;
3008
+ }
3009
+ async findById(id) {
3010
+ const response = await this.api.get(`${this.route}${id}`);
3011
+ return response.data;
3012
+ }
3013
+ async update(id, body) {
3014
+ await this.api.post(`${this.route}${id}`, body);
3015
+ }
3016
+ async deleteOne(id) {
3017
+ await this.api.delete(`${this.route}${id}`);
3018
+ }
3019
+ };
3020
+
3021
+ // src/modules/tickets/clt.ts
3022
+ var clt_exports = {};
3023
+ __export(clt_exports, {
3024
+ default: () => Repository79
3025
+ });
3026
+ var Repository79 = class {
3027
+ constructor({ api, route, publicRoute }) {
3028
+ this.api = api;
3029
+ this.route = route;
3030
+ this.publicRoute = publicRoute;
3031
+ }
3032
+ async create(body) {
3033
+ const response = await this.api.post(`${this.route}`, body);
3034
+ return response.data;
3035
+ }
3036
+ async find() {
3037
+ const response = await this.api.get(`${this.route}`);
3038
+ return response.data;
3039
+ }
3040
+ async findMinified(params) {
3041
+ const response = await this.api.get(`${this.route}minified`, {
3042
+ params
3043
+ });
3044
+ return response.data;
3045
+ }
3046
+ async findById(id) {
3047
+ const response = await this.api.get(`${this.route}${id}`);
3048
+ return response.data;
3049
+ }
3050
+ async update(id, body) {
3051
+ await this.api.post(`${this.route}${id}`, body);
3052
+ }
3053
+ async deleteOne(id) {
3054
+ await this.api.delete(`${this.route}${id}`);
3055
+ }
3056
+ };
3057
+
3058
+ // src/modules/supply/startDocumentHeaderLastUpdate.ts
3059
+ var startDocumentHeaderLastUpdate_exports = {};
3060
+ __export(startDocumentHeaderLastUpdate_exports, {
3061
+ default: () => Repository80
3062
+ });
3063
+ var Repository80 = class {
3064
+ constructor({ api, route, publicRoute }) {
3065
+ this.api = api;
3066
+ this.route = route;
3067
+ this.publicRoute = publicRoute;
3068
+ }
3069
+ async findById(selector) {
3070
+ const response = await this.api.get(`${this.route}${selector.id}`);
3071
+ return response.data;
3072
+ }
3073
+ };
3074
+
3075
+ // src/modules/user/persona.ts
3076
+ var persona_exports = {};
3077
+ __export(persona_exports, {
3078
+ default: () => Repository81
3079
+ });
3080
+ var Repository81 = class {
3081
+ constructor({ api, route, publicRoute }) {
3082
+ this.api = api;
3083
+ this.route = route;
3084
+ this.publicRoute = publicRoute;
3085
+ }
3086
+ async findByOwnerId(params) {
3087
+ const response = await this.api.get(`${this.route}by_owner`, {
3088
+ params
3089
+ });
3090
+ return response.data;
3091
+ }
3092
+ async findById(selector) {
3093
+ const response = await this.api.get(`${this.route}${selector.id}`);
3094
+ return response.data;
3095
+ }
3096
+ async findContactPersonaByOwnerId(params) {
3097
+ const response = await this.api.get(`${this.route}contact`, { params });
3098
+ return response.data;
3099
+ }
3100
+ async create(body) {
3101
+ const response = await this.api.post(`${this.route}`, body);
3102
+ return response.data;
3103
+ }
3104
+ async update(selector, body) {
3105
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3106
+ return response.data;
3107
+ }
3108
+ async deleteOne(params) {
3109
+ const response = await this.api.delete(`${this.route}`, { params });
3110
+ return response.data;
3111
+ }
3112
+ async findByBasic(params) {
3113
+ const response = await this.api.get(`${this.route}basic_search`, {
3114
+ params
3115
+ });
3116
+ return response.data;
3117
+ }
3118
+ async find(data) {
3119
+ const response = await this.api.get(`${this.route}`, {
3120
+ data
3121
+ });
3122
+ return response.data;
3123
+ }
3124
+ async findByEmail(data) {
3125
+ const response = await this.api.get(`${this.route}by_email`, {
3126
+ data
3127
+ });
3128
+ return response.data;
3129
+ }
3130
+ };
3131
+
3132
+ // src/modules/integration/projectInfo.ts
3133
+ var projectInfo_exports = {};
3134
+ __export(projectInfo_exports, {
3135
+ default: () => Repository82
3136
+ });
3137
+ var Repository82 = class {
3138
+ constructor({ api, route, publicRoute }) {
3139
+ this.api = api;
3140
+ this.route = route;
3141
+ this.publicRoute = publicRoute;
3142
+ }
3143
+ async sendEmail(body) {
3144
+ await this.api.post(`${this.route}sendEmail`, body);
3145
+ }
3146
+ };
3147
+
3148
+ // src/modules/document/order.ts
3149
+ var order_exports = {};
3150
+ __export(order_exports, {
3151
+ default: () => Repository83
3152
+ });
3153
+ var Repository83 = class {
3154
+ constructor({ api, route, publicRoute }) {
3155
+ this.api = api;
3156
+ this.route = route;
3157
+ this.publicRoute = publicRoute;
3158
+ }
3159
+ async unsetCativado(params) {
3160
+ const response = await this.api.post(`${this.route}unset_cativado`, {
3161
+ params
3162
+ });
3163
+ return response.data;
3164
+ }
3165
+ async findStockToOrder(params) {
3166
+ const response = await this.api.get(`${this.route}check_lines_to_order`, {
3167
+ params
3168
+ });
3169
+ return response.data;
3170
+ }
3171
+ async findProvidersWithStockToOrder() {
3172
+ const response = await this.api.get(`${this.route}stock_order_provider`);
3173
+ return response.data;
3174
+ }
3175
+ async undoEncomendaVA(data) {
3176
+ await this.api.post(`${this.route}undo_encomenda_va`, data);
3177
+ }
3178
+ async setProvider(data) {
3179
+ await this.api.post(`${this.route}set_provider`, data);
3180
+ }
3181
+ async unsetProvider({ id }) {
3182
+ await this.api.post(`${this.route}${id}/unset_provider`);
3183
+ }
3184
+ async undoEncomendaStock(data) {
3185
+ await this.api.post(`${this.route}undo_encomenda_stock`, data);
3186
+ }
3187
+ async undoProviderOrder(data) {
3188
+ await this.api.post(`${this.route}undo_provider_order`, data);
3189
+ }
3190
+ async conferirEncomendaCliente(data) {
3191
+ const response = await this.api.post(`${this.route}check_client_order`, data);
3192
+ return response.data;
3193
+ }
3194
+ async find(params) {
3195
+ const response = await this.api.get(`${this.route}`, { params });
3196
+ return response.data;
3197
+ }
3198
+ };
3199
+
3200
+ // src/modules/document/purchase.ts
3201
+ var purchase_exports = {};
3202
+ __export(purchase_exports, {
3203
+ default: () => Repository84
3204
+ });
3205
+ var Repository84 = class {
3206
+ constructor({ api, route, publicRoute }) {
3207
+ this.api = api;
3208
+ this.route = route;
3209
+ this.publicRoute = publicRoute;
3210
+ }
3211
+ async purchaseFromProvider(data) {
3212
+ await this.api.post(`${this.route}purchase_from_provider`, data);
3213
+ }
3214
+ async findUnpaidMaterialEntrance(params) {
3215
+ const response = await this.api.get(`${this.route}unpaid_material_entrance`, {
3216
+ params
3217
+ });
3218
+ return response.data;
3219
+ }
3220
+ async findUnpaidMaterialEntranceProviders() {
3221
+ const response = await this.api.get(`${this.route}unpaid_material_entrance_providers`);
3222
+ return response.data;
3223
+ }
3224
+ async sync(data) {
3225
+ const response = await this.api.post(`${this.route}sync`, data);
3226
+ return response.data;
3227
+ }
3228
+ };
3229
+
3230
+ // src/modules/document/materialEntrance.ts
3231
+ var materialEntrance_exports = {};
3232
+ __export(materialEntrance_exports, {
3233
+ default: () => Repository85
3234
+ });
3235
+ var Repository85 = class {
3236
+ constructor({ api, route, publicRoute }) {
3237
+ this.api = api;
3238
+ this.route = route;
3239
+ this.publicRoute = publicRoute;
3240
+ }
3241
+ async findMaterialEntranceProviders() {
3242
+ const response = await this.api.get(`${this.route}material_entrance_providers`);
3243
+ return response.data;
3244
+ }
3245
+ async findUnfinishedPickings({
3246
+ id
3247
+ }) {
3248
+ const response = await this.api.get(`${this.route}unfinished_pickings/${id}`);
3249
+ return response.data;
3250
+ }
3251
+ async finalizarEntradaMaterial(data) {
3252
+ const response = await this.api.post(`${this.route}finalize_material_entrance`, data);
3253
+ return response.data;
3254
+ }
3255
+ async undoEntradaMaterial(data) {
3256
+ await this.api.post(`${this.route}undo_material_entrance`, data);
3257
+ }
3258
+ printLabelToPdfUrl({ product_id }, {
3259
+ quantity,
3260
+ ef_name,
3261
+ pc_document_number,
3262
+ prison,
3263
+ note
3264
+ }, token) {
3265
+ const qs = new URLSearchParams();
3266
+ qs.set("ef_name", ef_name);
3267
+ qs.set("quantity", quantity.toString());
3268
+ if (pc_document_number) {
3269
+ qs.set("pc_document_number", pc_document_number.toString());
3270
+ }
3271
+ if (note) {
3272
+ qs.set("note", note.toString());
3273
+ }
3274
+ qs.set("prison", prison.toString());
3275
+ qs.set("token", token);
3276
+ return `${this.publicRoute}print_label_pdf/${product_id}?${qs.toString()}`;
3277
+ }
3278
+ printBulkLabelToPdfUrl({
3279
+ groupLabel,
3280
+ saved_em_picking_ids,
3281
+ token
3282
+ }) {
3283
+ const qs = new URLSearchParams();
3284
+ qs.set("groupLabel", groupLabel.toString());
3285
+ qs.set("saved_em_picking_ids", saved_em_picking_ids);
3286
+ qs.set("token", token);
3287
+ return `${this.publicRoute}print_bulk_label_pdf?${qs.toString()}`;
3288
+ }
3289
+ };
3290
+
3291
+ // src/modules/document/transformado.ts
3292
+ var transformado_exports = {};
3293
+ __export(transformado_exports, {
3294
+ default: () => Repository86
3295
+ });
3296
+ var Repository86 = class {
3297
+ constructor({ api, route, publicRoute }) {
3298
+ this.api = api;
3299
+ this.route = route;
3300
+ this.publicRoute = publicRoute;
3301
+ }
3302
+ async create(body) {
3303
+ const response = await this.api.post(`${this.route}`, body);
3304
+ return response.data;
3305
+ }
3306
+ };
3307
+
3308
+ // src/modules/document/upfrontReturn.ts
3309
+ var upfrontReturn_exports = {};
3310
+ __export(upfrontReturn_exports, {
3311
+ default: () => Repository87
3312
+ });
3313
+ var Repository87 = class {
3314
+ constructor({ api, route, publicRoute }) {
3315
+ this.api = api;
3316
+ this.route = route;
3317
+ this.publicRoute = publicRoute;
3318
+ }
3319
+ async create(selector, data) {
3320
+ const response = await this.api.post(`${this.route}${selector.id}`, data);
3321
+ return response.data;
3322
+ }
3323
+ };
3324
+
3325
+ // src/modules/stock/savedEmPicking.ts
3326
+ var savedEmPicking_exports = {};
3327
+ __export(savedEmPicking_exports, {
3328
+ default: () => Repository88
3329
+ });
3330
+ var Repository88 = class {
3331
+ constructor({ api, route, publicRoute }) {
3332
+ this.api = api;
3333
+ this.route = route;
3334
+ this.publicRoute = publicRoute;
3335
+ }
3336
+ async create(body) {
3337
+ const response = await this.api.post(`${this.route}`, body);
3338
+ return response.data;
3339
+ }
3340
+ async createMany(body) {
3341
+ const response = await this.api.post(`${this.route}many`, body);
3342
+ return response.data;
3343
+ }
3344
+ async deleteOne(selector) {
3345
+ await this.api.delete(`${this.route}${selector.id}`);
3346
+ }
3347
+ async deleteMany(body) {
3348
+ await this.api.post(`${this.route}delete_many`, body);
3349
+ }
3350
+ };
3351
+
3352
+ // src/modules/integration/emailTemplate.ts
3353
+ var emailTemplate_exports = {};
3354
+ __export(emailTemplate_exports, {
3355
+ default: () => Repository89
3356
+ });
3357
+ var Repository89 = class {
3358
+ constructor({ api, route, publicRoute }) {
3359
+ this.api = api;
3360
+ this.route = route;
3361
+ this.publicRoute = publicRoute;
3362
+ }
3363
+ async find() {
3364
+ const response = await this.api.get(`${this.route}`);
3365
+ return response.data;
3366
+ }
3367
+ async create(data) {
3368
+ const response = await this.api.post(`${this.route}`, data);
3369
+ return response.data;
3370
+ }
3371
+ async update(selector, data) {
3372
+ const response = await this.api.put(`${this.route}${selector.id}`, data);
3373
+ return response.data;
3374
+ }
3375
+ async deleteOne(selector) {
3376
+ await this.api.delete(`${this.route}${selector.id}`);
3377
+ }
3378
+ async send(data) {
3379
+ const response = await this.api.post(`${this.route}send`, data);
3380
+ return response.data;
3381
+ }
3382
+ };
3383
+
3384
+ // src/modules/integration/emailTemplateAttachment.ts
3385
+ var emailTemplateAttachment_exports = {};
3386
+ __export(emailTemplateAttachment_exports, {
3387
+ default: () => Repository90
3388
+ });
3389
+ var Repository90 = class {
3390
+ constructor({ api, route, publicRoute }) {
3391
+ this.api = api;
3392
+ this.route = route;
3393
+ this.publicRoute = publicRoute;
3394
+ }
3395
+ async create(data) {
3396
+ const response = await this.api.post(`${this.route}`, data);
3397
+ return response.data;
3398
+ }
3399
+ async deleteOne(selector) {
3400
+ await this.api.delete(`${this.route}${selector.id}`);
3401
+ }
3402
+ };
3403
+
3404
+ // src/modules/stock/prison.ts
3405
+ var prison_exports = {};
3406
+ __export(prison_exports, {
3407
+ default: () => Repository91
3408
+ });
3409
+ var Repository91 = class {
3410
+ constructor({ api, route, publicRoute }) {
3411
+ this.api = api;
3412
+ this.route = route;
3413
+ this.publicRoute = publicRoute;
3414
+ }
3415
+ async putLineInPrison(data) {
3416
+ const response = await this.api.post(`${this.route}put_in_prison`, data);
3417
+ return response.data;
3418
+ }
3419
+ async removeLineFromPrison(data) {
3420
+ const response = await this.api.post(`${this.route}remove_from_prison`, data);
3421
+ return response.data;
3422
+ }
3423
+ async findLinesInPrison() {
3424
+ const response = await this.api.get(`${this.route}in_prison`, {});
3425
+ return response.data;
3426
+ }
3427
+ async findLinesInPrisonProviders() {
3428
+ const response = await this.api.get(`${this.route}in_prison_providers`, {});
3429
+ return response.data;
3430
+ }
3431
+ async checkLinesInPrison(data) {
3432
+ await this.api.post(`${this.route}check_in_prison`, data);
3433
+ }
3434
+ async createLinesInPrison(data) {
3435
+ const response = await this.api.post(`${this.route}create_lines`, data);
3436
+ return response.data;
3437
+ }
3438
+ };
3439
+
3440
+ // src/modules/document/quebra.ts
3441
+ var quebra_exports = {};
3442
+ __export(quebra_exports, {
3443
+ default: () => Repository92
3444
+ });
3445
+ var Repository92 = class {
3446
+ constructor({ api, route, publicRoute }) {
3447
+ this.api = api;
3448
+ this.route = route;
3449
+ this.publicRoute = publicRoute;
3450
+ }
3451
+ async findInventoryLosses() {
3452
+ const response = await this.api.get(`${this.route}`);
3453
+ return response.data;
3454
+ }
3455
+ async findInventoryLossesProviders() {
3456
+ const response = await this.api.get(`${this.route}providers`);
3457
+ return response.data;
3458
+ }
3459
+ async create(body) {
3460
+ const response = await this.api.post(`${this.route}`, body);
3461
+ return response.data;
3462
+ }
3463
+ async createMany(body) {
3464
+ const response = await this.api.post(`${this.route}create_many`, body);
3465
+ return response.data;
3466
+ }
3467
+ async deleteInventoryLosses(data) {
3468
+ await this.api.delete(`${this.route}inventory_loss`, { data });
3469
+ }
3470
+ };
3471
+
3472
+ // src/modules/document/inventario.ts
3473
+ var inventario_exports = {};
3474
+ __export(inventario_exports, {
3475
+ default: () => Repository93
3476
+ });
3477
+ var Repository93 = class {
3478
+ constructor({ api, route, publicRoute }) {
3479
+ this.api = api;
3480
+ this.route = route;
3481
+ this.publicRoute = publicRoute;
3482
+ }
3483
+ async createInventory(data) {
3484
+ await this.api.post(`${this.route}`, data);
3485
+ }
3486
+ };
3487
+
3488
+ // src/modules/document/returnToProvider.ts
3489
+ var returnToProvider_exports = {};
3490
+ __export(returnToProvider_exports, {
3491
+ default: () => Repository94
3492
+ });
3493
+ var Repository94 = class {
3494
+ constructor({ api, route, publicRoute }) {
3495
+ this.api = api;
3496
+ this.route = route;
3497
+ this.publicRoute = publicRoute;
3498
+ }
3499
+ async findLinesToReturn(params) {
3500
+ const response = await this.api.get(`${this.route}lines_to_return`, {
3501
+ params
3502
+ });
3503
+ return response.data;
3504
+ }
3505
+ async findLinesToReturnProviders() {
3506
+ const response = await this.api.get(`${this.route}lines_to_return_providers`);
3507
+ return response.data;
3508
+ }
3509
+ async checkLinesToReturn(data) {
3510
+ await this.api.post(`${this.route}check_to_return`, data);
3511
+ }
3512
+ };
3513
+
3514
+ // src/modules/integration/emailVerification.ts
3515
+ var emailVerification_exports = {};
3516
+ __export(emailVerification_exports, {
3517
+ default: () => Repository95
3518
+ });
3519
+ var Repository95 = class {
3520
+ constructor({ api, route, publicRoute }) {
3521
+ this.api = api;
3522
+ this.route = route;
3523
+ this.publicRoute = publicRoute;
3524
+ }
3525
+ async isVerified(params) {
3526
+ const response = await this.api.get(`${this.route}`, { params });
3527
+ return response.data;
3528
+ }
3529
+ async sendVerificationEmail(data) {
3530
+ const response = await this.api.post(`${this.route}`, data);
3531
+ return response.data;
3532
+ }
3533
+ async markAsVerified(data) {
3534
+ const response = await this.api.put(`${this.publicRoute}`, data);
3535
+ return response.data;
3536
+ }
3537
+ };
3538
+
3539
+ // src/modules/integration/emailLog.ts
3540
+ var emailLog_exports = {};
3541
+ __export(emailLog_exports, {
3542
+ default: () => Repository96
3543
+ });
3544
+ var Repository96 = class {
3545
+ constructor({ api, route, publicRoute }) {
3546
+ this.api = api;
3547
+ this.route = route;
3548
+ this.publicRoute = publicRoute;
3549
+ }
3550
+ async find(params) {
3551
+ const response = await this.api.get(`${this.route}`, { params });
3552
+ return response.data;
3553
+ }
3554
+ async findById({
3555
+ id
3556
+ }) {
3557
+ const response = await this.api.get(`${this.route}${id}`);
3558
+ return response.data;
3559
+ }
3560
+ async findByDocumentHeaderId({
3561
+ id
3562
+ }) {
3563
+ const response = await this.api.get(`${this.route}document_header/${id}`);
3564
+ return response.data;
3565
+ }
3566
+ async checkSent(body) {
3567
+ const response = await this.api.post(`${this.route}check_sent`, body);
3568
+ return response.data;
3569
+ }
3570
+ };
3571
+
3572
+ // src/modules/supply/documentLineNote.ts
3573
+ var documentLineNote_exports = {};
3574
+ __export(documentLineNote_exports, {
3575
+ default: () => Repository97
3576
+ });
3577
+ var Repository97 = class {
3578
+ constructor({ api, route, publicRoute }) {
3579
+ this.api = api;
3580
+ this.route = route;
3581
+ this.publicRoute = publicRoute;
3582
+ }
3583
+ async create(body) {
3584
+ const response = await this.api.post(`${this.route}`, body);
3585
+ return response.data;
3586
+ }
3587
+ async update(selector, body) {
3588
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3589
+ return response.data;
3590
+ }
3591
+ async deleteOne(selector) {
3592
+ const response = await this.api.delete(`${this.route}${selector.id}`);
3593
+ return response.data;
3594
+ }
3595
+ };
3596
+
3597
+ // src/modules/stock/savedProviderProposal.ts
3598
+ var savedProviderProposal_exports = {};
3599
+ __export(savedProviderProposal_exports, {
3600
+ default: () => Repository98
3601
+ });
3602
+ var Repository98 = class {
3603
+ constructor({ api, route, publicRoute }) {
3604
+ this.api = api;
3605
+ this.route = route;
3606
+ this.publicRoute = publicRoute;
3607
+ }
3608
+ async findByProviderId(selector) {
3609
+ const response = await this.api.get(`${this.route}${selector.id}`);
3610
+ return response.data;
3611
+ }
3612
+ async create(body) {
3613
+ const response = await this.api.post(`${this.route}`, body);
3614
+ return response.data;
3615
+ }
3616
+ async update(selector, body) {
3617
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3618
+ return response.data;
3619
+ }
3620
+ async deleteOne(selector) {
3621
+ const response = await this.api.delete(`${this.route}${selector.id}`);
3622
+ return response.data;
3623
+ }
3624
+ };
3625
+
3626
+ // src/modules/stock/productGoogleSheets.ts
3627
+ var productGoogleSheets_exports = {};
3628
+ __export(productGoogleSheets_exports, {
3629
+ default: () => Repository99
3630
+ });
3631
+ var Repository99 = class {
3632
+ constructor({ api, route, publicRoute }) {
3633
+ this.api = api;
3634
+ this.route = route;
3635
+ this.publicRoute = publicRoute;
3636
+ }
3637
+ async basicSearch(params) {
3638
+ const response = await this.api.get(`${this.route}basic_search`, {
3639
+ params
3640
+ });
3641
+ return response.data;
3642
+ }
3643
+ async findReferenceAndIdForMobile(params) {
3644
+ const response = await this.api.get(`${this.route}reference_and_id_mobile`, {
3645
+ params
3646
+ });
3647
+ return response.data;
3648
+ }
3649
+ async findDataForMobile(params) {
3650
+ const response = await this.api.get(`${this.route}data_mobile/${params.id}`);
3651
+ return response.data;
3652
+ }
3653
+ async findStockForMobile(params) {
3654
+ const response = await this.api.get(`${this.route}stock_mobile/${params.id}`);
3655
+ return response.data;
3656
+ }
3657
+ async findPreArtigo(params) {
3658
+ const response = await this.api.get(`${this.route}pre_artigo`, {
3659
+ params
3660
+ });
3661
+ return response.data;
3662
+ }
3663
+ async updatePricesFromPreArtigo() {
3664
+ await this.api.get(`${this.route}update_prices_from_pre_artigo`);
3665
+ }
3666
+ async validateByRef(params) {
3667
+ const response = await this.api.get(`${this.route}validate_by_ref`, {
3668
+ params
3669
+ });
3670
+ return response.data;
3671
+ }
3672
+ async findSimilarProductsByName(params) {
3673
+ const response = await this.api.get(`${this.route}similar_products`, {
3674
+ params
3675
+ });
3676
+ return response.data;
3677
+ }
3678
+ async findByProductType(params) {
3679
+ const response = await this.api.get(`${this.route}by_product_type`, {
3680
+ params
3681
+ });
3682
+ return response.data;
3683
+ }
3684
+ async findById({
3685
+ id
3686
+ }) {
3687
+ const response = await this.api.get(`${this.route}${id}`);
3688
+ return response.data;
3689
+ }
3690
+ async findByIdWithStock({
3691
+ id
3692
+ }) {
3693
+ const response = await this.api.get(`${this.route}${id}/with_stock`);
3694
+ return response.data;
3695
+ }
3696
+ async updateGoogleSheetsLinesProduct(body) {
3697
+ const response = await this.api.put(`${this.route}update_google_sheets_lines_product`, body);
3698
+ return response.data;
3699
+ }
3700
+ async googleSheetsFieldsByRef(params) {
3701
+ const response = await this.api.get(
3702
+ `${this.route}google_sheets_fields_by_ref/${params.reference}`
3703
+ );
3704
+ return response.data;
3705
+ }
3706
+ async findRowPositionOnSheetsWithColumns(params) {
3707
+ const response = await this.api.get(`${this.route}sheet_row_and_columns/${params.selector}`);
3708
+ return response.data;
3709
+ }
3710
+ async checkStockByIds(data) {
3711
+ const response = await this.api.post(`${this.route}check_stock_by_ids`, data);
3712
+ return response.data;
3713
+ }
3714
+ async create(body) {
3715
+ const response = await this.api.post(`${this.route}`, body);
3716
+ return response.data;
3717
+ }
3718
+ async update({ id }, body) {
3719
+ await this.api.put(`${this.route}${id}`, body);
3720
+ }
3721
+ async deleteOne(selector) {
3722
+ await this.api.delete(`${this.route}${selector.id}`);
3723
+ }
3724
+ printLabelToPdfUrl({ id }, token) {
3725
+ const qs = new URLSearchParams();
3726
+ qs.set("token", token);
3727
+ return `${this.publicRoute}print_label_pdf/${id}?${qs.toString()}`;
3728
+ }
3729
+ printLabelToPdfBulk(ids, token) {
3730
+ const qs = new URLSearchParams();
3731
+ qs.set("token", token);
3732
+ qs.set("ids", ids.join(","));
3733
+ return `${this.publicRoute}print_label_pdf/bulk?${qs.toString()}`;
3734
+ }
3735
+ async updateDbFromSheets() {
3736
+ await this.api.post(`${this.route}update_db_from_sheets`);
3737
+ }
3738
+ async partialLocation(body) {
3739
+ await this.api.post(`${this.route}partial_location`, body);
3740
+ }
3741
+ async fullLocation(body) {
3742
+ await this.api.post(`${this.route}full_location`, body);
3743
+ }
3744
+ };
3745
+
3746
+ // src/modules/stock/task.ts
3747
+ var task_exports = {};
3748
+ __export(task_exports, {
3749
+ default: () => Repository100
3750
+ });
3751
+ var Repository100 = class {
3752
+ constructor({ api, route, publicRoute }) {
3753
+ this.api = api;
3754
+ this.route = route;
3755
+ this.publicRoute = publicRoute;
3756
+ }
3757
+ async find(selector) {
3758
+ return this.api.get(`${this.route}${selector}`);
3759
+ }
3760
+ async findWithMessages(selector) {
3761
+ return this.api.get(`${this.route}with_messages`, {
3762
+ params: selector
3763
+ });
3764
+ }
3765
+ async create(body) {
3766
+ const response = await this.api.post(`${this.route}`, body);
3767
+ return response.data;
3768
+ }
3769
+ async update(selector, body) {
3770
+ await this.api.put(`${this.route}${selector.id}`, body);
3771
+ }
3772
+ async delete(selector) {
3773
+ await this.api.delete(`${this.route}${selector.id}`);
3774
+ }
3775
+ async findByOwnerId(selector) {
3776
+ const response = await this.api.delete(`${this.route}by_owner/${selector.owner_id}`);
3777
+ return response.data;
3778
+ }
3779
+ };
3780
+
3781
+ // src/modules/stock/taskMessage.ts
3782
+ var taskMessage_exports = {};
3783
+ __export(taskMessage_exports, {
3784
+ default: () => Repository101
3785
+ });
3786
+ var Repository101 = class {
3787
+ constructor({ api, route, publicRoute }) {
3788
+ this.api = api;
3789
+ this.route = route;
3790
+ this.publicRoute = publicRoute;
3791
+ }
3792
+ async create(body) {
3793
+ const response = await this.api.post(`${this.route}`, body);
3794
+ return response.data;
3795
+ }
3796
+ async update(selector, body) {
3797
+ await this.api.put(`${this.route}${selector.id}`, body);
3798
+ }
3799
+ async delete(selector) {
3800
+ await this.api.delete(`${this.route}${selector.id}`);
3801
+ }
3802
+ };
3803
+
3804
+ // src/modules/stock/recurrentTasks.ts
3805
+ var recurrentTasks_exports = {};
3806
+ __export(recurrentTasks_exports, {
3807
+ default: () => Repository102
3808
+ });
3809
+ var Repository102 = class {
3810
+ constructor({ api, route, publicRoute }) {
3811
+ this.api = api;
3812
+ this.route = route;
3813
+ this.publicRoute = publicRoute;
3814
+ }
3815
+ async from_master() {
3816
+ return this.api.post(`${this.route}from_master`);
3817
+ }
3818
+ async from_master_checked() {
3819
+ return this.api.post(`${this.route}from_master`);
3820
+ }
3821
+ };
3822
+
3823
+ // src/modules/stock/taskRead.ts
3824
+ var taskRead_exports = {};
3825
+ __export(taskRead_exports, {
3826
+ default: () => Repository103
3827
+ });
3828
+ var Repository103 = class {
3829
+ constructor({ api, route, publicRoute }) {
3830
+ this.api = api;
3831
+ this.route = route;
3832
+ this.publicRoute = publicRoute;
3833
+ }
3834
+ async create(body) {
3835
+ await this.api.post(`${this.route}`, body);
3836
+ }
3837
+ async delete(params) {
3838
+ await this.api.delete(`${this.route}`, { data: params });
3839
+ }
3840
+ };
3841
+
3842
+ // src/modules/user/theme.ts
3843
+ var theme_exports = {};
3844
+ __export(theme_exports, {
3845
+ default: () => Repository104
3846
+ });
3847
+ var Repository104 = class {
3848
+ constructor({ api, route, publicRoute }) {
3849
+ this.api = api;
3850
+ this.route = route;
3851
+ this.publicRoute = publicRoute;
3852
+ }
3853
+ async createOrUpdate(body) {
3854
+ await this.api.post(`${this.route}`, body);
3855
+ }
3856
+ };
3857
+
3858
+ // src/modules/stock/dashboard.ts
3859
+ var dashboard_exports = {};
3860
+ __export(dashboard_exports, {
3861
+ default: () => Repository105
3862
+ });
3863
+ var Repository105 = class {
3864
+ constructor({ api, route, publicRoute }) {
3865
+ this.api = api;
3866
+ this.route = route;
3867
+ this.publicRoute = publicRoute;
3868
+ }
3869
+ async findByDate(selector) {
3870
+ const response = await this.api.get(`${this.route}${selector.date}`);
3871
+ return response.data;
3872
+ }
3873
+ };
3874
+
3875
+ // src/modules/stock/chatRapidMessage.ts
3876
+ var chatRapidMessage_exports = {};
3877
+ __export(chatRapidMessage_exports, {
3878
+ default: () => Repository106
3879
+ });
3880
+ var Repository106 = class {
3881
+ constructor({ api, route, publicRoute }) {
3882
+ this.api = api;
3883
+ this.route = route;
3884
+ this.publicRoute = publicRoute;
3885
+ }
3886
+ async create(data) {
3887
+ const response = await this.api.post(`${this.route}`, data);
3888
+ return response.data;
3889
+ }
3890
+ async findMinified() {
3891
+ const response = await this.api.get(`${this.route}`);
3892
+ return response.data;
3893
+ }
3894
+ async findById(selector) {
3895
+ const response = await this.api.get(`${this.route}${selector.id}`);
3896
+ return response.data;
3897
+ }
3898
+ async update(selector, data) {
3899
+ const response = await this.api.put(`${this.route}${selector.date}`, data);
3900
+ return response.data;
3901
+ }
3902
+ async delete(selector) {
3903
+ await this.api.delete(`${this.route}${selector.id}`);
3904
+ }
3905
+ };
3906
+
3907
+ // src/modules/stock/sideMenu.ts
3908
+ var sideMenu_exports = {};
3909
+ __export(sideMenu_exports, {
3910
+ default: () => Repository107
3911
+ });
3912
+ var Repository107 = class {
3913
+ constructor({ api, route, publicRoute }) {
3914
+ this.api = api;
3915
+ this.route = route;
3916
+ this.publicRoute = publicRoute;
3917
+ }
3918
+ async findSideMenuStoreOperators() {
3919
+ const response = await this.api.get(`${this.route}side_menu_store_operators`);
3920
+ return response.data;
3921
+ }
3922
+ async findByDocumentLineState(params) {
3923
+ const response = await this.api.get(`${this.route}by_document_line_state`, {
3924
+ params
3925
+ });
3926
+ return response.data;
3927
+ }
3928
+ async findByState(params) {
3929
+ const response = await this.api.get(`${this.route}find_by_state`, {
3930
+ params
3931
+ });
3932
+ return response.data;
3933
+ }
3934
+ async findSideMenuCounters() {
3935
+ const response = await this.api.get(`${this.route}counters`);
3936
+ return response.data;
3937
+ }
3938
+ };
3939
+
3940
+ // src/modules/view/errorLog.ts
3941
+ var errorLog_exports = {};
3942
+ __export(errorLog_exports, {
3943
+ default: () => Repository108
3944
+ });
3945
+ var Repository108 = class {
3946
+ constructor({ api, route, publicRoute }) {
3947
+ this.api = api;
3948
+ this.route = route;
3949
+ this.publicRoute = publicRoute;
3950
+ }
3951
+ async create(body) {
3952
+ await this.api.post(`${this.route}`, body);
3953
+ }
3954
+ };
3955
+
3956
+ // src/modules/view/adminPanel.ts
3957
+ var adminPanel_exports = {};
3958
+ __export(adminPanel_exports, {
3959
+ default: () => Repository109
3960
+ });
3961
+ var Repository109 = class {
3962
+ constructor({ api, route, publicRoute }) {
3963
+ this.api = api;
3964
+ this.route = route;
3965
+ this.publicRoute = publicRoute;
3966
+ }
3967
+ async getData(params) {
3968
+ const response = await this.api.get(`${this.route}`, { params });
3969
+ return response.data;
3970
+ }
3971
+ };
3972
+
3973
+ // src/modules/supply/documentLineRm.ts
3974
+ var documentLineRm_exports = {};
3975
+ __export(documentLineRm_exports, {
3976
+ default: () => Repository110
3977
+ });
3978
+ var Repository110 = class {
3979
+ constructor({ api, route, publicRoute }) {
3980
+ this.api = api;
3981
+ this.route = route;
3982
+ this.publicRoute = publicRoute;
3983
+ }
3984
+ async findByOwnerId({
3985
+ owner_id
3986
+ }) {
3987
+ const response = await this.api.get(`${this.route}${owner_id}`);
3988
+ return response.data;
3989
+ }
3990
+ async update(data) {
3991
+ await this.api.put(`${this.route}`, data);
3992
+ }
3993
+ };
3994
+
3995
+ // src/modules/supply/documentLineMt.ts
3996
+ var documentLineMt_exports = {};
3997
+ __export(documentLineMt_exports, {
3998
+ default: () => Repository111
3999
+ });
4000
+ var Repository111 = class {
4001
+ constructor({ api, route, publicRoute }) {
4002
+ this.api = api;
4003
+ this.route = route;
4004
+ this.publicRoute = publicRoute;
4005
+ }
4006
+ async findByOwnerId({
4007
+ owner_id
4008
+ }) {
4009
+ const response = await this.api.get(`${this.route}${owner_id}`);
4010
+ return response.data;
4011
+ }
4012
+ async update(data) {
4013
+ await this.api.put(`${this.route}`, data);
4014
+ }
4015
+ };
4016
+
4017
+ // src/modules/user/chatSubscriber.ts
4018
+ var chatSubscriber_exports = {};
4019
+ __export(chatSubscriber_exports, {
4020
+ default: () => Repository112
4021
+ });
4022
+ var Repository112 = class {
4023
+ constructor({ api, route, publicRoute }) {
4024
+ this.api = api;
4025
+ this.route = route;
4026
+ this.publicRoute = publicRoute;
4027
+ }
4028
+ async createOrUpdate(data) {
4029
+ const response = await this.api.post(`${this.route}`, data);
4030
+ return response.data;
4031
+ }
4032
+ async findByOwnerId(selector) {
4033
+ const response = await this.api.get(`${this.route}by_owner_id/${selector.id}`);
4034
+ return response.data;
4035
+ }
4036
+ async findByDocumentHeaderId(selector) {
4037
+ const response = await this.api.get(`${this.route}by_document_header_id/${selector.id}`);
4038
+ return response.data;
4039
+ }
4040
+ async findByPersonaId(selector) {
4041
+ const response = await this.api.get(`${this.route}by_persona_id/${selector.id}`);
4042
+ return response.data;
4043
+ }
4044
+ async deleteOne(selector) {
4045
+ await this.api.post(`${this.route}/id/${selector}`);
4046
+ }
4047
+ };
4048
+
4049
+ // src/main.ts
4050
+ var API = class {
4051
+ constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
4052
+ this.processEnvironment = processEnvironment || "localhost";
4053
+ const defaultHeaders = new AxiosHeaders();
4054
+ if (apikey) {
4055
+ defaultHeaders.set("apikey", apikey);
4056
+ }
4057
+ if (tokenBearer) {
4058
+ defaultHeaders.setAuthorization(tokenBearer);
4059
+ }
4060
+ this.client = axios.create({
4061
+ baseURL: gatewayUrl,
4062
+ headers: defaultHeaders
4063
+ });
4064
+ const getServicePath = (service) => {
4065
+ const baseUrl = services[service];
4066
+ const servicePath = processEnvironment === "localhost" ? "/" : `${service}/`;
4067
+ return `${baseUrl}${servicePath}`;
4068
+ };
4069
+ this.services = {
4070
+ stock: getServicePath("stock"),
4071
+ users: getServicePath("users"),
4072
+ integration: getServicePath("integration"),
4073
+ documents: getServicePath("documents"),
4074
+ view: getServicePath("view"),
4075
+ print: getServicePath("print"),
4076
+ tickets: getServicePath("tickets")
4077
+ };
4078
+ const getModuleParams = (service, module) => ({
4079
+ api: this.client,
4080
+ route: `${this.services[service]}${module}/`,
4081
+ publicRoute: `${this.services[service]}${module}/`
4082
+ });
4083
+ this.BankData = new Repository(getModuleParams("users", "bank_data"));
4084
+ this.Client = new Repository2(getModuleParams("users", "client"));
4085
+ this.ClientType = new Repository3(getModuleParams("users", "client_type"));
4086
+ this.Chat = new Repository4(getModuleParams("stock", "chat"));
4087
+ this.Commissioner = new Repository5(getModuleParams("users", "commissioner"));
4088
+ this.Country = new Repository6(getModuleParams("users", "country"));
4089
+ this.DocumentHeader = new Repository7(getModuleParams("stock", "document_header"));
4090
+ this.BillOfLading = new Repository8(getModuleParams("stock", "document_header"));
4091
+ this.ProductionOrder = new Repository9(getModuleParams("stock", "document_header"));
4092
+ this.Proforma = new Repository10(getModuleParams("stock", "document_header"));
4093
+ this.PropostaFornecedor = new Repository11(
4094
+ getModuleParams("stock", "document_header")
4095
+ );
4096
+ this.ProviderCreditNoteFromReturn = new Repository12(
4097
+ getModuleParams("stock", "document_header")
4098
+ );
4099
+ this.ProviderFinancialCreditNote = new Repository13(
4100
+ getModuleParams("stock", "document_header")
4101
+ );
4102
+ this.ProviderServiceInvoice = new Repository14(
4103
+ getModuleParams("stock", "document_header")
4104
+ );
4105
+ this.DocumentLine = new Repository15(getModuleParams("stock", "document_line"));
4106
+ this.DocumentLineAssoc = new Repository16(
4107
+ getModuleParams("stock", "document_line_assoc")
4108
+ );
4109
+ this.DocumentType = new Repository17(getModuleParams("stock", "document_type"));
4110
+ this.Favorites = new Repository18(getModuleParams("users", "favorite"));
4111
+ this.File = new Repository19(getModuleParams("stock", "file"));
4112
+ this.GoogleSheets = new Repository20(getModuleParams("integration", "google"));
4113
+ this.GroupPermissions = new Repository21(getModuleParams("users", "group_permission"));
4114
+ this.Language = new Repository22(getModuleParams("users", "language"));
4115
+ this.Location = new Repository23(getModuleParams("stock", "location"));
4116
+ this.Logout = new Repository24(getModuleParams("users", "logout"));
4117
+ this.Multimedia = new Repository25(getModuleParams("documents", "multimedia"));
4118
+ this.Observation = new Repository26(getModuleParams("integration", "observation"));
4119
+ this.ObservationType = new Repository27(
4120
+ getModuleParams("integration", "observation_type")
4121
+ );
4122
+ this.Password = new Repository28(getModuleParams("users", "password"));
4123
+ this.Permissions = new Repository29(getModuleParams("users", "permission"));
4124
+ this.ProductImage = new Repository30(getModuleParams("stock", "product_image"));
4125
+ this.Promotion = new Repository31(getModuleParams("stock", "promotion"));
4126
+ this.PromotionAssoc = new Repository32(getModuleParams("stock", "promotion_assoc"));
4127
+ this.Providers = new Repository33(getModuleParams("users", "provider"));
4128
+ this.ProviderType = new Repository34(getModuleParams("users", "provider_type"));
4129
+ this.PurchaseConditions = new Repository35(
4130
+ getModuleParams("users", "purchase_condition")
4131
+ );
4132
+ this.ReasonForExemption = new Repository36(
4133
+ getModuleParams("users", "reason_for_exemption")
4134
+ );
4135
+ this.RefreshToken = new Repository37(getModuleParams("users", "refresh-token"));
4136
+ this.SegmentsArea = new Repository38(getModuleParams("users", "segments_area"));
4137
+ this.Sessions = new Repository39(getModuleParams("users", "sessions"));
4138
+ this.Shippings = new Repository40(getModuleParams("users", "shipping"));
4139
+ this.StoreOperator = new Repository41(getModuleParams("users", "store_operator"));
4140
+ this.Swift = new Repository42(getModuleParams("users", "swift"));
4141
+ this.TypeOfLocation = new Repository43(getModuleParams("stock", "type_of_location"));
4142
+ this.UnitOfMeasure = new Repository44(getModuleParams("stock", "unit_of_measure"));
4143
+ this.UserPermissions = new Repository45(getModuleParams("users", "user_permission"));
4144
+ this.UserPositions = new Repository46(getModuleParams("users", "user_position"));
4145
+ this.Users = new Repository47(getModuleParams("users", "users"));
4146
+ this.VatTax = new Repository48(getModuleParams("stock", "vat_tax"));
4147
+ this.VatTaxZone = new Repository49(getModuleParams("stock", "vat_tax_zone"));
4148
+ this.Workflow = new Repository50(getModuleParams("stock", "workflow"));
4149
+ this.DeliveryMethods = new Repository51(getModuleParams("users", "delivery_methods"));
4150
+ this.MaturityDates = new Repository52(getModuleParams("users", "maturity_dates"));
4151
+ this.PaymentMethods = new Repository53(getModuleParams("users", "payment_methods"));
4152
+ this.Vehicles = new Repository54(getModuleParams("users", "vehicles"));
4153
+ this.ExternalDocumentType = new Repository55(
4154
+ getModuleParams("stock", "external_document_type")
4155
+ );
4156
+ this.DocumentSet = new Repository56(getModuleParams("stock", "document_set"));
4157
+ this.Payment = new Repository57(getModuleParams("stock", "payment"));
4158
+ this.ExternalDocumentHeader = new Repository58(
4159
+ getModuleParams("stock", "external_document_header")
4160
+ );
4161
+ this.VatValidation = new Repository59(getModuleParams("stock", "vat_validation"));
4162
+ this.StockMovement = new Repository60(getModuleParams("stock", "stock_movement"));
4163
+ this.ZipCode = new Repository61(getModuleParams("users", "zip_code"));
4164
+ this.Tenant = new Repository62(getModuleParams("users", "tenant"));
4165
+ this.PreSale = new Repository63(getModuleParams("stock", "pre_sale"));
4166
+ this.PreSaleProduct = new Repository64(getModuleParams("stock", "pre_sale_product"));
4167
+ this.OrderManagement = new Repository65(getModuleParams("stock", "order_management"));
4168
+ this.Npc = new Repository66(getModuleParams("print", "npc"));
4169
+ this.Printer = new Repository67(getModuleParams("print", "printer"));
4170
+ this.SchedulePrintJob = new Repository68(
4171
+ getModuleParams("print", "schedule_print_job")
4172
+ );
4173
+ this.QueryList = new Repository69(getModuleParams("stock", "query"));
4174
+ this.QueryParameter = new Repository70(getModuleParams("stock", "query_parameter"));
4175
+ this.ReturnReason = new Repository71(getModuleParams("stock", "return_reason"));
4176
+ this.PropostaSheets = new Repository72(getModuleParams("stock", "proposta_sheets"));
4177
+ this.Schedule = new Repository73(getModuleParams("stock", "schedule"));
4178
+ this.GoogleFilePermission = new Repository74(
4179
+ getModuleParams("integration", "google_file_permission")
4180
+ );
4181
+ this.Settings = new Repository75(getModuleParams("integration", "settings"));
4182
+ this.Tickets = new Repository76(getModuleParams("tickets", "tickets"));
4183
+ this.Channel = new Repository77(getModuleParams("tickets", "channel"));
4184
+ this.TicketsLanguage = new Repository78(getModuleParams("tickets", "tickets_language"));
4185
+ this.Clt = new Repository79(getModuleParams("tickets", "clt"));
4186
+ this.StartDocumentHeaderLastUpdate = new Repository80(
4187
+ getModuleParams("stock", "start_document_header_last_update")
4188
+ );
4189
+ this.Persona = new Repository81(getModuleParams("users", "persona"));
4190
+ this.ProjectInfo = new Repository82(getModuleParams("integration", "project_info"));
4191
+ this.Order = new Repository83(getModuleParams("stock", "order"));
4192
+ this.Purchase = new Repository84(getModuleParams("stock", "purchase"));
4193
+ this.MaterialEntrance = new Repository85(
4194
+ getModuleParams("stock", "material_entrance")
4195
+ );
4196
+ this.Transformado = new Repository86(getModuleParams("stock", "transformado"));
4197
+ this.UpfrontReturn = new Repository87(getModuleParams("stock", "upfront_return"));
4198
+ this.SavedEmPicking = new Repository88(getModuleParams("stock", "saved_em_picking"));
4199
+ this.EmailTemplate = new Repository89(getModuleParams("integration", "email_template"));
4200
+ this.EmailTemplateAttachment = new Repository90(
4201
+ getModuleParams("integration", "email_template_attachment")
4202
+ );
4203
+ this.Prison = new Repository91(getModuleParams("stock", "prison"));
4204
+ this.Quebra = new Repository92(getModuleParams("stock", "quebra"));
4205
+ this.Inventario = new Repository93(getModuleParams("stock", "inventario"));
4206
+ this.ReturnToProvider = new Repository94(
4207
+ getModuleParams("stock", "return_to_provider")
4208
+ );
4209
+ this.EmailVerification = new Repository95(
4210
+ getModuleParams("integration", "email_verification")
4211
+ );
4212
+ this.EmailLog = new Repository96(getModuleParams("integration", "email_log"));
4213
+ this.DocumentLineNote = new Repository97(
4214
+ getModuleParams("stock", "document_line_note")
4215
+ );
4216
+ this.SavedProviderProposal = new Repository98(
4217
+ getModuleParams("stock", "saved_provider_proposal")
4218
+ );
4219
+ this.ProductGoogleSheets = new Repository99(
4220
+ getModuleParams("stock", "product_google")
4221
+ );
4222
+ this.Task = new Repository100(getModuleParams("stock", "task"));
4223
+ this.TaskMessage = new Repository101(getModuleParams("stock", "task_message"));
4224
+ this.RecurrentTasks = new Repository102(getModuleParams("stock", "recurrent_tasks"));
4225
+ this.TaskRead = new Repository103(getModuleParams("stock", "task_read"));
4226
+ this.Theme = new Repository104(getModuleParams("users", "theme"));
4227
+ this.Dashboard = new Repository105(getModuleParams("stock", "dashboard"));
4228
+ this.ChatRapidMessage = new Repository106(
4229
+ getModuleParams("stock", "chat_rapid_message")
4230
+ );
4231
+ this.SideMenu = new Repository107(getModuleParams("stock", "side_menu"));
4232
+ this.ErrorLog = new Repository108(getModuleParams("view", "error_log"));
4233
+ this.AdminPanel = new Repository109(getModuleParams("view", "admin_panel"));
4234
+ this.DocumentLineRm = new Repository110(getModuleParams("stock", "document_line_rm"));
4235
+ this.DocumentLineMt = new Repository111(getModuleParams("stock", "document_line_mt"));
4236
+ this.ChatSubscriber = new Repository112(getModuleParams("users", "chat_subscriber"));
4237
+ }
4238
+ };
4239
+
4240
+ // src/index.ts
4241
+ var index_default = main_exports;
4242
+
4243
+ export { index_default as default };