@nomalism-com/api 1.3.35 → 1.3.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ __export(main_exports, {
11
11
  AccountCode: () => accountCode_exports,
12
12
  AdminPanel: () => adminPanel_exports,
13
13
  BankData: () => bankData_exports,
14
+ Catalogo: () => CAT_exports,
14
15
  Channel: () => channel_exports,
15
16
  ChatRapidMessage: () => chatRapidMessage_exports,
16
17
  ChatSubscriber: () => chatSubscriber_exports,
@@ -51,7 +52,6 @@ __export(main_exports, {
51
52
  LLM: () => llm_exports,
52
53
  Language: () => language_exports,
53
54
  Location: () => location_exports,
54
- Logout: () => logout_exports,
55
55
  MaterialEntrance: () => materialEntrance_exports,
56
56
  MaturityDates: () => maturityDates_exports,
57
57
  Multimedia: () => multimedia_exports,
@@ -75,6 +75,7 @@ __export(main_exports, {
75
75
  Prison: () => prison_exports,
76
76
  ProductGoogleSheets: () => productGoogleSheets_exports,
77
77
  ProductImage: () => productImage_exports,
78
+ ProductLocation: () => productLocation_exports,
78
79
  ProjectInfo: () => projectInfo_exports,
79
80
  Promotion: () => promotion_exports,
80
81
  PromotionAssoc: () => promotionAssoc_exports,
@@ -101,10 +102,14 @@ __export(main_exports, {
101
102
  Settings: () => settings_exports,
102
103
  Shippings: () => shippings_exports,
103
104
  SideMenu: () => sideMenu_exports,
105
+ SidemenuHighlight: () => sidemenuHighlight_exports,
106
+ SmsSender: () => smsSender_exports,
107
+ SmsTemplate: () => smsTemplate_exports,
104
108
  StartDocumentHeaderLastUpdate: () => startDocumentHeaderLastUpdate_exports,
105
109
  StockMovement: () => stockMovement_exports,
106
110
  StoreOperator: () => storeOperator_exports,
107
111
  Swift: () => swift_exports,
112
+ SystemModule: () => systemModule_exports,
108
113
  Tag: () => tag_exports,
109
114
  Task: () => task_exports,
110
115
  TaskMessage: () => taskMessage_exports,
@@ -113,6 +118,7 @@ __export(main_exports, {
113
118
  Theme: () => theme_exports,
114
119
  Tickets: () => tickets_exports,
115
120
  TicketsLanguage: () => language_exports2,
121
+ TimeSheet: () => timeSheet_exports,
116
122
  Transformado: () => transformado_exports,
117
123
  TypeOfLocation: () => typeOfLocation_exports,
118
124
  UnitOfMeasure: () => unitOfMeasure_exports,
@@ -126,7 +132,211 @@ __export(main_exports, {
126
132
  Workflow: () => workflow_exports,
127
133
  ZipCode: () => zipCode_exports
128
134
  });
129
- import axios, { AxiosHeaders } from "axios";
135
+ import axios2, { AxiosHeaders } from "axios";
136
+ import Nomalism from "@nomalism-com/types";
137
+
138
+ // src/lib/apiError.ts
139
+ import axios from "axios";
140
+ var RAW_ERROR = /* @__PURE__ */ Symbol("rawError");
141
+ var ApiError = class _ApiError extends Error {
142
+ constructor(fields, cause) {
143
+ super(fields.message);
144
+ this.name = "ApiError";
145
+ this.kind = fields.kind;
146
+ this.status = fields.status;
147
+ this.code = fields.code;
148
+ this.method = fields.method;
149
+ this.url = fields.url;
150
+ this.data = fields.data;
151
+ Object.defineProperty(this, RAW_ERROR, {
152
+ value: cause,
153
+ enumerable: false,
154
+ writable: false,
155
+ configurable: true
156
+ });
157
+ const captureStackTrace = Error.captureStackTrace;
158
+ captureStackTrace?.(this, _ApiError);
159
+ }
160
+ /**
161
+ * The original underlying error (e.g. the raw AxiosError) for deep debugging.
162
+ * Lives on a non-enumerable Symbol slot, so it is never printed by loggers.
163
+ */
164
+ get raw() {
165
+ return this[RAW_ERROR];
166
+ }
167
+ /** Controls what `JSON.stringify(err)` and most loggers emit — kept compact. */
168
+ toJSON() {
169
+ return {
170
+ kind: this.kind,
171
+ message: this.message,
172
+ status: this.status,
173
+ code: this.code,
174
+ method: this.method,
175
+ url: this.url,
176
+ data: this.data
177
+ };
178
+ }
179
+ };
180
+ function isApiError(error) {
181
+ return error instanceof ApiError;
182
+ }
183
+ function extractServerMessage(data, fallback) {
184
+ if (typeof data === "string" && data.trim()) return data;
185
+ if (data && typeof data === "object") {
186
+ const record = data;
187
+ const candidate = record.message ?? record.error ?? record.detail ?? record.title;
188
+ if (typeof candidate === "string" && candidate.trim()) return candidate;
189
+ }
190
+ return fallback;
191
+ }
192
+ function parseApiError(error) {
193
+ if (error instanceof ApiError) return error;
194
+ if (!axios.isAxiosError(error)) {
195
+ const message = error instanceof Error ? error.message : String(error);
196
+ return new ApiError({ kind: "unknown", message }, error);
197
+ }
198
+ const axiosError = error;
199
+ const method = axiosError.config?.method?.toUpperCase();
200
+ const url = axiosError.config?.url;
201
+ const code = axiosError.code;
202
+ if (axiosError.response) {
203
+ const { status, data } = axiosError.response;
204
+ const message = extractServerMessage(data, `Request failed with status ${status}`);
205
+ return new ApiError({ kind: "response", message, status, code, method, url, data }, error);
206
+ }
207
+ if (axiosError.request) {
208
+ const message = code === "ECONNABORTED" ? `Request timed out${url ? ` (${method} ${url})` : ""}` : `No response received${url ? ` from ${method} ${url}` : ""}`;
209
+ return new ApiError({ kind: "request", message, code, method, url }, error);
210
+ }
211
+ return new ApiError({ kind: "setup", message: axiosError.message, code, method, url }, error);
212
+ }
213
+
214
+ // src/modules/view/webSocket.ts
215
+ var CLOSE_AUTH_REJECTED = 4401;
216
+ var CLOSE_AUTH_UNAVAILABLE = 4503;
217
+ var PING_INTERVAL_MS = 25e3;
218
+ var MAX_BACKOFF_MS = 3e4;
219
+ var BASE_BACKOFF_MS = 1e3;
220
+ var Service = class {
221
+ constructor({ route }) {
222
+ this.route = route.replace(/^http(s?):/i, "ws$1:");
223
+ }
224
+ openSocket({
225
+ token,
226
+ channel,
227
+ onEvent,
228
+ onOpen,
229
+ onReconnect,
230
+ onClose,
231
+ onAuthUnverified
232
+ }) {
233
+ let ws = null;
234
+ let attempts = 0;
235
+ let opensSoFar = 0;
236
+ let pingTimer = null;
237
+ let reconnectTimer = null;
238
+ let closedByCaller = false;
239
+ const subprotocols = channel ? [`bearer.${token}`, `channel.${channel}`] : [`bearer.${token}`];
240
+ const stopPing = () => {
241
+ if (pingTimer !== null) {
242
+ window.clearInterval(pingTimer);
243
+ pingTimer = null;
244
+ }
245
+ };
246
+ const startPing = () => {
247
+ stopPing();
248
+ pingTimer = setInterval(() => {
249
+ if (ws?.readyState === WebSocket.OPEN) {
250
+ try {
251
+ ws.send(JSON.stringify({ type: "ping" }));
252
+ } catch (err) {
253
+ console.warn("WebSocket ping failed", err);
254
+ }
255
+ }
256
+ }, PING_INTERVAL_MS);
257
+ };
258
+ const scheduleReconnect = () => {
259
+ if (closedByCaller) return;
260
+ const delay = Math.min(MAX_BACKOFF_MS, BASE_BACKOFF_MS * 2 ** Math.min(attempts, 6));
261
+ attempts += 1;
262
+ reconnectTimer = setTimeout(connect, delay);
263
+ };
264
+ const connect = () => {
265
+ if (closedByCaller) return;
266
+ try {
267
+ ws = new WebSocket(this.route, subprotocols);
268
+ } catch (err) {
269
+ console.error("WebSocket constructor threw", err);
270
+ scheduleReconnect();
271
+ return;
272
+ }
273
+ ws.onopen = () => {
274
+ attempts = 0;
275
+ opensSoFar += 1;
276
+ startPing();
277
+ if (opensSoFar === 1) {
278
+ onOpen?.();
279
+ } else {
280
+ onReconnect?.();
281
+ }
282
+ };
283
+ ws.onmessage = (msg) => {
284
+ let payload;
285
+ try {
286
+ payload = JSON.parse(msg.data);
287
+ } catch {
288
+ console.warn("WebSocket received non-JSON frame", msg.data);
289
+ return;
290
+ }
291
+ if (payload.type === "ping" || payload.type === "pong") return;
292
+ try {
293
+ onEvent(payload);
294
+ } catch (err) {
295
+ console.error("WebSocket event handler threw", err, payload);
296
+ }
297
+ };
298
+ ws.onerror = (err) => {
299
+ console.warn("WebSocket error", err);
300
+ };
301
+ ws.onclose = (e) => {
302
+ stopPing();
303
+ ws = null;
304
+ onClose?.();
305
+ if (e.code === CLOSE_AUTH_REJECTED) {
306
+ console.error("WebSocket auth rejected by server, not reconnecting");
307
+ closedByCaller = true;
308
+ return;
309
+ }
310
+ if (e.code === CLOSE_AUTH_UNAVAILABLE) {
311
+ console.warn("WebSocket auth verifier unavailable, retrying");
312
+ attempts = Math.min(attempts, 2);
313
+ onAuthUnverified?.();
314
+ scheduleReconnect();
315
+ return;
316
+ }
317
+ scheduleReconnect();
318
+ };
319
+ };
320
+ connect();
321
+ return {
322
+ close: () => {
323
+ closedByCaller = true;
324
+ if (reconnectTimer !== null) {
325
+ window.clearTimeout(reconnectTimer);
326
+ reconnectTimer = null;
327
+ }
328
+ stopPing();
329
+ if (ws && ws.readyState <= WebSocket.OPEN) {
330
+ try {
331
+ ws.close(1e3, "client unmount");
332
+ } catch {
333
+ }
334
+ }
335
+ ws = null;
336
+ }
337
+ };
338
+ }
339
+ };
130
340
 
131
341
  // src/modules/user/bankData.ts
132
342
  var bankData_exports = {};
@@ -456,9 +666,6 @@ var Repository7 = class {
456
666
  async transferClientOwnership(data) {
457
667
  await this.api.put(`${this.route}transfer_client_ownership`, data);
458
668
  }
459
- async updateManyWithPersona(data) {
460
- await this.api.put(`${this.route}update_many_with_persona`, data);
461
- }
462
669
  async sendClientNotification({ id }, data) {
463
670
  await this.api.post(`${this.route}${id}/send_client_notification`, data);
464
671
  }
@@ -624,6 +831,9 @@ var Repository16 = class {
624
831
  this.api = api;
625
832
  this.route = route;
626
833
  }
834
+ async getSmsData() {
835
+ await this.api.get(`${this.route}get_sms_data`);
836
+ }
627
837
  async create(body) {
628
838
  const response = await this.api.post(`${this.route}`, body);
629
839
  return response.data;
@@ -893,27 +1103,12 @@ var Repository23 = class {
893
1103
  }
894
1104
  };
895
1105
 
896
- // src/modules/user/logout.ts
897
- var logout_exports = {};
898
- __export(logout_exports, {
899
- default: () => Repository24
900
- });
901
- var Repository24 = class {
902
- constructor({ api, route }) {
903
- this.api = api;
904
- this.route = route;
905
- }
906
- async logout() {
907
- await this.api.post(`${this.route}`);
908
- }
909
- };
910
-
911
1106
  // src/modules/documentManagement/multimedia.ts
912
1107
  var multimedia_exports = {};
913
1108
  __export(multimedia_exports, {
914
- default: () => Repository25
1109
+ default: () => Repository24
915
1110
  });
916
- var Repository25 = class {
1111
+ var Repository24 = class {
917
1112
  constructor({ api, route }) {
918
1113
  this.api = api;
919
1114
  this.route = route;
@@ -934,14 +1129,24 @@ var Repository25 = class {
934
1129
  });
935
1130
  return response.data;
936
1131
  }
1132
+ async update(id, multipartFormData, headers) {
1133
+ await this.api.post(`${this.route}upload_and_update/${id}`, multipartFormData, {
1134
+ headers: {
1135
+ ...headers || {},
1136
+ "content-type": "multipart/form-data"
1137
+ },
1138
+ maxBodyLength: Infinity,
1139
+ maxContentLength: Infinity
1140
+ });
1141
+ }
937
1142
  };
938
1143
 
939
1144
  // src/modules/integration/observation.ts
940
1145
  var observation_exports = {};
941
1146
  __export(observation_exports, {
942
- default: () => Repository26
1147
+ default: () => Repository25
943
1148
  });
944
- var Repository26 = class {
1149
+ var Repository25 = class {
945
1150
  constructor({ api, route }) {
946
1151
  this.api = api;
947
1152
  this.route = route;
@@ -973,9 +1178,9 @@ var Repository26 = class {
973
1178
  // src/modules/integration/observationType.ts
974
1179
  var observationType_exports = {};
975
1180
  __export(observationType_exports, {
976
- default: () => Repository27
1181
+ default: () => Repository26
977
1182
  });
978
- var Repository27 = class {
1183
+ var Repository26 = class {
979
1184
  constructor({ api, route }) {
980
1185
  this.api = api;
981
1186
  this.route = route;
@@ -1007,9 +1212,9 @@ var Repository27 = class {
1007
1212
  // src/modules/user/password.ts
1008
1213
  var password_exports = {};
1009
1214
  __export(password_exports, {
1010
- default: () => Repository28
1215
+ default: () => Repository27
1011
1216
  });
1012
- var Repository28 = class {
1217
+ var Repository27 = class {
1013
1218
  constructor({ api, route }) {
1014
1219
  this.api = api;
1015
1220
  this.route = route;
@@ -1029,9 +1234,9 @@ var Repository28 = class {
1029
1234
  // src/modules/stock/productImage.ts
1030
1235
  var productImage_exports = {};
1031
1236
  __export(productImage_exports, {
1032
- default: () => Repository29
1237
+ default: () => Repository28
1033
1238
  });
1034
- var Repository29 = class {
1239
+ var Repository28 = class {
1035
1240
  constructor({ api, route }) {
1036
1241
  this.api = api;
1037
1242
  this.route = route;
@@ -1071,9 +1276,9 @@ var Repository29 = class {
1071
1276
  // src/modules/stock/promotion.ts
1072
1277
  var promotion_exports = {};
1073
1278
  __export(promotion_exports, {
1074
- default: () => Repository30
1279
+ default: () => Repository29
1075
1280
  });
1076
- var Repository30 = class {
1281
+ var Repository29 = class {
1077
1282
  constructor({ api, route }) {
1078
1283
  this.api = api;
1079
1284
  this.route = route;
@@ -1131,9 +1336,9 @@ var Repository30 = class {
1131
1336
  // src/modules/stock/promotionAssoc.ts
1132
1337
  var promotionAssoc_exports = {};
1133
1338
  __export(promotionAssoc_exports, {
1134
- default: () => Repository31
1339
+ default: () => Repository30
1135
1340
  });
1136
- var Repository31 = class {
1341
+ var Repository30 = class {
1137
1342
  constructor({ api, route }) {
1138
1343
  this.api = api;
1139
1344
  this.route = route;
@@ -1173,9 +1378,9 @@ var Repository31 = class {
1173
1378
  // src/modules/user/provider.ts
1174
1379
  var provider_exports = {};
1175
1380
  __export(provider_exports, {
1176
- default: () => Repository32
1381
+ default: () => Repository31
1177
1382
  });
1178
- var Repository32 = class {
1383
+ var Repository31 = class {
1179
1384
  constructor({ api, route }) {
1180
1385
  this.api = api;
1181
1386
  this.route = route;
@@ -1235,9 +1440,9 @@ var Repository32 = class {
1235
1440
  // src/modules/user/providerType.ts
1236
1441
  var providerType_exports = {};
1237
1442
  __export(providerType_exports, {
1238
- default: () => Repository33
1443
+ default: () => Repository32
1239
1444
  });
1240
- var Repository33 = class {
1445
+ var Repository32 = class {
1241
1446
  constructor({ api, route }) {
1242
1447
  this.api = api;
1243
1448
  this.route = route;
@@ -1277,9 +1482,9 @@ var Repository33 = class {
1277
1482
  // src/modules/user/purchaseCondition.ts
1278
1483
  var purchaseCondition_exports = {};
1279
1484
  __export(purchaseCondition_exports, {
1280
- default: () => Repository34
1485
+ default: () => Repository33
1281
1486
  });
1282
- var Repository34 = class {
1487
+ var Repository33 = class {
1283
1488
  constructor({ api, route }) {
1284
1489
  this.api = api;
1285
1490
  this.route = route;
@@ -1319,9 +1524,9 @@ var Repository34 = class {
1319
1524
  // src/modules/user/reasonForExemption.ts
1320
1525
  var reasonForExemption_exports = {};
1321
1526
  __export(reasonForExemption_exports, {
1322
- default: () => Repository35
1527
+ default: () => Repository34
1323
1528
  });
1324
- var Repository35 = class {
1529
+ var Repository34 = class {
1325
1530
  constructor({ api, route }) {
1326
1531
  this.api = api;
1327
1532
  this.route = route;
@@ -1361,9 +1566,9 @@ var Repository35 = class {
1361
1566
  // src/modules/user/refreshToken.ts
1362
1567
  var refreshToken_exports = {};
1363
1568
  __export(refreshToken_exports, {
1364
- default: () => Repository36
1569
+ default: () => Repository35
1365
1570
  });
1366
- var Repository36 = class {
1571
+ var Repository35 = class {
1367
1572
  constructor({ api, route }) {
1368
1573
  this.api = api;
1369
1574
  this.route = route;
@@ -1377,9 +1582,9 @@ var Repository36 = class {
1377
1582
  // src/modules/user/segmentsArea.ts
1378
1583
  var segmentsArea_exports = {};
1379
1584
  __export(segmentsArea_exports, {
1380
- default: () => Repository37
1585
+ default: () => Repository36
1381
1586
  });
1382
- var Repository37 = class {
1587
+ var Repository36 = class {
1383
1588
  constructor({ api, route }) {
1384
1589
  this.api = api;
1385
1590
  this.route = route;
@@ -1419,9 +1624,9 @@ var Repository37 = class {
1419
1624
  // src/modules/user/sessions.ts
1420
1625
  var sessions_exports = {};
1421
1626
  __export(sessions_exports, {
1422
- default: () => Repository38
1627
+ default: () => Repository37
1423
1628
  });
1424
- var Repository38 = class {
1629
+ var Repository37 = class {
1425
1630
  constructor({ api, route }) {
1426
1631
  this.api = api;
1427
1632
  this.route = route;
@@ -1430,14 +1635,17 @@ var Repository38 = class {
1430
1635
  const response = await this.api.post(`${this.route}`, body);
1431
1636
  return response.data;
1432
1637
  }
1638
+ async logout() {
1639
+ await this.api.post(`${this.route}logout`);
1640
+ }
1433
1641
  };
1434
1642
 
1435
1643
  // src/modules/user/shippings.ts
1436
1644
  var shippings_exports = {};
1437
1645
  __export(shippings_exports, {
1438
- default: () => Repository39
1646
+ default: () => Repository38
1439
1647
  });
1440
- var Repository39 = class {
1648
+ var Repository38 = class {
1441
1649
  constructor({ api, route }) {
1442
1650
  this.api = api;
1443
1651
  this.route = route;
@@ -1477,9 +1685,9 @@ var Repository39 = class {
1477
1685
  // src/modules/user/storeOperator.ts
1478
1686
  var storeOperator_exports = {};
1479
1687
  __export(storeOperator_exports, {
1480
- default: () => Repository40
1688
+ default: () => Repository39
1481
1689
  });
1482
- var Repository40 = class {
1690
+ var Repository39 = class {
1483
1691
  constructor({ api, route }) {
1484
1692
  this.api = api;
1485
1693
  this.route = route;
@@ -1510,12 +1718,40 @@ var Repository40 = class {
1510
1718
  const response = await this.api.put(`${this.route}password/${selector.id}`, body);
1511
1719
  return response.data;
1512
1720
  }
1721
+ async updateOwnPin(body) {
1722
+ const response = await this.api.put(`${this.route}pin`, body);
1723
+ return response.data;
1724
+ }
1513
1725
  async deleteOne(selector) {
1514
1726
  const response = await this.api.delete(`${this.route}${selector.id}`);
1515
1727
  return response.data;
1516
1728
  }
1517
1729
  };
1518
1730
 
1731
+ // src/modules/user/systemModule.ts
1732
+ var systemModule_exports = {};
1733
+ __export(systemModule_exports, {
1734
+ default: () => Repository40
1735
+ });
1736
+ var Repository40 = class {
1737
+ constructor({ api, route }) {
1738
+ this.api = api;
1739
+ this.route = route;
1740
+ }
1741
+ async find() {
1742
+ const response = await this.api.get(`${this.route}`);
1743
+ return response.data;
1744
+ }
1745
+ async findByStoreOperatorId(selector) {
1746
+ const response = await this.api.get(`${this.route}${selector.store_operator_id}`);
1747
+ return response.data;
1748
+ }
1749
+ async setStoreOperatorModules(body) {
1750
+ const response = await this.api.post(`${this.route}`, body);
1751
+ return response.data;
1752
+ }
1753
+ };
1754
+
1519
1755
  // src/modules/user/swift.ts
1520
1756
  var swift_exports = {};
1521
1757
  __export(swift_exports, {
@@ -2953,6 +3189,9 @@ var Repository81 = class {
2953
3189
  async regroupLinesInProviderOrder({ id }) {
2954
3190
  await this.api.post(`${this.route}regroup/${id}`);
2955
3191
  }
3192
+ async createProviderOrderChat(data) {
3193
+ await this.api.post(`${this.route}create_provider_order_chat`, data);
3194
+ }
2956
3195
  };
2957
3196
 
2958
3197
  // src/modules/document/purchase.ts
@@ -3045,11 +3284,17 @@ var Repository83 = class {
3045
3284
  }
3046
3285
  printBulkLabelToPdfUrl({
3047
3286
  groupLabel,
3287
+ stockOrders,
3288
+ notOk,
3289
+ clientOrders,
3048
3290
  saved_em_picking_ids,
3049
3291
  token
3050
3292
  }) {
3051
3293
  const qs = new URLSearchParams();
3052
3294
  qs.set("groupLabel", groupLabel.toString());
3295
+ qs.set("stockOrders", stockOrders);
3296
+ qs.set("notOk", notOk);
3297
+ qs.set("clientOrders", clientOrders);
3053
3298
  qs.set("saved_em_picking_ids", saved_em_picking_ids);
3054
3299
  qs.set("token", token);
3055
3300
  return `${this.route}print_bulk_label_pdf?${qs.toString()}`;
@@ -3622,6 +3867,10 @@ var Repository103 = class {
3622
3867
  const response = await this.api.get(`${this.route}project_info`);
3623
3868
  return response.data;
3624
3869
  }
3870
+ async todoCounts(params) {
3871
+ const response = await this.api.get(`${this.route}todo_counts`, { params });
3872
+ return response.data;
3873
+ }
3625
3874
  };
3626
3875
 
3627
3876
  // src/modules/stock/chatRapidMessage.ts
@@ -3687,12 +3936,36 @@ var Repository105 = class {
3687
3936
  }
3688
3937
  };
3689
3938
 
3939
+ // src/modules/ui/sidemenuHighlight.ts
3940
+ var sidemenuHighlight_exports = {};
3941
+ __export(sidemenuHighlight_exports, {
3942
+ default: () => Repository106
3943
+ });
3944
+ var Repository106 = class {
3945
+ constructor({ api, route }) {
3946
+ this.api = api;
3947
+ this.route = route;
3948
+ }
3949
+ async find() {
3950
+ const response = await this.api.get(`${this.route}`);
3951
+ return response.data;
3952
+ }
3953
+ async findByStoreOperatorId(selector) {
3954
+ const response = await this.api.get(`${this.route}${selector.store_operator_id}`);
3955
+ return response.data;
3956
+ }
3957
+ async setStoreOperatorHighlights(body) {
3958
+ const response = await this.api.post(`${this.route}`, body);
3959
+ return response.data;
3960
+ }
3961
+ };
3962
+
3690
3963
  // src/modules/view/errorLog.ts
3691
3964
  var errorLog_exports = {};
3692
3965
  __export(errorLog_exports, {
3693
- default: () => Repository106
3966
+ default: () => Repository107
3694
3967
  });
3695
- var Repository106 = class {
3968
+ var Repository107 = class {
3696
3969
  constructor({ api, route }) {
3697
3970
  this.api = api;
3698
3971
  this.route = route;
@@ -3705,9 +3978,9 @@ var Repository106 = class {
3705
3978
  // src/modules/view/adminPanel.ts
3706
3979
  var adminPanel_exports = {};
3707
3980
  __export(adminPanel_exports, {
3708
- default: () => Repository107
3981
+ default: () => Repository108
3709
3982
  });
3710
- var Repository107 = class {
3983
+ var Repository108 = class {
3711
3984
  constructor({ api, route }) {
3712
3985
  this.api = api;
3713
3986
  this.route = route;
@@ -3721,9 +3994,9 @@ var Repository107 = class {
3721
3994
  // src/modules/supply/documentLineRm.ts
3722
3995
  var documentLineRm_exports = {};
3723
3996
  __export(documentLineRm_exports, {
3724
- default: () => Repository108
3997
+ default: () => Repository109
3725
3998
  });
3726
- var Repository108 = class {
3999
+ var Repository109 = class {
3727
4000
  constructor({ api, route }) {
3728
4001
  this.api = api;
3729
4002
  this.route = route;
@@ -3742,9 +4015,9 @@ var Repository108 = class {
3742
4015
  // src/modules/supply/documentLineMt.ts
3743
4016
  var documentLineMt_exports = {};
3744
4017
  __export(documentLineMt_exports, {
3745
- default: () => Repository109
4018
+ default: () => Repository110
3746
4019
  });
3747
- var Repository109 = class {
4020
+ var Repository110 = class {
3748
4021
  constructor({ api, route }) {
3749
4022
  this.api = api;
3750
4023
  this.route = route;
@@ -3763,9 +4036,9 @@ var Repository109 = class {
3763
4036
  // src/modules/user/chatSubscriber.ts
3764
4037
  var chatSubscriber_exports = {};
3765
4038
  __export(chatSubscriber_exports, {
3766
- default: () => Repository110
4039
+ default: () => Repository111
3767
4040
  });
3768
- var Repository110 = class {
4041
+ var Repository111 = class {
3769
4042
  constructor({ api, route }) {
3770
4043
  this.api = api;
3771
4044
  this.route = route;
@@ -3774,6 +4047,12 @@ var Repository110 = class {
3774
4047
  const response = await this.api.get(`${this.route}document_header_subscribers`, { params });
3775
4048
  return response.data;
3776
4049
  }
4050
+ async findDocumentHeaderSubscribersByLanguage(params) {
4051
+ const response = await this.api.get(`${this.route}document_header_subscribers_by_language`, {
4052
+ params
4053
+ });
4054
+ return response.data;
4055
+ }
3777
4056
  async findSubscribedDocumentHeaders(params) {
3778
4057
  const response = await this.api.get(`${this.route}subscribed_document_headers`, { params });
3779
4058
  return response.data;
@@ -3784,6 +4063,18 @@ var Repository110 = class {
3784
4063
  const response = await this.api.get(`${this.route}${id}`);
3785
4064
  return response.data;
3786
4065
  }
4066
+ async findByEmailToken({
4067
+ token
4068
+ }) {
4069
+ const response = await this.api.get(`${this.route}by_email_token/${token}`);
4070
+ return response.data;
4071
+ }
4072
+ async publicAuthenticateByEmailToken({
4073
+ token
4074
+ }) {
4075
+ const response = await this.api.get(`${this.route}authenticate_email_token/${token}`);
4076
+ return response.data;
4077
+ }
3787
4078
  async createOrUpdate(data) {
3788
4079
  const response = await this.api.post(`${this.route}`, data);
3789
4080
  return response.data;
@@ -3794,14 +4085,18 @@ var Repository110 = class {
3794
4085
  async deleteByDocumentHeader({ id }) {
3795
4086
  await this.api.delete(`${this.route}document_header/${id}`);
3796
4087
  }
4088
+ async publicAuthenticate({ id }) {
4089
+ const response = await this.api.get(`${this.route}authenticate/${id}`);
4090
+ return response.data;
4091
+ }
3797
4092
  };
3798
4093
 
3799
4094
  // src/modules/stock/tag.ts
3800
4095
  var tag_exports = {};
3801
4096
  __export(tag_exports, {
3802
- default: () => Repository111
4097
+ default: () => Repository112
3803
4098
  });
3804
- var Repository111 = class {
4099
+ var Repository112 = class {
3805
4100
  constructor({ api, route }) {
3806
4101
  this.api = api;
3807
4102
  this.route = route;
@@ -3825,9 +4120,9 @@ var Repository111 = class {
3825
4120
  // src/modules/stock/gmails.ts
3826
4121
  var gmails_exports = {};
3827
4122
  __export(gmails_exports, {
3828
- default: () => Repository112
4123
+ default: () => Repository113
3829
4124
  });
3830
- var Repository112 = class {
4125
+ var Repository113 = class {
3831
4126
  constructor({ api, route }) {
3832
4127
  this.api = api;
3833
4128
  this.route = route;
@@ -3845,9 +4140,9 @@ var Repository112 = class {
3845
4140
  // src/modules/document/NPF.ts
3846
4141
  var NPF_exports = {};
3847
4142
  __export(NPF_exports, {
3848
- default: () => Repository113
4143
+ default: () => Repository114
3849
4144
  });
3850
- var Repository113 = class {
4145
+ var Repository114 = class {
3851
4146
  constructor({ api, route }) {
3852
4147
  this.api = api;
3853
4148
  this.route = route;
@@ -3861,9 +4156,9 @@ var Repository113 = class {
3861
4156
  // src/modules/document/NRCL.ts
3862
4157
  var NRCL_exports = {};
3863
4158
  __export(NRCL_exports, {
3864
- default: () => Repository114
4159
+ default: () => Repository115
3865
4160
  });
3866
- var Repository114 = class {
4161
+ var Repository115 = class {
3867
4162
  constructor({ api, route }) {
3868
4163
  this.api = api;
3869
4164
  this.route = route;
@@ -3878,15 +4173,15 @@ var Repository114 = class {
3878
4173
  // src/modules/supply/currentAccount.ts
3879
4174
  var currentAccount_exports = {};
3880
4175
  __export(currentAccount_exports, {
3881
- default: () => Repository115
4176
+ default: () => Repository116
3882
4177
  });
3883
- var Repository115 = class {
4178
+ var Repository116 = class {
3884
4179
  constructor({ api, route }) {
3885
4180
  this.api = api;
3886
4181
  this.route = route;
3887
4182
  }
3888
4183
  async findCurrentAccountByOwnerId(params) {
3889
- const response = await this.api.get(`${this.route}current_account`, {
4184
+ const response = await this.api.get(`${this.route}`, {
3890
4185
  params
3891
4186
  });
3892
4187
  return response.data;
@@ -3898,7 +4193,7 @@ var Repository115 = class {
3898
4193
  return response.data;
3899
4194
  }
3900
4195
  async exportCurrentAccount(params) {
3901
- const response = await this.api.get(`${this.route}export_current_account`, {
4196
+ const response = await this.api.get(`${this.route}export`, {
3902
4197
  params
3903
4198
  });
3904
4199
  return response.data;
@@ -3909,6 +4204,12 @@ var Repository115 = class {
3909
4204
  });
3910
4205
  return response.data;
3911
4206
  }
4207
+ async findClientOverpaidCredit(params) {
4208
+ const response = await this.api.get(`${this.route}overpaid_credit`, {
4209
+ params
4210
+ });
4211
+ return response.data;
4212
+ }
3912
4213
  async findClientUnpaidDebit(params) {
3913
4214
  const response = await this.api.get(`${this.route}unpaid_debit`, {
3914
4215
  params
@@ -3928,16 +4229,16 @@ var Repository115 = class {
3928
4229
  if (start_date) qs.set("start_date", start_date.toISOString());
3929
4230
  if (end_date) qs.set("end_date", end_date.toISOString());
3930
4231
  qs.set("token", token);
3931
- return `${this.route}export_current_account?${qs.toString()}`;
4232
+ return `${this.route}export?${qs.toString()}`;
3932
4233
  }
3933
4234
  };
3934
4235
 
3935
4236
  // src/modules/supply/paymentBatch.ts
3936
4237
  var paymentBatch_exports = {};
3937
4238
  __export(paymentBatch_exports, {
3938
- default: () => Repository116
4239
+ default: () => Repository117
3939
4240
  });
3940
- var Repository116 = class {
4241
+ var Repository117 = class {
3941
4242
  constructor({ api, route }) {
3942
4243
  this.api = api;
3943
4244
  this.route = route;
@@ -3981,9 +4282,9 @@ var Repository116 = class {
3981
4282
  // src/modules/ui/portal.ts
3982
4283
  var portal_exports = {};
3983
4284
  __export(portal_exports, {
3984
- default: () => Repository117
4285
+ default: () => Repository118
3985
4286
  });
3986
- var Repository117 = class {
4287
+ var Repository118 = class {
3987
4288
  constructor({ api, route }) {
3988
4289
  this.api = api;
3989
4290
  this.route = route;
@@ -4007,9 +4308,9 @@ var Repository117 = class {
4007
4308
  // src/modules/supply/googleSheetPool.ts
4008
4309
  var googleSheetPool_exports = {};
4009
4310
  __export(googleSheetPool_exports, {
4010
- default: () => Repository118
4311
+ default: () => Repository119
4011
4312
  });
4012
- var Repository118 = class {
4313
+ var Repository119 = class {
4013
4314
  constructor({ api, route }) {
4014
4315
  this.api = api;
4015
4316
  this.route = route;
@@ -4023,9 +4324,9 @@ var Repository118 = class {
4023
4324
  // src/modules/stock/accountCode.ts
4024
4325
  var accountCode_exports = {};
4025
4326
  __export(accountCode_exports, {
4026
- default: () => Repository119
4327
+ default: () => Repository120
4027
4328
  });
4028
- var Repository119 = class {
4329
+ var Repository120 = class {
4029
4330
  constructor({ api, route }) {
4030
4331
  this.api = api;
4031
4332
  this.route = route;
@@ -4041,9 +4342,9 @@ var Repository119 = class {
4041
4342
  // src/modules/llm/llm.ts
4042
4343
  var llm_exports = {};
4043
4344
  __export(llm_exports, {
4044
- default: () => Repository120
4345
+ default: () => Repository121
4045
4346
  });
4046
- var Repository120 = class {
4347
+ var Repository121 = class {
4047
4348
  constructor({ api, route }) {
4048
4349
  this.api = api;
4049
4350
  this.route = route;
@@ -4088,14 +4389,18 @@ var Repository120 = class {
4088
4389
  const response = await this.api.post(`${this.route}identify_language`, body);
4089
4390
  return response.data;
4090
4391
  }
4392
+ async identifyAndTranslate(body) {
4393
+ const response = await this.api.post(`${this.route}identify_and_translate`, body);
4394
+ return response.data;
4395
+ }
4091
4396
  };
4092
4397
 
4093
4398
  // src/modules/integration/patchNotes.ts
4094
4399
  var patchNotes_exports = {};
4095
4400
  __export(patchNotes_exports, {
4096
- default: () => Repository121
4401
+ default: () => Repository122
4097
4402
  });
4098
- var Repository121 = class {
4403
+ var Repository122 = class {
4099
4404
  constructor({ api, route }) {
4100
4405
  this.api = api;
4101
4406
  this.route = route;
@@ -4113,15 +4418,15 @@ var Repository121 = class {
4113
4418
  // src/modules/supply/documentHeaderSurvey.ts
4114
4419
  var documentHeaderSurvey_exports = {};
4115
4420
  __export(documentHeaderSurvey_exports, {
4116
- default: () => Repository122
4421
+ default: () => Repository123
4117
4422
  });
4118
- var Repository122 = class {
4423
+ var Repository123 = class {
4119
4424
  constructor({ api, route }) {
4120
4425
  this.api = api;
4121
4426
  this.route = route;
4122
4427
  }
4123
- async find() {
4124
- const response = await this.api.get(`${this.route}`);
4428
+ async find(params) {
4429
+ const response = await this.api.get(`${this.route}`, { params });
4125
4430
  return response.data;
4126
4431
  }
4127
4432
  async updateSent(body) {
@@ -4137,9 +4442,9 @@ var Repository122 = class {
4137
4442
  // src/modules/supply/documentHeaderSubscriber.ts
4138
4443
  var documentHeaderSubscriber_exports = {};
4139
4444
  __export(documentHeaderSubscriber_exports, {
4140
- default: () => Repository123
4445
+ default: () => Repository124
4141
4446
  });
4142
- var Repository123 = class {
4447
+ var Repository124 = class {
4143
4448
  constructor({ api, route }) {
4144
4449
  this.api = api;
4145
4450
  this.route = route;
@@ -4161,9 +4466,9 @@ var Repository123 = class {
4161
4466
  // src/modules/stock/googleCalendar.ts
4162
4467
  var googleCalendar_exports = {};
4163
4468
  __export(googleCalendar_exports, {
4164
- default: () => Repository124
4469
+ default: () => Repository125
4165
4470
  });
4166
- var Repository124 = class {
4471
+ var Repository125 = class {
4167
4472
  constructor({ api, route }) {
4168
4473
  this.api = api;
4169
4474
  this.route = route;
@@ -4181,9 +4486,9 @@ var Repository124 = class {
4181
4486
  // src/modules/supply/saft.ts
4182
4487
  var saft_exports = {};
4183
4488
  __export(saft_exports, {
4184
- default: () => Repository125
4489
+ default: () => Repository126
4185
4490
  });
4186
- var Repository125 = class {
4491
+ var Repository126 = class {
4187
4492
  constructor({ route }) {
4188
4493
  this.route = route;
4189
4494
  }
@@ -4196,6 +4501,156 @@ var Repository125 = class {
4196
4501
  }
4197
4502
  };
4198
4503
 
4504
+ // src/modules/stock/productLocation.ts
4505
+ var productLocation_exports = {};
4506
+ __export(productLocation_exports, {
4507
+ default: () => Repository127
4508
+ });
4509
+ var Repository127 = class {
4510
+ constructor({ api, route }) {
4511
+ this.api = api;
4512
+ this.route = route;
4513
+ }
4514
+ async findMany() {
4515
+ const response = await this.api.get(`${this.route}find_many`);
4516
+ return response.data;
4517
+ }
4518
+ };
4519
+
4520
+ // src/modules/user/timeSheet.ts
4521
+ var timeSheet_exports = {};
4522
+ __export(timeSheet_exports, {
4523
+ default: () => TimesheetRepository
4524
+ });
4525
+ var TimesheetRepository = class {
4526
+ constructor({ api, route }) {
4527
+ this.api = api;
4528
+ this.route = route.endsWith("/") ? route : `${route}/`;
4529
+ }
4530
+ /**
4531
+ * GET todos os registos com filtros opcionais
4532
+ */
4533
+ async find(params) {
4534
+ const response = await this.api.get(`${this.route}`, { params });
4535
+ return response.data;
4536
+ }
4537
+ /**
4538
+ * GET registos de um utilizador numa data específica
4539
+ */
4540
+ async findByUserAndDate(filters) {
4541
+ const response = await this.api.get(`${this.route}by-date`, {
4542
+ params: filters
4543
+ });
4544
+ return response.data;
4545
+ }
4546
+ /**
4547
+ * GET resumo diário
4548
+ */
4549
+ async getDailySummary(filters) {
4550
+ const response = await this.api.get(`${this.route}daily-summary`, {
4551
+ params: filters
4552
+ });
4553
+ return response.data;
4554
+ }
4555
+ /**
4556
+ * POST novo registo
4557
+ */
4558
+ async create(body) {
4559
+ const response = await this.api.post(`${this.route}`, body);
4560
+ return response.data;
4561
+ }
4562
+ /**
4563
+ * PUT atualizar registo
4564
+ */
4565
+ async update(selector, body) {
4566
+ const response = await this.api.put(`${this.route}${selector.id}`, body);
4567
+ return response.data;
4568
+ }
4569
+ /**
4570
+ * DELETE registo
4571
+ */
4572
+ async deleteOne(selector) {
4573
+ await this.api.delete(`${this.route}${selector.id}`);
4574
+ }
4575
+ };
4576
+
4577
+ // src/modules/document/CAT.ts
4578
+ var CAT_exports = {};
4579
+ __export(CAT_exports, {
4580
+ default: () => Repository128
4581
+ });
4582
+ var Repository128 = class {
4583
+ constructor({ api, route }) {
4584
+ this.api = api;
4585
+ this.route = route;
4586
+ }
4587
+ async create(data) {
4588
+ const result = await this.api.post(`${this.route}`, data);
4589
+ return result.data;
4590
+ }
4591
+ };
4592
+
4593
+ // src/modules/sms/smsSender.ts
4594
+ var smsSender_exports = {};
4595
+ __export(smsSender_exports, {
4596
+ default: () => Repository129
4597
+ });
4598
+ var Repository129 = class {
4599
+ constructor({ api, route }) {
4600
+ this.api = api;
4601
+ this.route = route;
4602
+ }
4603
+ async claim() {
4604
+ const response = await this.api.get(`${this.route}claim`);
4605
+ return response.data;
4606
+ }
4607
+ async result(id, body) {
4608
+ await this.api.post(`${this.route}result/${id}`, body);
4609
+ }
4610
+ async findById(id) {
4611
+ const response = await this.api.get(`${this.route}${id}`);
4612
+ return response.data;
4613
+ }
4614
+ async findAll() {
4615
+ const response = await this.api.get(`${this.route}`);
4616
+ return response.data;
4617
+ }
4618
+ };
4619
+
4620
+ // src/modules/sms/smsTemplate.ts
4621
+ var smsTemplate_exports = {};
4622
+ __export(smsTemplate_exports, {
4623
+ default: () => Repository130
4624
+ });
4625
+ var Repository130 = class {
4626
+ constructor({ api, route }) {
4627
+ this.api = api;
4628
+ this.route = route;
4629
+ }
4630
+ async find() {
4631
+ const response = await this.api.get(`${this.route}`);
4632
+ return response.data;
4633
+ }
4634
+ async findById(id) {
4635
+ const response = await this.api.get(`${this.route}${id}`);
4636
+ return response.data;
4637
+ }
4638
+ async findByKey(key) {
4639
+ const response = await this.api.get(`${this.route}key/${key}`);
4640
+ return response.data;
4641
+ }
4642
+ async create(data) {
4643
+ const response = await this.api.post(`${this.route}`, data);
4644
+ return response.data.id;
4645
+ }
4646
+ async update(selector, data) {
4647
+ await this.api.patch(`${this.route}${selector.id}`, data);
4648
+ }
4649
+ async deleteOne(selector) {
4650
+ await this.api.delete(`${this.route}${selector.id}`);
4651
+ }
4652
+ };
4653
+
4199
4654
  // src/main.ts
4200
4655
  var API = class {
4201
4656
  constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
@@ -4207,10 +4662,14 @@ var API = class {
4207
4662
  if (tokenBearer) {
4208
4663
  this.defaultHeaders.setAuthorization(tokenBearer);
4209
4664
  }
4210
- this.client = axios.create({
4665
+ this.client = axios2.create({
4211
4666
  baseURL: gatewayUrl,
4212
4667
  headers: this.defaultHeaders
4213
4668
  });
4669
+ this.client.interceptors.response.use(
4670
+ (response) => response,
4671
+ (error) => Promise.reject(parseApiError(error))
4672
+ );
4214
4673
  const getServicePath = (service) => {
4215
4674
  const baseUrl = services[service];
4216
4675
  const servicePath = processEnvironment === "localhost" ? "/" : `${service}/`;
@@ -4224,190 +4683,292 @@ var API = class {
4224
4683
  view: getServicePath("view"),
4225
4684
  print: getServicePath("print"),
4226
4685
  tickets: getServicePath("tickets"),
4227
- llm: getServicePath("llm")
4686
+ llm: getServicePath("llm"),
4687
+ sms: getServicePath("sms")
4228
4688
  };
4229
4689
  const getModuleParams = (service, module) => ({
4230
4690
  api: this.client,
4231
4691
  route: `${this.services[service]}${module}/`
4232
4692
  });
4233
- this.BankData = new Repository(getModuleParams("users", "bank_data"));
4234
- this.Client = new Repository2(getModuleParams("users", "client"));
4235
- this.ClientType = new Repository3(getModuleParams("users", "client_type"));
4236
- this.Chat = new Repository4(getModuleParams("stock", "chat"));
4237
- this.Commissioner = new Repository5(getModuleParams("users", "commissioner"));
4238
- this.Country = new Repository6(getModuleParams("users", "country"));
4239
- this.DocumentHeader = new Repository7(getModuleParams("stock", "document_header"));
4693
+ this.WebSocket = new Service(getModuleParams("view", "ws"));
4694
+ this.BankData = new Repository(getModuleParams("users", Nomalism.BankData.Route));
4695
+ this.Client = new Repository2(getModuleParams("users", Nomalism.Client.Route));
4696
+ this.ClientType = new Repository3(getModuleParams("users", Nomalism.ClientType.Route));
4697
+ this.Chat = new Repository4(getModuleParams("stock", Nomalism.Chat.Route));
4698
+ this.Commissioner = new Repository5(
4699
+ getModuleParams("users", Nomalism.Commissioner.Route)
4700
+ );
4701
+ this.Country = new Repository6(getModuleParams("users", Nomalism.Country.Route));
4702
+ this.DocumentHeader = new Repository7(
4703
+ getModuleParams("stock", Nomalism.DocumentHeader.Route)
4704
+ );
4240
4705
  this.DocumentHeaderHistory = new Repository8(
4241
- getModuleParams("stock", "document_header_history")
4706
+ getModuleParams("stock", Nomalism.DocumentHeaderHistory.Route)
4707
+ );
4708
+ this.BillOfLading = new Repository9(
4709
+ getModuleParams("stock", Nomalism.BillOfLading.Route)
4242
4710
  );
4243
- this.BillOfLading = new Repository9(getModuleParams("stock", "document_header"));
4244
- this.ProductionOrder = new Repository10(getModuleParams("stock", "document_header"));
4245
- this.Proforma = new Repository11(getModuleParams("stock", "document_header"));
4711
+ this.ProductionOrder = new Repository10(
4712
+ getModuleParams("stock", Nomalism.ProductionOrder.Route)
4713
+ );
4714
+ this.Proforma = new Repository11(getModuleParams("stock", Nomalism.Proforma.Route));
4246
4715
  this.PropostaFornecedor = new Repository12(
4247
- getModuleParams("stock", "document_header")
4716
+ getModuleParams("stock", Nomalism.PropostaFornecedor.Route)
4248
4717
  );
4249
4718
  this.ProviderCreditNoteFromReturn = new Repository13(
4250
- getModuleParams("stock", "document_header")
4719
+ getModuleParams("stock", Nomalism.ProviderCreditNoteFromReturn.Route)
4251
4720
  );
4252
4721
  this.ProviderFinancialCreditNote = new Repository14(
4253
- getModuleParams("stock", "document_header")
4722
+ getModuleParams("stock", Nomalism.ProviderFinancialCreditNote.Route)
4254
4723
  );
4255
4724
  this.ProviderServiceInvoice = new Repository15(
4256
- getModuleParams("stock", "document_header")
4725
+ getModuleParams("stock", Nomalism.ProviderServiceInvoice.Route)
4726
+ );
4727
+ this.DocumentLine = new Repository16(
4728
+ getModuleParams("stock", Nomalism.DocumentLine.Route)
4257
4729
  );
4258
- this.DocumentLine = new Repository16(getModuleParams("stock", "document_line"));
4259
4730
  this.DocumentLineAssoc = new Repository17(
4260
- getModuleParams("stock", "document_line_assoc")
4731
+ getModuleParams("stock", Nomalism.DocumentLineAssoc.Route)
4732
+ );
4733
+ this.DocumentType = new Repository18(
4734
+ getModuleParams("stock", Nomalism.DocumentType.Route)
4735
+ );
4736
+ this.Favorites = new Repository19(getModuleParams("users", Nomalism.Favorites.Route));
4737
+ this.File = new Repository20(getModuleParams("stock", Nomalism.File.Route));
4738
+ this.GoogleSheets = new Repository21(
4739
+ getModuleParams("integration", Nomalism.GoogleSheets.Route)
4740
+ );
4741
+ this.Language = new Repository22(getModuleParams("users", Nomalism.Language.Route));
4742
+ this.Location = new Repository23(getModuleParams("stock", Nomalism.Location.Route));
4743
+ this.Multimedia = new Repository24(getModuleParams("documents", Nomalism.Multimedia.Route));
4744
+ this.Observation = new Repository25(
4745
+ getModuleParams("integration", Nomalism.Observation.Route)
4746
+ );
4747
+ this.ObservationType = new Repository26(
4748
+ getModuleParams("integration", Nomalism.ObservationType.Route)
4749
+ );
4750
+ this.Password = new Repository27(getModuleParams("users", Nomalism.Password.Route));
4751
+ this.ProductImage = new Repository28(
4752
+ getModuleParams("stock", Nomalism.ProductImage.Route)
4753
+ );
4754
+ this.Promotion = new Repository29(getModuleParams("stock", Nomalism.Promotion.Route));
4755
+ this.PromotionAssoc = new Repository30(
4756
+ getModuleParams("stock", Nomalism.PromotionAssoc.Route)
4757
+ );
4758
+ this.Providers = new Repository31(getModuleParams("users", Nomalism.Providers.Route));
4759
+ this.ProviderType = new Repository32(
4760
+ getModuleParams("users", Nomalism.ProviderType.Route)
4761
+ );
4762
+ this.PurchaseConditions = new Repository33(
4763
+ getModuleParams("users", Nomalism.PurchaseConditions.Route)
4764
+ );
4765
+ this.ReasonForExemption = new Repository34(
4766
+ getModuleParams("users", Nomalism.ReasonForExemption.Route)
4767
+ );
4768
+ this.RefreshToken = new Repository35(
4769
+ getModuleParams("users", Nomalism.RefreshToken.Route)
4770
+ );
4771
+ this.SegmentsArea = new Repository36(
4772
+ getModuleParams("users", Nomalism.SegmentsArea.Route)
4773
+ );
4774
+ this.Sessions = new Repository37(getModuleParams("users", Nomalism.Sessions.Route));
4775
+ this.Shippings = new Repository38(getModuleParams("users", Nomalism.Shippings.Route));
4776
+ this.StoreOperator = new Repository39(
4777
+ getModuleParams("users", Nomalism.StoreOperator.Route)
4778
+ );
4779
+ this.SystemModule = new Repository40(
4780
+ getModuleParams("users", Nomalism.SystemModule.Route)
4781
+ );
4782
+ this.Swift = new Repository41(getModuleParams("users", Nomalism.Swift.Route));
4783
+ this.TypeOfLocation = new Repository42(
4784
+ getModuleParams("stock", Nomalism.TypeOfLocation.Route)
4785
+ );
4786
+ this.UnitOfMeasure = new Repository43(
4787
+ getModuleParams("stock", Nomalism.UnitOfMeasure.Route)
4788
+ );
4789
+ this.UserPositions = new Repository44(
4790
+ getModuleParams("users", Nomalism.UserPositions.Route)
4261
4791
  );
4262
- this.DocumentType = new Repository18(getModuleParams("stock", "document_type"));
4263
- this.Favorites = new Repository19(getModuleParams("users", "favorite"));
4264
- this.File = new Repository20(getModuleParams("stock", "file"));
4265
- this.GoogleSheets = new Repository21(getModuleParams("integration", "google"));
4266
- this.Language = new Repository22(getModuleParams("users", "language"));
4267
- this.Location = new Repository23(getModuleParams("stock", "location"));
4268
- this.Logout = new Repository24(getModuleParams("users", "logout"));
4269
- this.Multimedia = new Repository25(getModuleParams("documents", "multimedia"));
4270
- this.Observation = new Repository26(getModuleParams("integration", "observation"));
4271
- this.ObservationType = new Repository27(
4272
- getModuleParams("integration", "observation_type")
4792
+ this.Users = new Repository45(getModuleParams("users", Nomalism.Users.Route));
4793
+ this.VatTax = new Repository46(getModuleParams("stock", Nomalism.VatTax.Route));
4794
+ this.VatTaxZone = new Repository47(getModuleParams("stock", Nomalism.VatTaxZone.Route));
4795
+ this.Workflow = new Repository48(getModuleParams("stock", Nomalism.Workflow.Route));
4796
+ this.DeliveryMethods = new Repository49(
4797
+ getModuleParams("users", Nomalism.DeliveryMethods.Route)
4273
4798
  );
4274
- this.Password = new Repository28(getModuleParams("users", "password"));
4275
- this.ProductImage = new Repository29(getModuleParams("stock", "product_image"));
4276
- this.Promotion = new Repository30(getModuleParams("stock", "promotion"));
4277
- this.PromotionAssoc = new Repository31(getModuleParams("stock", "promotion_assoc"));
4278
- this.Providers = new Repository32(getModuleParams("users", "provider"));
4279
- this.ProviderType = new Repository33(getModuleParams("users", "provider_type"));
4280
- this.PurchaseConditions = new Repository34(
4281
- getModuleParams("users", "purchase_condition")
4799
+ this.MaturityDates = new Repository50(
4800
+ getModuleParams("users", Nomalism.MaturityDates.Route)
4282
4801
  );
4283
- this.ReasonForExemption = new Repository35(
4284
- getModuleParams("users", "reason_for_exemption")
4802
+ this.PaymentMethods = new Repository51(
4803
+ getModuleParams("users", Nomalism.PaymentMethods.Route)
4285
4804
  );
4286
- this.RefreshToken = new Repository36(getModuleParams("users", "refresh-token"));
4287
- this.SegmentsArea = new Repository37(getModuleParams("users", "segments_area"));
4288
- this.Sessions = new Repository38(getModuleParams("users", "sessions"));
4289
- this.Shippings = new Repository39(getModuleParams("users", "shipping"));
4290
- this.StoreOperator = new Repository40(getModuleParams("users", "store_operator"));
4291
- this.Swift = new Repository41(getModuleParams("users", "swift"));
4292
- this.TypeOfLocation = new Repository42(getModuleParams("stock", "type_of_location"));
4293
- this.UnitOfMeasure = new Repository43(getModuleParams("stock", "unit_of_measure"));
4294
- this.UserPositions = new Repository44(getModuleParams("users", "user_position"));
4295
- this.Users = new Repository45(getModuleParams("users", "users"));
4296
- this.VatTax = new Repository46(getModuleParams("stock", "vat_tax"));
4297
- this.VatTaxZone = new Repository47(getModuleParams("stock", "vat_tax_zone"));
4298
- this.Workflow = new Repository48(getModuleParams("stock", "workflow"));
4299
- this.DeliveryMethods = new Repository49(getModuleParams("users", "delivery_methods"));
4300
- this.MaturityDates = new Repository50(getModuleParams("users", "maturity_dates"));
4301
- this.PaymentMethods = new Repository51(getModuleParams("users", "payment_methods"));
4302
- this.Vehicles = new Repository52(getModuleParams("users", "vehicles"));
4805
+ this.Vehicles = new Repository52(getModuleParams("users", Nomalism.Vehicles.Route));
4303
4806
  this.ExternalDocumentType = new Repository53(
4304
- getModuleParams("stock", "external_document_type")
4807
+ getModuleParams("stock", Nomalism.ExternalDocumentType.Route)
4305
4808
  );
4306
- this.DocumentSet = new Repository54(getModuleParams("stock", "document_set"));
4307
- this.Payment = new Repository55(getModuleParams("stock", "payment"));
4809
+ this.DocumentSet = new Repository54(getModuleParams("stock", Nomalism.DocumentSet.Route));
4810
+ this.Payment = new Repository55(getModuleParams("stock", Nomalism.Payment.Route));
4308
4811
  this.ExternalDocumentHeader = new Repository56(
4309
- getModuleParams("stock", "external_document_header")
4812
+ getModuleParams("stock", Nomalism.ExternalDocumentHeader.Route)
4310
4813
  );
4311
- this.VatValidation = new Repository57(getModuleParams("stock", "vat_validation"));
4312
- this.StockMovement = new Repository58(getModuleParams("stock", "stock_movement"));
4313
- this.ZipCode = new Repository59(getModuleParams("users", "zip_code"));
4314
- this.Tenant = new Repository60(getModuleParams("users", "tenant"));
4315
- this.PreSale = new Repository61(getModuleParams("stock", "pre_sale"));
4316
- this.PreSaleProduct = new Repository62(getModuleParams("stock", "pre_sale_product"));
4317
- this.OrderManagement = new Repository63(getModuleParams("stock", "order_management"));
4318
- this.Npc = new Repository64(getModuleParams("print", "npc"));
4319
- this.Printer = new Repository65(getModuleParams("print", "printer"));
4814
+ this.VatValidation = new Repository57(
4815
+ getModuleParams("stock", Nomalism.VatValidation.Route)
4816
+ );
4817
+ this.StockMovement = new Repository58(
4818
+ getModuleParams("stock", Nomalism.StockMovement.Route)
4819
+ );
4820
+ this.ZipCode = new Repository59(getModuleParams("users", Nomalism.ZipCode.Route));
4821
+ this.Tenant = new Repository60(getModuleParams("users", Nomalism.Tenant.Route));
4822
+ this.PreSale = new Repository61(getModuleParams("stock", Nomalism.PreSale.Route));
4823
+ this.PreSaleProduct = new Repository62(
4824
+ getModuleParams("stock", Nomalism.PreSaleProduct.Route)
4825
+ );
4826
+ this.OrderManagement = new Repository63(
4827
+ getModuleParams("stock", Nomalism.OrderManagement.Route)
4828
+ );
4829
+ this.Npc = new Repository64(getModuleParams("print", Nomalism.Npc.Route));
4830
+ this.Printer = new Repository65(getModuleParams("print", Nomalism.Printer.Route));
4320
4831
  this.SchedulePrintJob = new Repository66(
4321
- getModuleParams("print", "schedule_print_job")
4832
+ getModuleParams("print", Nomalism.SchedulePrintJob.Route)
4833
+ );
4834
+ this.QueryList = new Repository67(getModuleParams("stock", Nomalism.QueryList.Route));
4835
+ this.QueryParameter = new Repository68(
4836
+ getModuleParams("stock", Nomalism.QueryParameter.Route)
4837
+ );
4838
+ this.ReturnReason = new Repository69(
4839
+ getModuleParams("stock", Nomalism.ReturnReason.Route)
4322
4840
  );
4323
- this.QueryList = new Repository67(getModuleParams("stock", "query"));
4324
- this.QueryParameter = new Repository68(getModuleParams("stock", "query_parameter"));
4325
- this.ReturnReason = new Repository69(getModuleParams("stock", "return_reason"));
4326
- this.PropostaSheets = new Repository70(getModuleParams("stock", "proposta_sheets"));
4327
- this.Schedule = new Repository71(getModuleParams("stock", "schedule"));
4841
+ this.PropostaSheets = new Repository70(
4842
+ getModuleParams("stock", Nomalism.PropostaSheets.Route)
4843
+ );
4844
+ this.Schedule = new Repository71(getModuleParams("stock", Nomalism.Schedule.Route));
4328
4845
  this.GoogleFilePermission = new Repository72(
4329
- getModuleParams("integration", "google_file_permission")
4846
+ getModuleParams("integration", Nomalism.GoogleFilePermission.Route)
4847
+ );
4848
+ this.Settings = new Repository73(getModuleParams("integration", Nomalism.Settings.Route));
4849
+ this.Tickets = new Repository74(getModuleParams("tickets", Nomalism.Tickets.Route));
4850
+ this.Channel = new Repository75(getModuleParams("tickets", Nomalism.Channel.Route));
4851
+ this.TicketsLanguage = new Repository76(
4852
+ getModuleParams("tickets", Nomalism.TicketsLanguage.Route)
4330
4853
  );
4331
- this.Settings = new Repository73(getModuleParams("integration", "settings"));
4332
- this.Tickets = new Repository74(getModuleParams("tickets", "tickets"));
4333
- this.Channel = new Repository75(getModuleParams("tickets", "channel"));
4334
- this.TicketsLanguage = new Repository76(getModuleParams("tickets", "tickets_language"));
4335
- this.Clt = new Repository77(getModuleParams("tickets", "clt"));
4854
+ this.Clt = new Repository77(getModuleParams("tickets", Nomalism.CLT.Route));
4336
4855
  this.StartDocumentHeaderLastUpdate = new Repository78(
4337
- getModuleParams("stock", "start_document_header_last_update")
4856
+ getModuleParams("stock", Nomalism.StartDocumentHeaderLastUpdate.Route)
4857
+ );
4858
+ this.Persona = new Repository79(getModuleParams("users", Nomalism.Persona.Route));
4859
+ this.ProjectInfo = new Repository80(
4860
+ getModuleParams("integration", Nomalism.ProjectInfo.Route)
4338
4861
  );
4339
- this.Persona = new Repository79(getModuleParams("users", "persona"));
4340
- this.ProjectInfo = new Repository80(getModuleParams("integration", "project_info"));
4341
- this.Order = new Repository81(getModuleParams("stock", "order"));
4342
- this.Purchase = new Repository82(getModuleParams("stock", "purchase"));
4862
+ this.Order = new Repository81(getModuleParams("stock", Nomalism.Order.Route));
4863
+ this.Purchase = new Repository82(getModuleParams("stock", Nomalism.Purchase.Route));
4343
4864
  this.MaterialEntrance = new Repository83(
4344
- getModuleParams("stock", "material_entrance")
4865
+ getModuleParams("stock", Nomalism.MaterialEntrance.Route)
4866
+ );
4867
+ this.Transformado = new Repository84(
4868
+ getModuleParams("stock", Nomalism.Transformado.Route)
4869
+ );
4870
+ this.UpfrontReturn = new Repository85(
4871
+ getModuleParams("stock", Nomalism.UpfrontReturn.Route)
4872
+ );
4873
+ this.SavedEmPicking = new Repository86(
4874
+ getModuleParams("stock", Nomalism.SavedEmPicking.Route)
4875
+ );
4876
+ this.EmailTemplate = new Repository87(
4877
+ getModuleParams("integration", Nomalism.EmailTemplate.Route)
4345
4878
  );
4346
- this.Transformado = new Repository84(getModuleParams("stock", "transformado"));
4347
- this.UpfrontReturn = new Repository85(getModuleParams("stock", "upfront_return"));
4348
- this.SavedEmPicking = new Repository86(getModuleParams("stock", "saved_em_picking"));
4349
- this.EmailTemplate = new Repository87(getModuleParams("integration", "email_template"));
4350
4879
  this.EmailTemplateAttachment = new Repository88(
4351
- getModuleParams("integration", "email_template_attachment")
4880
+ getModuleParams("integration", Nomalism.EmailTemplateAttachment.Route)
4352
4881
  );
4353
- this.Prison = new Repository89(getModuleParams("stock", "prison"));
4354
- this.Quebra = new Repository90(getModuleParams("stock", "quebra"));
4355
- this.Inventario = new Repository91(getModuleParams("stock", "inventario"));
4882
+ this.Prison = new Repository89(getModuleParams("stock", Nomalism.Prison.Route));
4883
+ this.Quebra = new Repository90(getModuleParams("stock", Nomalism.Quebra.Route));
4884
+ this.Inventario = new Repository91(getModuleParams("stock", Nomalism.Inventario.Route));
4356
4885
  this.ReturnToProvider = new Repository92(
4357
- getModuleParams("stock", "return_to_provider")
4886
+ getModuleParams("stock", Nomalism.ReturnToProvider.Route)
4358
4887
  );
4359
4888
  this.EmailVerification = new Repository93(
4360
- getModuleParams("integration", "email_verification")
4889
+ getModuleParams("integration", Nomalism.EmailVerification.Route)
4361
4890
  );
4362
- this.EmailLog = new Repository94(getModuleParams("integration", "email_log"));
4891
+ this.EmailLog = new Repository94(getModuleParams("integration", Nomalism.EmailLog.Route));
4363
4892
  this.DocumentLineNote = new Repository95(
4364
- getModuleParams("stock", "document_line_note")
4893
+ getModuleParams("stock", Nomalism.DocumentLineNote.Route)
4365
4894
  );
4366
4895
  this.SavedProviderProposal = new Repository96(
4367
- getModuleParams("stock", "saved_provider_proposal")
4896
+ getModuleParams("stock", Nomalism.SavedProviderProposal.Route)
4368
4897
  );
4369
4898
  this.ProductGoogleSheets = new Repository97(
4370
- getModuleParams("stock", "product_google")
4899
+ getModuleParams("stock", Nomalism.ProductGoogleSheets.Route)
4900
+ );
4901
+ this.Task = new Repository98(getModuleParams("stock", Nomalism.Task.Route));
4902
+ this.TaskMessage = new Repository99(getModuleParams("stock", Nomalism.TaskMessage.Route));
4903
+ this.RecurrentTasks = new Repository100(
4904
+ getModuleParams("stock", Nomalism.RecurrentTasks.Route)
4371
4905
  );
4372
- this.Task = new Repository98(getModuleParams("stock", "task"));
4373
- this.TaskMessage = new Repository99(getModuleParams("stock", "task_message"));
4374
- this.RecurrentTasks = new Repository100(getModuleParams("stock", "recurrent_tasks"));
4375
- this.TaskRead = new Repository101(getModuleParams("stock", "task_read"));
4376
- this.Theme = new Repository102(getModuleParams("users", "theme"));
4377
- this.Dashboard = new Repository103(getModuleParams("stock", "dashboard"));
4906
+ this.TaskRead = new Repository101(getModuleParams("stock", Nomalism.TaskRead.Route));
4907
+ this.Theme = new Repository102(getModuleParams("users", Nomalism.Theme.Route));
4908
+ this.Dashboard = new Repository103(getModuleParams("stock", Nomalism.Dashboard.Route));
4378
4909
  this.ChatRapidMessage = new Repository104(
4379
- getModuleParams("stock", "chat_rapid_message")
4910
+ getModuleParams("stock", Nomalism.ChatRapidMessage.Route)
4911
+ );
4912
+ this.SideMenu = new Repository105(getModuleParams("stock", Nomalism.SideMenu.Route));
4913
+ this.SidemenuHighlight = new Repository106(
4914
+ getModuleParams("stock", Nomalism.SidemenuHighlight.Route)
4915
+ );
4916
+ this.ErrorLog = new Repository107(getModuleParams("view", Nomalism.ErrorLog.Route));
4917
+ this.AdminPanel = new Repository108(getModuleParams("view", Nomalism.AdminPanel.Route));
4918
+ this.DocumentLineRm = new Repository109(
4919
+ getModuleParams("stock", Nomalism.DocumentLineRm.Route)
4920
+ );
4921
+ this.DocumentLineMt = new Repository110(
4922
+ getModuleParams("stock", Nomalism.DocumentLineMt.Route)
4923
+ );
4924
+ this.ChatSubscriber = new Repository111(
4925
+ getModuleParams("users", Nomalism.ChatSubscriber.Route)
4926
+ );
4927
+ this.Tag = new Repository112(getModuleParams("stock", Nomalism.Tag.Route));
4928
+ this.Gmails = new Repository113(getModuleParams("stock", Nomalism.Gmails.Route));
4929
+ this.NPF = new Repository114(getModuleParams("stock", Nomalism.NPF.Route));
4930
+ this.NRCL = new Repository115(getModuleParams("stock", Nomalism.NRCL.Route));
4931
+ this.PaymentBatch = new Repository117(
4932
+ getModuleParams("stock", Nomalism.PaymentBatch.Route)
4933
+ );
4934
+ this.CurrentAccount = new Repository116(
4935
+ getModuleParams("stock", Nomalism.CurrentAccount.Route)
4936
+ );
4937
+ this.Portal = new Repository118(getModuleParams("stock", Nomalism.Portal.Route));
4938
+ this.Saft = new Repository126(getModuleParams("stock", "saft"));
4939
+ this.AccountCode = new Repository120(getModuleParams("stock", "account_code"));
4940
+ this.GoogleSheetPool = new Repository119(
4941
+ getModuleParams("stock", Nomalism.GoogleSheetPool.Route)
4942
+ );
4943
+ this.AccountCode = new Repository120(getModuleParams("stock", Nomalism.AccountCode.Route));
4944
+ this.LLM = new Repository121(getModuleParams("llm", Nomalism.LLM.Route));
4945
+ this.PatchNotes = new Repository122(
4946
+ getModuleParams("integration", Nomalism.PatchNotes.Route)
4947
+ );
4948
+ this.DocumentHeaderSurvey = new Repository123(
4949
+ getModuleParams("stock", Nomalism.DocumentHeaderSurvey.Route)
4950
+ );
4951
+ this.DocumentHeaderSubscriber = new Repository124(
4952
+ getModuleParams("stock", Nomalism.DocumentHeaderSubscriber.Route)
4380
4953
  );
4381
- this.SideMenu = new Repository105(getModuleParams("stock", "side_menu"));
4382
- this.ErrorLog = new Repository106(getModuleParams("view", "error_log"));
4383
- this.AdminPanel = new Repository107(getModuleParams("view", "admin_panel"));
4384
- this.DocumentLineRm = new Repository108(getModuleParams("stock", "document_line_rm"));
4385
- this.DocumentLineMt = new Repository109(getModuleParams("stock", "document_line_mt"));
4386
- this.ChatSubscriber = new Repository110(getModuleParams("users", "chat_subscriber"));
4387
- this.Tag = new Repository111(getModuleParams("stock", "tag"));
4388
- this.Gmails = new Repository112(getModuleParams("stock", "gmail"));
4389
- this.NPF = new Repository113(getModuleParams("stock", "npf"));
4390
- this.NRCL = new Repository114(getModuleParams("stock", "nrcl"));
4391
- this.PaymentBatch = new Repository116(getModuleParams("stock", "payment_batch"));
4392
- this.CurrentAccount = new Repository115(getModuleParams("stock", "current_account"));
4393
- this.Portal = new Repository117(getModuleParams("stock", "portal"));
4394
- this.GoogleSheetPool = new Repository118(getModuleParams("stock", "google_sheet_pool"));
4395
- this.Saft = new Repository125(getModuleParams("stock", "saft"));
4396
- this.AccountCode = new Repository119(getModuleParams("stock", "account_code"));
4397
- this.LLM = new Repository120(getModuleParams("llm", "llm"));
4398
- this.PatchNotes = new Repository121(getModuleParams("integration", "patch_notes"));
4399
- this.DocumentHeaderSurvey = new Repository122(
4400
- getModuleParams("stock", "document_header_survey")
4954
+ this.GoogleCalendar = new Repository125(
4955
+ getModuleParams("stock", Nomalism.GoogleCalendar.Route)
4401
4956
  );
4402
- this.DocumentHeaderSubscriber = new Repository123(
4403
- getModuleParams("stock", "document_header_subscriber")
4957
+ this.ProductLocation = new Repository127(
4958
+ getModuleParams("stock", Nomalism.ProductLocation.Route)
4404
4959
  );
4405
- this.GoogleCalendar = new Repository124(getModuleParams("stock", "google_calendar"));
4960
+ this.TimeSheet = new TimesheetRepository(getModuleParams("users", Nomalism.TimeSheet.Route));
4961
+ this.Catalogo = new Repository128(getModuleParams("stock", Nomalism.Catalogo.Route));
4962
+ this.SmsSender = new Repository129(getModuleParams("sms", Nomalism.SmsSender.Route));
4963
+ this.SmsTemplate = new Repository130(getModuleParams("sms", Nomalism.SmsTemplate.Route));
4406
4964
  }
4407
4965
  };
4408
4966
 
4409
4967
  // src/index.ts
4410
4968
  var index_default = main_exports;
4411
4969
  export {
4412
- index_default as default
4970
+ ApiError,
4971
+ index_default as default,
4972
+ isApiError,
4973
+ parseApiError
4413
4974
  };