@tagsamurai/fats-api-services 1.0.0-alpha.227 → 1.0.0-alpha.229

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.
@@ -22,6 +22,9 @@ const createAxiosInstance = (config = {}, useDifferentHeaders = false) => {
22
22
  });
23
23
  return instance;
24
24
  };
25
+ const SERVER_PREFIX = {
26
+ SETTINGS_ATTRIBUTES: "settings-attribute"
27
+ };
25
28
  const queryParamsStringfy = (data) => {
26
29
  if (!data || typeof data === "string") {
27
30
  return;
@@ -68,156 +71,185 @@ const getAssetsFile = async (file, type = "excel") => {
68
71
  );
69
72
  return response;
70
73
  };
71
- const API$T = createAxiosInstance({
72
- prefix: "/settings-attribute/v2"
74
+ const API$S = createAxiosInstance({
75
+ prefix: "/settings-attribute-go/v2"
73
76
  });
74
77
  const getEndpoint = (type) => {
75
78
  return type === "category" ? "category" : "groups";
76
79
  };
77
80
  const GroupCategoryServices = {
78
81
  getGroupCategory: (type, params) => {
79
- return API$T.get(`/${getEndpoint(type)}/tree`, { params });
82
+ return API$S.get(`/${getEndpoint(type)}/tree`, { params });
80
83
  },
81
84
  // Doesn't exist in company plan other than "Basic"
82
85
  getGroupCategoryList: (type, groupId, params) => {
83
- return API$T.get(`/${getEndpoint(type)}/${groupId}`, { params });
86
+ return API$S.get(`/${getEndpoint(type)}/${groupId}`, { params });
84
87
  },
85
88
  getNames: (type) => {
86
- return API$T.get(`/${getEndpoint(type)}/names`);
89
+ return API$S.get(`/${getEndpoint(type)}/names`);
87
90
  },
88
91
  getCodes: (type) => {
89
- return API$T.get(`/${getEndpoint(type)}/codes`);
92
+ return API$S.get(`/${getEndpoint(type)}/codes`);
90
93
  },
91
94
  postCreateGroupCategory: (type, body) => {
92
- return API$T.post(`/${getEndpoint(type)}`, body);
95
+ return API$S.post(`/${getEndpoint(type)}`, body);
93
96
  },
94
97
  putEditGroupCategory: (type, body, objectId) => {
95
- return API$T.put(`/${getEndpoint(type)}/${objectId}`, body);
98
+ return API$S.put(`/${getEndpoint(type)}/${objectId}`, body);
96
99
  },
97
100
  // Doesn't exist in company plan other than "Enterprise"
98
101
  putMoveGroup: (body, objectId) => {
99
- return API$T.put(`/groups/${objectId}/move-group`, body);
102
+ return API$S.put(`/groups/${objectId}/move-group`, body);
100
103
  },
101
104
  // Doesn't exist in company plan other than "Enterprise"
102
105
  putEditBulkGroups: async (body) => {
103
- return API$T.put("/groups/bulk", body);
106
+ return API$S.put("/groups/bulk", body);
104
107
  },
105
108
  deleteGroupCategory: (type, body, objectId) => {
106
- return API$T.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
109
+ return API$S.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
107
110
  }
108
111
  };
109
- const API$S = createAxiosInstance({
110
- prefix: "/settings-attribute/v2/alias-code"
112
+ const API$R = createAxiosInstance({
113
+ prefix: "/settings-attribute-go/v2/alias-code"
111
114
  });
112
115
  const AliasCodeServices = {
113
116
  getAliasCode: () => {
114
- return API$S.get("/");
117
+ return API$R.get("/");
115
118
  },
116
119
  postAliasCode: (data) => {
117
- return API$S.post("/", data);
120
+ return API$R.post("/", data);
118
121
  },
119
122
  getAliasCodeList: (params) => {
120
- return API$S.get(`/${params.object}/code-list`, { params });
123
+ return API$R.get(`/${params.object}/code-list`, { params });
121
124
  }
122
125
  };
123
- const API$R = createAxiosInstance({
124
- prefix: "/settings-attribute/v2/general-settings"
126
+ const API$Q = createAxiosInstance({
127
+ prefix: "/settings-attribute-go/v2/general-settings"
125
128
  });
126
129
  const GeneralSettingsServices = {
127
130
  getGeneralSettings: () => {
128
- return API$R.get("/");
131
+ return API$Q.get("/");
129
132
  },
130
133
  putUpdateGeneralSettings: (data) => {
131
- return API$R.put("/", data);
134
+ return API$Q.put("/", data);
132
135
  }
133
136
  };
134
- const API$Q = createAxiosInstance({
137
+ const API$P = createAxiosInstance({
138
+ prefix: "/settings-attribute-go/v2/custom-field"
139
+ });
140
+ const CustomFieldServices = {
141
+ getCustomField: async (params) => {
142
+ return API$P.get("/", { params });
143
+ },
144
+ getCustomFieldsByCategory: (category, params) => {
145
+ return API$P.get(`/${category}`, { params });
146
+ },
147
+ getOptions: async (params) => {
148
+ return API$P.get("/options", { params });
149
+ },
150
+ postCreateCustomField: async (params, data) => {
151
+ return API$P.post("/", data, { params });
152
+ },
153
+ putEditCustomField: async (params, data, id) => {
154
+ return API$P.put(`/${id}`, data, { params });
155
+ },
156
+ putChangeStatus: async (params, data) => {
157
+ return API$P.put("/bulk", data, { params });
158
+ },
159
+ deleteCustomField: async (params) => {
160
+ return API$P.delete("/bulk", { params });
161
+ },
162
+ getUsedCustomFields: async () => {
163
+ return API$P.get("/used-by-assets");
164
+ }
165
+ };
166
+ const API$O = createAxiosInstance({
135
167
  prefix: "/v2",
136
168
  env: "APP_LOGS_NOTIFICATION_API"
137
169
  });
138
170
  const NotificationApprovalServices = {
139
171
  getTotalApprovals: () => {
140
- return API$Q.get("/approval/count");
172
+ return API$O.get("/approval/count");
141
173
  }
142
174
  };
143
- const API$P = createAxiosInstance({
175
+ const API$N = createAxiosInstance({
144
176
  prefix: "/v2",
145
177
  env: "APP_LOGS_NOTIFICATION_API"
146
178
  });
147
179
  const ChangelogServices$1 = {
148
180
  getActionLog: (params) => {
149
- return API$P.get("/change-log", { params });
181
+ return API$N.get("/change-log", { params });
150
182
  },
151
183
  getActionLogOption: (params) => {
152
- return API$P.get("/change-log/options", { params });
184
+ return API$N.get("/change-log/options", { params });
153
185
  },
154
186
  getSessionLogList: (params) => {
155
- return API$P.get("/session-log", { params });
187
+ return API$N.get("/session-log", { params });
156
188
  },
157
189
  getUserDetailSystemLogList: (params) => {
158
- return API$P.get("/change-log", { params });
190
+ return API$N.get("/change-log", { params });
159
191
  },
160
192
  getUserDetailSystemLogOption: (params) => {
161
- return API$P.get("/change-log/options", { params });
193
+ return API$N.get("/change-log/options", { params });
162
194
  },
163
195
  /**
164
196
  * Retrieves the transaction log.
165
197
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
166
198
  */
167
199
  getTransactionLog: (params) => {
168
- return API$P.get("/transaction-log", { params });
200
+ return API$N.get("/transaction-log", { params });
169
201
  },
170
202
  /**
171
203
  * Retrieves the transaction log options.
172
204
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
173
205
  */
174
206
  getTransactionLogOption: (params) => {
175
- return API$P.get("/transaction-log/options", { params });
207
+ return API$N.get("/transaction-log/options", { params });
176
208
  },
177
209
  postScanLog: (body) => {
178
- return API$P.post("/transaction-log/scan-log", body);
210
+ return API$N.post("/transaction-log/scan-log", body);
179
211
  }
180
212
  };
181
- const API$O = createAxiosInstance({
213
+ const API$M = createAxiosInstance({
182
214
  prefix: "/utility/v2"
183
215
  });
184
216
  const ChangelogServices = {
185
217
  getActionLog: (params) => {
186
- return API$O.get("/change-log", { params });
218
+ return API$M.get("/change-log", { params });
187
219
  },
188
220
  getActionLogOption: (params) => {
189
- return API$O.get("/change-log/options", { params });
221
+ return API$M.get("/change-log/options", { params });
190
222
  },
191
223
  getSessionLogList: (params) => {
192
- return API$O.get("/session-log", { params });
224
+ return API$M.get("/session-log", { params });
193
225
  },
194
226
  getTransactionLog: (params) => {
195
- return API$O.get("/transaction-log", { params });
227
+ return API$M.get("/transaction-log", { params });
196
228
  },
197
229
  /**
198
230
  * Retrieves the transaction log options.
199
231
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
200
232
  */
201
233
  getTransactionLogOption: (params) => {
202
- return API$O.get("/transaction-log/options", { params });
234
+ return API$M.get("/transaction-log/options", { params });
203
235
  },
204
236
  getUserDetailSystemLogList: (params) => {
205
- return API$O.get("/change-log", { params });
237
+ return API$M.get("/change-log", { params });
206
238
  },
207
239
  getUserDetailSystemLogOption: (params) => {
208
- return API$O.get("/change-log/options", { params });
240
+ return API$M.get("/change-log/options", { params });
209
241
  },
210
242
  getUserDetailUserLogBorrowingList: (userId, params) => {
211
- return API$O.get(`/borrowing-log/${userId}`, { params });
243
+ return API$M.get(`/borrowing-log/${userId}`, { params });
212
244
  },
213
245
  getUserDetailUserLogAssignmentList: (userId, params) => {
214
- return API$O.get(`/assignment-log/${userId}`, { params });
246
+ return API$M.get(`/assignment-log/${userId}`, { params });
215
247
  },
216
248
  getUserDetailUserLogBorrowingOption: (userId, params) => {
217
- return API$O.get(`/borrowing-log/${userId}/options`, { params });
249
+ return API$M.get(`/borrowing-log/${userId}/options`, { params });
218
250
  },
219
251
  getUserDetailUserLogAssignmentOption: (userId, params) => {
220
- return API$O.get(`/assignment-log/${userId}/options`, { params });
252
+ return API$M.get(`/assignment-log/${userId}/options`, { params });
221
253
  }
222
254
  };
223
255
  const AssetsAPIs$1 = createAxiosInstance({
@@ -330,7 +362,7 @@ const AssetServices$1 = {
330
362
  }
331
363
  };
332
364
  const AssetsAPIs = createAxiosInstance({
333
- prefix: "/assets/v2/assets"
365
+ prefix: "/assets-go/v2/assets"
334
366
  });
335
367
  const AssetServices = {
336
368
  getAllAssets: (params) => {
@@ -409,7 +441,7 @@ const AssetServices = {
409
441
  return AssetsAPIs.delete("/attachment/bulk", { params });
410
442
  }
411
443
  };
412
- const API$N = createAxiosInstance({
444
+ const API$L = createAxiosInstance({
413
445
  prefix: "/tracking/v2/missing"
414
446
  });
415
447
  const MissingServices$2 = {
@@ -418,171 +450,171 @@ const MissingServices$2 = {
418
450
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
419
451
  */
420
452
  putMarkAsFound: (body) => {
421
- return API$N.put("/found", body);
453
+ return API$L.put("/found", body);
422
454
  },
423
455
  putReportMissing: (id, body) => {
424
- return API$N.put(`/report-missing/${id}`, body);
456
+ return API$L.put(`/report-missing/${id}`, body);
425
457
  },
426
458
  getData: (params) => {
427
- return API$N.get("/", { params });
459
+ return API$L.get("/", { params });
428
460
  },
429
461
  getDetail: (id) => {
430
- return API$N.get(`/${id}`);
462
+ return API$L.get(`/${id}`);
431
463
  },
432
464
  getOptions: (params) => {
433
- return API$N.get("/options", { params });
465
+ return API$L.get("/options", { params });
434
466
  }
435
467
  };
436
- const API$M = createAxiosInstance({
468
+ const API$K = createAxiosInstance({
437
469
  prefix: "/missing-tracking/v2"
438
470
  });
439
471
  const MissingServices$1 = {
440
472
  putFoundAsset: (body) => {
441
- return API$M.put("/found", body);
473
+ return API$K.put("/found", body);
442
474
  },
443
475
  putReportMissing: (id, body) => {
444
- return API$M.put(`/${id}/report-missing`, body);
476
+ return API$K.put(`/${id}/report-missing`, body);
445
477
  },
446
478
  getData: (params) => {
447
- return API$M.get("/", { params });
479
+ return API$K.get("/", { params });
448
480
  },
449
481
  getDataOptions: (params) => {
450
- return API$M.get("/options", { params });
482
+ return API$K.get("/options", { params });
451
483
  },
452
484
  getDetail: (id) => {
453
- return API$M.get(`/${id}`);
485
+ return API$K.get(`/${id}`);
454
486
  }
455
487
  };
456
- const API$L = createAxiosInstance({
488
+ const API$J = createAxiosInstance({
457
489
  prefix: "/v2/notification",
458
490
  env: "APP_LOGS_NOTIFICATION_API"
459
491
  });
460
492
  const NotificationServices$1 = {
461
493
  getNotifications: (params) => {
462
- return API$L.get("/", { params });
494
+ return API$J.get("/", { params });
463
495
  },
464
496
  readNotification: (id) => {
465
- return API$L.put(`/${id}`);
497
+ return API$J.put(`/${id}`);
466
498
  }
467
499
  };
468
- const API$K = createAxiosInstance({
500
+ const API$I = createAxiosInstance({
469
501
  prefix: "/utility/v2/notification"
470
502
  });
471
503
  const NotificationServices = {
472
504
  getNotifications: (params) => {
473
- return API$K.get("/", { params });
505
+ return API$I.get("/", { params });
474
506
  },
475
507
  readNotification: (id) => {
476
- return API$K.put(`/${id}`);
508
+ return API$I.put(`/${id}`);
477
509
  }
478
510
  };
479
- const API$J = createAxiosInstance({
511
+ const API$H = createAxiosInstance({
480
512
  prefix: "/v2/session-log",
481
513
  env: "APP_LOGS_NOTIFICATION_API"
482
514
  });
483
515
  const SessionLogServices = {
484
516
  postLogout: () => {
485
- return API$J.post("/logout");
517
+ return API$H.post("/logout");
486
518
  }
487
519
  };
488
- const API$I = createAxiosInstance({
520
+ const API$G = createAxiosInstance({
489
521
  prefix: "/tag/v2"
490
522
  });
491
523
  const TAGServices = {
492
524
  getScanQR: (tag) => {
493
- return API$I.get("/qr", { params: { tag } });
525
+ return API$G.get("/qr", { params: { tag } });
494
526
  },
495
527
  getScanRFID: (tag) => {
496
- return API$I.get("/rfid", { params: { tag } });
528
+ return API$G.get("/rfid", { params: { tag } });
497
529
  },
498
530
  getRFIDQRTAG: (params) => {
499
- return API$I.get("/rfid-qr/scan", { params });
531
+ return API$G.get("/rfid-qr/scan", { params });
500
532
  },
501
533
  getEventLog: (params) => {
502
- return API$I.get("/tag-transaction/event-log", { params });
534
+ return API$G.get("/tag-transaction/event-log", { params });
503
535
  },
504
536
  // Tab All
505
537
  getRfidQrAll: (path, params) => {
506
- return API$I.get(`/${path}`, { params });
538
+ return API$G.get(`/${path}`, { params });
507
539
  },
508
540
  // Tab Paired
509
541
  getRfidQrPaired: (tagType, viewBy, params) => {
510
- return API$I.get(`/${tagType}/paired/${viewBy}`, { params });
542
+ return API$G.get(`/${tagType}/paired/${viewBy}`, { params });
511
543
  },
512
544
  postAddTAGtoPrelist: (body, destination) => {
513
- return API$I.post(`/prelist/${destination}/asset-name`, body);
545
+ return API$G.post(`/prelist/${destination}/asset-name`, body);
514
546
  },
515
547
  postAddTAGtoReplacePrelist: (body) => {
516
- return API$I.post("/prelist/replace-tag", body);
548
+ return API$G.post("/prelist/replace-tag", body);
517
549
  },
518
550
  postAddTAGToPrelistUnpair: (body) => {
519
- return API$I.post("/prelist/unpair-tag", body);
551
+ return API$G.post("/prelist/unpair-tag", body);
520
552
  },
521
553
  postAddTAGtoPending: (body) => {
522
- return API$I.post("/pending-changes", body);
554
+ return API$G.post("/pending-changes", body);
523
555
  },
524
556
  // Available Tab
525
557
  getRFIDQrAvailable: (tagType, params) => {
526
- return API$I.get(`/${tagType}/available`, { params });
558
+ return API$G.get(`/${tagType}/available`, { params });
527
559
  },
528
560
  // Damaged TAB
529
561
  getRFIDQrDamaged: (tagType, params) => {
530
- return API$I.get(`/${tagType}/damaged`, { params });
562
+ return API$G.get(`/${tagType}/damaged`, { params });
531
563
  },
532
564
  // RFID and QR Module
533
565
  getRFIDandQRList: (params) => {
534
- return API$I.get("/rfid-qr", { params });
566
+ return API$G.get("/rfid-qr", { params });
535
567
  },
536
568
  deleteUnpairTAG: (body) => {
537
- return API$I.delete("/rfid-qr", { data: { data: body } });
569
+ return API$G.delete("/rfid-qr", { data: { data: body } });
538
570
  },
539
571
  postPairTAG: (body) => {
540
- return API$I.post("/rfid-qr", { body: { data: body } });
572
+ return API$G.post("/rfid-qr", { body: { data: body } });
541
573
  },
542
574
  // RFID To Be Returned
543
575
  getToBeReturnedTAGList: (params) => {
544
- return API$I.get("/rfid/to-be-returned", { params });
576
+ return API$G.get("/rfid/to-be-returned", { params });
545
577
  },
546
578
  // Handover TAG
547
579
  putHandoverTAG: (body) => {
548
- return API$I.put("/rfid/handover", { body: { data: body } });
580
+ return API$G.put("/rfid/handover", { body: { data: body } });
549
581
  },
550
582
  // Table Filter
551
583
  getFilterOptions: (path, params) => {
552
- return API$I.get(`/${path}/options`, { params });
584
+ return API$G.get(`/${path}/options`, { params });
553
585
  },
554
586
  getHolderListOptions: (params) => {
555
- return API$I.get("/rfid/holder-list/options", { params });
587
+ return API$G.get("/rfid/holder-list/options", { params });
556
588
  },
557
589
  getHolderList: (params) => {
558
- return API$I.get("/rfid/holder-list", { params });
590
+ return API$G.get("/rfid/holder-list", { params });
559
591
  },
560
592
  putAuditTAG: (body, tagType) => {
561
- return API$I.put(`/${tagType}/audit`, body);
593
+ return API$G.put(`/${tagType}/audit`, body);
562
594
  },
563
595
  postLogAudit: (body) => {
564
- return API$I.post("/tag-transaction/log-audit", body);
596
+ return API$G.post("/tag-transaction/log-audit", body);
565
597
  },
566
598
  postCreateQr: (amount) => {
567
599
  const body = { amount };
568
- return API$I.post("/qr", body);
600
+ return API$G.post("/qr", body);
569
601
  },
570
602
  putReportTAG: (id, body) => {
571
- return API$I.put(`/tag-transaction/report/${id}`, body);
603
+ return API$G.put(`/tag-transaction/report/${id}`, body);
572
604
  },
573
605
  putReportTAGBulk: (body) => {
574
- return API$I.put("/tag-transaction/report/bulk", body);
606
+ return API$G.put("/tag-transaction/report/bulk", body);
575
607
  },
576
608
  putDeclineReport: (body, tagType) => {
577
- return API$I.put(`/report/decline-report/${tagType}`, body);
609
+ return API$G.put(`/report/decline-report/${tagType}`, body);
578
610
  }
579
611
  };
580
- const API$H = createAxiosInstance({
612
+ const API$F = createAxiosInstance({
581
613
  prefix: "/tracking/v2/tracking"
582
614
  });
583
615
  const MissingServices = {
584
616
  getTrackingDetail: (trackingId) => {
585
- return API$H.get(`/${trackingId}`);
617
+ return API$F.get(`/${trackingId}`);
586
618
  },
587
619
  putFoundAsset: (tag, groupId, serialNumber) => {
588
620
  const params = {
@@ -591,43 +623,43 @@ const MissingServices = {
591
623
  serialNumber,
592
624
  type: "Global"
593
625
  };
594
- return API$H.put("/scan", void 0, { params });
626
+ return API$F.put("/scan", void 0, { params });
595
627
  },
596
628
  putReportPermanentlyMissing: (trackingId, body) => {
597
- return API$H.put(`/report-permanently-missing/${trackingId}`, body);
629
+ return API$F.put(`/report-permanently-missing/${trackingId}`, body);
598
630
  },
599
631
  putMoveBack: (body) => {
600
- return API$H.put("/tracking/move-back", body);
632
+ return API$F.put("/tracking/move-back", body);
601
633
  }
602
634
  };
603
- const API$G = createAxiosInstance({
635
+ const API$E = createAxiosInstance({
604
636
  prefix: "/settings-user-role/v2"
605
637
  });
606
638
  const UserServices$1 = {
607
639
  reLogin: (body) => {
608
- return API$G.post("/auth/login", body);
640
+ return API$E.post("/auth/login", body);
609
641
  },
610
642
  changePassword: (body) => {
611
- return API$G.put("/users/change-password", body);
643
+ return API$E.put("/users/change-password", body);
612
644
  },
613
645
  /**
614
646
  * Retrieves the user list as dropdown options.
615
647
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
616
648
  */
617
649
  getUserDropdown: (params) => {
618
- return API$G.get("/users/dropdown", { params });
650
+ return API$E.get("/users/dropdown", { params });
619
651
  },
620
652
  getUserOptions: (params) => {
621
- return API$G.get("/users/options", { params });
653
+ return API$E.get("/users/options", { params });
622
654
  },
623
655
  getUserList: (params) => {
624
- return API$G.get("/users", { params });
656
+ return API$E.get("/users", { params });
625
657
  },
626
658
  getUserDetail: (id) => {
627
- return API$G.get(`/users/${id}`);
659
+ return API$E.get(`/users/${id}`);
628
660
  },
629
661
  putSetActiveBulk: (data) => {
630
- return API$G.put("/users/set-active-bulk", data);
662
+ return API$E.put("/users/set-active-bulk", data);
631
663
  },
632
664
  // User Detail
633
665
  /**
@@ -638,62 +670,62 @@ const UserServices$1 = {
638
670
  */
639
671
  getUserDetailSystemRoles: (id, params, permissionType) => {
640
672
  const additionalPath = permissionType ? `/${permissionType}` : "";
641
- return API$G.get(`/user-detail/${id}/system-roles${additionalPath}`, {
673
+ return API$E.get(`/user-detail/${id}/system-roles${additionalPath}`, {
642
674
  params
643
675
  });
644
676
  },
645
677
  getUserDetailTransactionRoleList: (id, params) => {
646
- return API$G.get(`/user-detail/${id}/transaction-role-list`, { params });
678
+ return API$E.get(`/user-detail/${id}/transaction-role-list`, { params });
647
679
  },
648
680
  postUserDetailAddTransactionRole: (userId, data) => {
649
- return API$G.post(`/user-detail/${userId}/add-transaction-role`, data);
681
+ return API$E.post(`/user-detail/${userId}/add-transaction-role`, data);
650
682
  },
651
683
  deleteUserDetailTransactionRole: (userId, data) => {
652
- return API$G.delete(`/user-detail/${userId}/delete-transaction-role`, {
684
+ return API$E.delete(`/user-detail/${userId}/delete-transaction-role`, {
653
685
  data
654
686
  });
655
687
  },
656
688
  putUserDetailEditTransactionRole: (userId, data) => {
657
- return API$G.put(`/user-detail/${userId}/edit-transaction-role`, data);
689
+ return API$E.put(`/user-detail/${userId}/edit-transaction-role`, data);
658
690
  },
659
691
  putAssignGroup: (data, permissionType, id) => {
660
- return API$G.put(`/user-detail/${id}/system-roles/${permissionType}`, data);
692
+ return API$E.put(`/user-detail/${id}/system-roles/${permissionType}`, data);
661
693
  },
662
694
  getUserDetailUserLogBorrowingList: (userId, params) => {
663
- return API$G.get(`/users-log/${userId}/borrowing`, { params });
695
+ return API$E.get(`/users-log/${userId}/borrowing`, { params });
664
696
  },
665
697
  getUserDetailUserLogAssignmentList: (userId, params) => {
666
- return API$G.get(`/users-log/${userId}/assignment`, { params });
698
+ return API$E.get(`/users-log/${userId}/assignment`, { params });
667
699
  },
668
700
  getUserDetailUserLogBorrowingOption: (userId, params) => {
669
- return API$G.get(`/users-log/${userId}/borrowing/option`, { params });
701
+ return API$E.get(`/users-log/${userId}/borrowing/option`, { params });
670
702
  },
671
703
  getUserDetailUserLogAssignmentOption: (userId, params) => {
672
- return API$G.get(`/users-log/${userId}/assignment/option`, { params });
704
+ return API$E.get(`/users-log/${userId}/assignment/option`, { params });
673
705
  },
674
706
  getUserDetailTransactionAdminLogList: (userId, params) => {
675
- return API$G.get(`/users-log/${userId}/transaction-log`, { params });
707
+ return API$E.get(`/users-log/${userId}/transaction-log`, { params });
676
708
  },
677
709
  getUserDetailTransactionAdminLogOption: (userId, params) => {
678
- return API$G.get(`/users-log/${userId}/transaction-log/option`, { params });
710
+ return API$E.get(`/users-log/${userId}/transaction-log/option`, { params });
679
711
  },
680
712
  getUserDetailUserAssetBorrowedList: (userId, params) => {
681
- return API$G.get(`/user-detail/${userId}/assets/borrowed`, { params });
713
+ return API$E.get(`/user-detail/${userId}/assets/borrowed`, { params });
682
714
  },
683
715
  getUserDetailUserAssetAssignedList: (userId, params) => {
684
- return API$G.get(`/user-detail/${userId}/assets/assigned`, { params });
716
+ return API$E.get(`/user-detail/${userId}/assets/assigned`, { params });
685
717
  },
686
718
  getUserDetailUserAssetBorrowedOption: (userId, params) => {
687
- return API$G.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
719
+ return API$E.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
688
720
  },
689
721
  getUserDetailUserAssetAssignedOption: (userId, params) => {
690
- return API$G.get(`/user-detail/${userId}/assets/assigned/option`, { params });
722
+ return API$E.get(`/user-detail/${userId}/assets/assigned/option`, { params });
691
723
  },
692
724
  getUserAndSubUser: (params) => {
693
- return API$G.get("/users/user-and-sub-user", { params });
725
+ return API$E.get("/users/user-and-sub-user", { params });
694
726
  },
695
727
  getUserAndSubUserOptions: () => {
696
- return API$G.get("/users/user-and-sub-user/options", {
728
+ return API$E.get("/users/user-and-sub-user/options", {
697
729
  params: {
698
730
  divisionOptions: "true",
699
731
  positionOptions: "true"
@@ -701,8 +733,8 @@ const UserServices$1 = {
701
733
  });
702
734
  }
703
735
  };
704
- const API$F = createAxiosInstance({
705
- prefix: "/settings-user-role/v2"
736
+ const API$D = createAxiosInstance({
737
+ prefix: "/settings-user-role-go/v2"
706
738
  });
707
739
  const UserServices = {
708
740
  /**
@@ -710,19 +742,19 @@ const UserServices = {
710
742
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
711
743
  */
712
744
  getUserDropdown: (params) => {
713
- return API$F.get("/users/dropdown", { params });
745
+ return API$D.get("/users/dropdown", { params });
714
746
  },
715
747
  getUserOptions: (params) => {
716
- return API$F.get("/users/options", { params });
748
+ return API$D.get("/users/options", { params });
717
749
  },
718
750
  getUserList: (params) => {
719
- return API$F.get("/users", { params });
751
+ return API$D.get("/users", { params });
720
752
  },
721
753
  getUserDetail: (id) => {
722
- return API$F.get(`/users/${id}`);
754
+ return API$D.get(`/users/${id}`);
723
755
  },
724
756
  putSetActiveBulk: (data) => {
725
- return API$F.put("/users/set-active-bulk", data);
757
+ return API$D.put("/users/set-active-bulk", data);
726
758
  },
727
759
  // User Detail
728
760
  /**
@@ -733,128 +765,128 @@ const UserServices = {
733
765
  */
734
766
  getUserDetailSystemRoles: (id, params, permissionType) => {
735
767
  const additionalPath = permissionType ? `/${permissionType}/groups` : "";
736
- return API$F.get(`/users/${id}/system-roles${additionalPath}`, {
768
+ return API$D.get(`/users/${id}/system-roles${additionalPath}`, {
737
769
  params
738
770
  });
739
771
  },
740
772
  getUserDetailTransactionRoleList: (id, params) => {
741
- return API$F.get(`/users/${id}/transaction-roles`, { params });
773
+ return API$D.get(`/users/${id}/transaction-roles`, { params });
742
774
  },
743
775
  postUserDetailAddTransactionRole: (userId, data) => {
744
- return API$F.post(`/users/${userId}/add-transaction-role`, data);
776
+ return API$D.post(`/users/${userId}/add-transaction-role`, data);
745
777
  },
746
778
  deleteUserDetailTransactionRole: (userId, body) => {
747
- return API$F.put(`/users/${userId}/delete-transaction-role`, body);
779
+ return API$D.put(`/users/${userId}/delete-transaction-role`, body);
748
780
  },
749
781
  putUserDetailEditTransactionRole: (userId, data) => {
750
- return API$F.put(`/users/${userId}/edit-transaction-role`, data);
782
+ return API$D.put(`/users/${userId}/edit-transaction-role`, data);
751
783
  },
752
784
  putAssignGroup: (data, permissionType, id) => {
753
- return API$F.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
785
+ return API$D.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
754
786
  },
755
787
  putRoleSetActive: (body, userId) => {
756
- return API$F.put(`/users/${userId}/system-roles/set-active-bulk`, body);
788
+ return API$D.put(`/users/${userId}/system-roles/set-active-bulk`, body);
757
789
  },
758
790
  getUserDetailTransactionAdminLogList: (userId, params) => {
759
- return API$F.get(`/users/${userId}/transaction-log`, { params });
791
+ return API$D.get(`/users/${userId}/transaction-log`, { params });
760
792
  },
761
793
  getUserDetailTransactionAdminLogOption: (userId, params) => {
762
- return API$F.get(`/users/${userId}/transaction-log/option`, { params });
794
+ return API$D.get(`/users/${userId}/transaction-log/option`, { params });
763
795
  },
764
796
  getUserDetailUserAssetBorrowedList: (userId, params) => {
765
- return API$F.get(`/users/${userId}/borrowed-asset`, { params });
797
+ return API$D.get(`/users/${userId}/borrowed-asset`, { params });
766
798
  },
767
799
  getUserDetailUserAssetAssignedList: (userId, params) => {
768
- return API$F.get(`/users/${userId}/assigned-asset`, { params });
800
+ return API$D.get(`/users/${userId}/assigned-asset`, { params });
769
801
  },
770
802
  getUserDetailUserAssetBorrowedOption: (userId, params) => {
771
- return API$F.get(`/users/${userId}/borrowed-asset/option`, { params });
803
+ return API$D.get(`/users/${userId}/borrowed-asset/option`, { params });
772
804
  },
773
805
  getUserDetailUserAssetAssignedOption: (userId, params) => {
774
- return API$F.get(`/users/${userId}/assigned-asset/option`, { params });
806
+ return API$D.get(`/users/${userId}/assigned-asset/option`, { params });
775
807
  }
776
808
  };
777
- const API$E = createAxiosInstance({
809
+ const API$C = createAxiosInstance({
778
810
  prefix: "/settings-user-role/v2/sub-users"
779
811
  });
780
812
  const SubUserServices$1 = {
781
813
  // Sub User
782
814
  getSubUserList: (userId, params) => {
783
- return API$E.get(`/${userId}`, { params });
815
+ return API$C.get(`/${userId}`, { params });
784
816
  },
785
817
  getSubUserOptions: (userId, params) => {
786
- return API$E.get(`/${userId}/option`, { params });
818
+ return API$C.get(`/${userId}/option`, { params });
787
819
  },
788
820
  postCreateSubUser: (userId, data) => {
789
821
  const headers = { "Content-Type": "multipart/form-data" };
790
- return API$E.post(`/${userId}`, data, { headers });
822
+ return API$C.post(`/${userId}`, data, { headers });
791
823
  },
792
824
  putSubUserSetActiveBulk: (data) => {
793
- return API$E.put("/set-active-bulk", data);
825
+ return API$C.put("/set-active-bulk", data);
794
826
  },
795
827
  deleteSubUser: (subUserIds) => {
796
- return API$E.delete("/bulk", { data: { subUserIds } });
828
+ return API$C.delete("/bulk", { data: { subUserIds } });
797
829
  },
798
830
  putEditSubUser: (userId, data) => {
799
831
  const headers = { "Content-Type": "multipart/form-data" };
800
- return API$E.put(`/${userId}`, data, { headers });
832
+ return API$C.put(`/${userId}`, data, { headers });
801
833
  },
802
834
  getBorrowedAsset: (id, params) => {
803
- return API$E.get(`/${id}/borrowed-asset`, { params });
835
+ return API$C.get(`/${id}/borrowed-asset`, { params });
804
836
  },
805
837
  getBorrowedAssetOptions: (id, params) => {
806
- return API$E.get(`/${id}/borrowed-asset/options`, { params });
838
+ return API$C.get(`/${id}/borrowed-asset/options`, { params });
807
839
  }
808
840
  };
809
- const API$D = createAxiosInstance({
810
- prefix: "/settings-user-role/v2/users"
841
+ const API$B = createAxiosInstance({
842
+ prefix: "/settings-user-role-go/v2/users"
811
843
  });
812
844
  const SubUserServices = {
813
845
  // Sub User
814
846
  getSubUserList: (userId, params) => {
815
- return API$D.get(`/${userId}/sub-users`, { params });
847
+ return API$B.get(`/${userId}/sub-users`, { params });
816
848
  },
817
849
  getSubUserOptions: (userId, params) => {
818
- return API$D.get(`/${userId}/sub-users/option`, { params });
850
+ return API$B.get(`/${userId}/sub-users/option`, { params });
819
851
  },
820
852
  postCreateSubUser: (userId, data) => {
821
853
  const headers = { "Content-Type": "multipart/form-data" };
822
- return API$D.post(`/${userId}/sub-users`, data, { headers });
854
+ return API$B.post(`/${userId}/sub-users`, data, { headers });
823
855
  },
824
856
  putSubUserSetActiveBulk: (userId, data) => {
825
- return API$D.put(`/${userId}/sub-users/set-active-bulk`, data);
857
+ return API$B.put(`/${userId}/sub-users/set-active-bulk`, data);
826
858
  },
827
859
  deleteSubUser: (userId, subUserIds) => {
828
- return API$D.put(`/${userId}/sub-users/bulk`, { subUserIds });
860
+ return API$B.put(`/${userId}/sub-users/bulk`, { subUserIds });
829
861
  },
830
862
  putEditSubUser: (userId, subUserId, data) => {
831
863
  const headers = { "Content-Type": "multipart/form-data" };
832
- return API$D.put(`/${userId}/sub-users/${subUserId}`, data, {
864
+ return API$B.put(`/${userId}/sub-users/${subUserId}`, data, {
833
865
  headers
834
866
  });
835
867
  },
836
868
  getBorrowedAsset: (userId, subUserId, params) => {
837
- return API$D.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
869
+ return API$B.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
838
870
  params
839
871
  });
840
872
  },
841
873
  getBorrowedAssetOptions: (userId, subUserId, params) => {
842
- return API$D.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
874
+ return API$B.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
843
875
  params
844
876
  });
845
877
  },
846
878
  getAssignedAsset: (userId, subUserId, params) => {
847
- return API$D.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
879
+ return API$B.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
848
880
  params
849
881
  });
850
882
  },
851
883
  getAssignedAssetOptions: (userId, subUserId, params) => {
852
- return API$D.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
884
+ return API$B.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
853
885
  params
854
886
  });
855
887
  }
856
888
  };
857
- const API$C = createAxiosInstance({
889
+ const API$A = createAxiosInstance({
858
890
  env: "APP_ADMIN_API",
859
891
  prefix: "/settings-attribute/languages"
860
892
  });
@@ -865,7 +897,7 @@ const I18nService = {
865
897
  * @returns A promise resolving to a key-value record of messages.
866
898
  */
867
899
  getMessages: (isoCode) => {
868
- return API$C.get(`/${isoCode}/translations`);
900
+ return API$A.get(`/${isoCode}/translations`);
869
901
  },
870
902
  /**
871
903
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
@@ -873,7 +905,7 @@ const I18nService = {
873
905
  * @returns Promise Array of options
874
906
  */
875
907
  getLanguageOptions: async () => {
876
- const { data } = await API$C.get("/dropdown");
908
+ const { data } = await API$A.get("/dropdown");
877
909
  return data.data;
878
910
  },
879
911
  /**
@@ -883,7 +915,7 @@ const I18nService = {
883
915
  * @returns Promise LanguageMeta
884
916
  */
885
917
  getLanguageOptionMeta: async (isoCode) => {
886
- const { data } = await API$C.get(
918
+ const { data } = await API$A.get(
887
919
  "/dropdown/" + isoCode
888
920
  );
889
921
  return data.data;
@@ -895,80 +927,22 @@ const I18nService = {
895
927
  * @param locale Target locale code.
896
928
  */
897
929
  translateText: async (key, locale) => {
898
- const { data } = await API$C.post("/translate", {
930
+ const { data } = await API$A.post("/translate", {
899
931
  q: key,
900
932
  target: locale
901
933
  });
902
934
  return data.data.translations[key];
903
935
  }
904
936
  };
905
- const API$B = createAxiosInstance({
937
+ const API$z = createAxiosInstance({
906
938
  prefix: "/dashboard/v2/dashboard"
907
939
  });
908
940
  const DashboardServices = {
909
941
  getLatestTask: (params) => {
910
- return API$B.get("/latest-task", { params });
942
+ return API$z.get("/latest-task", { params });
911
943
  },
912
944
  getSummary: (params) => {
913
- return API$B.get("/summary", { params });
914
- }
915
- };
916
- const API$A = createAxiosInstance({
917
- prefix: "/settings-attribute/v2/custom-field"
918
- });
919
- const CustomFieldServices$1 = {
920
- getCustomField: async (params) => {
921
- return API$A.get("/", { params });
922
- },
923
- getCustomFieldsByCategory: (category, params) => {
924
- return API$A.get(`/${category}`, { params });
925
- },
926
- getOptions: async (params) => {
927
- return API$A.get("/options", { params });
928
- },
929
- postCreateCustomField: async (params, data) => {
930
- return API$A.post("/", data, { params });
931
- },
932
- putEditCustomField: async (params, data, id) => {
933
- return API$A.put(`/${id}`, data, { params });
934
- },
935
- putChangeStatus: async (params, data) => {
936
- return API$A.put("/bulk", data, { params });
937
- },
938
- deleteCustomField: async (data) => {
939
- return API$A.delete("/bulk", { data });
940
- },
941
- getUsedCustomFields: async () => {
942
- return API$A.get("/used-by-assets");
943
- }
944
- };
945
- const API$z = createAxiosInstance({
946
- prefix: "/settings-attribute/v2/custom-field"
947
- });
948
- const CustomFieldServices = {
949
- getCustomField: async (params) => {
950
- return API$z.get("/", { params });
951
- },
952
- getCustomFieldsByCategory: (category, params) => {
953
- return API$z.get(`/${category}`, { params });
954
- },
955
- getOptions: async (params) => {
956
- return API$z.get("/options", { params });
957
- },
958
- postCreateCustomField: async (params, data) => {
959
- return API$z.post("/", data, { params });
960
- },
961
- putEditCustomField: async (params, data, id) => {
962
- return API$z.put(`/${id}`, data, { params });
963
- },
964
- putChangeStatus: async (params, data) => {
965
- return API$z.put("/bulk", data, { params });
966
- },
967
- deleteCustomField: async (params) => {
968
- return API$z.delete("/bulk", { params });
969
- },
970
- getUsedCustomFields: async () => {
971
- return API$z.get("/used-by-assets");
945
+ return API$z.get("/summary", { params });
972
946
  }
973
947
  };
974
948
  const API$y = ({ headers = {}, params = {} } = {}) => {
@@ -1305,7 +1279,7 @@ const RoleServices$1 = {
1305
1279
  }
1306
1280
  };
1307
1281
  const API$r = createAxiosInstance({
1308
- prefix: "/settings-user-role/v2"
1282
+ prefix: "/settings-user-role-go/v2"
1309
1283
  });
1310
1284
  const RoleServices = {
1311
1285
  /**
@@ -1432,7 +1406,7 @@ const OpenAPIServices$1 = {
1432
1406
  }
1433
1407
  };
1434
1408
  const API$p = createAxiosInstance({
1435
- prefix: "/settings-attribute/v2/open-api"
1409
+ prefix: "/settings-attribute-go/v2/open-api"
1436
1410
  });
1437
1411
  const OpenAPIServices = {
1438
1412
  putGenerateToken: () => {
@@ -1477,7 +1451,7 @@ const ImportServices$1 = {
1477
1451
  }
1478
1452
  };
1479
1453
  const API$n = createAxiosInstance({
1480
- prefix: "/import/v2"
1454
+ prefix: "/import-go/v2"
1481
1455
  });
1482
1456
  const ImportServices = {
1483
1457
  getImport: (importUrl, params) => {
@@ -1681,7 +1655,7 @@ const AssignmentServices$1 = {
1681
1655
  }
1682
1656
  };
1683
1657
  const API$k = createAxiosInstance({
1684
- prefix: "/assignment/v2"
1658
+ prefix: "/assignment-go/v2"
1685
1659
  });
1686
1660
  const AssignmentServices = {
1687
1661
  getTransactionData: (params) => {
@@ -1779,7 +1753,7 @@ const LicenseServices$1 = {
1779
1753
  ...LicenseAssetAddonServices
1780
1754
  };
1781
1755
  const API$i = createAxiosInstance({
1782
- prefix: "/license/v2"
1756
+ prefix: "/license-go/v2"
1783
1757
  });
1784
1758
  const TotalLicenseServices = {
1785
1759
  getTotalLicense: () => {
@@ -2071,7 +2045,7 @@ const MyAssetServices$1 = {
2071
2045
  }
2072
2046
  };
2073
2047
  const API$d = createAxiosInstance({
2074
- prefix: "/assets/v2/my-assets"
2048
+ prefix: "/assets-go/v2/my-assets"
2075
2049
  });
2076
2050
  const MyAssetServices = {
2077
2051
  getAssigned: async (params) => {
@@ -2111,7 +2085,7 @@ const RepairServices = {
2111
2085
  }
2112
2086
  };
2113
2087
  const API$b = createAxiosInstance({
2114
- prefix: "/settings-user-role/v2/auth"
2088
+ prefix: "/settings-user-role-go/v2/auth"
2115
2089
  });
2116
2090
  const onRejected$1 = (error) => {
2117
2091
  var _a, _b, _c, _d;
@@ -2393,7 +2367,7 @@ const DisposalServices$1 = {
2393
2367
  }
2394
2368
  };
2395
2369
  const API$9 = createAxiosInstance({
2396
- prefix: "/transfer/v2"
2370
+ prefix: "/transfer-go/v2"
2397
2371
  });
2398
2372
  const TransferServicesGo = {
2399
2373
  getTransactionData: (params) => {
@@ -2459,7 +2433,7 @@ const TransactionSettingServices = {
2459
2433
  }
2460
2434
  };
2461
2435
  const API$4 = createAxiosInstance({
2462
- prefix: "/borrowing/v2"
2436
+ prefix: "/borrowing-go/v2"
2463
2437
  });
2464
2438
  const BorrowServicesGo = {
2465
2439
  getTransactions: async (params) => {
@@ -2487,7 +2461,7 @@ const BorrowServicesGo = {
2487
2461
  }
2488
2462
  };
2489
2463
  const API$3 = createAxiosInstance({
2490
- prefix: "/disposal/v2/"
2464
+ prefix: "/disposal-go/v2/"
2491
2465
  });
2492
2466
  const DisposalServices = {
2493
2467
  getReportedDisposal: (params) => {
@@ -2556,7 +2530,7 @@ const ReportServices$1 = {
2556
2530
  }
2557
2531
  };
2558
2532
  const API$1 = createAxiosInstance({
2559
- prefix: "/report/v2/reports"
2533
+ prefix: "/report-go/v2/reports"
2560
2534
  });
2561
2535
  const ReportServices = {
2562
2536
  getReportList: (params) => {
@@ -2591,7 +2565,7 @@ const ReportServices = {
2591
2565
  }
2592
2566
  };
2593
2567
  const API = createAxiosInstance({
2594
- prefix: "/settings-attribute/v2/asset-name-policy"
2568
+ prefix: `/${SERVER_PREFIX.SETTINGS_ATTRIBUTES}/v2/asset-name-policy`
2595
2569
  });
2596
2570
  const AssetPolicyServices = {
2597
2571
  getList: (params) => {
@@ -2619,8 +2593,7 @@ export {
2619
2593
  BrandServices,
2620
2594
  ChangelogServices$1 as ChangelogServices,
2621
2595
  CountryStateServices,
2622
- CustomFieldServices$1 as CustomFieldServices,
2623
- CustomFieldServices as CustomFieldServicesGo,
2596
+ CustomFieldServices,
2624
2597
  DamageServices$1 as DamageServices,
2625
2598
  DamageServices as DamageServicesGo,
2626
2599
  DashboardServices,