@nomalism-com/api 1.0.38 → 1.1.1

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 +1933 -2
  2. package/dist/index.js +4260 -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,4260 @@
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(params) {
1588
+ const response = await this.api.get(`${this.route}`, { params });
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 findByOwnerId(params) {
1602
+ const response = await this.api.get(`${this.route}by_owner`, {
1603
+ params
1604
+ });
1605
+ return response.data;
1606
+ }
1607
+ async findById(selector) {
1608
+ const response = await this.api.get(`${this.route}${selector.id}`);
1609
+ return response.data;
1610
+ }
1611
+ async create(body) {
1612
+ const response = await this.api.post(`${this.route}`, body);
1613
+ return response.data;
1614
+ }
1615
+ async update(selector, body) {
1616
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1617
+ return response.data;
1618
+ }
1619
+ async deleteOne(selector) {
1620
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1621
+ return response.data;
1622
+ }
1623
+ async checkPin(data) {
1624
+ const response = await this.api.post(`${this.route}pin`, data);
1625
+ return response.data;
1626
+ }
1627
+ async updateStoreOperator(selector, body) {
1628
+ await this.api.put(`${this.route}store_operator${selector.id}`, body);
1629
+ }
1630
+ };
1631
+
1632
+ // src/modules/user/swift.ts
1633
+ var swift_exports = {};
1634
+ __export(swift_exports, {
1635
+ default: () => Repository42
1636
+ });
1637
+ var Repository42 = class {
1638
+ constructor({ api, route, publicRoute }) {
1639
+ this.api = api;
1640
+ this.route = route;
1641
+ this.publicRoute = publicRoute;
1642
+ }
1643
+ async find(params) {
1644
+ const response = await this.api.get(`${this.route}`, { params });
1645
+ return response.data;
1646
+ }
1647
+ async findPaginated(params) {
1648
+ const response = await this.api.get(`${this.route}paginated`, { params });
1649
+ return response.data;
1650
+ }
1651
+ async findMinified(params) {
1652
+ const response = await this.api.get(`${this.route}minified`, {
1653
+ params
1654
+ });
1655
+ return response.data;
1656
+ }
1657
+ async findById(selector) {
1658
+ const response = await this.api.get(`${this.route}${selector.id}`);
1659
+ return response.data;
1660
+ }
1661
+ async create(body) {
1662
+ const response = await this.api.post(`${this.route}`, body);
1663
+ return response.data;
1664
+ }
1665
+ async update(selector, body) {
1666
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1667
+ return response.data;
1668
+ }
1669
+ async deleteOne(selector) {
1670
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1671
+ return response.data;
1672
+ }
1673
+ };
1674
+
1675
+ // src/modules/stock/typeOfLocation.ts
1676
+ var typeOfLocation_exports = {};
1677
+ __export(typeOfLocation_exports, {
1678
+ default: () => Repository43
1679
+ });
1680
+ var Repository43 = class {
1681
+ constructor({ api, route, publicRoute }) {
1682
+ this.api = api;
1683
+ this.route = route;
1684
+ this.publicRoute = publicRoute;
1685
+ }
1686
+ async find(params) {
1687
+ const response = await this.api.get(`${this.route}`, { params });
1688
+ return response.data;
1689
+ }
1690
+ async findPaginated(params) {
1691
+ const response = await this.api.get(`${this.route}paginated`, { params });
1692
+ return response.data;
1693
+ }
1694
+ async findMinified(params) {
1695
+ const response = await this.api.get(`${this.route}minified`, {
1696
+ params
1697
+ });
1698
+ return response.data;
1699
+ }
1700
+ async findByOwnerId(params) {
1701
+ const response = await this.api.get(`${this.route}by_owner`, {
1702
+ params
1703
+ });
1704
+ return response.data;
1705
+ }
1706
+ async findById(selector) {
1707
+ const response = await this.api.get(`${this.route}${selector.id}`);
1708
+ return response.data;
1709
+ }
1710
+ async create(body) {
1711
+ const response = await this.api.post(`${this.route}`, body);
1712
+ return response.data;
1713
+ }
1714
+ async update(selector, body) {
1715
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1716
+ return response.data;
1717
+ }
1718
+ async deleteOne(selector) {
1719
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1720
+ return response.data;
1721
+ }
1722
+ };
1723
+
1724
+ // src/modules/stock/unitOfMeasure.ts
1725
+ var unitOfMeasure_exports = {};
1726
+ __export(unitOfMeasure_exports, {
1727
+ default: () => Repository44
1728
+ });
1729
+ var Repository44 = class {
1730
+ constructor({ api, route, publicRoute }) {
1731
+ this.api = api;
1732
+ this.route = route;
1733
+ this.publicRoute = publicRoute;
1734
+ }
1735
+ async find(params) {
1736
+ const response = await this.api.get(`${this.route}`, { params });
1737
+ return response.data;
1738
+ }
1739
+ async findPaginated(params) {
1740
+ const response = await this.api.get(`${this.route}paginated`, { params });
1741
+ return response.data;
1742
+ }
1743
+ async findMinified(params) {
1744
+ const response = await this.api.get(`${this.route}minified`, {
1745
+ params
1746
+ });
1747
+ return response.data;
1748
+ }
1749
+ async findByOwnerId(params) {
1750
+ const response = await this.api.get(`${this.route}by_owner`, {
1751
+ params
1752
+ });
1753
+ return response.data;
1754
+ }
1755
+ async findById(selector) {
1756
+ const response = await this.api.get(`${this.route}${selector.id}`);
1757
+ return response.data;
1758
+ }
1759
+ async create(body) {
1760
+ const response = await this.api.post(`${this.route}`, body);
1761
+ return response.data;
1762
+ }
1763
+ async update(selector, body) {
1764
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1765
+ return response.data;
1766
+ }
1767
+ async deleteOne(selector) {
1768
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1769
+ return response.data;
1770
+ }
1771
+ };
1772
+
1773
+ // src/modules/user/userPermission.ts
1774
+ var userPermission_exports = {};
1775
+ __export(userPermission_exports, {
1776
+ default: () => Repository45
1777
+ });
1778
+ var Repository45 = class {
1779
+ constructor({ api, route, publicRoute }) {
1780
+ this.api = api;
1781
+ this.route = route;
1782
+ this.publicRoute = publicRoute;
1783
+ }
1784
+ async findByOwnerId(params) {
1785
+ const response = await this.api.get(`${this.route}by_owner`, {
1786
+ params
1787
+ });
1788
+ return response.data;
1789
+ }
1790
+ async create(body) {
1791
+ const response = await this.api.post(`${this.route}`, body);
1792
+ return response.data;
1793
+ }
1794
+ async deleteOne(selector) {
1795
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1796
+ return response.data;
1797
+ }
1798
+ };
1799
+
1800
+ // src/modules/user/userPositions.ts
1801
+ var userPositions_exports = {};
1802
+ __export(userPositions_exports, {
1803
+ default: () => Repository46
1804
+ });
1805
+ var Repository46 = class {
1806
+ constructor({ api, route, publicRoute }) {
1807
+ this.api = api;
1808
+ this.route = route;
1809
+ this.publicRoute = publicRoute;
1810
+ }
1811
+ async find(params) {
1812
+ const response = await this.api.get(`${this.route}`, { params });
1813
+ return response.data;
1814
+ }
1815
+ async findPaginated(params) {
1816
+ const response = await this.api.get(`${this.route}paginated`, { params });
1817
+ return response.data;
1818
+ }
1819
+ async findMinified(params) {
1820
+ const response = await this.api.get(`${this.route}minified`, {
1821
+ params
1822
+ });
1823
+ return response.data;
1824
+ }
1825
+ async findById(selector) {
1826
+ const response = await this.api.get(`${this.route}${selector.id}`);
1827
+ return response.data;
1828
+ }
1829
+ async create(body) {
1830
+ const response = await this.api.post(`${this.route}`, body);
1831
+ return response.data;
1832
+ }
1833
+ async update(selector, body) {
1834
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1835
+ return response.data;
1836
+ }
1837
+ async deleteOne(selector) {
1838
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1839
+ return response.data;
1840
+ }
1841
+ };
1842
+
1843
+ // src/modules/user/user.ts
1844
+ var user_exports = {};
1845
+ __export(user_exports, {
1846
+ default: () => Repository47
1847
+ });
1848
+ var Repository47 = class {
1849
+ constructor({ api, route, publicRoute }) {
1850
+ this.api = api;
1851
+ this.route = route;
1852
+ this.publicRoute = publicRoute;
1853
+ }
1854
+ async find(params) {
1855
+ const response = await this.api.get(`${this.route}`, { params });
1856
+ return response.data;
1857
+ }
1858
+ async findPaginated(params) {
1859
+ const response = await this.api.get(`${this.route}paginated`, { params });
1860
+ return response.data;
1861
+ }
1862
+ async findMinified(params) {
1863
+ const response = await this.api.get(`${this.route}minified`, {
1864
+ params
1865
+ });
1866
+ return response.data;
1867
+ }
1868
+ async findById(selector) {
1869
+ const response = await this.api.get(`${this.route}${selector.id}`);
1870
+ return response.data;
1871
+ }
1872
+ async create(body) {
1873
+ const response = await this.api.post(`${this.route}`, body);
1874
+ return response.data;
1875
+ }
1876
+ async update(selector, body) {
1877
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1878
+ return response.data;
1879
+ }
1880
+ async deleteOne(selector) {
1881
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1882
+ return response.data;
1883
+ }
1884
+ async findProvidersWithClientId(body) {
1885
+ const response = await this.api.post(`${this.route}providers`, body);
1886
+ return response.data;
1887
+ }
1888
+ async findFromClientOrProviderId(body) {
1889
+ const response = await this.api.post(`${this.route}from_client_or_provider_id`, body);
1890
+ return response.data;
1891
+ }
1892
+ };
1893
+
1894
+ // src/modules/stock/vatTax.ts
1895
+ var vatTax_exports = {};
1896
+ __export(vatTax_exports, {
1897
+ default: () => Repository48
1898
+ });
1899
+ var Repository48 = class {
1900
+ constructor({ api, route, publicRoute }) {
1901
+ this.api = api;
1902
+ this.route = route;
1903
+ this.publicRoute = publicRoute;
1904
+ }
1905
+ async find(params) {
1906
+ const response = await this.api.get(`${this.route}`, { params });
1907
+ return response.data;
1908
+ }
1909
+ async findPaginated(params) {
1910
+ const response = await this.api.get(`${this.route}paginated`, { params });
1911
+ return response.data;
1912
+ }
1913
+ async findMinified(params) {
1914
+ const response = await this.api.get(`${this.route}minified`, {
1915
+ params
1916
+ });
1917
+ return response.data;
1918
+ }
1919
+ async findByOwnerId(params) {
1920
+ const response = await this.api.get(`${this.route}by_owner`, {
1921
+ params
1922
+ });
1923
+ return response.data;
1924
+ }
1925
+ async findById(selector) {
1926
+ const response = await this.api.get(`${this.route}${selector.id}`);
1927
+ return response.data;
1928
+ }
1929
+ async create(body) {
1930
+ const response = await this.api.post(`${this.route}`, body);
1931
+ return response.data;
1932
+ }
1933
+ async update(selector, body) {
1934
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1935
+ return response.data;
1936
+ }
1937
+ async deleteOne(selector) {
1938
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1939
+ return response.data;
1940
+ }
1941
+ };
1942
+
1943
+ // src/modules/stock/vatTaxZone.ts
1944
+ var vatTaxZone_exports = {};
1945
+ __export(vatTaxZone_exports, {
1946
+ default: () => Repository49
1947
+ });
1948
+ var Repository49 = class {
1949
+ constructor({ api, route, publicRoute }) {
1950
+ this.api = api;
1951
+ this.route = route;
1952
+ this.publicRoute = publicRoute;
1953
+ }
1954
+ async find(params) {
1955
+ const response = await this.api.get(`${this.route}`, { params });
1956
+ return response.data;
1957
+ }
1958
+ async findPaginated(params) {
1959
+ const response = await this.api.get(`${this.route}paginated`, { params });
1960
+ return response.data;
1961
+ }
1962
+ async findMinified(params) {
1963
+ const response = await this.api.get(`${this.route}minified`, {
1964
+ params
1965
+ });
1966
+ return response.data;
1967
+ }
1968
+ async findByOwnerId(params) {
1969
+ const response = await this.api.get(`${this.route}by_owner`, {
1970
+ params
1971
+ });
1972
+ return response.data;
1973
+ }
1974
+ async findById(selector) {
1975
+ const response = await this.api.get(`${this.route}${selector.id}`);
1976
+ return response.data;
1977
+ }
1978
+ async create(body) {
1979
+ const response = await this.api.post(`${this.route}`, body);
1980
+ return response.data;
1981
+ }
1982
+ async update(selector, body) {
1983
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
1984
+ return response.data;
1985
+ }
1986
+ async deleteOne(selector) {
1987
+ const response = await this.api.delete(`${this.route}${selector.id}`);
1988
+ return response.data;
1989
+ }
1990
+ };
1991
+
1992
+ // src/modules/supply/workflow.ts
1993
+ var workflow_exports = {};
1994
+ __export(workflow_exports, {
1995
+ default: () => Repository50
1996
+ });
1997
+ var Repository50 = class {
1998
+ constructor({ api, route, publicRoute }) {
1999
+ this.api = api;
2000
+ this.route = route;
2001
+ this.publicRoute = publicRoute;
2002
+ }
2003
+ async find(params) {
2004
+ const response = await this.api.get(`${this.route}`, { params });
2005
+ return response.data;
2006
+ }
2007
+ async findByOwnerId(params) {
2008
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2009
+ return response.data;
2010
+ }
2011
+ async create(body) {
2012
+ const response = await this.api.post(`${this.route}`, body);
2013
+ return response.data;
2014
+ }
2015
+ async update(selector, body) {
2016
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2017
+ return response.data;
2018
+ }
2019
+ async deleteOne(selector) {
2020
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2021
+ return response.data;
2022
+ }
2023
+ };
2024
+
2025
+ // src/modules/user/deliveryMethods.ts
2026
+ var deliveryMethods_exports = {};
2027
+ __export(deliveryMethods_exports, {
2028
+ default: () => Repository51
2029
+ });
2030
+ var Repository51 = class {
2031
+ constructor({ api, route, publicRoute }) {
2032
+ this.api = api;
2033
+ this.route = route;
2034
+ this.publicRoute = publicRoute;
2035
+ }
2036
+ async find() {
2037
+ const response = await this.api.get(`${this.route}`);
2038
+ return response.data;
2039
+ }
2040
+ async findMinified(params) {
2041
+ const response = await this.api.get(`${this.route}minified`, {
2042
+ params
2043
+ });
2044
+ return response.data;
2045
+ }
2046
+ async findById(selector) {
2047
+ const response = await this.api.get(`${this.route}${selector.id}`);
2048
+ return response.data;
2049
+ }
2050
+ async create(body) {
2051
+ const response = await this.api.post(`${this.route}`, body);
2052
+ return response.data;
2053
+ }
2054
+ async update(selector, body) {
2055
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2056
+ return response.data;
2057
+ }
2058
+ async deleteOne(selector) {
2059
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2060
+ return response.data;
2061
+ }
2062
+ };
2063
+
2064
+ // src/modules/user/maturityDates.ts
2065
+ var maturityDates_exports = {};
2066
+ __export(maturityDates_exports, {
2067
+ default: () => Repository52
2068
+ });
2069
+ var Repository52 = class {
2070
+ constructor({ api, route, publicRoute }) {
2071
+ this.api = api;
2072
+ this.route = route;
2073
+ this.publicRoute = publicRoute;
2074
+ }
2075
+ async find() {
2076
+ const response = await this.api.get(`${this.route}`);
2077
+ return response.data;
2078
+ }
2079
+ async findById(selector) {
2080
+ const response = await this.api.get(`${this.route}${selector.id}`);
2081
+ return response.data;
2082
+ }
2083
+ async findMinified(params) {
2084
+ const response = await this.api.get(`${this.route}minified`, {
2085
+ params
2086
+ });
2087
+ return response.data;
2088
+ }
2089
+ async create(body) {
2090
+ const response = await this.api.post(`${this.route}`, body);
2091
+ return response.data;
2092
+ }
2093
+ async update(selector, body) {
2094
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2095
+ return response.data;
2096
+ }
2097
+ async deleteOne(selector) {
2098
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2099
+ return response.data;
2100
+ }
2101
+ };
2102
+
2103
+ // src/modules/user/paymentMethods.ts
2104
+ var paymentMethods_exports = {};
2105
+ __export(paymentMethods_exports, {
2106
+ default: () => Repository53
2107
+ });
2108
+ var Repository53 = class {
2109
+ constructor({ api, route, publicRoute }) {
2110
+ this.api = api;
2111
+ this.route = route;
2112
+ this.publicRoute = publicRoute;
2113
+ }
2114
+ async find() {
2115
+ const response = await this.api.get(`${this.route}`);
2116
+ return response.data;
2117
+ }
2118
+ async findById(selector) {
2119
+ const response = await this.api.get(`${this.route}${selector.id}`);
2120
+ return response.data;
2121
+ }
2122
+ async findMinified(params) {
2123
+ const response = await this.api.get(`${this.route}minified`, {
2124
+ params
2125
+ });
2126
+ return response.data;
2127
+ }
2128
+ async create(body) {
2129
+ const response = await this.api.post(`${this.route}`, body);
2130
+ return response.data;
2131
+ }
2132
+ async update(selector, body) {
2133
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2134
+ return response.data;
2135
+ }
2136
+ async deleteOne(selector) {
2137
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2138
+ return response.data;
2139
+ }
2140
+ };
2141
+
2142
+ // src/modules/user/vehicles.ts
2143
+ var vehicles_exports = {};
2144
+ __export(vehicles_exports, {
2145
+ default: () => Repository54
2146
+ });
2147
+ var Repository54 = class {
2148
+ constructor({ api, route, publicRoute }) {
2149
+ this.api = api;
2150
+ this.route = route;
2151
+ this.publicRoute = publicRoute;
2152
+ }
2153
+ async find() {
2154
+ const response = await this.api.get(`${this.route}`);
2155
+ return response.data;
2156
+ }
2157
+ async create(body) {
2158
+ const response = await this.api.post(`${this.route}`, body);
2159
+ return response.data;
2160
+ }
2161
+ async update(selector, body) {
2162
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2163
+ return response.data;
2164
+ }
2165
+ async deleteOne(selector) {
2166
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2167
+ return response.data;
2168
+ }
2169
+ };
2170
+
2171
+ // src/modules/supply/externalDocumentType.ts
2172
+ var externalDocumentType_exports = {};
2173
+ __export(externalDocumentType_exports, {
2174
+ default: () => Repository55
2175
+ });
2176
+ var Repository55 = class {
2177
+ constructor({ api, route, publicRoute }) {
2178
+ this.api = api;
2179
+ this.route = route;
2180
+ this.publicRoute = publicRoute;
2181
+ }
2182
+ async find() {
2183
+ const response = await this.api.get(`${this.route}`);
2184
+ return response.data;
2185
+ }
2186
+ async findMinified(params) {
2187
+ const response = await this.api.get(`${this.route}minified`, { params });
2188
+ return response.data;
2189
+ }
2190
+ };
2191
+
2192
+ // src/modules/supply/documentSet.ts
2193
+ var documentSet_exports = {};
2194
+ __export(documentSet_exports, {
2195
+ default: () => Repository56
2196
+ });
2197
+ var Repository56 = class {
2198
+ constructor({ api, route, publicRoute }) {
2199
+ this.api = api;
2200
+ this.route = route;
2201
+ this.publicRoute = publicRoute;
2202
+ }
2203
+ async find() {
2204
+ const response = await this.api.get(`${this.route}`);
2205
+ return response.data;
2206
+ }
2207
+ async findById(selector) {
2208
+ const response = await this.api.get(`${this.route}${selector.id}`);
2209
+ return response.data;
2210
+ }
2211
+ async findMinified(params) {
2212
+ const response = await this.api.get(`${this.route}minified`, { params });
2213
+ return response.data;
2214
+ }
2215
+ async create(body) {
2216
+ const response = await this.api.post(`${this.route}`, body);
2217
+ return response.data;
2218
+ }
2219
+ async update(selector, body) {
2220
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2221
+ return response.data;
2222
+ }
2223
+ async deleteOne(selector) {
2224
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2225
+ return response.data;
2226
+ }
2227
+ };
2228
+
2229
+ // src/modules/supply/payment.ts
2230
+ var payment_exports = {};
2231
+ __export(payment_exports, {
2232
+ default: () => Repository57
2233
+ });
2234
+ var Repository57 = class {
2235
+ constructor({ api, route, publicRoute }) {
2236
+ this.api = api;
2237
+ this.route = route;
2238
+ this.publicRoute = publicRoute;
2239
+ }
2240
+ async find(params) {
2241
+ const response = await this.api.get(`${this.route}`, { params });
2242
+ return response.data;
2243
+ }
2244
+ async findPaginated(params) {
2245
+ const response = await this.api.get(`${this.route}paginated`, { params });
2246
+ return response.data;
2247
+ }
2248
+ async findByOwnerId(params) {
2249
+ const response = await this.api.get(`${this.route}by_owner`, {
2250
+ params
2251
+ });
2252
+ return response.data;
2253
+ }
2254
+ async findById(selector) {
2255
+ const response = await this.api.get(`${this.route}${selector.id}`);
2256
+ return response.data;
2257
+ }
2258
+ async deleteBatch(selector) {
2259
+ const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
2260
+ return response.data;
2261
+ }
2262
+ async findCurrentAccountByOwnerId(params) {
2263
+ const response = await this.api.get(`${this.route}current_account`, {
2264
+ params
2265
+ });
2266
+ return response.data;
2267
+ }
2268
+ async findBalanceByOwnerId(params) {
2269
+ const response = await this.api.get(`${this.route}balance`, {
2270
+ params
2271
+ });
2272
+ return response.data;
2273
+ }
2274
+ async findSettledMaterialEntrance(params) {
2275
+ const response = await this.api.get(`${this.route}settled_material_entrance`, {
2276
+ params
2277
+ });
2278
+ return response.data;
2279
+ }
2280
+ async findSettledMaterialEntranceProviders() {
2281
+ const response = await this.api.get(`${this.route}settled_material_entrance_providers`);
2282
+ return response.data;
2283
+ }
2284
+ async createProvidersPayments(body) {
2285
+ const response = await this.api.post(`${this.route}provider`, body);
2286
+ return response.data;
2287
+ }
2288
+ async findPaymentsNotExported(params) {
2289
+ const response = await this.api.get(`${this.route}not_exported`, {
2290
+ params
2291
+ });
2292
+ return response.data;
2293
+ }
2294
+ async findPaymentBatches() {
2295
+ const response = await this.api.get(`${this.route}batches`);
2296
+ return response.data;
2297
+ }
2298
+ async updateDownloadedBatchNumber(params) {
2299
+ await this.api.put(`${this.route}downloaded_batch_number/${params}`);
2300
+ }
2301
+ async exportCurrentAccount(params) {
2302
+ const response = await this.api.get(`${this.publicRoute}export_current_account`, {
2303
+ params
2304
+ });
2305
+ return response.data;
2306
+ }
2307
+ async findSettledMaterialEntranceByDate(params) {
2308
+ const response = await this.api.get(`${this.route}settled_material_entrance_by_date`, {
2309
+ params
2310
+ });
2311
+ return response.data;
2312
+ }
2313
+ async exportPayments(body) {
2314
+ await this.api.post(`${this.route}export_payments`, body);
2315
+ }
2316
+ getExportCurrentAccountUrl({
2317
+ owner_id,
2318
+ start_date,
2319
+ end_date,
2320
+ output,
2321
+ token
2322
+ }) {
2323
+ const qs = new URLSearchParams();
2324
+ qs.set("owner_id", owner_id);
2325
+ qs.set("output", output);
2326
+ if (start_date) qs.set("start_date", start_date.toISOString());
2327
+ if (end_date) qs.set("end_date", end_date.toISOString());
2328
+ qs.set("token", token);
2329
+ return `${this.publicRoute}export_current_account?${qs.toString()}`;
2330
+ }
2331
+ async findCurrentAccountPaginated(params) {
2332
+ const response = await this.api.get(`${this.route}current_account_paginated`, {
2333
+ params
2334
+ });
2335
+ return response.data;
2336
+ }
2337
+ };
2338
+
2339
+ // src/modules/supply/externalDocumentHeader.ts
2340
+ var externalDocumentHeader_exports = {};
2341
+ __export(externalDocumentHeader_exports, {
2342
+ default: () => Repository58
2343
+ });
2344
+ var Repository58 = class {
2345
+ constructor({ api, route, publicRoute }) {
2346
+ this.api = api;
2347
+ this.route = route;
2348
+ this.publicRoute = publicRoute;
2349
+ }
2350
+ async create(body) {
2351
+ const response = await this.api.post(`${this.route}`, body);
2352
+ return response.data;
2353
+ }
2354
+ async update(selector, body) {
2355
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2356
+ return response.data;
2357
+ }
2358
+ async findById(selector) {
2359
+ const response = await this.api.get(`${this.route}${selector.id}`);
2360
+ return response.data;
2361
+ }
2362
+ async findByOwnerId(params) {
2363
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2364
+ return response.data;
2365
+ }
2366
+ async publicFindByOwnerId(params) {
2367
+ const response = await this.api.get(`${this.route}public_by_owner`, {
2368
+ params
2369
+ });
2370
+ return response.data;
2371
+ }
2372
+ async find(params) {
2373
+ const response = await this.api.get(`${this.route}`, { params });
2374
+ return response.data;
2375
+ }
2376
+ async findPaginated(params) {
2377
+ const response = await this.api.get(`${this.route}paginated`, { params });
2378
+ return response.data;
2379
+ }
2380
+ async deleteOne(params) {
2381
+ const response = await this.api.get(`${this.route}`, { params });
2382
+ return response.data;
2383
+ }
2384
+ async sendEmailDocument(body) {
2385
+ await this.api.post(`${this.route}sendEmail`, body);
2386
+ }
2387
+ async createDocumentHeaderNote(data) {
2388
+ const response = await this.api.post(`${this.route}public_document_header_note`, data);
2389
+ return response.data;
2390
+ }
2391
+ async updateDocumentHeaderNote({ id }, data) {
2392
+ const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
2393
+ return response.data;
2394
+ }
2395
+ };
2396
+
2397
+ // src/modules/supply/vatValidation.ts
2398
+ var vatValidation_exports = {};
2399
+ __export(vatValidation_exports, {
2400
+ default: () => Repository59
2401
+ });
2402
+ var Repository59 = class {
2403
+ constructor({ api, route, publicRoute }) {
2404
+ this.api = api;
2405
+ this.route = route;
2406
+ this.publicRoute = publicRoute;
2407
+ }
2408
+ async findByLatest(nif) {
2409
+ const response = await this.api.get(`${this.route}`, {
2410
+ params: {
2411
+ nif
2412
+ }
2413
+ });
2414
+ return response.data;
2415
+ }
2416
+ };
2417
+
2418
+ // src/modules/stock/stockMovement.ts
2419
+ var stockMovement_exports = {};
2420
+ __export(stockMovement_exports, {
2421
+ default: () => Repository60
2422
+ });
2423
+ var Repository60 = class {
2424
+ constructor({ api, route, publicRoute }) {
2425
+ this.api = api;
2426
+ this.route = route;
2427
+ this.publicRoute = publicRoute;
2428
+ }
2429
+ async findByProvider({
2430
+ id
2431
+ }) {
2432
+ const response = await this.api.get(`${this.route}${id}`);
2433
+ return response.data;
2434
+ }
2435
+ async findByOwnerId(params) {
2436
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2437
+ return response.data;
2438
+ }
2439
+ async exportCsv(params) {
2440
+ const response = await this.api.get(`${this.route}csv`, { params });
2441
+ return response.data;
2442
+ }
2443
+ getStockCsvUrl({ date, version, format, token }) {
2444
+ const qs = new URLSearchParams();
2445
+ qs.set("date", date.toISOString());
2446
+ qs.set("version", version);
2447
+ qs.set("format", format);
2448
+ qs.set("token", token);
2449
+ return `${this.publicRoute}csv?${qs.toString()}`;
2450
+ }
2451
+ async findStockMovementPaginated(params) {
2452
+ const response = await this.api.get(`${this.route}stock_movement_paginated`, { params });
2453
+ return response.data;
2454
+ }
2455
+ };
2456
+
2457
+ // src/modules/user/zipCode.ts
2458
+ var zipCode_exports = {};
2459
+ __export(zipCode_exports, {
2460
+ default: () => Repository61
2461
+ });
2462
+ var Repository61 = class {
2463
+ constructor({ api, route, publicRoute }) {
2464
+ this.api = api;
2465
+ this.route = route;
2466
+ this.publicRoute = publicRoute;
2467
+ }
2468
+ async create(body) {
2469
+ await this.api.post(`${this.route}`, body);
2470
+ }
2471
+ async findByPostalCode(params) {
2472
+ const response = await this.api.get(`${this.route}`, { params });
2473
+ return response.data;
2474
+ }
2475
+ };
2476
+
2477
+ // src/modules/user/tenant.ts
2478
+ var tenant_exports = {};
2479
+ __export(tenant_exports, {
2480
+ default: () => Repository62
2481
+ });
2482
+ var Repository62 = class {
2483
+ constructor({ api, route, publicRoute }) {
2484
+ this.api = api;
2485
+ this.route = route;
2486
+ this.publicRoute = publicRoute;
2487
+ }
2488
+ async create(body) {
2489
+ const response = await this.api.post(`${this.route}`, body);
2490
+ return response.data;
2491
+ }
2492
+ async find() {
2493
+ const response = await this.api.get(`${this.route}`);
2494
+ return response.data;
2495
+ }
2496
+ async findById(selector) {
2497
+ const response = await this.api.get(`${this.route}${selector.id}`);
2498
+ return response.data;
2499
+ }
2500
+ async update(selector, body) {
2501
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2502
+ return response.data;
2503
+ }
2504
+ };
2505
+
2506
+ // src/modules/supply/preSale.ts
2507
+ var preSale_exports = {};
2508
+ __export(preSale_exports, {
2509
+ default: () => Repository63
2510
+ });
2511
+ var Repository63 = class {
2512
+ constructor({ api, route, publicRoute }) {
2513
+ this.api = api;
2514
+ this.route = route;
2515
+ this.publicRoute = publicRoute;
2516
+ }
2517
+ async find(selector) {
2518
+ const response = await this.api.get(`${this.route}by_user/${selector.created_by}`);
2519
+ return response.data;
2520
+ }
2521
+ async findById(selector) {
2522
+ const response = await this.api.get(`${this.route}${selector.id}`);
2523
+ return response.data;
2524
+ }
2525
+ async findPending() {
2526
+ const response = await this.api.get(`${this.route}pending`);
2527
+ return response.data;
2528
+ }
2529
+ async create(body) {
2530
+ const response = await this.api.post(`${this.route}`, body);
2531
+ return response.data;
2532
+ }
2533
+ async update(selector, body) {
2534
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2535
+ return response.data;
2536
+ }
2537
+ async updatePreSaleQuantity(selector, body) {
2538
+ const response = await this.api.put(`${this.route}${selector.id}/quantity`, body);
2539
+ return response.data;
2540
+ }
2541
+ async removeProduct(selector, body) {
2542
+ const response = await this.api.put(`${this.route}product/${selector.id}`, body);
2543
+ return response.data;
2544
+ }
2545
+ async importToClientProposal(data) {
2546
+ const response = await this.api.post(`${this.route}client_proposal`, data);
2547
+ return response.data;
2548
+ }
2549
+ };
2550
+
2551
+ // src/modules/supply/preSaleProduct.ts
2552
+ var preSaleProduct_exports = {};
2553
+ __export(preSaleProduct_exports, {
2554
+ default: () => Repository64
2555
+ });
2556
+ var Repository64 = class {
2557
+ constructor({ api, route, publicRoute }) {
2558
+ this.api = api;
2559
+ this.route = route;
2560
+ this.publicRoute = publicRoute;
2561
+ }
2562
+ async find() {
2563
+ const response = await this.api.get(`${this.route}`);
2564
+ return response.data;
2565
+ }
2566
+ async findById(selector) {
2567
+ const response = await this.api.get(`${this.route}${selector.id}`);
2568
+ return response.data;
2569
+ }
2570
+ };
2571
+
2572
+ // src/modules/supply/orderManagement.ts
2573
+ var orderManagement_exports = {};
2574
+ __export(orderManagement_exports, {
2575
+ default: () => Repository65
2576
+ });
2577
+ var Repository65 = class {
2578
+ constructor({ api, route, publicRoute }) {
2579
+ this.api = api;
2580
+ this.route = route;
2581
+ this.publicRoute = publicRoute;
2582
+ }
2583
+ async findProviderProducts(params) {
2584
+ const response = await this.api.get(`${this.route}provider_products`, {
2585
+ params
2586
+ });
2587
+ return response.data;
2588
+ }
2589
+ async findAllProviderProducts() {
2590
+ const response = await this.api.get(`${this.route}all_provider_products`);
2591
+ return response.data;
2592
+ }
2593
+ };
2594
+
2595
+ // src/modules/print/npc.ts
2596
+ var npc_exports = {};
2597
+ __export(npc_exports, {
2598
+ default: () => Repository66
2599
+ });
2600
+ var Repository66 = class {
2601
+ constructor({ api, route, publicRoute }) {
2602
+ this.api = api;
2603
+ this.route = route;
2604
+ this.publicRoute = publicRoute;
2605
+ }
2606
+ async find() {
2607
+ const response = await this.api.get(`${this.route}`);
2608
+ return response.data;
2609
+ }
2610
+ async update(selector, body) {
2611
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2612
+ return response.data;
2613
+ }
2614
+ async findPrintJobsForComputerId(selector) {
2615
+ const response = await this.api.get(
2616
+ `${this.route}find_print_jobs_for_computer_id/${selector.computer_id}`
2617
+ );
2618
+ return response.data;
2619
+ }
2620
+ };
2621
+
2622
+ // src/modules/print/printer.ts
2623
+ var printer_exports = {};
2624
+ __export(printer_exports, {
2625
+ default: () => Repository67
2626
+ });
2627
+ var Repository67 = class {
2628
+ constructor({ api, route, publicRoute }) {
2629
+ this.api = api;
2630
+ this.route = route;
2631
+ this.publicRoute = publicRoute;
2632
+ }
2633
+ async find() {
2634
+ const response = await this.api.get(`${this.route}`);
2635
+ return response.data;
2636
+ }
2637
+ async findByOwnerId(params) {
2638
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2639
+ return response.data;
2640
+ }
2641
+ async update(selector, body) {
2642
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2643
+ return response.data;
2644
+ }
2645
+ async updateMany(body) {
2646
+ await this.api.put(`${this.route}update_many`, body);
2647
+ }
2648
+ async getOrSetPrinters(body) {
2649
+ const response = await this.api.post(`${this.route}get_or_set_printers`, body);
2650
+ return response.data;
2651
+ }
2652
+ };
2653
+
2654
+ // src/modules/print/schedulePrintJob.ts
2655
+ var schedulePrintJob_exports = {};
2656
+ __export(schedulePrintJob_exports, {
2657
+ default: () => Repository68
2658
+ });
2659
+ var Repository68 = class {
2660
+ constructor({ api, route, publicRoute }) {
2661
+ this.api = api;
2662
+ this.route = route;
2663
+ this.publicRoute = publicRoute;
2664
+ }
2665
+ async create(body) {
2666
+ await this.api.post(`${this.route}`, body);
2667
+ }
2668
+ async createMany(body) {
2669
+ await this.api.post(`${this.route}many`, body);
2670
+ }
2671
+ async deleteOne(selector) {
2672
+ await this.api.delete(`${this.route}${selector.id}`);
2673
+ }
2674
+ async dispatchSchedulePrintJob(body) {
2675
+ const response = await this.api.post(`${this.route}dispatch_schedule_print_job`, body);
2676
+ return response.data;
2677
+ }
2678
+ async findByOwner(params) {
2679
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2680
+ return response.data;
2681
+ }
2682
+ };
2683
+
2684
+ // src/modules/stock/queryList.ts
2685
+ var queryList_exports = {};
2686
+ __export(queryList_exports, {
2687
+ default: () => Repository69
2688
+ });
2689
+ var Repository69 = class {
2690
+ constructor({ api, route, publicRoute }) {
2691
+ this.api = api;
2692
+ this.route = route;
2693
+ this.publicRoute = publicRoute;
2694
+ }
2695
+ async find() {
2696
+ const response = await this.api.get(`${this.route}`);
2697
+ return response.data;
2698
+ }
2699
+ async findById(selector) {
2700
+ const response = await this.api.get(`${this.route}${selector.id}`);
2701
+ return response.data;
2702
+ }
2703
+ async create(body) {
2704
+ const response = await this.api.post(`${this.route}`, body);
2705
+ return response.data;
2706
+ }
2707
+ async update(selector, body) {
2708
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2709
+ return response.data;
2710
+ }
2711
+ async deleteOne(selector) {
2712
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2713
+ return response.data;
2714
+ }
2715
+ async execute(params) {
2716
+ const response = await this.api.get(`${this.route}execute`, { params });
2717
+ return response.data;
2718
+ }
2719
+ getQueryExecuteUrl({ query_id, output, token, ...data }) {
2720
+ const qs = new URLSearchParams();
2721
+ qs.set("query_id", query_id);
2722
+ qs.set("output", output);
2723
+ if (token) {
2724
+ qs.set("token", token);
2725
+ }
2726
+ Object.entries(data).forEach(([key, value]) => {
2727
+ if (typeof value === "undefined") return;
2728
+ if (value === null) return;
2729
+ qs.set(key, value.toString());
2730
+ });
2731
+ return `${this.route}execute?${qs.toString()}`;
2732
+ }
2733
+ };
2734
+
2735
+ // src/modules/stock/queryParameter.ts
2736
+ var queryParameter_exports = {};
2737
+ __export(queryParameter_exports, {
2738
+ default: () => Repository70
2739
+ });
2740
+ var Repository70 = class {
2741
+ constructor({ api, route, publicRoute }) {
2742
+ this.api = api;
2743
+ this.route = route;
2744
+ this.publicRoute = publicRoute;
2745
+ }
2746
+ async find() {
2747
+ const response = await this.api.get(`${this.route}`);
2748
+ return response.data;
2749
+ }
2750
+ async findById(selector) {
2751
+ const response = await this.api.get(`${this.route}${selector.id}`);
2752
+ return response.data;
2753
+ }
2754
+ async create(body) {
2755
+ const response = await this.api.post(`${this.route}`, body);
2756
+ return response.data;
2757
+ }
2758
+ async update(selector, body) {
2759
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2760
+ return response.data;
2761
+ }
2762
+ async deleteOne(selector) {
2763
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2764
+ return response.data;
2765
+ }
2766
+ async findByOwnerId(params) {
2767
+ const response = await this.api.get(`${this.route}by_owner`, { params });
2768
+ return response.data;
2769
+ }
2770
+ };
2771
+
2772
+ // src/modules/stock/returnReason.ts
2773
+ var returnReason_exports = {};
2774
+ __export(returnReason_exports, {
2775
+ default: () => Repository71
2776
+ });
2777
+ var Repository71 = class {
2778
+ constructor({ api, route, publicRoute }) {
2779
+ this.api = api;
2780
+ this.route = route;
2781
+ this.publicRoute = publicRoute;
2782
+ }
2783
+ async create(body) {
2784
+ const response = await this.api.post(`${this.route}`, body);
2785
+ return response.data;
2786
+ }
2787
+ async update(selector, body) {
2788
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
2789
+ return response.data;
2790
+ }
2791
+ async find() {
2792
+ const response = await this.api.get(`${this.route}`);
2793
+ return response.data;
2794
+ }
2795
+ async deleteOne(selector) {
2796
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2797
+ return response.data;
2798
+ }
2799
+ };
2800
+
2801
+ // src/modules/document/propostaSheets.ts
2802
+ var propostaSheets_exports = {};
2803
+ __export(propostaSheets_exports, {
2804
+ default: () => Repository72
2805
+ });
2806
+ var Repository72 = class {
2807
+ constructor({ api, route, publicRoute }) {
2808
+ this.api = api;
2809
+ this.route = route;
2810
+ this.publicRoute = publicRoute;
2811
+ }
2812
+ async isProcessing(params) {
2813
+ const response = await this.api.get(`${this.route}is_processing`, {
2814
+ params
2815
+ });
2816
+ return response.data;
2817
+ }
2818
+ async importFromSheet(params) {
2819
+ const response = await this.api.post(`${this.route}import_from_sheet`, {
2820
+ params
2821
+ });
2822
+ return response.data;
2823
+ }
2824
+ async createSheetFromDocument(params) {
2825
+ const response = await this.api.post(`${this.route}create_sheet_from_document`, params);
2826
+ return response.data;
2827
+ }
2828
+ async cloneSheetsToNewDocument(params) {
2829
+ const response = await this.api.post(`${this.route}clone_sheet_to_new_document`, params);
2830
+ return response.data;
2831
+ }
2832
+ async conflictAccept(params) {
2833
+ await this.api.post(`${this.route}conflict_accept`, params);
2834
+ }
2835
+ async conflictDelete(data) {
2836
+ await this.api.delete(`${this.route}conflict_delete`, {
2837
+ data
2838
+ });
2839
+ }
2840
+ async conflictFindByOwnerId(params) {
2841
+ const response = await this.api.get(`${this.route}conflict_find_by_owner_id`, {
2842
+ params
2843
+ });
2844
+ return response.data;
2845
+ }
2846
+ async rmGetDataBySheetId(params) {
2847
+ const response = await this.api.get(`${this.route}rm_data_by_sheet_id/${params.id}`);
2848
+ return response.data;
2849
+ }
2850
+ async rmUpdateDataBySheetId(params, body) {
2851
+ await this.api.post(`${this.route}rm_data_by_sheet_id/${params.id}`, body);
2852
+ }
2853
+ };
2854
+
2855
+ // src/modules/stock/schedule.ts
2856
+ var schedule_exports = {};
2857
+ __export(schedule_exports, {
2858
+ default: () => Repository73
2859
+ });
2860
+ var Repository73 = class {
2861
+ constructor({ api, route, publicRoute }) {
2862
+ this.api = api;
2863
+ this.route = route;
2864
+ this.publicRoute = publicRoute;
2865
+ }
2866
+ async runImmediately(selector) {
2867
+ await this.api.post(`${this.route}${selector.scheduleType}`);
2868
+ }
2869
+ };
2870
+
2871
+ // src/modules/integration/googleFilePermission.ts
2872
+ var googleFilePermission_exports = {};
2873
+ __export(googleFilePermission_exports, {
2874
+ default: () => Repository74
2875
+ });
2876
+ var Repository74 = class {
2877
+ constructor({ api, route, publicRoute }) {
2878
+ this.api = api;
2879
+ this.route = route;
2880
+ this.publicRoute = publicRoute;
2881
+ }
2882
+ async create(body) {
2883
+ const response = await this.api.post(`${this.route}`, body);
2884
+ return response.data;
2885
+ }
2886
+ async find() {
2887
+ const response = await this.api.get(`${this.route}`);
2888
+ return response.data;
2889
+ }
2890
+ async findById(selector) {
2891
+ const response = await this.api.get(`${this.route}${selector.id}`);
2892
+ return response.data;
2893
+ }
2894
+ async deleteOne(selector) {
2895
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2896
+ return response.data;
2897
+ }
2898
+ };
2899
+
2900
+ // src/modules/integration/settings.ts
2901
+ var settings_exports = {};
2902
+ __export(settings_exports, {
2903
+ default: () => Repository75
2904
+ });
2905
+ var Repository75 = class {
2906
+ constructor({ api, route, publicRoute }) {
2907
+ this.api = api;
2908
+ this.route = route;
2909
+ this.publicRoute = publicRoute;
2910
+ }
2911
+ async create(body) {
2912
+ const response = await this.api.post(`${this.route}`, body);
2913
+ return response.data;
2914
+ }
2915
+ async findByKey(params) {
2916
+ const response = await this.api.get(`${this.publicRoute}by_key`, {
2917
+ params
2918
+ });
2919
+ return response.data;
2920
+ }
2921
+ async update(body) {
2922
+ const response = await this.api.put(`${this.route}`, body);
2923
+ return response.data;
2924
+ }
2925
+ async deleteOne(selector) {
2926
+ const response = await this.api.delete(`${this.route}${selector.id}`);
2927
+ return response.data;
2928
+ }
2929
+ async find() {
2930
+ const response = await this.api.get(`${this.route}`);
2931
+ return response.data;
2932
+ }
2933
+ };
2934
+
2935
+ // src/modules/tickets/tickets.ts
2936
+ var tickets_exports = {};
2937
+ __export(tickets_exports, {
2938
+ default: () => Repository76
2939
+ });
2940
+ var Repository76 = class {
2941
+ constructor({ api, route, publicRoute }) {
2942
+ this.api = api;
2943
+ this.route = route;
2944
+ this.publicRoute = publicRoute;
2945
+ }
2946
+ async create(body) {
2947
+ const response = await this.api.post(`${this.route}`, body);
2948
+ return response.data;
2949
+ }
2950
+ async findToday() {
2951
+ const response = await this.api.get(`${this.route}find_today`);
2952
+ return response.data;
2953
+ }
2954
+ async update(body) {
2955
+ const response = await this.api.put(`${this.route}`, body);
2956
+ return response.data;
2957
+ }
2958
+ async undoLastCall() {
2959
+ const response = await this.api.put(`${this.route}undo_last_call`);
2960
+ return response.data;
2961
+ }
2962
+ };
2963
+
2964
+ // src/modules/tickets/channel.ts
2965
+ var channel_exports = {};
2966
+ __export(channel_exports, {
2967
+ default: () => Repository77
2968
+ });
2969
+ var Repository77 = class {
2970
+ constructor({ api, route, publicRoute }) {
2971
+ this.api = api;
2972
+ this.route = route;
2973
+ this.publicRoute = publicRoute;
2974
+ }
2975
+ async create(body) {
2976
+ const response = await this.api.post(`${this.route}`, body);
2977
+ return response.data;
2978
+ }
2979
+ async find() {
2980
+ const response = await this.api.get(`${this.route}`);
2981
+ return response.data;
2982
+ }
2983
+ async findMinified(params) {
2984
+ const response = await this.api.get(`${this.route}minified`, {
2985
+ params
2986
+ });
2987
+ return response.data;
2988
+ }
2989
+ async findById(id) {
2990
+ const response = await this.api.get(`${this.route}${id}`);
2991
+ return response.data;
2992
+ }
2993
+ async update(id, body) {
2994
+ await this.api.post(`${this.route}${id}`, body);
2995
+ }
2996
+ async deleteOne(id) {
2997
+ await this.api.delete(`${this.route}${id}`);
2998
+ }
2999
+ };
3000
+
3001
+ // src/modules/tickets/language.ts
3002
+ var language_exports2 = {};
3003
+ __export(language_exports2, {
3004
+ default: () => Repository78
3005
+ });
3006
+ var Repository78 = class {
3007
+ constructor({ api, route, publicRoute }) {
3008
+ this.api = api;
3009
+ this.route = route;
3010
+ this.publicRoute = publicRoute;
3011
+ }
3012
+ async create(body) {
3013
+ const response = await this.api.post(`${this.route}`, body);
3014
+ return response.data;
3015
+ }
3016
+ async find() {
3017
+ const response = await this.api.get(`${this.route}`);
3018
+ return response.data;
3019
+ }
3020
+ async findMinified(params) {
3021
+ const response = await this.api.get(`${this.route}minified`, {
3022
+ params
3023
+ });
3024
+ return response.data;
3025
+ }
3026
+ async findById(id) {
3027
+ const response = await this.api.get(`${this.route}${id}`);
3028
+ return response.data;
3029
+ }
3030
+ async update(id, body) {
3031
+ await this.api.post(`${this.route}${id}`, body);
3032
+ }
3033
+ async deleteOne(id) {
3034
+ await this.api.delete(`${this.route}${id}`);
3035
+ }
3036
+ };
3037
+
3038
+ // src/modules/tickets/clt.ts
3039
+ var clt_exports = {};
3040
+ __export(clt_exports, {
3041
+ default: () => Repository79
3042
+ });
3043
+ var Repository79 = class {
3044
+ constructor({ api, route, publicRoute }) {
3045
+ this.api = api;
3046
+ this.route = route;
3047
+ this.publicRoute = publicRoute;
3048
+ }
3049
+ async create(body) {
3050
+ const response = await this.api.post(`${this.route}`, body);
3051
+ return response.data;
3052
+ }
3053
+ async find() {
3054
+ const response = await this.api.get(`${this.route}`);
3055
+ return response.data;
3056
+ }
3057
+ async findMinified(params) {
3058
+ const response = await this.api.get(`${this.route}minified`, {
3059
+ params
3060
+ });
3061
+ return response.data;
3062
+ }
3063
+ async findById(id) {
3064
+ const response = await this.api.get(`${this.route}${id}`);
3065
+ return response.data;
3066
+ }
3067
+ async update(id, body) {
3068
+ await this.api.post(`${this.route}${id}`, body);
3069
+ }
3070
+ async deleteOne(id) {
3071
+ await this.api.delete(`${this.route}${id}`);
3072
+ }
3073
+ };
3074
+
3075
+ // src/modules/supply/startDocumentHeaderLastUpdate.ts
3076
+ var startDocumentHeaderLastUpdate_exports = {};
3077
+ __export(startDocumentHeaderLastUpdate_exports, {
3078
+ default: () => Repository80
3079
+ });
3080
+ var Repository80 = class {
3081
+ constructor({ api, route, publicRoute }) {
3082
+ this.api = api;
3083
+ this.route = route;
3084
+ this.publicRoute = publicRoute;
3085
+ }
3086
+ async findById(selector) {
3087
+ const response = await this.api.get(`${this.route}${selector.id}`);
3088
+ return response.data;
3089
+ }
3090
+ };
3091
+
3092
+ // src/modules/user/persona.ts
3093
+ var persona_exports = {};
3094
+ __export(persona_exports, {
3095
+ default: () => Repository81
3096
+ });
3097
+ var Repository81 = class {
3098
+ constructor({ api, route, publicRoute }) {
3099
+ this.api = api;
3100
+ this.route = route;
3101
+ this.publicRoute = publicRoute;
3102
+ }
3103
+ async findByOwnerId(params) {
3104
+ const response = await this.api.get(`${this.route}by_owner`, {
3105
+ params
3106
+ });
3107
+ return response.data;
3108
+ }
3109
+ async findById(selector) {
3110
+ const response = await this.api.get(`${this.route}${selector.id}`);
3111
+ return response.data;
3112
+ }
3113
+ async findContactPersonaByOwnerId(params) {
3114
+ const response = await this.api.get(`${this.route}contact`, { params });
3115
+ return response.data;
3116
+ }
3117
+ async create(body) {
3118
+ const response = await this.api.post(`${this.route}`, body);
3119
+ return response.data;
3120
+ }
3121
+ async update(selector, body) {
3122
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3123
+ return response.data;
3124
+ }
3125
+ async deleteOne(params) {
3126
+ const response = await this.api.delete(`${this.route}`, { params });
3127
+ return response.data;
3128
+ }
3129
+ async findByBasic(params) {
3130
+ const response = await this.api.get(`${this.route}basic_search`, {
3131
+ params
3132
+ });
3133
+ return response.data;
3134
+ }
3135
+ async find(data) {
3136
+ const response = await this.api.get(`${this.route}`, {
3137
+ data
3138
+ });
3139
+ return response.data;
3140
+ }
3141
+ async findByEmail(data) {
3142
+ const response = await this.api.get(`${this.route}by_email`, {
3143
+ data
3144
+ });
3145
+ return response.data;
3146
+ }
3147
+ };
3148
+
3149
+ // src/modules/integration/projectInfo.ts
3150
+ var projectInfo_exports = {};
3151
+ __export(projectInfo_exports, {
3152
+ default: () => Repository82
3153
+ });
3154
+ var Repository82 = class {
3155
+ constructor({ api, route, publicRoute }) {
3156
+ this.api = api;
3157
+ this.route = route;
3158
+ this.publicRoute = publicRoute;
3159
+ }
3160
+ async sendEmail(body) {
3161
+ await this.api.post(`${this.route}sendEmail`, body);
3162
+ }
3163
+ };
3164
+
3165
+ // src/modules/document/order.ts
3166
+ var order_exports = {};
3167
+ __export(order_exports, {
3168
+ default: () => Repository83
3169
+ });
3170
+ var Repository83 = class {
3171
+ constructor({ api, route, publicRoute }) {
3172
+ this.api = api;
3173
+ this.route = route;
3174
+ this.publicRoute = publicRoute;
3175
+ }
3176
+ async unsetCativado(params) {
3177
+ const response = await this.api.post(`${this.route}unset_cativado`, {
3178
+ params
3179
+ });
3180
+ return response.data;
3181
+ }
3182
+ async findStockToOrder(params) {
3183
+ const response = await this.api.get(`${this.route}check_lines_to_order`, {
3184
+ params
3185
+ });
3186
+ return response.data;
3187
+ }
3188
+ async findProvidersWithStockToOrder() {
3189
+ const response = await this.api.get(`${this.route}stock_order_provider`);
3190
+ return response.data;
3191
+ }
3192
+ async undoEncomendaVA(data) {
3193
+ await this.api.post(`${this.route}undo_encomenda_va`, data);
3194
+ }
3195
+ async setProvider(data) {
3196
+ await this.api.post(`${this.route}set_provider`, data);
3197
+ }
3198
+ async unsetProvider({ id }) {
3199
+ await this.api.post(`${this.route}${id}/unset_provider`);
3200
+ }
3201
+ async undoEncomendaStock(data) {
3202
+ await this.api.post(`${this.route}undo_encomenda_stock`, data);
3203
+ }
3204
+ async undoProviderOrder(data) {
3205
+ await this.api.post(`${this.route}undo_provider_order`, data);
3206
+ }
3207
+ async conferirEncomendaCliente(data) {
3208
+ const response = await this.api.post(`${this.route}check_client_order`, data);
3209
+ return response.data;
3210
+ }
3211
+ async find(params) {
3212
+ const response = await this.api.get(`${this.route}`, { params });
3213
+ return response.data;
3214
+ }
3215
+ };
3216
+
3217
+ // src/modules/document/purchase.ts
3218
+ var purchase_exports = {};
3219
+ __export(purchase_exports, {
3220
+ default: () => Repository84
3221
+ });
3222
+ var Repository84 = class {
3223
+ constructor({ api, route, publicRoute }) {
3224
+ this.api = api;
3225
+ this.route = route;
3226
+ this.publicRoute = publicRoute;
3227
+ }
3228
+ async purchaseFromProvider(data) {
3229
+ await this.api.post(`${this.route}purchase_from_provider`, data);
3230
+ }
3231
+ async findUnpaidMaterialEntrance(params) {
3232
+ const response = await this.api.get(`${this.route}unpaid_material_entrance`, {
3233
+ params
3234
+ });
3235
+ return response.data;
3236
+ }
3237
+ async findUnpaidMaterialEntranceProviders() {
3238
+ const response = await this.api.get(`${this.route}unpaid_material_entrance_providers`);
3239
+ return response.data;
3240
+ }
3241
+ async sync(data) {
3242
+ const response = await this.api.post(`${this.route}sync`, data);
3243
+ return response.data;
3244
+ }
3245
+ };
3246
+
3247
+ // src/modules/document/materialEntrance.ts
3248
+ var materialEntrance_exports = {};
3249
+ __export(materialEntrance_exports, {
3250
+ default: () => Repository85
3251
+ });
3252
+ var Repository85 = class {
3253
+ constructor({ api, route, publicRoute }) {
3254
+ this.api = api;
3255
+ this.route = route;
3256
+ this.publicRoute = publicRoute;
3257
+ }
3258
+ async findMaterialEntranceProviders() {
3259
+ const response = await this.api.get(`${this.route}material_entrance_providers`);
3260
+ return response.data;
3261
+ }
3262
+ async findUnfinishedPickings({
3263
+ id
3264
+ }) {
3265
+ const response = await this.api.get(`${this.route}unfinished_pickings/${id}`);
3266
+ return response.data;
3267
+ }
3268
+ async finalizarEntradaMaterial(data) {
3269
+ const response = await this.api.post(`${this.route}finalize_material_entrance`, data);
3270
+ return response.data;
3271
+ }
3272
+ async undoEntradaMaterial(data) {
3273
+ await this.api.post(`${this.route}undo_material_entrance`, data);
3274
+ }
3275
+ printLabelToPdfUrl({ product_id }, {
3276
+ quantity,
3277
+ ef_name,
3278
+ pc_document_number,
3279
+ prison,
3280
+ note
3281
+ }, token) {
3282
+ const qs = new URLSearchParams();
3283
+ qs.set("ef_name", ef_name);
3284
+ qs.set("quantity", quantity.toString());
3285
+ if (pc_document_number) {
3286
+ qs.set("pc_document_number", pc_document_number.toString());
3287
+ }
3288
+ if (note) {
3289
+ qs.set("note", note.toString());
3290
+ }
3291
+ qs.set("prison", prison.toString());
3292
+ qs.set("token", token);
3293
+ return `${this.publicRoute}print_label_pdf/${product_id}?${qs.toString()}`;
3294
+ }
3295
+ printBulkLabelToPdfUrl({
3296
+ groupLabel,
3297
+ saved_em_picking_ids,
3298
+ token
3299
+ }) {
3300
+ const qs = new URLSearchParams();
3301
+ qs.set("groupLabel", groupLabel.toString());
3302
+ qs.set("saved_em_picking_ids", saved_em_picking_ids);
3303
+ qs.set("token", token);
3304
+ return `${this.publicRoute}print_bulk_label_pdf?${qs.toString()}`;
3305
+ }
3306
+ };
3307
+
3308
+ // src/modules/document/transformado.ts
3309
+ var transformado_exports = {};
3310
+ __export(transformado_exports, {
3311
+ default: () => Repository86
3312
+ });
3313
+ var Repository86 = class {
3314
+ constructor({ api, route, publicRoute }) {
3315
+ this.api = api;
3316
+ this.route = route;
3317
+ this.publicRoute = publicRoute;
3318
+ }
3319
+ async create(body) {
3320
+ const response = await this.api.post(`${this.route}`, body);
3321
+ return response.data;
3322
+ }
3323
+ };
3324
+
3325
+ // src/modules/document/upfrontReturn.ts
3326
+ var upfrontReturn_exports = {};
3327
+ __export(upfrontReturn_exports, {
3328
+ default: () => Repository87
3329
+ });
3330
+ var Repository87 = class {
3331
+ constructor({ api, route, publicRoute }) {
3332
+ this.api = api;
3333
+ this.route = route;
3334
+ this.publicRoute = publicRoute;
3335
+ }
3336
+ async create(selector, data) {
3337
+ const response = await this.api.post(`${this.route}${selector.id}`, data);
3338
+ return response.data;
3339
+ }
3340
+ };
3341
+
3342
+ // src/modules/stock/savedEmPicking.ts
3343
+ var savedEmPicking_exports = {};
3344
+ __export(savedEmPicking_exports, {
3345
+ default: () => Repository88
3346
+ });
3347
+ var Repository88 = class {
3348
+ constructor({ api, route, publicRoute }) {
3349
+ this.api = api;
3350
+ this.route = route;
3351
+ this.publicRoute = publicRoute;
3352
+ }
3353
+ async create(body) {
3354
+ const response = await this.api.post(`${this.route}`, body);
3355
+ return response.data;
3356
+ }
3357
+ async createMany(body) {
3358
+ const response = await this.api.post(`${this.route}many`, body);
3359
+ return response.data;
3360
+ }
3361
+ async deleteOne(selector) {
3362
+ await this.api.delete(`${this.route}${selector.id}`);
3363
+ }
3364
+ async deleteMany(body) {
3365
+ await this.api.post(`${this.route}delete_many`, body);
3366
+ }
3367
+ };
3368
+
3369
+ // src/modules/integration/emailTemplate.ts
3370
+ var emailTemplate_exports = {};
3371
+ __export(emailTemplate_exports, {
3372
+ default: () => Repository89
3373
+ });
3374
+ var Repository89 = class {
3375
+ constructor({ api, route, publicRoute }) {
3376
+ this.api = api;
3377
+ this.route = route;
3378
+ this.publicRoute = publicRoute;
3379
+ }
3380
+ async find() {
3381
+ const response = await this.api.get(`${this.route}`);
3382
+ return response.data;
3383
+ }
3384
+ async create(data) {
3385
+ const response = await this.api.post(`${this.route}`, data);
3386
+ return response.data;
3387
+ }
3388
+ async update(selector, data) {
3389
+ const response = await this.api.put(`${this.route}${selector.id}`, data);
3390
+ return response.data;
3391
+ }
3392
+ async deleteOne(selector) {
3393
+ await this.api.delete(`${this.route}${selector.id}`);
3394
+ }
3395
+ async send(data) {
3396
+ const response = await this.api.post(`${this.route}send`, data);
3397
+ return response.data;
3398
+ }
3399
+ };
3400
+
3401
+ // src/modules/integration/emailTemplateAttachment.ts
3402
+ var emailTemplateAttachment_exports = {};
3403
+ __export(emailTemplateAttachment_exports, {
3404
+ default: () => Repository90
3405
+ });
3406
+ var Repository90 = class {
3407
+ constructor({ api, route, publicRoute }) {
3408
+ this.api = api;
3409
+ this.route = route;
3410
+ this.publicRoute = publicRoute;
3411
+ }
3412
+ async create(data) {
3413
+ const response = await this.api.post(`${this.route}`, data);
3414
+ return response.data;
3415
+ }
3416
+ async deleteOne(selector) {
3417
+ await this.api.delete(`${this.route}${selector.id}`);
3418
+ }
3419
+ };
3420
+
3421
+ // src/modules/stock/prison.ts
3422
+ var prison_exports = {};
3423
+ __export(prison_exports, {
3424
+ default: () => Repository91
3425
+ });
3426
+ var Repository91 = class {
3427
+ constructor({ api, route, publicRoute }) {
3428
+ this.api = api;
3429
+ this.route = route;
3430
+ this.publicRoute = publicRoute;
3431
+ }
3432
+ async putLineInPrison(data) {
3433
+ const response = await this.api.post(`${this.route}put_in_prison`, data);
3434
+ return response.data;
3435
+ }
3436
+ async removeLineFromPrison(data) {
3437
+ const response = await this.api.post(`${this.route}remove_from_prison`, data);
3438
+ return response.data;
3439
+ }
3440
+ async findLinesInPrison() {
3441
+ const response = await this.api.get(`${this.route}in_prison`, {});
3442
+ return response.data;
3443
+ }
3444
+ async findLinesInPrisonProviders() {
3445
+ const response = await this.api.get(`${this.route}in_prison_providers`, {});
3446
+ return response.data;
3447
+ }
3448
+ async checkLinesInPrison(data) {
3449
+ await this.api.post(`${this.route}check_in_prison`, data);
3450
+ }
3451
+ async createLinesInPrison(data) {
3452
+ const response = await this.api.post(`${this.route}create_lines`, data);
3453
+ return response.data;
3454
+ }
3455
+ };
3456
+
3457
+ // src/modules/document/quebra.ts
3458
+ var quebra_exports = {};
3459
+ __export(quebra_exports, {
3460
+ default: () => Repository92
3461
+ });
3462
+ var Repository92 = class {
3463
+ constructor({ api, route, publicRoute }) {
3464
+ this.api = api;
3465
+ this.route = route;
3466
+ this.publicRoute = publicRoute;
3467
+ }
3468
+ async findInventoryLosses() {
3469
+ const response = await this.api.get(`${this.route}`);
3470
+ return response.data;
3471
+ }
3472
+ async findInventoryLossesProviders() {
3473
+ const response = await this.api.get(`${this.route}providers`);
3474
+ return response.data;
3475
+ }
3476
+ async create(body) {
3477
+ const response = await this.api.post(`${this.route}`, body);
3478
+ return response.data;
3479
+ }
3480
+ async createMany(body) {
3481
+ const response = await this.api.post(`${this.route}create_many`, body);
3482
+ return response.data;
3483
+ }
3484
+ async deleteInventoryLosses(data) {
3485
+ await this.api.delete(`${this.route}inventory_loss`, { data });
3486
+ }
3487
+ };
3488
+
3489
+ // src/modules/document/inventario.ts
3490
+ var inventario_exports = {};
3491
+ __export(inventario_exports, {
3492
+ default: () => Repository93
3493
+ });
3494
+ var Repository93 = class {
3495
+ constructor({ api, route, publicRoute }) {
3496
+ this.api = api;
3497
+ this.route = route;
3498
+ this.publicRoute = publicRoute;
3499
+ }
3500
+ async createInventory(data) {
3501
+ await this.api.post(`${this.route}`, data);
3502
+ }
3503
+ };
3504
+
3505
+ // src/modules/document/returnToProvider.ts
3506
+ var returnToProvider_exports = {};
3507
+ __export(returnToProvider_exports, {
3508
+ default: () => Repository94
3509
+ });
3510
+ var Repository94 = class {
3511
+ constructor({ api, route, publicRoute }) {
3512
+ this.api = api;
3513
+ this.route = route;
3514
+ this.publicRoute = publicRoute;
3515
+ }
3516
+ async findLinesToReturn(params) {
3517
+ const response = await this.api.get(`${this.route}lines_to_return`, {
3518
+ params
3519
+ });
3520
+ return response.data;
3521
+ }
3522
+ async findLinesToReturnProviders() {
3523
+ const response = await this.api.get(`${this.route}lines_to_return_providers`);
3524
+ return response.data;
3525
+ }
3526
+ async checkLinesToReturn(data) {
3527
+ await this.api.post(`${this.route}check_to_return`, data);
3528
+ }
3529
+ };
3530
+
3531
+ // src/modules/integration/emailVerification.ts
3532
+ var emailVerification_exports = {};
3533
+ __export(emailVerification_exports, {
3534
+ default: () => Repository95
3535
+ });
3536
+ var Repository95 = class {
3537
+ constructor({ api, route, publicRoute }) {
3538
+ this.api = api;
3539
+ this.route = route;
3540
+ this.publicRoute = publicRoute;
3541
+ }
3542
+ async isVerified(params) {
3543
+ const response = await this.api.get(`${this.route}`, { params });
3544
+ return response.data;
3545
+ }
3546
+ async sendVerificationEmail(data) {
3547
+ const response = await this.api.post(`${this.route}`, data);
3548
+ return response.data;
3549
+ }
3550
+ async markAsVerified(data) {
3551
+ const response = await this.api.put(`${this.publicRoute}`, data);
3552
+ return response.data;
3553
+ }
3554
+ };
3555
+
3556
+ // src/modules/integration/emailLog.ts
3557
+ var emailLog_exports = {};
3558
+ __export(emailLog_exports, {
3559
+ default: () => Repository96
3560
+ });
3561
+ var Repository96 = class {
3562
+ constructor({ api, route, publicRoute }) {
3563
+ this.api = api;
3564
+ this.route = route;
3565
+ this.publicRoute = publicRoute;
3566
+ }
3567
+ async find(params) {
3568
+ const response = await this.api.get(`${this.route}`, { params });
3569
+ return response.data;
3570
+ }
3571
+ async findById({
3572
+ id
3573
+ }) {
3574
+ const response = await this.api.get(`${this.route}${id}`);
3575
+ return response.data;
3576
+ }
3577
+ async findByDocumentHeaderId({
3578
+ id
3579
+ }) {
3580
+ const response = await this.api.get(`${this.route}document_header/${id}`);
3581
+ return response.data;
3582
+ }
3583
+ async checkSent(body) {
3584
+ const response = await this.api.post(`${this.route}check_sent`, body);
3585
+ return response.data;
3586
+ }
3587
+ };
3588
+
3589
+ // src/modules/supply/documentLineNote.ts
3590
+ var documentLineNote_exports = {};
3591
+ __export(documentLineNote_exports, {
3592
+ default: () => Repository97
3593
+ });
3594
+ var Repository97 = class {
3595
+ constructor({ api, route, publicRoute }) {
3596
+ this.api = api;
3597
+ this.route = route;
3598
+ this.publicRoute = publicRoute;
3599
+ }
3600
+ async create(body) {
3601
+ const response = await this.api.post(`${this.route}`, body);
3602
+ return response.data;
3603
+ }
3604
+ async update(selector, body) {
3605
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3606
+ return response.data;
3607
+ }
3608
+ async deleteOne(selector) {
3609
+ const response = await this.api.delete(`${this.route}${selector.id}`);
3610
+ return response.data;
3611
+ }
3612
+ };
3613
+
3614
+ // src/modules/stock/savedProviderProposal.ts
3615
+ var savedProviderProposal_exports = {};
3616
+ __export(savedProviderProposal_exports, {
3617
+ default: () => Repository98
3618
+ });
3619
+ var Repository98 = class {
3620
+ constructor({ api, route, publicRoute }) {
3621
+ this.api = api;
3622
+ this.route = route;
3623
+ this.publicRoute = publicRoute;
3624
+ }
3625
+ async findByProviderId(selector) {
3626
+ const response = await this.api.get(`${this.route}${selector.id}`);
3627
+ return response.data;
3628
+ }
3629
+ async create(body) {
3630
+ const response = await this.api.post(`${this.route}`, body);
3631
+ return response.data;
3632
+ }
3633
+ async update(selector, body) {
3634
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
3635
+ return response.data;
3636
+ }
3637
+ async deleteOne(selector) {
3638
+ const response = await this.api.delete(`${this.route}${selector.id}`);
3639
+ return response.data;
3640
+ }
3641
+ };
3642
+
3643
+ // src/modules/stock/productGoogleSheets.ts
3644
+ var productGoogleSheets_exports = {};
3645
+ __export(productGoogleSheets_exports, {
3646
+ default: () => Repository99
3647
+ });
3648
+ var Repository99 = class {
3649
+ constructor({ api, route, publicRoute }) {
3650
+ this.api = api;
3651
+ this.route = route;
3652
+ this.publicRoute = publicRoute;
3653
+ }
3654
+ async basicSearch(params) {
3655
+ const response = await this.api.get(`${this.route}basic_search`, {
3656
+ params
3657
+ });
3658
+ return response.data;
3659
+ }
3660
+ async findReferenceAndIdForMobile(params) {
3661
+ const response = await this.api.get(`${this.route}reference_and_id_mobile`, {
3662
+ params
3663
+ });
3664
+ return response.data;
3665
+ }
3666
+ async findDataForMobile(params) {
3667
+ const response = await this.api.get(`${this.route}data_mobile/${params.id}`);
3668
+ return response.data;
3669
+ }
3670
+ async findStockForMobile(params) {
3671
+ const response = await this.api.get(`${this.route}stock_mobile/${params.id}`);
3672
+ return response.data;
3673
+ }
3674
+ async findPreArtigo(params) {
3675
+ const response = await this.api.get(`${this.route}pre_artigo`, {
3676
+ params
3677
+ });
3678
+ return response.data;
3679
+ }
3680
+ async updatePricesFromPreArtigo() {
3681
+ await this.api.get(`${this.route}update_prices_from_pre_artigo`);
3682
+ }
3683
+ async validateByRef(params) {
3684
+ const response = await this.api.get(`${this.route}validate_by_ref`, {
3685
+ params
3686
+ });
3687
+ return response.data;
3688
+ }
3689
+ async findSimilarProductsByName(params) {
3690
+ const response = await this.api.get(`${this.route}similar_products`, {
3691
+ params
3692
+ });
3693
+ return response.data;
3694
+ }
3695
+ async findByProductType(params) {
3696
+ const response = await this.api.get(`${this.route}by_product_type`, {
3697
+ params
3698
+ });
3699
+ return response.data;
3700
+ }
3701
+ async findById({
3702
+ id
3703
+ }) {
3704
+ const response = await this.api.get(`${this.route}${id}`);
3705
+ return response.data;
3706
+ }
3707
+ async findByIdWithStock({
3708
+ id
3709
+ }) {
3710
+ const response = await this.api.get(`${this.route}${id}/with_stock`);
3711
+ return response.data;
3712
+ }
3713
+ async updateGoogleSheetsLinesProduct(body) {
3714
+ const response = await this.api.put(`${this.route}update_google_sheets_lines_product`, body);
3715
+ return response.data;
3716
+ }
3717
+ async googleSheetsFieldsByRef(params) {
3718
+ const response = await this.api.get(
3719
+ `${this.route}google_sheets_fields_by_ref/${params.reference}`
3720
+ );
3721
+ return response.data;
3722
+ }
3723
+ async findRowPositionOnSheetsWithColumns(params) {
3724
+ const response = await this.api.get(`${this.route}sheet_row_and_columns/${params.selector}`);
3725
+ return response.data;
3726
+ }
3727
+ async checkStockByIds(data) {
3728
+ const response = await this.api.post(`${this.route}check_stock_by_ids`, data);
3729
+ return response.data;
3730
+ }
3731
+ async create(body) {
3732
+ const response = await this.api.post(`${this.route}`, body);
3733
+ return response.data;
3734
+ }
3735
+ async update({ id }, body) {
3736
+ await this.api.put(`${this.route}${id}`, body);
3737
+ }
3738
+ async deleteOne(selector) {
3739
+ await this.api.delete(`${this.route}${selector.id}`);
3740
+ }
3741
+ printLabelToPdfUrl({ id }, token) {
3742
+ const qs = new URLSearchParams();
3743
+ qs.set("token", token);
3744
+ return `${this.publicRoute}print_label_pdf/${id}?${qs.toString()}`;
3745
+ }
3746
+ printLabelToPdfBulk(ids, token) {
3747
+ const qs = new URLSearchParams();
3748
+ qs.set("token", token);
3749
+ qs.set("ids", ids.join(","));
3750
+ return `${this.publicRoute}print_label_pdf/bulk?${qs.toString()}`;
3751
+ }
3752
+ async updateDbFromSheets() {
3753
+ await this.api.post(`${this.route}update_db_from_sheets`);
3754
+ }
3755
+ async partialLocation(body) {
3756
+ await this.api.post(`${this.route}partial_location`, body);
3757
+ }
3758
+ async fullLocation(body) {
3759
+ await this.api.post(`${this.route}full_location`, body);
3760
+ }
3761
+ };
3762
+
3763
+ // src/modules/stock/task.ts
3764
+ var task_exports = {};
3765
+ __export(task_exports, {
3766
+ default: () => Repository100
3767
+ });
3768
+ var Repository100 = class {
3769
+ constructor({ api, route, publicRoute }) {
3770
+ this.api = api;
3771
+ this.route = route;
3772
+ this.publicRoute = publicRoute;
3773
+ }
3774
+ async find(selector) {
3775
+ return this.api.get(`${this.route}${selector}`);
3776
+ }
3777
+ async findWithMessages(selector) {
3778
+ return this.api.get(`${this.route}with_messages`, {
3779
+ params: selector
3780
+ });
3781
+ }
3782
+ async create(body) {
3783
+ const response = await this.api.post(`${this.route}`, body);
3784
+ return response.data;
3785
+ }
3786
+ async update(selector, body) {
3787
+ await this.api.put(`${this.route}${selector.id}`, body);
3788
+ }
3789
+ async delete(selector) {
3790
+ await this.api.delete(`${this.route}${selector.id}`);
3791
+ }
3792
+ async findByOwnerId(selector) {
3793
+ const response = await this.api.delete(`${this.route}by_owner/${selector.owner_id}`);
3794
+ return response.data;
3795
+ }
3796
+ };
3797
+
3798
+ // src/modules/stock/taskMessage.ts
3799
+ var taskMessage_exports = {};
3800
+ __export(taskMessage_exports, {
3801
+ default: () => Repository101
3802
+ });
3803
+ var Repository101 = class {
3804
+ constructor({ api, route, publicRoute }) {
3805
+ this.api = api;
3806
+ this.route = route;
3807
+ this.publicRoute = publicRoute;
3808
+ }
3809
+ async create(body) {
3810
+ const response = await this.api.post(`${this.route}`, body);
3811
+ return response.data;
3812
+ }
3813
+ async update(selector, body) {
3814
+ await this.api.put(`${this.route}${selector.id}`, body);
3815
+ }
3816
+ async delete(selector) {
3817
+ await this.api.delete(`${this.route}${selector.id}`);
3818
+ }
3819
+ };
3820
+
3821
+ // src/modules/stock/recurrentTasks.ts
3822
+ var recurrentTasks_exports = {};
3823
+ __export(recurrentTasks_exports, {
3824
+ default: () => Repository102
3825
+ });
3826
+ var Repository102 = class {
3827
+ constructor({ api, route, publicRoute }) {
3828
+ this.api = api;
3829
+ this.route = route;
3830
+ this.publicRoute = publicRoute;
3831
+ }
3832
+ async from_master() {
3833
+ return this.api.post(`${this.route}from_master`);
3834
+ }
3835
+ async from_master_checked() {
3836
+ return this.api.post(`${this.route}from_master`);
3837
+ }
3838
+ };
3839
+
3840
+ // src/modules/stock/taskRead.ts
3841
+ var taskRead_exports = {};
3842
+ __export(taskRead_exports, {
3843
+ default: () => Repository103
3844
+ });
3845
+ var Repository103 = class {
3846
+ constructor({ api, route, publicRoute }) {
3847
+ this.api = api;
3848
+ this.route = route;
3849
+ this.publicRoute = publicRoute;
3850
+ }
3851
+ async create(body) {
3852
+ await this.api.post(`${this.route}`, body);
3853
+ }
3854
+ async delete(params) {
3855
+ await this.api.delete(`${this.route}`, { data: params });
3856
+ }
3857
+ };
3858
+
3859
+ // src/modules/user/theme.ts
3860
+ var theme_exports = {};
3861
+ __export(theme_exports, {
3862
+ default: () => Repository104
3863
+ });
3864
+ var Repository104 = class {
3865
+ constructor({ api, route, publicRoute }) {
3866
+ this.api = api;
3867
+ this.route = route;
3868
+ this.publicRoute = publicRoute;
3869
+ }
3870
+ async createOrUpdate(body) {
3871
+ await this.api.post(`${this.route}`, body);
3872
+ }
3873
+ };
3874
+
3875
+ // src/modules/stock/dashboard.ts
3876
+ var dashboard_exports = {};
3877
+ __export(dashboard_exports, {
3878
+ default: () => Repository105
3879
+ });
3880
+ var Repository105 = class {
3881
+ constructor({ api, route, publicRoute }) {
3882
+ this.api = api;
3883
+ this.route = route;
3884
+ this.publicRoute = publicRoute;
3885
+ }
3886
+ async findByDate(selector) {
3887
+ const response = await this.api.get(`${this.route}${selector.date}`);
3888
+ return response.data;
3889
+ }
3890
+ };
3891
+
3892
+ // src/modules/stock/chatRapidMessage.ts
3893
+ var chatRapidMessage_exports = {};
3894
+ __export(chatRapidMessage_exports, {
3895
+ default: () => Repository106
3896
+ });
3897
+ var Repository106 = class {
3898
+ constructor({ api, route, publicRoute }) {
3899
+ this.api = api;
3900
+ this.route = route;
3901
+ this.publicRoute = publicRoute;
3902
+ }
3903
+ async create(data) {
3904
+ const response = await this.api.post(`${this.route}`, data);
3905
+ return response.data;
3906
+ }
3907
+ async findMinified() {
3908
+ const response = await this.api.get(`${this.route}`);
3909
+ return response.data;
3910
+ }
3911
+ async findById(selector) {
3912
+ const response = await this.api.get(`${this.route}${selector.id}`);
3913
+ return response.data;
3914
+ }
3915
+ async update(selector, data) {
3916
+ const response = await this.api.put(`${this.route}${selector.date}`, data);
3917
+ return response.data;
3918
+ }
3919
+ async delete(selector) {
3920
+ await this.api.delete(`${this.route}${selector.id}`);
3921
+ }
3922
+ };
3923
+
3924
+ // src/modules/stock/sideMenu.ts
3925
+ var sideMenu_exports = {};
3926
+ __export(sideMenu_exports, {
3927
+ default: () => Repository107
3928
+ });
3929
+ var Repository107 = class {
3930
+ constructor({ api, route, publicRoute }) {
3931
+ this.api = api;
3932
+ this.route = route;
3933
+ this.publicRoute = publicRoute;
3934
+ }
3935
+ async findSideMenuStoreOperators() {
3936
+ const response = await this.api.get(`${this.route}side_menu_store_operators`);
3937
+ return response.data;
3938
+ }
3939
+ async findByDocumentLineState(params) {
3940
+ const response = await this.api.get(`${this.route}by_document_line_state`, {
3941
+ params
3942
+ });
3943
+ return response.data;
3944
+ }
3945
+ async findByState(params) {
3946
+ const response = await this.api.get(`${this.route}find_by_state`, {
3947
+ params
3948
+ });
3949
+ return response.data;
3950
+ }
3951
+ async findSideMenuCounters() {
3952
+ const response = await this.api.get(`${this.route}counters`);
3953
+ return response.data;
3954
+ }
3955
+ };
3956
+
3957
+ // src/modules/view/errorLog.ts
3958
+ var errorLog_exports = {};
3959
+ __export(errorLog_exports, {
3960
+ default: () => Repository108
3961
+ });
3962
+ var Repository108 = class {
3963
+ constructor({ api, route, publicRoute }) {
3964
+ this.api = api;
3965
+ this.route = route;
3966
+ this.publicRoute = publicRoute;
3967
+ }
3968
+ async create(body) {
3969
+ await this.api.post(`${this.route}`, body);
3970
+ }
3971
+ };
3972
+
3973
+ // src/modules/view/adminPanel.ts
3974
+ var adminPanel_exports = {};
3975
+ __export(adminPanel_exports, {
3976
+ default: () => Repository109
3977
+ });
3978
+ var Repository109 = class {
3979
+ constructor({ api, route, publicRoute }) {
3980
+ this.api = api;
3981
+ this.route = route;
3982
+ this.publicRoute = publicRoute;
3983
+ }
3984
+ async getData(params) {
3985
+ const response = await this.api.get(`${this.route}`, { params });
3986
+ return response.data;
3987
+ }
3988
+ };
3989
+
3990
+ // src/modules/supply/documentLineRm.ts
3991
+ var documentLineRm_exports = {};
3992
+ __export(documentLineRm_exports, {
3993
+ default: () => Repository110
3994
+ });
3995
+ var Repository110 = class {
3996
+ constructor({ api, route, publicRoute }) {
3997
+ this.api = api;
3998
+ this.route = route;
3999
+ this.publicRoute = publicRoute;
4000
+ }
4001
+ async findByOwnerId({
4002
+ owner_id
4003
+ }) {
4004
+ const response = await this.api.get(`${this.route}${owner_id}`);
4005
+ return response.data;
4006
+ }
4007
+ async update(data) {
4008
+ await this.api.put(`${this.route}`, data);
4009
+ }
4010
+ };
4011
+
4012
+ // src/modules/supply/documentLineMt.ts
4013
+ var documentLineMt_exports = {};
4014
+ __export(documentLineMt_exports, {
4015
+ default: () => Repository111
4016
+ });
4017
+ var Repository111 = class {
4018
+ constructor({ api, route, publicRoute }) {
4019
+ this.api = api;
4020
+ this.route = route;
4021
+ this.publicRoute = publicRoute;
4022
+ }
4023
+ async findByOwnerId({
4024
+ owner_id
4025
+ }) {
4026
+ const response = await this.api.get(`${this.route}${owner_id}`);
4027
+ return response.data;
4028
+ }
4029
+ async update(data) {
4030
+ await this.api.put(`${this.route}`, data);
4031
+ }
4032
+ };
4033
+
4034
+ // src/modules/user/chatSubscriber.ts
4035
+ var chatSubscriber_exports = {};
4036
+ __export(chatSubscriber_exports, {
4037
+ default: () => Repository112
4038
+ });
4039
+ var Repository112 = class {
4040
+ constructor({ api, route, publicRoute }) {
4041
+ this.api = api;
4042
+ this.route = route;
4043
+ this.publicRoute = publicRoute;
4044
+ }
4045
+ async createOrUpdate(data) {
4046
+ const response = await this.api.post(`${this.route}`, data);
4047
+ return response.data;
4048
+ }
4049
+ async findByOwnerId(selector) {
4050
+ const response = await this.api.get(`${this.route}by_owner_id/${selector.id}`);
4051
+ return response.data;
4052
+ }
4053
+ async findByDocumentHeaderId(selector) {
4054
+ const response = await this.api.get(`${this.route}by_document_header_id/${selector.id}`);
4055
+ return response.data;
4056
+ }
4057
+ async findByPersonaId(selector) {
4058
+ const response = await this.api.get(`${this.route}by_persona_id/${selector.id}`);
4059
+ return response.data;
4060
+ }
4061
+ async deleteOne(selector) {
4062
+ await this.api.post(`${this.route}/id/${selector}`);
4063
+ }
4064
+ };
4065
+
4066
+ // src/main.ts
4067
+ var API = class {
4068
+ constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
4069
+ this.processEnvironment = processEnvironment || "localhost";
4070
+ const defaultHeaders = new AxiosHeaders();
4071
+ if (apikey) {
4072
+ defaultHeaders.set("apikey", apikey);
4073
+ }
4074
+ if (tokenBearer) {
4075
+ defaultHeaders.setAuthorization(tokenBearer);
4076
+ }
4077
+ this.client = axios.create({
4078
+ baseURL: gatewayUrl,
4079
+ headers: defaultHeaders
4080
+ });
4081
+ const getServicePath = (service) => {
4082
+ const baseUrl = services[service];
4083
+ const servicePath = processEnvironment === "localhost" ? "/" : `${service}/`;
4084
+ return `${baseUrl}${servicePath}`;
4085
+ };
4086
+ this.services = {
4087
+ stock: getServicePath("stock"),
4088
+ users: getServicePath("users"),
4089
+ integration: getServicePath("integration"),
4090
+ documents: getServicePath("documents"),
4091
+ view: getServicePath("view"),
4092
+ print: getServicePath("print"),
4093
+ tickets: getServicePath("tickets")
4094
+ };
4095
+ const getModuleParams = (service, module) => ({
4096
+ api: this.client,
4097
+ route: `${this.services[service]}${module}/`,
4098
+ publicRoute: `${this.services[service]}${module}/`
4099
+ });
4100
+ this.BankData = new Repository(getModuleParams("users", "bank_data"));
4101
+ this.Client = new Repository2(getModuleParams("users", "client"));
4102
+ this.ClientType = new Repository3(getModuleParams("users", "client_type"));
4103
+ this.Chat = new Repository4(getModuleParams("stock", "chat"));
4104
+ this.Commissioner = new Repository5(getModuleParams("users", "commissioner"));
4105
+ this.Country = new Repository6(getModuleParams("users", "country"));
4106
+ this.DocumentHeader = new Repository7(getModuleParams("stock", "document_header"));
4107
+ this.BillOfLading = new Repository8(getModuleParams("stock", "document_header"));
4108
+ this.ProductionOrder = new Repository9(getModuleParams("stock", "document_header"));
4109
+ this.Proforma = new Repository10(getModuleParams("stock", "document_header"));
4110
+ this.PropostaFornecedor = new Repository11(
4111
+ getModuleParams("stock", "document_header")
4112
+ );
4113
+ this.ProviderCreditNoteFromReturn = new Repository12(
4114
+ getModuleParams("stock", "document_header")
4115
+ );
4116
+ this.ProviderFinancialCreditNote = new Repository13(
4117
+ getModuleParams("stock", "document_header")
4118
+ );
4119
+ this.ProviderServiceInvoice = new Repository14(
4120
+ getModuleParams("stock", "document_header")
4121
+ );
4122
+ this.DocumentLine = new Repository15(getModuleParams("stock", "document_line"));
4123
+ this.DocumentLineAssoc = new Repository16(
4124
+ getModuleParams("stock", "document_line_assoc")
4125
+ );
4126
+ this.DocumentType = new Repository17(getModuleParams("stock", "document_type"));
4127
+ this.Favorites = new Repository18(getModuleParams("users", "favorite"));
4128
+ this.File = new Repository19(getModuleParams("stock", "file"));
4129
+ this.GoogleSheets = new Repository20(getModuleParams("integration", "google"));
4130
+ this.GroupPermissions = new Repository21(getModuleParams("users", "group_permission"));
4131
+ this.Language = new Repository22(getModuleParams("users", "language"));
4132
+ this.Location = new Repository23(getModuleParams("stock", "location"));
4133
+ this.Logout = new Repository24(getModuleParams("users", "logout"));
4134
+ this.Multimedia = new Repository25(getModuleParams("documents", "multimedia"));
4135
+ this.Observation = new Repository26(getModuleParams("integration", "observation"));
4136
+ this.ObservationType = new Repository27(
4137
+ getModuleParams("integration", "observation_type")
4138
+ );
4139
+ this.Password = new Repository28(getModuleParams("users", "password"));
4140
+ this.Permissions = new Repository29(getModuleParams("users", "permission"));
4141
+ this.ProductImage = new Repository30(getModuleParams("stock", "product_image"));
4142
+ this.Promotion = new Repository31(getModuleParams("stock", "promotion"));
4143
+ this.PromotionAssoc = new Repository32(getModuleParams("stock", "promotion_assoc"));
4144
+ this.Providers = new Repository33(getModuleParams("users", "provider"));
4145
+ this.ProviderType = new Repository34(getModuleParams("users", "provider_type"));
4146
+ this.PurchaseConditions = new Repository35(
4147
+ getModuleParams("users", "purchase_condition")
4148
+ );
4149
+ this.ReasonForExemption = new Repository36(
4150
+ getModuleParams("users", "reason_for_exemption")
4151
+ );
4152
+ this.RefreshToken = new Repository37(getModuleParams("users", "refresh-token"));
4153
+ this.SegmentsArea = new Repository38(getModuleParams("users", "segments_area"));
4154
+ this.Sessions = new Repository39(getModuleParams("users", "sessions"));
4155
+ this.Shippings = new Repository40(getModuleParams("users", "shipping"));
4156
+ this.StoreOperator = new Repository41(getModuleParams("users", "store_operator"));
4157
+ this.Swift = new Repository42(getModuleParams("users", "swift"));
4158
+ this.TypeOfLocation = new Repository43(getModuleParams("stock", "type_of_location"));
4159
+ this.UnitOfMeasure = new Repository44(getModuleParams("stock", "unit_of_measure"));
4160
+ this.UserPermissions = new Repository45(getModuleParams("users", "user_permission"));
4161
+ this.UserPositions = new Repository46(getModuleParams("users", "user_position"));
4162
+ this.Users = new Repository47(getModuleParams("users", "users"));
4163
+ this.VatTax = new Repository48(getModuleParams("stock", "vat_tax"));
4164
+ this.VatTaxZone = new Repository49(getModuleParams("stock", "vat_tax_zone"));
4165
+ this.Workflow = new Repository50(getModuleParams("stock", "workflow"));
4166
+ this.DeliveryMethods = new Repository51(getModuleParams("users", "delivery_methods"));
4167
+ this.MaturityDates = new Repository52(getModuleParams("users", "maturity_dates"));
4168
+ this.PaymentMethods = new Repository53(getModuleParams("users", "payment_methods"));
4169
+ this.Vehicles = new Repository54(getModuleParams("users", "vehicles"));
4170
+ this.ExternalDocumentType = new Repository55(
4171
+ getModuleParams("stock", "external_document_type")
4172
+ );
4173
+ this.DocumentSet = new Repository56(getModuleParams("stock", "document_set"));
4174
+ this.Payment = new Repository57(getModuleParams("stock", "payment"));
4175
+ this.ExternalDocumentHeader = new Repository58(
4176
+ getModuleParams("stock", "external_document_header")
4177
+ );
4178
+ this.VatValidation = new Repository59(getModuleParams("stock", "vat_validation"));
4179
+ this.StockMovement = new Repository60(getModuleParams("stock", "stock_movement"));
4180
+ this.ZipCode = new Repository61(getModuleParams("users", "zip_code"));
4181
+ this.Tenant = new Repository62(getModuleParams("users", "tenant"));
4182
+ this.PreSale = new Repository63(getModuleParams("stock", "pre_sale"));
4183
+ this.PreSaleProduct = new Repository64(getModuleParams("stock", "pre_sale_product"));
4184
+ this.OrderManagement = new Repository65(getModuleParams("stock", "order_management"));
4185
+ this.Npc = new Repository66(getModuleParams("print", "npc"));
4186
+ this.Printer = new Repository67(getModuleParams("print", "printer"));
4187
+ this.SchedulePrintJob = new Repository68(
4188
+ getModuleParams("print", "schedule_print_job")
4189
+ );
4190
+ this.QueryList = new Repository69(getModuleParams("stock", "query"));
4191
+ this.QueryParameter = new Repository70(getModuleParams("stock", "query_parameter"));
4192
+ this.ReturnReason = new Repository71(getModuleParams("stock", "return_reason"));
4193
+ this.PropostaSheets = new Repository72(getModuleParams("stock", "proposta_sheets"));
4194
+ this.Schedule = new Repository73(getModuleParams("stock", "schedule"));
4195
+ this.GoogleFilePermission = new Repository74(
4196
+ getModuleParams("integration", "google_file_permission")
4197
+ );
4198
+ this.Settings = new Repository75(getModuleParams("integration", "settings"));
4199
+ this.Tickets = new Repository76(getModuleParams("tickets", "tickets"));
4200
+ this.Channel = new Repository77(getModuleParams("tickets", "channel"));
4201
+ this.TicketsLanguage = new Repository78(getModuleParams("tickets", "tickets_language"));
4202
+ this.Clt = new Repository79(getModuleParams("tickets", "clt"));
4203
+ this.StartDocumentHeaderLastUpdate = new Repository80(
4204
+ getModuleParams("stock", "start_document_header_last_update")
4205
+ );
4206
+ this.Persona = new Repository81(getModuleParams("users", "persona"));
4207
+ this.ProjectInfo = new Repository82(getModuleParams("integration", "project_info"));
4208
+ this.Order = new Repository83(getModuleParams("stock", "order"));
4209
+ this.Purchase = new Repository84(getModuleParams("stock", "purchase"));
4210
+ this.MaterialEntrance = new Repository85(
4211
+ getModuleParams("stock", "material_entrance")
4212
+ );
4213
+ this.Transformado = new Repository86(getModuleParams("stock", "transformado"));
4214
+ this.UpfrontReturn = new Repository87(getModuleParams("stock", "upfront_return"));
4215
+ this.SavedEmPicking = new Repository88(getModuleParams("stock", "saved_em_picking"));
4216
+ this.EmailTemplate = new Repository89(getModuleParams("integration", "email_template"));
4217
+ this.EmailTemplateAttachment = new Repository90(
4218
+ getModuleParams("integration", "email_template_attachment")
4219
+ );
4220
+ this.Prison = new Repository91(getModuleParams("stock", "prison"));
4221
+ this.Quebra = new Repository92(getModuleParams("stock", "quebra"));
4222
+ this.Inventario = new Repository93(getModuleParams("stock", "inventario"));
4223
+ this.ReturnToProvider = new Repository94(
4224
+ getModuleParams("stock", "return_to_provider")
4225
+ );
4226
+ this.EmailVerification = new Repository95(
4227
+ getModuleParams("integration", "email_verification")
4228
+ );
4229
+ this.EmailLog = new Repository96(getModuleParams("integration", "email_log"));
4230
+ this.DocumentLineNote = new Repository97(
4231
+ getModuleParams("stock", "document_line_note")
4232
+ );
4233
+ this.SavedProviderProposal = new Repository98(
4234
+ getModuleParams("stock", "saved_provider_proposal")
4235
+ );
4236
+ this.ProductGoogleSheets = new Repository99(
4237
+ getModuleParams("stock", "product_google")
4238
+ );
4239
+ this.Task = new Repository100(getModuleParams("stock", "task"));
4240
+ this.TaskMessage = new Repository101(getModuleParams("stock", "task_message"));
4241
+ this.RecurrentTasks = new Repository102(getModuleParams("stock", "recurrent_tasks"));
4242
+ this.TaskRead = new Repository103(getModuleParams("stock", "task_read"));
4243
+ this.Theme = new Repository104(getModuleParams("users", "theme"));
4244
+ this.Dashboard = new Repository105(getModuleParams("stock", "dashboard"));
4245
+ this.ChatRapidMessage = new Repository106(
4246
+ getModuleParams("stock", "chat_rapid_message")
4247
+ );
4248
+ this.SideMenu = new Repository107(getModuleParams("stock", "side_menu"));
4249
+ this.ErrorLog = new Repository108(getModuleParams("view", "error_log"));
4250
+ this.AdminPanel = new Repository109(getModuleParams("view", "admin_panel"));
4251
+ this.DocumentLineRm = new Repository110(getModuleParams("stock", "document_line_rm"));
4252
+ this.DocumentLineMt = new Repository111(getModuleParams("stock", "document_line_mt"));
4253
+ this.ChatSubscriber = new Repository112(getModuleParams("users", "chat_subscriber"));
4254
+ }
4255
+ };
4256
+
4257
+ // src/index.ts
4258
+ var index_default = main_exports;
4259
+
4260
+ export { index_default as default };