repzo 1.0.130 → 1.0.132

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/lib/index.js CHANGED
@@ -2,94 +2,8 @@ import axios from "axios";
2
2
  import { v4 as uuid } from "uuid";
3
3
  export default class Repzo {
4
4
  constructor(apiKey, options) {
5
- this._end_points = {
6
- CLIENT: "client",
7
- PRODUCT: "product",
8
- VARIANT: "variant",
9
- CATEGORY: "product-category",
10
- SUB_CATEGORY: "product-sub-category",
11
- BRAND: "product-brand",
12
- PRODUCT_GROUP: "product-group",
13
- TAX: "tax",
14
- MEASUREUNIT: "measureunits",
15
- MEASUREUNIT_FAMILY: "measureunit-family",
16
- MEDIA: "media",
17
- PRICELIST: "pricelists",
18
- PRICELIST_ITEM: "pricelistsitems",
19
- TEAM: "teams",
20
- RETURN_REASON: "return-reason",
21
- REP: "rep",
22
- TAG: "tag",
23
- WAREHOUSE: "warehouse",
24
- ROUTE: "route",
25
- PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
26
- CHANNEL: "client-channel",
27
- SPECIALITY: "speciality",
28
- CLIENT_CONTACT: "client-contact",
29
- PAYMENT_TERM: "paymentterms",
30
- BANK: "banks",
31
- BANK_LIST: "bankslists",
32
- CUSTOM_STATUS: "custom-status",
33
- CUSTOM_LIST: "custom-list",
34
- CUSTOM_LIST_ITEM: "custom-list-item",
35
- INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
36
- WORKORDER: "workorder",
37
- WORKORDER_REQUEST: "workorder-request",
38
- SUPPLIER: "supplier",
39
- QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
40
- VISIT: "visit",
41
- INVOICE: "fullinvoices",
42
- PROFORMA: "proforma",
43
- PAYMENT: "payments",
44
- REFUND: "refund",
45
- SETTLEMENT: "settlement",
46
- CHECK: "checks",
47
- DAY: "day",
48
- RECEIVING_MATERIAL: "receiving-material",
49
- ADJUST_ACCOUNT: "adjust-account",
50
- TRANSFER: "transfer",
51
- MSL: "msl",
52
- MSL_PRODUCT: "msl-products",
53
- MEDIA_STORAGE: "media-storage",
54
- STORECHECK_TEMPLATE: "storecheck-template",
55
- ACTIVITY_STORECHECK: "activity-storecheck",
56
- ADJUST_INVENTORY: "adjust-inventory",
57
- INVENTORY: "inventory",
58
- INTEGRATION_APP: "integration-app",
59
- JOIN_ACTIONS_WEBHOOK: "svix-integration",
60
- INTEGRATION_ACTION_LOG: "integration-action-log",
61
- INTEGRATION_COMMAND_LOG: "integration-command-log",
62
- PATCH_ACTION: "patch-action",
63
- UPDATE_INTEGRATION_META: "update-integration-meta",
64
- ASSET_PART_TYPE: "asset-part-type",
65
- ASSET_PART: "asset-part",
66
- ASSET_PART_UNIT: "asset-part-unit",
67
- ASSET_PART_RECEIVAL: "asset-part-receival",
68
- ASSET_PART_TRANSFER: "asset-part-transfer",
69
- RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
70
- STORE_ASSET_PART_UNIT: "store-asset-part-unit",
71
- OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
72
- OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
73
- ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
74
- OCR_INVOICE_JOB: "ocr-invoice-job",
75
- OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
76
- SETTINGS: "settings",
77
- MAIL_UNSUBSCRIBE: "mail-unsubscribe",
78
- APPROVAL_REQUEST: "approval-request",
79
- SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
80
- CLIENT_LOCATION: "client-location",
81
- ASSET_TYPE: "asset-type",
82
- ASSET: "asset",
83
- ASSET_UNIT: "asset-unit",
84
- WORKORDER_PORTAL: "workorder-portal",
85
- APPROVAL: "approvals",
86
- ACTIVITY_FEEDBACK: "activity-feedback",
87
- ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
88
- FEEDBACK_OPTION: "feedback-options",
89
- };
90
- this.END_POINTS = this._end_points;
91
5
  this.client = {
92
- _path: this._end_points.CLIENT,
6
+ _path: Repzo._end_points.CLIENT,
93
7
  find: async (params) => {
94
8
  let res = await this._fetch(
95
9
  this.svAPIEndpoint,
@@ -130,7 +44,7 @@ export default class Repzo {
130
44
  },
131
45
  };
132
46
  this.product = {
133
- _path: this._end_points.PRODUCT,
47
+ _path: Repzo._end_points.PRODUCT,
134
48
  find: async (params) => {
135
49
  let res = await this._fetch(
136
50
  this.svAPIEndpoint,
@@ -171,7 +85,7 @@ export default class Repzo {
171
85
  },
172
86
  };
173
87
  this.variant = {
174
- _path: this._end_points.VARIANT,
88
+ _path: Repzo._end_points.VARIANT,
175
89
  find: async (params) => {
176
90
  let res = await this._fetch(
177
91
  this.svAPIEndpoint,
@@ -212,7 +126,7 @@ export default class Repzo {
212
126
  },
213
127
  };
214
128
  this.category = {
215
- _path: this._end_points.CATEGORY,
129
+ _path: Repzo._end_points.CATEGORY,
216
130
  find: async (params) => {
217
131
  let res = await this._fetch(
218
132
  this.svAPIEndpoint,
@@ -252,7 +166,7 @@ export default class Repzo {
252
166
  },
253
167
  };
254
168
  this.sub_category = {
255
- _path: this._end_points.SUB_CATEGORY,
169
+ _path: Repzo._end_points.SUB_CATEGORY,
256
170
  find: async (params) => {
257
171
  let res = await this._fetch(
258
172
  this.svAPIEndpoint,
@@ -293,7 +207,7 @@ export default class Repzo {
293
207
  },
294
208
  };
295
209
  this.brand = {
296
- _path: this._end_points.BRAND,
210
+ _path: Repzo._end_points.BRAND,
297
211
  find: async (params) => {
298
212
  let res = await this._fetch(
299
213
  this.svAPIEndpoint,
@@ -333,7 +247,7 @@ export default class Repzo {
333
247
  },
334
248
  };
335
249
  this.product_group = {
336
- _path: this._end_points.PRODUCT_GROUP,
250
+ _path: Repzo._end_points.PRODUCT_GROUP,
337
251
  find: async (params) => {
338
252
  let res = await this._fetch(
339
253
  this.svAPIEndpoint,
@@ -373,7 +287,7 @@ export default class Repzo {
373
287
  },
374
288
  };
375
289
  this.tax = {
376
- _path: this._end_points.TAX,
290
+ _path: Repzo._end_points.TAX,
377
291
  find: async (params) => {
378
292
  let res = await this._fetch(this.svAPIEndpoint, this.tax._path, params);
379
293
  return res;
@@ -402,7 +316,7 @@ export default class Repzo {
402
316
  },
403
317
  };
404
318
  this.measureunit = {
405
- _path: this._end_points.MEASUREUNIT,
319
+ _path: Repzo._end_points.MEASUREUNIT,
406
320
  find: async (params) => {
407
321
  let res = await this._fetch(
408
322
  this.svAPIEndpoint,
@@ -442,7 +356,7 @@ export default class Repzo {
442
356
  },
443
357
  };
444
358
  this.measureunitFamily = {
445
- _path: this._end_points.MEASUREUNIT_FAMILY,
359
+ _path: Repzo._end_points.MEASUREUNIT_FAMILY,
446
360
  find: async (params) => {
447
361
  let res = await this._fetch(
448
362
  this.svAPIEndpoint,
@@ -482,7 +396,7 @@ export default class Repzo {
482
396
  },
483
397
  };
484
398
  this.media = {
485
- _path: this._end_points.MEDIA,
399
+ _path: Repzo._end_points.MEDIA,
486
400
  find: async (params) => {
487
401
  let res = await this._fetch(
488
402
  this.svAPIEndpoint,
@@ -522,7 +436,7 @@ export default class Repzo {
522
436
  },
523
437
  };
524
438
  this.priceList = {
525
- _path: this._end_points.PRICELIST,
439
+ _path: Repzo._end_points.PRICELIST,
526
440
  find: async (params) => {
527
441
  let res = await this._fetch(
528
442
  this.svAPIEndpoint,
@@ -562,7 +476,7 @@ export default class Repzo {
562
476
  },
563
477
  };
564
478
  this.priceListItem = {
565
- _path: this._end_points.PRICELIST_ITEM,
479
+ _path: Repzo._end_points.PRICELIST_ITEM,
566
480
  find: async (params) => {
567
481
  let res = await this._fetch(
568
482
  this.svAPIEndpoint,
@@ -602,7 +516,7 @@ export default class Repzo {
602
516
  },
603
517
  };
604
518
  this.team = {
605
- _path: this._end_points.TEAM,
519
+ _path: Repzo._end_points.TEAM,
606
520
  find: async (params) => {
607
521
  let res = await this._fetch(
608
522
  this.svAPIEndpoint,
@@ -638,7 +552,7 @@ export default class Repzo {
638
552
  },
639
553
  };
640
554
  this.returnReason = {
641
- _path: this._end_points.RETURN_REASON,
555
+ _path: Repzo._end_points.RETURN_REASON,
642
556
  find: async (params) => {
643
557
  let res = await this._fetch(
644
558
  this.svAPIEndpoint,
@@ -678,7 +592,7 @@ export default class Repzo {
678
592
  },
679
593
  };
680
594
  this.rep = {
681
- _path: this._end_points.REP,
595
+ _path: Repzo._end_points.REP,
682
596
  find: async (params) => {
683
597
  let res = await this._fetch(this.svAPIEndpoint, this.rep._path, params);
684
598
  return res;
@@ -711,7 +625,7 @@ export default class Repzo {
711
625
  },
712
626
  };
713
627
  this.tag = {
714
- _path: this._end_points.TAG,
628
+ _path: Repzo._end_points.TAG,
715
629
  find: async (params) => {
716
630
  let res = await this._fetch(this.svAPIEndpoint, this.tag._path, params);
717
631
  return res;
@@ -740,7 +654,7 @@ export default class Repzo {
740
654
  },
741
655
  };
742
656
  this.warehouse = {
743
- _path: this._end_points.WAREHOUSE,
657
+ _path: Repzo._end_points.WAREHOUSE,
744
658
  find: async (params) => {
745
659
  let res = await this._fetch(
746
660
  this.svAPIEndpoint,
@@ -780,7 +694,7 @@ export default class Repzo {
780
694
  },
781
695
  };
782
696
  this.route = {
783
- _path: this._end_points.ROUTE,
697
+ _path: Repzo._end_points.ROUTE,
784
698
  find: async (params) => {
785
699
  let res = await this._fetch(
786
700
  this.svAPIEndpoint,
@@ -820,7 +734,7 @@ export default class Repzo {
820
734
  },
821
735
  };
822
736
  this.productModifiersGroup = {
823
- _path: this._end_points.PRODUCT_MODIFIERS_GROUP,
737
+ _path: Repzo._end_points.PRODUCT_MODIFIERS_GROUP,
824
738
  find: async (params) => {
825
739
  let res = await this._fetch(
826
740
  this.svAPIEndpoint,
@@ -860,7 +774,7 @@ export default class Repzo {
860
774
  },
861
775
  };
862
776
  this.channel = {
863
- _path: this._end_points.CHANNEL,
777
+ _path: Repzo._end_points.CHANNEL,
864
778
  find: async (params) => {
865
779
  let res = await this._fetch(
866
780
  this.svAPIEndpoint,
@@ -900,7 +814,7 @@ export default class Repzo {
900
814
  },
901
815
  };
902
816
  this.speciality = {
903
- _path: this._end_points.SPECIALITY,
817
+ _path: Repzo._end_points.SPECIALITY,
904
818
  find: async (params) => {
905
819
  let res = await this._fetch(
906
820
  this.svAPIEndpoint,
@@ -940,7 +854,7 @@ export default class Repzo {
940
854
  },
941
855
  };
942
856
  this.clientContact = {
943
- _path: this._end_points.CLIENT_CONTACT,
857
+ _path: Repzo._end_points.CLIENT_CONTACT,
944
858
  find: async (params) => {
945
859
  let res = await this._fetch(
946
860
  this.svAPIEndpoint,
@@ -980,7 +894,7 @@ export default class Repzo {
980
894
  },
981
895
  };
982
896
  this.paymentTerm = {
983
- _path: this._end_points.PAYMENT_TERM,
897
+ _path: Repzo._end_points.PAYMENT_TERM,
984
898
  find: async (params) => {
985
899
  let res = await this._fetch(
986
900
  this.svAPIEndpoint,
@@ -1020,7 +934,7 @@ export default class Repzo {
1020
934
  },
1021
935
  };
1022
936
  this.bank = {
1023
- _path: this._end_points.BANK,
937
+ _path: Repzo._end_points.BANK,
1024
938
  find: async (params) => {
1025
939
  let res = await this._fetch(
1026
940
  this.svAPIEndpoint,
@@ -1049,7 +963,7 @@ export default class Repzo {
1049
963
  },
1050
964
  };
1051
965
  this.bank_list = {
1052
- _path: this._end_points.BANK_LIST,
966
+ _path: Repzo._end_points.BANK_LIST,
1053
967
  find: async (params) => {
1054
968
  let res = await this._fetch(
1055
969
  this.svAPIEndpoint,
@@ -1082,7 +996,7 @@ export default class Repzo {
1082
996
  },
1083
997
  };
1084
998
  this.customStatus = {
1085
- _path: this._end_points.CUSTOM_STATUS,
999
+ _path: Repzo._end_points.CUSTOM_STATUS,
1086
1000
  find: async (params) => {
1087
1001
  let res = await this._fetch(
1088
1002
  this.svAPIEndpoint,
@@ -1122,7 +1036,7 @@ export default class Repzo {
1122
1036
  },
1123
1037
  };
1124
1038
  this.customList = {
1125
- _path: this._end_points.CUSTOM_LIST,
1039
+ _path: Repzo._end_points.CUSTOM_LIST,
1126
1040
  find: async (params) => {
1127
1041
  let res = await this._fetch(
1128
1042
  this.svAPIEndpoint,
@@ -1163,7 +1077,7 @@ export default class Repzo {
1163
1077
  },
1164
1078
  };
1165
1079
  this.customListItem = {
1166
- _path: this._end_points.CUSTOM_LIST_ITEM,
1080
+ _path: Repzo._end_points.CUSTOM_LIST_ITEM,
1167
1081
  find: async (params) => {
1168
1082
  let res = await this._fetch(
1169
1083
  this.svAPIEndpoint,
@@ -1204,7 +1118,7 @@ export default class Repzo {
1204
1118
  },
1205
1119
  };
1206
1120
  this.inventoryAdjustmentReason = {
1207
- _path: this._end_points.INVENTORY_ADJUSTMENT_REASON,
1121
+ _path: Repzo._end_points.INVENTORY_ADJUSTMENT_REASON,
1208
1122
  find: async (params) => {
1209
1123
  let res = await this._fetch(
1210
1124
  this.svAPIEndpoint,
@@ -1244,7 +1158,7 @@ export default class Repzo {
1244
1158
  },
1245
1159
  };
1246
1160
  this.workorder = {
1247
- _path: this._end_points.WORKORDER,
1161
+ _path: Repzo._end_points.WORKORDER,
1248
1162
  find: async (params) => {
1249
1163
  let res = await this._fetch(
1250
1164
  this.svAPIEndpoint,
@@ -1285,7 +1199,7 @@ export default class Repzo {
1285
1199
  },
1286
1200
  };
1287
1201
  this.workorderRequest = {
1288
- _path: this._end_points.WORKORDER_REQUEST,
1202
+ _path: Repzo._end_points.WORKORDER_REQUEST,
1289
1203
  find: async (params) => {
1290
1204
  let res = await this._fetch(
1291
1205
  this.svAPIEndpoint,
@@ -1326,7 +1240,7 @@ export default class Repzo {
1326
1240
  },
1327
1241
  };
1328
1242
  this.supplier = {
1329
- _path: this._end_points.SUPPLIER,
1243
+ _path: Repzo._end_points.SUPPLIER,
1330
1244
  find: async (params) => {
1331
1245
  let res = await this._fetch(
1332
1246
  this.svAPIEndpoint,
@@ -1360,7 +1274,7 @@ export default class Repzo {
1360
1274
  },
1361
1275
  };
1362
1276
  this.quickConvertToPdf = {
1363
- _path: this._end_points.QUICK_CONVERT_TO_PDF,
1277
+ _path: Repzo._end_points.QUICK_CONVERT_TO_PDF,
1364
1278
  find: async (params) => {
1365
1279
  let res = await this._fetch(
1366
1280
  this.svAPIEndpoint,
@@ -1393,7 +1307,7 @@ export default class Repzo {
1393
1307
  },
1394
1308
  };
1395
1309
  this.visit = {
1396
- _path: this._end_points.VISIT,
1310
+ _path: Repzo._end_points.VISIT,
1397
1311
  find: async (params) => {
1398
1312
  let res = await this._fetch(
1399
1313
  this.svAPIEndpoint,
@@ -1427,7 +1341,7 @@ export default class Repzo {
1427
1341
  },
1428
1342
  };
1429
1343
  this.activityFeedback = {
1430
- _path: this._end_points.ACTIVITY_FEEDBACK,
1344
+ _path: Repzo._end_points.ACTIVITY_FEEDBACK,
1431
1345
  find: async (params) => {
1432
1346
  let res = await this._fetch(
1433
1347
  this.svAPIEndpoint,
@@ -1461,7 +1375,7 @@ export default class Repzo {
1461
1375
  },
1462
1376
  };
1463
1377
  this.activityFeedbackV2 = {
1464
- _path: this._end_points.ACTIVITY_FEEDBACKV2,
1378
+ _path: Repzo._end_points.ACTIVITY_FEEDBACKV2,
1465
1379
  find: async (params) => {
1466
1380
  let res = await this._fetch(
1467
1381
  this.svAPIEndpoint,
@@ -1495,7 +1409,7 @@ export default class Repzo {
1495
1409
  },
1496
1410
  };
1497
1411
  this.feedbackOption = {
1498
- _path: this._end_points.FEEDBACK_OPTION,
1412
+ _path: Repzo._end_points.FEEDBACK_OPTION,
1499
1413
  find: async (params) => {
1500
1414
  let res = await this._fetch(
1501
1415
  this.svAPIEndpoint,
@@ -1529,7 +1443,7 @@ export default class Repzo {
1529
1443
  },
1530
1444
  };
1531
1445
  this.invoice = {
1532
- _path: this._end_points.INVOICE,
1446
+ _path: Repzo._end_points.INVOICE,
1533
1447
  find: async (params) => {
1534
1448
  let res = await this._fetch(
1535
1449
  this.svAPIEndpoint,
@@ -1563,7 +1477,7 @@ export default class Repzo {
1563
1477
  },
1564
1478
  };
1565
1479
  this.proforma = {
1566
- _path: this._end_points.PROFORMA,
1480
+ _path: Repzo._end_points.PROFORMA,
1567
1481
  find: async (params) => {
1568
1482
  let res = await this._fetch(
1569
1483
  this.svAPIEndpoint,
@@ -1597,7 +1511,7 @@ export default class Repzo {
1597
1511
  },
1598
1512
  };
1599
1513
  this.payment = {
1600
- _path: this._end_points.PAYMENT,
1514
+ _path: Repzo._end_points.PAYMENT,
1601
1515
  find: async (params) => {
1602
1516
  let res = await this._fetch(
1603
1517
  this.svAPIEndpoint,
@@ -1631,7 +1545,7 @@ export default class Repzo {
1631
1545
  },
1632
1546
  };
1633
1547
  this.refund = {
1634
- _path: this._end_points.REFUND,
1548
+ _path: Repzo._end_points.REFUND,
1635
1549
  find: async (params) => {
1636
1550
  let res = await this._fetch(
1637
1551
  this.svAPIEndpoint,
@@ -1665,7 +1579,7 @@ export default class Repzo {
1665
1579
  },
1666
1580
  };
1667
1581
  this.settlement = {
1668
- _path: this._end_points.SETTLEMENT,
1582
+ _path: Repzo._end_points.SETTLEMENT,
1669
1583
  find: async (params) => {
1670
1584
  let res = await this._fetch(
1671
1585
  this.svAPIEndpoint,
@@ -1691,7 +1605,7 @@ export default class Repzo {
1691
1605
  },
1692
1606
  };
1693
1607
  this.check = {
1694
- _path: this._end_points.CHECK,
1608
+ _path: Repzo._end_points.CHECK,
1695
1609
  find: async (params) => {
1696
1610
  let res = await this._fetch(
1697
1611
  this.svAPIEndpoint,
@@ -1717,7 +1631,7 @@ export default class Repzo {
1717
1631
  },
1718
1632
  };
1719
1633
  this.day = {
1720
- _path: this._end_points.DAY,
1634
+ _path: Repzo._end_points.DAY,
1721
1635
  find: async (params) => {
1722
1636
  let res = await this._fetch(this.svAPIEndpoint, this.day._path, params);
1723
1637
  return res;
@@ -1735,7 +1649,7 @@ export default class Repzo {
1735
1649
  },
1736
1650
  };
1737
1651
  this.receivingMaterial = {
1738
- _path: this._end_points.RECEIVING_MATERIAL,
1652
+ _path: Repzo._end_points.RECEIVING_MATERIAL,
1739
1653
  find: async (params) => {
1740
1654
  let res = await this._fetch(
1741
1655
  this.svAPIEndpoint,
@@ -1769,7 +1683,7 @@ export default class Repzo {
1769
1683
  },
1770
1684
  };
1771
1685
  this.adjustAccount = {
1772
- _path: this._end_points.ADJUST_ACCOUNT,
1686
+ _path: Repzo._end_points.ADJUST_ACCOUNT,
1773
1687
  find: async (params) => {
1774
1688
  let res = await this._fetch(
1775
1689
  this.svAPIEndpoint,
@@ -1795,7 +1709,7 @@ export default class Repzo {
1795
1709
  },
1796
1710
  };
1797
1711
  this.transfer = {
1798
- _path: this._end_points.TRANSFER,
1712
+ _path: Repzo._end_points.TRANSFER,
1799
1713
  find: async (params) => {
1800
1714
  let res = await this._fetch(
1801
1715
  this.svAPIEndpoint,
@@ -1829,7 +1743,7 @@ export default class Repzo {
1829
1743
  },
1830
1744
  };
1831
1745
  this.msl = {
1832
- _path: this._end_points.MSL,
1746
+ _path: Repzo._end_points.MSL,
1833
1747
  find: async (params) => {
1834
1748
  let res = await this._fetch(this.svAPIEndpoint, this.msl._path, params);
1835
1749
  return res;
@@ -1862,7 +1776,7 @@ export default class Repzo {
1862
1776
  },
1863
1777
  };
1864
1778
  this.mslProduct = {
1865
- _path: this._end_points.MSL_PRODUCT,
1779
+ _path: Repzo._end_points.MSL_PRODUCT,
1866
1780
  find: async (params) => {
1867
1781
  let res = await this._fetch(
1868
1782
  this.svAPIEndpoint,
@@ -1903,7 +1817,7 @@ export default class Repzo {
1903
1817
  },
1904
1818
  };
1905
1819
  this.mediaStorage = {
1906
- _path: this._end_points.MEDIA_STORAGE,
1820
+ _path: Repzo._end_points.MEDIA_STORAGE,
1907
1821
  find: async (params) => {
1908
1822
  let res = await this._fetch(
1909
1823
  this.svAPIEndpoint,
@@ -1944,7 +1858,7 @@ export default class Repzo {
1944
1858
  },
1945
1859
  };
1946
1860
  this.storecheckTemplate = {
1947
- _path: this._end_points.STORECHECK_TEMPLATE,
1861
+ _path: Repzo._end_points.STORECHECK_TEMPLATE,
1948
1862
  find: async (params) => {
1949
1863
  let res = await this._fetch(
1950
1864
  this.svAPIEndpoint,
@@ -1985,7 +1899,7 @@ export default class Repzo {
1985
1899
  },
1986
1900
  };
1987
1901
  this.activityStorecheck = {
1988
- _path: this._end_points.ACTIVITY_STORECHECK,
1902
+ _path: Repzo._end_points.ACTIVITY_STORECHECK,
1989
1903
  find: async (params) => {
1990
1904
  let res = await this._fetch(
1991
1905
  this.svAPIEndpoint,
@@ -2019,7 +1933,7 @@ export default class Repzo {
2019
1933
  },
2020
1934
  };
2021
1935
  this.adjustInventory = {
2022
- _path: this._end_points.ADJUST_INVENTORY,
1936
+ _path: Repzo._end_points.ADJUST_INVENTORY,
2023
1937
  find: async (params) => {
2024
1938
  let res = await this._fetch(
2025
1939
  this.svAPIEndpoint,
@@ -2045,7 +1959,7 @@ export default class Repzo {
2045
1959
  },
2046
1960
  };
2047
1961
  this.inventory = {
2048
- _path: this._end_points.INVENTORY,
1962
+ _path: Repzo._end_points.INVENTORY,
2049
1963
  find: async (params) => {
2050
1964
  let res = await this._fetch(
2051
1965
  this.svAPIEndpoint,
@@ -2056,7 +1970,7 @@ export default class Repzo {
2056
1970
  },
2057
1971
  };
2058
1972
  this.integrationApp = {
2059
- _path: this._end_points.INTEGRATION_APP,
1973
+ _path: Repzo._end_points.INTEGRATION_APP,
2060
1974
  find: async (params) => {
2061
1975
  let res = await this._fetch(
2062
1976
  this.svAPIEndpoint,
@@ -2090,7 +2004,7 @@ export default class Repzo {
2090
2004
  },
2091
2005
  };
2092
2006
  this.joinActionsWebHook = {
2093
- _path: this._end_points.JOIN_ACTIONS_WEBHOOK,
2007
+ _path: Repzo._end_points.JOIN_ACTIONS_WEBHOOK,
2094
2008
  update: async (id, body) => {
2095
2009
  let res = await this._update(
2096
2010
  this.svAPIEndpoint,
@@ -2101,7 +2015,7 @@ export default class Repzo {
2101
2015
  },
2102
2016
  };
2103
2017
  this.patchAction = {
2104
- _path: this._end_points.PATCH_ACTION,
2018
+ _path: Repzo._end_points.PATCH_ACTION,
2105
2019
  create: async (body, params) => {
2106
2020
  const res = await this._create(
2107
2021
  this.svAPIEndpoint,
@@ -2121,7 +2035,7 @@ export default class Repzo {
2121
2035
  },
2122
2036
  };
2123
2037
  this.updateIntegrationMeta = {
2124
- _path: this._end_points.UPDATE_INTEGRATION_META,
2038
+ _path: Repzo._end_points.UPDATE_INTEGRATION_META,
2125
2039
  create: async (body, params) => {
2126
2040
  let res = await this._create(
2127
2041
  this.svAPIEndpoint,
@@ -2133,7 +2047,7 @@ export default class Repzo {
2133
2047
  },
2134
2048
  };
2135
2049
  this.assetPartType = {
2136
- _path: this._end_points.ASSET_PART_TYPE,
2050
+ _path: Repzo._end_points.ASSET_PART_TYPE,
2137
2051
  find: async (params) => {
2138
2052
  let res = await this._fetch(
2139
2053
  this.svAPIEndpoint,
@@ -2173,7 +2087,7 @@ export default class Repzo {
2173
2087
  },
2174
2088
  };
2175
2089
  this.assetPart = {
2176
- _path: this._end_points.ASSET_PART,
2090
+ _path: Repzo._end_points.ASSET_PART,
2177
2091
  find: async (params) => {
2178
2092
  let res = await this._fetch(
2179
2093
  this.svAPIEndpoint,
@@ -2214,7 +2128,7 @@ export default class Repzo {
2214
2128
  },
2215
2129
  };
2216
2130
  this.assetPartUnit = {
2217
- _path: this._end_points.ASSET_PART_UNIT,
2131
+ _path: Repzo._end_points.ASSET_PART_UNIT,
2218
2132
  find: async (params) => {
2219
2133
  let res = await this._fetch(
2220
2134
  this.svAPIEndpoint,
@@ -2240,7 +2154,7 @@ export default class Repzo {
2240
2154
  },
2241
2155
  };
2242
2156
  this.assetPartReceival = {
2243
- _path: this._end_points.ASSET_PART_RECEIVAL,
2157
+ _path: Repzo._end_points.ASSET_PART_RECEIVAL,
2244
2158
  find: async (params) => {
2245
2159
  let res = await this._fetch(
2246
2160
  this.svAPIEndpoint,
@@ -2283,7 +2197,7 @@ export default class Repzo {
2283
2197
  },
2284
2198
  };
2285
2199
  this.assetPartTransfer = {
2286
- _path: this._end_points.ASSET_PART_TRANSFER,
2200
+ _path: Repzo._end_points.ASSET_PART_TRANSFER,
2287
2201
  find: async (params) => {
2288
2202
  let res = await this._fetch(
2289
2203
  this.svAPIEndpoint,
@@ -2326,7 +2240,7 @@ export default class Repzo {
2326
2240
  },
2327
2241
  };
2328
2242
  this.returnAssetPartUnit = {
2329
- _path: this._end_points.RETURN_ASSET_PART_UNIT,
2243
+ _path: Repzo._end_points.RETURN_ASSET_PART_UNIT,
2330
2244
  find: async (params) => {
2331
2245
  let res = await this._fetch(
2332
2246
  this.svAPIEndpoint,
@@ -2369,7 +2283,7 @@ export default class Repzo {
2369
2283
  },
2370
2284
  };
2371
2285
  this.storeAssetPartUnit = {
2372
- _path: this._end_points.STORE_ASSET_PART_UNIT,
2286
+ _path: Repzo._end_points.STORE_ASSET_PART_UNIT,
2373
2287
  find: async (params) => {
2374
2288
  let res = await this._fetch(
2375
2289
  this.svAPIEndpoint,
@@ -2412,7 +2326,7 @@ export default class Repzo {
2412
2326
  },
2413
2327
  };
2414
2328
  this.ocrInvoiceJobTemplate = {
2415
- _path: this._end_points.OCR_INVOICE_JOB_TEMPLATE,
2329
+ _path: Repzo._end_points.OCR_INVOICE_JOB_TEMPLATE,
2416
2330
  find: async (params) => {
2417
2331
  let res = await this._fetch(
2418
2332
  this.svAPIEndpoint,
@@ -2445,7 +2359,7 @@ export default class Repzo {
2445
2359
  },
2446
2360
  };
2447
2361
  this.ocrInvoiceJobGroup = {
2448
- _path: this._end_points.OCR_INVOICE_JOB_GROUP,
2362
+ _path: Repzo._end_points.OCR_INVOICE_JOB_GROUP,
2449
2363
  find: async (params) => {
2450
2364
  let res = await this._fetch(
2451
2365
  this.svAPIEndpoint,
@@ -2470,7 +2384,7 @@ export default class Repzo {
2470
2384
  },
2471
2385
  };
2472
2386
  this.activityAiSalesOrder = {
2473
- _path: this._end_points.ACTIVITY_AI_SALES_ORDER,
2387
+ _path: Repzo._end_points.ACTIVITY_AI_SALES_ORDER,
2474
2388
  find: async (params) => {
2475
2389
  let res = await this._fetch(
2476
2390
  this.svAPIEndpoint,
@@ -2495,7 +2409,7 @@ export default class Repzo {
2495
2409
  },
2496
2410
  };
2497
2411
  this.ocrInvoiceJob = {
2498
- _path: this._end_points.OCR_INVOICE_JOB,
2412
+ _path: Repzo._end_points.OCR_INVOICE_JOB,
2499
2413
  find: async (params) => {
2500
2414
  let res = await this._fetch(
2501
2415
  this.svAPIEndpoint,
@@ -2512,7 +2426,7 @@ export default class Repzo {
2512
2426
  },
2513
2427
  };
2514
2428
  this.ocrInvoiceJobPage = {
2515
- _path: this._end_points.OCR_INVOICE_JOB_PAGE,
2429
+ _path: Repzo._end_points.OCR_INVOICE_JOB_PAGE,
2516
2430
  find: async (params) => {
2517
2431
  let res = await this._fetch(
2518
2432
  this.svAPIEndpoint,
@@ -2537,7 +2451,7 @@ export default class Repzo {
2537
2451
  },
2538
2452
  };
2539
2453
  this.settings = {
2540
- _path: this._end_points.SETTINGS,
2454
+ _path: Repzo._end_points.SETTINGS,
2541
2455
  find: async (params) => {
2542
2456
  let res = await this._fetch(
2543
2457
  this.svAPIEndpoint,
@@ -2562,7 +2476,7 @@ export default class Repzo {
2562
2476
  },
2563
2477
  };
2564
2478
  this.mailUnsubscribe = {
2565
- _path: this._end_points.MAIL_UNSUBSCRIBE,
2479
+ _path: Repzo._end_points.MAIL_UNSUBSCRIBE,
2566
2480
  get: async (id) => {
2567
2481
  return await this._fetch(
2568
2482
  this.svAPIEndpoint,
@@ -2580,7 +2494,7 @@ export default class Repzo {
2580
2494
  },
2581
2495
  };
2582
2496
  this.approvalRequest = {
2583
- _path: this._end_points.APPROVAL_REQUEST,
2497
+ _path: Repzo._end_points.APPROVAL_REQUEST,
2584
2498
  find: async (params) => {
2585
2499
  let res = await this._fetch(
2586
2500
  this.svAPIEndpoint,
@@ -2622,7 +2536,7 @@ export default class Repzo {
2622
2536
  },
2623
2537
  };
2624
2538
  this.safeInvoiceSerialCounter = {
2625
- _path: this._end_points.SAFE_INVOICE_SERIAL_COUNTER,
2539
+ _path: Repzo._end_points.SAFE_INVOICE_SERIAL_COUNTER,
2626
2540
  update: async (id, body) => {
2627
2541
  let res = await this._update(
2628
2542
  this.svAPIEndpoint,
@@ -2633,7 +2547,7 @@ export default class Repzo {
2633
2547
  },
2634
2548
  };
2635
2549
  this.clientLocation = {
2636
- _path: this._end_points.CLIENT_LOCATION,
2550
+ _path: Repzo._end_points.CLIENT_LOCATION,
2637
2551
  find: async (params) => {
2638
2552
  let res = await this._fetch(
2639
2553
  this.svAPIEndpoint,
@@ -2675,7 +2589,7 @@ export default class Repzo {
2675
2589
  },
2676
2590
  };
2677
2591
  this.assetType = {
2678
- _path: this._end_points.ASSET_TYPE,
2592
+ _path: Repzo._end_points.ASSET_TYPE,
2679
2593
  find: async (params) => {
2680
2594
  let res = await this._fetch(
2681
2595
  this.svAPIEndpoint,
@@ -2716,7 +2630,7 @@ export default class Repzo {
2716
2630
  },
2717
2631
  };
2718
2632
  this.asset = {
2719
- _path: this._end_points.ASSET,
2633
+ _path: Repzo._end_points.ASSET,
2720
2634
  find: async (params) => {
2721
2635
  let res = await this._fetch(
2722
2636
  this.svAPIEndpoint,
@@ -2758,7 +2672,7 @@ export default class Repzo {
2758
2672
  },
2759
2673
  };
2760
2674
  this.assetUnit = {
2761
- _path: this._end_points.ASSET_UNIT,
2675
+ _path: Repzo._end_points.ASSET_UNIT,
2762
2676
  find: async (params) => {
2763
2677
  let res = await this._fetch(
2764
2678
  this.svAPIEndpoint,
@@ -2800,7 +2714,7 @@ export default class Repzo {
2800
2714
  },
2801
2715
  };
2802
2716
  this.workorderPortal = {
2803
- _path: this._end_points.WORKORDER_PORTAL,
2717
+ _path: Repzo._end_points.WORKORDER_PORTAL,
2804
2718
  find: async (params) => {
2805
2719
  let res = await this._fetch(
2806
2720
  this.svAPIEndpoint,
@@ -2841,7 +2755,7 @@ export default class Repzo {
2841
2755
  },
2842
2756
  };
2843
2757
  this.approval = {
2844
- _path: this._end_points.APPROVAL,
2758
+ _path: Repzo._end_points.APPROVAL,
2845
2759
  find: async (params) => {
2846
2760
  let res = await this._fetch(
2847
2761
  this.svAPIEndpoint,
@@ -2881,6 +2795,129 @@ export default class Repzo {
2881
2795
  return res;
2882
2796
  },
2883
2797
  };
2798
+ this.workorderCategory = {
2799
+ _path: Repzo._end_points.WORKORDER_CATEGORY,
2800
+ find: async (params) => {
2801
+ let res = await this._fetch(
2802
+ this.svAPIEndpoint,
2803
+ this.workorderCategory._path,
2804
+ params
2805
+ );
2806
+ return res;
2807
+ },
2808
+ get: async (id, params) => {
2809
+ return await this._fetch(
2810
+ this.svAPIEndpoint,
2811
+ this.workorderCategory._path + `/${id}`,
2812
+ params
2813
+ );
2814
+ },
2815
+ create: async (body) => {
2816
+ let res = await this._create(
2817
+ this.svAPIEndpoint,
2818
+ this.workorderCategory._path,
2819
+ body
2820
+ );
2821
+ return res;
2822
+ },
2823
+ update: async (id, body) => {
2824
+ let res = await this._update(
2825
+ this.svAPIEndpoint,
2826
+ this.workorderCategory._path + `/${id}`,
2827
+ body
2828
+ );
2829
+ return res;
2830
+ },
2831
+ remove: async (id) => {
2832
+ let res = await this._delete(
2833
+ this.svAPIEndpoint,
2834
+ this.workorderCategory._path + `/${id}`
2835
+ );
2836
+ return res;
2837
+ },
2838
+ };
2839
+ this.contract = {
2840
+ _path: Repzo._end_points.CONTRACT,
2841
+ find: async (params) => {
2842
+ let res = await this._fetch(
2843
+ this.svAPIEndpoint,
2844
+ this.contract._path,
2845
+ params
2846
+ );
2847
+ return res;
2848
+ },
2849
+ get: async (id, params) => {
2850
+ return await this._fetch(
2851
+ this.svAPIEndpoint,
2852
+ this.contract._path + `/${id}`,
2853
+ params
2854
+ );
2855
+ },
2856
+ create: async (body) => {
2857
+ let res = await this._create(
2858
+ this.svAPIEndpoint,
2859
+ this.contract._path,
2860
+ body
2861
+ );
2862
+ return res;
2863
+ },
2864
+ update: async (id, body) => {
2865
+ let res = await this._update(
2866
+ this.svAPIEndpoint,
2867
+ this.contract._path + `/${id}`,
2868
+ body
2869
+ );
2870
+ return res;
2871
+ },
2872
+ remove: async (id) => {
2873
+ let res = await this._delete(
2874
+ this.svAPIEndpoint,
2875
+ this.contract._path + `/${id}`
2876
+ );
2877
+ return res;
2878
+ },
2879
+ };
2880
+ this.contractInstallment = {
2881
+ _path: Repzo._end_points.CONTRACT_INSTALLMENT,
2882
+ find: async (params) => {
2883
+ let res = await this._fetch(
2884
+ this.svAPIEndpoint,
2885
+ this.contractInstallment._path,
2886
+ params
2887
+ );
2888
+ return res;
2889
+ },
2890
+ get: async (id, params) => {
2891
+ return await this._fetch(
2892
+ this.svAPIEndpoint,
2893
+ this.contractInstallment._path + `/${id}`,
2894
+ params
2895
+ );
2896
+ },
2897
+ create: async (body) => {
2898
+ let res = await this._create(
2899
+ this.svAPIEndpoint,
2900
+ this.contractInstallment._path,
2901
+ body
2902
+ );
2903
+ return res;
2904
+ },
2905
+ update: async (id, body) => {
2906
+ let res = await this._update(
2907
+ this.svAPIEndpoint,
2908
+ this.contractInstallment._path + `/${id}`,
2909
+ body
2910
+ );
2911
+ return res;
2912
+ },
2913
+ remove: async (id) => {
2914
+ let res = await this._delete(
2915
+ this.svAPIEndpoint,
2916
+ this.contractInstallment._path + `/${id}`
2917
+ );
2918
+ return res;
2919
+ },
2920
+ };
2884
2921
  this.svAPIEndpoint =
2885
2922
  !options?.env || options?.env == "production"
2886
2923
  ? "https://sv.api.repzo.me"
@@ -2901,6 +2938,9 @@ export default class Repzo {
2901
2938
  this.timeout = 180000;
2902
2939
  }
2903
2940
  }
2941
+ static get END_POINTS() {
2942
+ return Repzo._end_points;
2943
+ }
2904
2944
  async _fetch(baseUrl, path, params) {
2905
2945
  if (params) {
2906
2946
  params = normalizeParams(params);
@@ -2945,6 +2985,94 @@ export default class Repzo {
2945
2985
  return res.data;
2946
2986
  }
2947
2987
  }
2988
+ Repzo._end_points = {
2989
+ CLIENT: "client",
2990
+ PRODUCT: "product",
2991
+ VARIANT: "variant",
2992
+ CATEGORY: "product-category",
2993
+ SUB_CATEGORY: "product-sub-category",
2994
+ BRAND: "product-brand",
2995
+ PRODUCT_GROUP: "product-group",
2996
+ TAX: "tax",
2997
+ MEASUREUNIT: "measureunits",
2998
+ MEASUREUNIT_FAMILY: "measureunit-family",
2999
+ MEDIA: "media",
3000
+ PRICELIST: "pricelists",
3001
+ PRICELIST_ITEM: "pricelistsitems",
3002
+ TEAM: "teams",
3003
+ RETURN_REASON: "return-reason",
3004
+ REP: "rep",
3005
+ TAG: "tag",
3006
+ WAREHOUSE: "warehouse",
3007
+ ROUTE: "route",
3008
+ PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
3009
+ CHANNEL: "client-channel",
3010
+ SPECIALITY: "speciality",
3011
+ CLIENT_CONTACT: "client-contact",
3012
+ PAYMENT_TERM: "paymentterms",
3013
+ BANK: "banks",
3014
+ BANK_LIST: "bankslists",
3015
+ CUSTOM_STATUS: "custom-status",
3016
+ CUSTOM_LIST: "custom-list",
3017
+ CUSTOM_LIST_ITEM: "custom-list-item",
3018
+ INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
3019
+ WORKORDER: "workorder",
3020
+ WORKORDER_REQUEST: "workorder-request",
3021
+ SUPPLIER: "supplier",
3022
+ QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
3023
+ VISIT: "visit",
3024
+ INVOICE: "fullinvoices",
3025
+ PROFORMA: "proforma",
3026
+ PAYMENT: "payments",
3027
+ REFUND: "refund",
3028
+ SETTLEMENT: "settlement",
3029
+ CHECK: "checks",
3030
+ DAY: "day",
3031
+ RECEIVING_MATERIAL: "receiving-material",
3032
+ ADJUST_ACCOUNT: "adjust-account",
3033
+ TRANSFER: "transfer",
3034
+ MSL: "msl",
3035
+ MSL_PRODUCT: "msl-products",
3036
+ MEDIA_STORAGE: "media-storage",
3037
+ STORECHECK_TEMPLATE: "storecheck-template",
3038
+ ACTIVITY_STORECHECK: "activity-storecheck",
3039
+ ADJUST_INVENTORY: "adjust-inventory",
3040
+ INVENTORY: "inventory",
3041
+ INTEGRATION_APP: "integration-app",
3042
+ JOIN_ACTIONS_WEBHOOK: "svix-integration",
3043
+ INTEGRATION_ACTION_LOG: "integration-action-log",
3044
+ INTEGRATION_COMMAND_LOG: "integration-command-log",
3045
+ PATCH_ACTION: "patch-action",
3046
+ UPDATE_INTEGRATION_META: "update-integration-meta",
3047
+ ASSET_PART_TYPE: "asset-part-type",
3048
+ ASSET_PART: "asset-part",
3049
+ ASSET_PART_UNIT: "asset-part-unit",
3050
+ ASSET_PART_RECEIVAL: "asset-part-receival",
3051
+ ASSET_PART_TRANSFER: "asset-part-transfer",
3052
+ RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
3053
+ STORE_ASSET_PART_UNIT: "store-asset-part-unit",
3054
+ OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
3055
+ OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
3056
+ ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
3057
+ OCR_INVOICE_JOB: "ocr-invoice-job",
3058
+ OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
3059
+ SETTINGS: "settings",
3060
+ MAIL_UNSUBSCRIBE: "mail-unsubscribe",
3061
+ APPROVAL_REQUEST: "approval-request",
3062
+ SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
3063
+ CLIENT_LOCATION: "client-location",
3064
+ ASSET_TYPE: "asset-type",
3065
+ ASSET: "asset",
3066
+ ASSET_UNIT: "asset-unit",
3067
+ WORKORDER_PORTAL: "workorder-portal",
3068
+ APPROVAL: "approvals",
3069
+ ACTIVITY_FEEDBACK: "activity-feedback",
3070
+ ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
3071
+ FEEDBACK_OPTION: "feedback-options",
3072
+ WORKORDER_CATEGORY: "workorder-category",
3073
+ CONTRACT: "contract",
3074
+ CONTRACT_INSTALLMENT: "contract-installment",
3075
+ };
2948
3076
  Repzo.ActionLogs = class {
2949
3077
  constructor(superThis, sync_id) {
2950
3078
  this.superThis = superThis;