@tagsamurai/fats-api-services 1.0.0-alpha.230 → 1.0.0-alpha.231

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.
@@ -1,5 +1,5 @@
1
1
  import axios from "axios";
2
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_ADMIN_API": "https://dev-admin-api.tagsamurai.com", "VITE_APP_API": "https://dev-api.tagsamurai.com", "VITE_APP_ASSETS_URL": "https://assets.tagsamurai.com", "VITE_APP_COUNTRY_STATE_API": "https://api.countrystatecity.in", "VITE_APP_COUNTRY_STATE_API_KEY": "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", "VITE_APP_GLOBAL_SETTINGS_API": "https://dev-api.global-settings.tagsamurai.com", "VITE_APP_LOGS_NOTIFICATION_API": "https://dev-api-logs-notification.tagsamurai.com" };
2
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_ADMIN_API": "https://dev-admin-api.tagsamurai.com", "VITE_APP_API": "https://dev-api.tagsamurai.com/fam", "VITE_APP_ASSETS_URL": "https://assets.tagsamurai.com", "VITE_APP_COUNTRY_STATE_API": "https://api.countrystatecity.in", "VITE_APP_COUNTRY_STATE_API_KEY": "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", "VITE_APP_GLOBAL_SETTINGS_API": "https://dev-api.global-settings.tagsamurai.com", "VITE_APP_LOGS_NOTIFICATION_API": "https://dev-api-logs-notification.tagsamurai.com", "VITE_APP_TAGSAMURAI_API": "https://dev-api.tagsamurai.com" };
3
3
  const getBaseURL = (env = "APP_API") => {
4
4
  return __vite_import_meta_env__["VITE_" + env];
5
5
  };
@@ -22,9 +22,6 @@ const createAxiosInstance = (config = {}, useDifferentHeaders = false) => {
22
22
  });
23
23
  return instance;
24
24
  };
25
- const SERVER_PREFIX = {
26
- SETTINGS_ATTRIBUTES: "settings-attribute"
27
- };
28
25
  const queryParamsStringfy = (data) => {
29
26
  if (!data || typeof data === "string") {
30
27
  return;
@@ -71,298 +68,50 @@ const getAssetsFile = async (file, type = "excel") => {
71
68
  );
72
69
  return response;
73
70
  };
74
- const API$S = createAxiosInstance({
75
- prefix: "/settings-attribute-go/v2"
76
- });
77
- const getEndpoint = (type) => {
78
- return type === "category" ? "category" : "groups";
79
- };
80
- const GroupCategoryServices = {
81
- getGroupCategory: (type, params) => {
82
- return API$S.get(`/${getEndpoint(type)}/tree`, { params });
83
- },
84
- // Doesn't exist in company plan other than "Basic"
85
- getGroupCategoryList: (type, groupId, params) => {
86
- return API$S.get(`/${getEndpoint(type)}/${groupId}`, { params });
87
- },
88
- getNames: (type) => {
89
- return API$S.get(`/${getEndpoint(type)}/names`);
90
- },
91
- getCodes: (type) => {
92
- return API$S.get(`/${getEndpoint(type)}/codes`);
93
- },
94
- postCreateGroupCategory: (type, body) => {
95
- return API$S.post(`/${getEndpoint(type)}`, body);
96
- },
97
- putEditGroupCategory: (type, body, objectId) => {
98
- return API$S.put(`/${getEndpoint(type)}/${objectId}`, body);
99
- },
100
- // Doesn't exist in company plan other than "Enterprise"
101
- putMoveGroup: (body, objectId) => {
102
- return API$S.put(`/groups/${objectId}/move-group`, body);
103
- },
104
- // Doesn't exist in company plan other than "Enterprise"
105
- putEditBulkGroups: async (body) => {
106
- return API$S.put("/groups/bulk", body);
107
- },
108
- deleteGroupCategory: (type, body, objectId) => {
109
- return API$S.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
110
- }
111
- };
112
- const API$R = createAxiosInstance({
113
- prefix: "/settings-attribute-go/v2/alias-code"
114
- });
115
- const AliasCodeServices = {
116
- getAliasCode: () => {
117
- return API$R.get("/");
118
- },
119
- postAliasCode: (data) => {
120
- return API$R.post("/", data);
121
- },
122
- getAliasCodeList: (params) => {
123
- return API$R.get(`/${params.object}/code-list`, { params });
124
- }
125
- };
126
- const API$Q = createAxiosInstance({
127
- prefix: "/settings-attribute-go/v2/general-settings"
128
- });
129
- const GeneralSettingsServices = {
130
- getGeneralSettings: () => {
131
- return API$Q.get("/");
132
- },
133
- putUpdateGeneralSettings: (data) => {
134
- return API$Q.put("/", data);
135
- }
136
- };
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({
167
- prefix: "/v2",
168
- env: "APP_LOGS_NOTIFICATION_API"
169
- });
170
- const NotificationApprovalServices = {
171
- getTotalApprovals: () => {
172
- return API$O.get("/approval/count");
173
- }
174
- };
175
- const API$N = createAxiosInstance({
176
- prefix: "/v2",
177
- env: "APP_LOGS_NOTIFICATION_API"
178
- });
179
- const ChangelogServices$1 = {
180
- getActionLog: (params) => {
181
- return API$N.get("/change-log", { params });
182
- },
183
- getActionLogOption: (params) => {
184
- return API$N.get("/change-log/options", { params });
185
- },
186
- getSessionLogList: (params) => {
187
- return API$N.get("/session-log", { params });
188
- },
189
- getUserDetailSystemLogList: (params) => {
190
- return API$N.get("/change-log", { params });
191
- },
192
- getUserDetailSystemLogOption: (params) => {
193
- return API$N.get("/change-log/options", { params });
194
- },
195
- /**
196
- * Retrieves the transaction log.
197
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
198
- */
199
- getTransactionLog: (params) => {
200
- return API$N.get("/transaction-log", { params });
201
- },
202
- /**
203
- * Retrieves the transaction log options.
204
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
205
- */
206
- getTransactionLogOption: (params) => {
207
- return API$N.get("/transaction-log/options", { params });
208
- },
209
- postScanLog: (body) => {
210
- return API$N.post("/transaction-log/scan-log", body);
211
- }
212
- };
213
- const API$M = createAxiosInstance({
71
+ const API$E = createAxiosInstance({
214
72
  prefix: "/utility/v2"
215
73
  });
216
- const ChangelogServices = {
74
+ const ChangelogServices$1 = {
217
75
  getActionLog: (params) => {
218
- return API$M.get("/change-log", { params });
76
+ return API$E.get("/change-log", { params });
219
77
  },
220
78
  getActionLogOption: (params) => {
221
- return API$M.get("/change-log/options", { params });
79
+ return API$E.get("/change-log/options", { params });
222
80
  },
223
81
  getSessionLogList: (params) => {
224
- return API$M.get("/session-log", { params });
82
+ return API$E.get("/session-log", { params });
225
83
  },
226
84
  getTransactionLog: (params) => {
227
- return API$M.get("/transaction-log", { params });
85
+ return API$E.get("/transaction-log", { params });
228
86
  },
229
87
  /**
230
88
  * Retrieves the transaction log options.
231
89
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
232
90
  */
233
91
  getTransactionLogOption: (params) => {
234
- return API$M.get("/transaction-log/options", { params });
92
+ return API$E.get("/transaction-log/options", { params });
235
93
  },
236
94
  getUserDetailSystemLogList: (params) => {
237
- return API$M.get("/change-log", { params });
95
+ return API$E.get("/change-log", { params });
238
96
  },
239
97
  getUserDetailSystemLogOption: (params) => {
240
- return API$M.get("/change-log/options", { params });
98
+ return API$E.get("/change-log/options", { params });
241
99
  },
242
100
  getUserDetailUserLogBorrowingList: (userId, params) => {
243
- return API$M.get(`/borrowing-log/${userId}`, { params });
101
+ return API$E.get(`/borrowing-log/${userId}`, { params });
244
102
  },
245
103
  getUserDetailUserLogAssignmentList: (userId, params) => {
246
- return API$M.get(`/assignment-log/${userId}`, { params });
104
+ return API$E.get(`/assignment-log/${userId}`, { params });
247
105
  },
248
106
  getUserDetailUserLogBorrowingOption: (userId, params) => {
249
- return API$M.get(`/borrowing-log/${userId}/options`, { params });
107
+ return API$E.get(`/borrowing-log/${userId}/options`, { params });
250
108
  },
251
109
  getUserDetailUserLogAssignmentOption: (userId, params) => {
252
- return API$M.get(`/assignment-log/${userId}/options`, { params });
253
- }
254
- };
255
- const AssetsAPIs$1 = createAxiosInstance({
256
- prefix: "/assets/v2/assets"
257
- });
258
- const AttachmentAPIs = createAxiosInstance({
259
- prefix: "/assets/v2/attachment"
260
- });
261
- const AssetServices$1 = {
262
- getScanTag: (tag) => {
263
- return AssetsAPIs$1.get("/scan", { params: { tag } });
264
- },
265
- getAllAssets: (params) => {
266
- return AssetsAPIs$1.get("/", { params });
267
- },
268
- getAllAssetsOptions: (params) => {
269
- return AssetsAPIs$1.get("/options", { params });
270
- },
271
- getAvailableAssets: (params) => {
272
- return AssetsAPIs$1.get("/available", { params });
273
- },
274
- getAvailableAssetOptions: (params) => {
275
- return AssetsAPIs$1.get("/available/options", { params });
276
- },
277
- scanAsset: (tag) => {
278
- return AssetsAPIs$1.get("", { params: { tag } });
279
- },
280
- getAssetsById: (_id, params) => {
281
- return AssetsAPIs$1.get("/by-id", { params: { _id, ...params } });
282
- },
283
- getOptions: (endpoint, params) => {
284
- return AssetsAPIs$1.get(endpoint ? `/${endpoint}/options` : "/options", {
285
- params
286
- });
287
- },
288
- getUnlinkedAssets: (params) => {
289
- return AssetsAPIs$1.get("/unlinked", { params });
290
- },
291
- getAssetDetail: (id, params) => {
292
- return AssetsAPIs$1.get(`/${id}`, { params });
293
- },
294
- getAssetNameTotal: (assetNameId) => {
295
- return AssetsAPIs$1.get(`/name-amount/${assetNameId}`);
296
- },
297
- getLinkedAssetFamily: (id) => {
298
- return AssetsAPIs$1.get("/family", { params: { id } });
299
- },
300
- matchAssetWithTag: (id, tag) => {
301
- const params = {
302
- _id: JSON.stringify([id]),
303
- tag
304
- };
305
- return AssetsAPIs$1.get("/by-id", { params });
306
- },
307
- postRegisterAsset: (body) => {
308
- const headers = { "Content-Type": "multipart/form-data" };
309
- return AssetsAPIs$1.post("/bulk", body, { headers });
310
- },
311
- putEditAsset: (id, body) => {
312
- const headers = { "Content-Type": "multipart/form-data" };
313
- return AssetsAPIs$1.put(`/${id}`, body, { headers });
314
- },
315
- putEditDetailCustomField: (id, body) => {
316
- const headers = { "Content-Type": "multipart/form-data" };
317
- return AssetsAPIs$1.put(`/${id}`, body, { headers });
318
- },
319
- getLinkedAsset: (assetId, params) => {
320
- return AssetsAPIs$1.get(`/${assetId}/linked`, { params });
321
- },
322
- getPurchase: (assetId) => {
323
- return AssetsAPIs$1.get(`/${assetId}/purchase`);
324
- },
325
- putPurchase: (body, assetId) => {
326
- return AssetsAPIs$1.put(`/${assetId}/purchase`, body);
327
- },
328
- getAccounting: (assetId, params) => {
329
- return AssetsAPIs$1.get(`/${assetId}/accounting`, { params });
330
- },
331
- getAssetFamily: (parentId) => {
332
- return AssetsAPIs$1.get(`/${parentId}/family`);
333
- },
334
- getLinkedAssetOption: (parentId, params) => {
335
- return AssetsAPIs$1.get(`/${parentId}/linked/options`, { params });
336
- },
337
- putLinkAsset: (body, parentId) => {
338
- return AssetsAPIs$1.put(`/${parentId}/link-assets`, body);
339
- },
340
- putUnlinkAsset: (body, parentId) => {
341
- return AssetsAPIs$1.put(`/${parentId}/remove-link-assets`, body);
342
- },
343
- // Asset Services prefixed by "attachment"
344
- getAttachment: (params) => {
345
- return AttachmentAPIs.get("", { params });
346
- },
347
- postAttachment: (body) => {
348
- const headers = { "Content-Type": "multipart/form-data" };
349
- return AttachmentAPIs.post("", body, { headers });
350
- },
351
- putAttachment: (body, id) => {
352
- const headers = { "Content-Type": "multipart/form-data" };
353
- return AttachmentAPIs.put(`/${id}`, body, { headers });
354
- },
355
- /**
356
- * Deletes the attachment with the given IDs.
357
- * @param {object} params - The request params containing the IDs of the attachments to delete.
358
- * @returns {Promise<AxiosResponse>}
359
- */
360
- deleteAttachment: (params) => {
361
- return AttachmentAPIs.delete("/bulk", { params });
110
+ return API$E.get(`/assignment-log/${userId}/options`, { params });
362
111
  }
363
112
  };
364
113
  const AssetsAPIs = createAxiosInstance({
365
- prefix: "/assets-go/v2/assets"
114
+ prefix: "/assets/v2/assets"
366
115
  });
367
116
  const AssetServices = {
368
117
  getAllAssets: (params) => {
@@ -441,646 +190,159 @@ const AssetServices = {
441
190
  return AssetsAPIs.delete("/attachment/bulk", { params });
442
191
  }
443
192
  };
444
- const API$L = createAxiosInstance({
445
- prefix: "/tracking/v2/missing"
446
- });
447
- const MissingServices$2 = {
448
- /**
449
- * To mark as found.
450
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
451
- */
452
- putMarkAsFound: (body) => {
453
- return API$L.put("/found", body);
454
- },
455
- putReportMissing: (id, body) => {
456
- return API$L.put(`/report-missing/${id}`, body);
457
- },
458
- getData: (params) => {
459
- return API$L.get("/", { params });
460
- },
461
- getDetail: (id) => {
462
- return API$L.get(`/${id}`);
463
- },
464
- getOptions: (params) => {
465
- return API$L.get("/options", { params });
466
- }
467
- };
468
- const API$K = createAxiosInstance({
193
+ const API$D = createAxiosInstance({
469
194
  prefix: "/missing-tracking/v2"
470
195
  });
471
196
  const MissingServices$1 = {
472
197
  putFoundAsset: (body) => {
473
- return API$K.put("/found", body);
198
+ return API$D.put("/found", body);
474
199
  },
475
200
  putReportMissing: (id, body) => {
476
- return API$K.put(`/${id}/report-missing`, body);
201
+ return API$D.put(`/${id}/report-missing`, body);
477
202
  },
478
203
  getData: (params) => {
479
- return API$K.get("/", { params });
204
+ return API$D.get("/", { params });
480
205
  },
481
206
  getDataOptions: (params) => {
482
- return API$K.get("/options", { params });
207
+ return API$D.get("/options", { params });
483
208
  },
484
209
  getDetail: (id) => {
485
- return API$K.get(`/${id}`);
486
- }
487
- };
488
- const API$J = createAxiosInstance({
489
- prefix: "/v2/notification",
490
- env: "APP_LOGS_NOTIFICATION_API"
491
- });
492
- const NotificationServices$1 = {
493
- getNotifications: (params) => {
494
- return API$J.get("/", { params });
495
- },
496
- readNotification: (id) => {
497
- return API$J.put(`/${id}`);
210
+ return API$D.get(`/${id}`);
498
211
  }
499
212
  };
500
- const API$I = createAxiosInstance({
213
+ const API$C = createAxiosInstance({
501
214
  prefix: "/utility/v2/notification"
502
215
  });
503
216
  const NotificationServices = {
504
217
  getNotifications: (params) => {
505
- return API$I.get("/", { params });
218
+ return API$C.get("/", { params });
506
219
  },
507
220
  readNotification: (id) => {
508
- return API$I.put(`/${id}`);
509
- }
510
- };
511
- const API$H = createAxiosInstance({
512
- prefix: "/v2/session-log",
513
- env: "APP_LOGS_NOTIFICATION_API"
514
- });
515
- const SessionLogServices = {
516
- postLogout: () => {
517
- return API$H.post("/logout");
221
+ return API$C.put(`/${id}`);
518
222
  }
519
223
  };
520
- const API$G = createAxiosInstance({
521
- prefix: "/tag/v2"
224
+ const API$B = createAxiosInstance({
225
+ prefix: "/settings-user-role/v2"
522
226
  });
523
- const TAGServices = {
524
- getScanQR: (tag) => {
525
- return API$G.get("/qr", { params: { tag } });
227
+ const UserServices = {
228
+ /**
229
+ * Retrieves the user list as dropdown options.
230
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
231
+ */
232
+ getUserDropdown: (params) => {
233
+ return API$B.get("/users/dropdown", { params });
526
234
  },
527
- getScanRFID: (tag) => {
528
- return API$G.get("/rfid", { params: { tag } });
235
+ getUserOptions: (params) => {
236
+ return API$B.get("/users/options", { params });
529
237
  },
530
- getRFIDQRTAG: (params) => {
531
- return API$G.get("/rfid-qr/scan", { params });
238
+ getUserList: (params) => {
239
+ return API$B.get("/users", { params });
532
240
  },
533
- getEventLog: (params) => {
534
- return API$G.get("/tag-transaction/event-log", { params });
241
+ getUserDetail: (id) => {
242
+ return API$B.get(`/users/${id}`);
535
243
  },
536
- // Tab All
537
- getRfidQrAll: (path, params) => {
538
- return API$G.get(`/${path}`, { params });
244
+ putSetActiveBulk: (data) => {
245
+ return API$B.put("/users/set-active-bulk", data);
539
246
  },
540
- // Tab Paired
541
- getRfidQrPaired: (tagType, viewBy, params) => {
542
- return API$G.get(`/${tagType}/paired/${viewBy}`, { params });
247
+ // User Detail
248
+ /**
249
+ *
250
+ * @param id {string} User's _id
251
+ * @param type {"Global" | "Group"} Whether the system role's type is global or group
252
+ * @param params {Record<string, unknown>}
253
+ */
254
+ getUserDetailSystemRoles: (id, params, permissionType) => {
255
+ const additionalPath = permissionType ? `/${permissionType}/groups` : "";
256
+ return API$B.get(`/users/${id}/system-roles${additionalPath}`, {
257
+ params
258
+ });
543
259
  },
544
- postAddTAGtoPrelist: (body, destination) => {
545
- return API$G.post(`/prelist/${destination}/asset-name`, body);
260
+ getUserDetailTransactionRoleList: (id, params) => {
261
+ return API$B.get(`/users/${id}/transaction-roles`, { params });
546
262
  },
547
- postAddTAGtoReplacePrelist: (body) => {
548
- return API$G.post("/prelist/replace-tag", body);
263
+ postUserDetailAddTransactionRole: (userId, data) => {
264
+ return API$B.post(`/users/${userId}/add-transaction-role`, data);
549
265
  },
550
- postAddTAGToPrelistUnpair: (body) => {
551
- return API$G.post("/prelist/unpair-tag", body);
266
+ deleteUserDetailTransactionRole: (userId, body) => {
267
+ return API$B.put(`/users/${userId}/delete-transaction-role`, body);
552
268
  },
553
- postAddTAGtoPending: (body) => {
554
- return API$G.post("/pending-changes", body);
269
+ putUserDetailEditTransactionRole: (userId, data) => {
270
+ return API$B.put(`/users/${userId}/edit-transaction-role`, data);
555
271
  },
556
- // Available Tab
557
- getRFIDQrAvailable: (tagType, params) => {
558
- return API$G.get(`/${tagType}/available`, { params });
272
+ putAssignGroup: (data, permissionType, id) => {
273
+ return API$B.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
559
274
  },
560
- // Damaged TAB
561
- getRFIDQrDamaged: (tagType, params) => {
562
- return API$G.get(`/${tagType}/damaged`, { params });
275
+ putRoleSetActive: (body, userId) => {
276
+ return API$B.put(`/users/${userId}/system-roles/set-active-bulk`, body);
563
277
  },
564
- // RFID and QR Module
565
- getRFIDandQRList: (params) => {
566
- return API$G.get("/rfid-qr", { params });
278
+ getUserDetailTransactionAdminLogList: (userId, params) => {
279
+ return API$B.get(`/users/${userId}/transaction-log`, { params });
567
280
  },
568
- deleteUnpairTAG: (body) => {
569
- return API$G.delete("/rfid-qr", { data: { data: body } });
281
+ getUserDetailTransactionAdminLogOption: (userId, params) => {
282
+ return API$B.get(`/users/${userId}/transaction-log/option`, { params });
570
283
  },
571
- postPairTAG: (body) => {
572
- return API$G.post("/rfid-qr", { body: { data: body } });
284
+ getUserDetailUserAssetBorrowedList: (userId, params) => {
285
+ return API$B.get(`/users/${userId}/borrowed-asset`, { params });
573
286
  },
574
- // RFID To Be Returned
575
- getToBeReturnedTAGList: (params) => {
576
- return API$G.get("/rfid/to-be-returned", { params });
287
+ getUserDetailUserAssetAssignedList: (userId, params) => {
288
+ return API$B.get(`/users/${userId}/assigned-asset`, { params });
577
289
  },
578
- // Handover TAG
579
- putHandoverTAG: (body) => {
580
- return API$G.put("/rfid/handover", { body: { data: body } });
581
- },
582
- // Table Filter
583
- getFilterOptions: (path, params) => {
584
- return API$G.get(`/${path}/options`, { params });
585
- },
586
- getHolderListOptions: (params) => {
587
- return API$G.get("/rfid/holder-list/options", { params });
588
- },
589
- getHolderList: (params) => {
590
- return API$G.get("/rfid/holder-list", { params });
591
- },
592
- putAuditTAG: (body, tagType) => {
593
- return API$G.put(`/${tagType}/audit`, body);
594
- },
595
- postLogAudit: (body) => {
596
- return API$G.post("/tag-transaction/log-audit", body);
597
- },
598
- postCreateQr: (amount) => {
599
- const body = { amount };
600
- return API$G.post("/qr", body);
601
- },
602
- putReportTAG: (id, body) => {
603
- return API$G.put(`/tag-transaction/report/${id}`, body);
604
- },
605
- putReportTAGBulk: (body) => {
606
- return API$G.put("/tag-transaction/report/bulk", body);
607
- },
608
- putDeclineReport: (body, tagType) => {
609
- return API$G.put(`/report/decline-report/${tagType}`, body);
610
- }
611
- };
612
- const API$F = createAxiosInstance({
613
- prefix: "/tracking/v2/tracking"
614
- });
615
- const MissingServices = {
616
- getTrackingDetail: (trackingId) => {
617
- return API$F.get(`/${trackingId}`);
618
- },
619
- putFoundAsset: (tag, groupId, serialNumber) => {
620
- const params = {
621
- tag,
622
- group: groupId,
623
- serialNumber,
624
- type: "Global"
625
- };
626
- return API$F.put("/scan", void 0, { params });
627
- },
628
- putReportPermanentlyMissing: (trackingId, body) => {
629
- return API$F.put(`/report-permanently-missing/${trackingId}`, body);
630
- },
631
- putMoveBack: (body) => {
632
- return API$F.put("/tracking/move-back", body);
633
- }
634
- };
635
- const API$E = createAxiosInstance({
636
- prefix: "/settings-user-role/v2"
637
- });
638
- const UserServices$1 = {
639
- reLogin: (body) => {
640
- return API$E.post("/auth/login", body);
641
- },
642
- changePassword: (body) => {
643
- return API$E.put("/users/change-password", body);
644
- },
645
- /**
646
- * Retrieves the user list as dropdown options.
647
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
648
- */
649
- getUserDropdown: (params) => {
650
- return API$E.get("/users/dropdown", { params });
651
- },
652
- getUserOptions: (params) => {
653
- return API$E.get("/users/options", { params });
654
- },
655
- getUserList: (params) => {
656
- return API$E.get("/users", { params });
657
- },
658
- getUserDetail: (id) => {
659
- return API$E.get(`/users/${id}`);
660
- },
661
- putSetActiveBulk: (data) => {
662
- return API$E.put("/users/set-active-bulk", data);
663
- },
664
- // User Detail
665
- /**
666
- *
667
- * @param id {string} User's _id
668
- * @param type {"Global" | "Group"} Whether the system role's type is global or group
669
- * @param params {Record<string, unknown>}
670
- */
671
- getUserDetailSystemRoles: (id, params, permissionType) => {
672
- const additionalPath = permissionType ? `/${permissionType}` : "";
673
- return API$E.get(`/user-detail/${id}/system-roles${additionalPath}`, {
674
- params
675
- });
676
- },
677
- getUserDetailTransactionRoleList: (id, params) => {
678
- return API$E.get(`/user-detail/${id}/transaction-role-list`, { params });
679
- },
680
- postUserDetailAddTransactionRole: (userId, data) => {
681
- return API$E.post(`/user-detail/${userId}/add-transaction-role`, data);
682
- },
683
- deleteUserDetailTransactionRole: (userId, data) => {
684
- return API$E.delete(`/user-detail/${userId}/delete-transaction-role`, {
685
- data
686
- });
687
- },
688
- putUserDetailEditTransactionRole: (userId, data) => {
689
- return API$E.put(`/user-detail/${userId}/edit-transaction-role`, data);
690
- },
691
- putAssignGroup: (data, permissionType, id) => {
692
- return API$E.put(`/user-detail/${id}/system-roles/${permissionType}`, data);
693
- },
694
- getUserDetailUserLogBorrowingList: (userId, params) => {
695
- return API$E.get(`/users-log/${userId}/borrowing`, { params });
696
- },
697
- getUserDetailUserLogAssignmentList: (userId, params) => {
698
- return API$E.get(`/users-log/${userId}/assignment`, { params });
699
- },
700
- getUserDetailUserLogBorrowingOption: (userId, params) => {
701
- return API$E.get(`/users-log/${userId}/borrowing/option`, { params });
702
- },
703
- getUserDetailUserLogAssignmentOption: (userId, params) => {
704
- return API$E.get(`/users-log/${userId}/assignment/option`, { params });
705
- },
706
- getUserDetailTransactionAdminLogList: (userId, params) => {
707
- return API$E.get(`/users-log/${userId}/transaction-log`, { params });
708
- },
709
- getUserDetailTransactionAdminLogOption: (userId, params) => {
710
- return API$E.get(`/users-log/${userId}/transaction-log/option`, { params });
711
- },
712
- getUserDetailUserAssetBorrowedList: (userId, params) => {
713
- return API$E.get(`/user-detail/${userId}/assets/borrowed`, { params });
714
- },
715
- getUserDetailUserAssetAssignedList: (userId, params) => {
716
- return API$E.get(`/user-detail/${userId}/assets/assigned`, { params });
717
- },
718
- getUserDetailUserAssetBorrowedOption: (userId, params) => {
719
- return API$E.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
290
+ getUserDetailUserAssetBorrowedOption: (userId, params) => {
291
+ return API$B.get(`/users/${userId}/borrowed-asset/option`, { params });
720
292
  },
721
293
  getUserDetailUserAssetAssignedOption: (userId, params) => {
722
- return API$E.get(`/user-detail/${userId}/assets/assigned/option`, { params });
723
- },
724
- getUserAndSubUser: (params) => {
725
- return API$E.get("/users/user-and-sub-user", { params });
726
- },
727
- getUserAndSubUserOptions: () => {
728
- return API$E.get("/users/user-and-sub-user/options", {
729
- params: {
730
- divisionOptions: "true",
731
- positionOptions: "true"
732
- }
733
- });
294
+ return API$B.get(`/users/${userId}/assigned-asset/option`, { params });
734
295
  }
735
296
  };
736
- const API$D = createAxiosInstance({
737
- prefix: "/settings-user-role-go/v2"
738
- });
739
- const UserServices = {
740
- /**
741
- * Retrieves the user list as dropdown options.
742
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
743
- */
744
- getUserDropdown: (params) => {
745
- return API$D.get("/users/dropdown", { params });
746
- },
747
- getUserOptions: (params) => {
748
- return API$D.get("/users/options", { params });
749
- },
750
- getUserList: (params) => {
751
- return API$D.get("/users", { params });
752
- },
753
- getUserDetail: (id) => {
754
- return API$D.get(`/users/${id}`);
755
- },
756
- putSetActiveBulk: (data) => {
757
- return API$D.put("/users/set-active-bulk", data);
758
- },
759
- // User Detail
760
- /**
761
- *
762
- * @param id {string} User's _id
763
- * @param type {"Global" | "Group"} Whether the system role's type is global or group
764
- * @param params {Record<string, unknown>}
765
- */
766
- getUserDetailSystemRoles: (id, params, permissionType) => {
767
- const additionalPath = permissionType ? `/${permissionType}/groups` : "";
768
- return API$D.get(`/users/${id}/system-roles${additionalPath}`, {
769
- params
770
- });
771
- },
772
- getUserDetailTransactionRoleList: (id, params) => {
773
- return API$D.get(`/users/${id}/transaction-roles`, { params });
774
- },
775
- postUserDetailAddTransactionRole: (userId, data) => {
776
- return API$D.post(`/users/${userId}/add-transaction-role`, data);
777
- },
778
- deleteUserDetailTransactionRole: (userId, body) => {
779
- return API$D.put(`/users/${userId}/delete-transaction-role`, body);
780
- },
781
- putUserDetailEditTransactionRole: (userId, data) => {
782
- return API$D.put(`/users/${userId}/edit-transaction-role`, data);
783
- },
784
- putAssignGroup: (data, permissionType, id) => {
785
- return API$D.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
786
- },
787
- putRoleSetActive: (body, userId) => {
788
- return API$D.put(`/users/${userId}/system-roles/set-active-bulk`, body);
789
- },
790
- getUserDetailTransactionAdminLogList: (userId, params) => {
791
- return API$D.get(`/users/${userId}/transaction-log`, { params });
792
- },
793
- getUserDetailTransactionAdminLogOption: (userId, params) => {
794
- return API$D.get(`/users/${userId}/transaction-log/option`, { params });
795
- },
796
- getUserDetailUserAssetBorrowedList: (userId, params) => {
797
- return API$D.get(`/users/${userId}/borrowed-asset`, { params });
798
- },
799
- getUserDetailUserAssetAssignedList: (userId, params) => {
800
- return API$D.get(`/users/${userId}/assigned-asset`, { params });
801
- },
802
- getUserDetailUserAssetBorrowedOption: (userId, params) => {
803
- return API$D.get(`/users/${userId}/borrowed-asset/option`, { params });
804
- },
805
- getUserDetailUserAssetAssignedOption: (userId, params) => {
806
- return API$D.get(`/users/${userId}/assigned-asset/option`, { params });
807
- }
808
- };
809
- const API$C = createAxiosInstance({
810
- prefix: "/settings-user-role/v2/sub-users"
811
- });
812
- const SubUserServices$1 = {
813
- // Sub User
814
- getSubUserList: (userId, params) => {
815
- return API$C.get(`/${userId}`, { params });
816
- },
817
- getSubUserOptions: (userId, params) => {
818
- return API$C.get(`/${userId}/option`, { params });
819
- },
820
- postCreateSubUser: (userId, data) => {
821
- const headers = { "Content-Type": "multipart/form-data" };
822
- return API$C.post(`/${userId}`, data, { headers });
823
- },
824
- putSubUserSetActiveBulk: (data) => {
825
- return API$C.put("/set-active-bulk", data);
826
- },
827
- deleteSubUser: (subUserIds) => {
828
- return API$C.delete("/bulk", { data: { subUserIds } });
829
- },
830
- putEditSubUser: (userId, data) => {
831
- const headers = { "Content-Type": "multipart/form-data" };
832
- return API$C.put(`/${userId}`, data, { headers });
833
- },
834
- getBorrowedAsset: (id, params) => {
835
- return API$C.get(`/${id}/borrowed-asset`, { params });
836
- },
837
- getBorrowedAssetOptions: (id, params) => {
838
- return API$C.get(`/${id}/borrowed-asset/options`, { params });
839
- }
840
- };
841
- const API$B = createAxiosInstance({
842
- prefix: "/settings-user-role-go/v2/users"
297
+ const API$A = createAxiosInstance({
298
+ prefix: "/settings-user-role/v2/users"
843
299
  });
844
300
  const SubUserServices = {
845
301
  // Sub User
846
302
  getSubUserList: (userId, params) => {
847
- return API$B.get(`/${userId}/sub-users`, { params });
303
+ return API$A.get(`/${userId}/sub-users`, { params });
848
304
  },
849
305
  getSubUserOptions: (userId, params) => {
850
- return API$B.get(`/${userId}/sub-users/option`, { params });
306
+ return API$A.get(`/${userId}/sub-users/option`, { params });
851
307
  },
852
308
  postCreateSubUser: (userId, data) => {
853
309
  const headers = { "Content-Type": "multipart/form-data" };
854
- return API$B.post(`/${userId}/sub-users`, data, { headers });
310
+ return API$A.post(`/${userId}/sub-users`, data, { headers });
855
311
  },
856
312
  putSubUserSetActiveBulk: (userId, data) => {
857
- return API$B.put(`/${userId}/sub-users/set-active-bulk`, data);
313
+ return API$A.put(`/${userId}/sub-users/set-active-bulk`, data);
858
314
  },
859
315
  deleteSubUser: (userId, subUserIds) => {
860
- return API$B.put(`/${userId}/sub-users/bulk`, { subUserIds });
316
+ return API$A.put(`/${userId}/sub-users/bulk`, { subUserIds });
861
317
  },
862
318
  putEditSubUser: (userId, subUserId, data) => {
863
319
  const headers = { "Content-Type": "multipart/form-data" };
864
- return API$B.put(`/${userId}/sub-users/${subUserId}`, data, {
320
+ return API$A.put(`/${userId}/sub-users/${subUserId}`, data, {
865
321
  headers
866
322
  });
867
323
  },
868
324
  getBorrowedAsset: (userId, subUserId, params) => {
869
- return API$B.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
325
+ return API$A.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
870
326
  params
871
327
  });
872
328
  },
873
329
  getBorrowedAssetOptions: (userId, subUserId, params) => {
874
- return API$B.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
330
+ return API$A.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
875
331
  params
876
332
  });
877
333
  },
878
334
  getAssignedAsset: (userId, subUserId, params) => {
879
- return API$B.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
335
+ return API$A.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
880
336
  params
881
337
  });
882
338
  },
883
339
  getAssignedAssetOptions: (userId, subUserId, params) => {
884
- return API$B.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
340
+ return API$A.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
885
341
  params
886
342
  });
887
343
  }
888
344
  };
889
- const API$A = createAxiosInstance({
890
- env: "APP_ADMIN_API",
891
- prefix: "/settings-attribute/languages"
892
- });
893
- const I18nService = {
894
- /**
895
- * Fetch all translation messages for a specific locale.
896
- * @param locale The locale code (e.g., 'en', 'id').
897
- * @returns A promise resolving to a key-value record of messages.
898
- */
899
- getMessages: (isoCode) => {
900
- return API$A.get(`/${isoCode}/translations`);
901
- },
902
- /**
903
- * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
904
- *
905
- * @returns Promise Array of options
906
- */
907
- getLanguageOptions: async () => {
908
- const { data } = await API$A.get("/dropdown");
909
- return data.data;
910
- },
911
- /**
912
- * Fetch single lang option meta data
913
- *
914
- * @param isoCode The locale code (e.g., 'en', 'id').
915
- * @returns Promise LanguageMeta
916
- */
917
- getLanguageOptionMeta: async (isoCode) => {
918
- const { data } = await API$A.get(
919
- "/dropdown/" + isoCode
920
- );
921
- return data.data;
922
- },
923
- /**
924
- * Translate a specific text to the target locale.
925
- *
926
- * @param key Unique translation key.
927
- * @param locale Target locale code.
928
- */
929
- translateText: async (key, locale) => {
930
- const { data } = await API$A.post("/translate", {
931
- q: key,
932
- target: locale
933
- });
934
- return data.data.translations[key];
935
- }
936
- };
937
345
  const API$z = createAxiosInstance({
938
- prefix: "/dashboard/v2/dashboard"
939
- });
940
- const DashboardServices = {
941
- getLatestTask: (params) => {
942
- return API$z.get("/latest-task", { params });
943
- },
944
- getSummary: (params) => {
945
- return API$z.get("/summary", { params });
946
- }
947
- };
948
- const API$y = ({ headers = {}, params = {} } = {}) => {
949
- const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
950
- const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
951
- const instance = axios.create({
952
- baseURL: `${BASE_URL}/v1`,
953
- headers: {
954
- "Content-type": "application/json",
955
- "X-CSCAPI-KEY": API_KEY,
956
- ...headers
957
- },
958
- params
959
- });
960
- return instance;
961
- };
962
- const CountryStateServices = {
963
- getCountry: () => {
964
- return API$y().get("/countries");
965
- },
966
- getState: (country) => {
967
- return API$y().get(`/countries/${country}/states`);
968
- },
969
- getCity: (country, state) => {
970
- return API$y().get(`/countries/${country}/states/${state}/cities`);
971
- }
972
- };
973
- const API$x = createAxiosInstance({
974
- prefix: "/routine/v2"
975
- });
976
- const ServiceCenterServices = {
977
- getList: (params) => {
978
- return API$x.get("/service-center", { params });
979
- },
980
- postList: (body) => {
981
- return API$x.post("/service-center", body);
982
- },
983
- putList: (id, body) => {
984
- return API$x.put(`/service-center/${id}`, body);
985
- },
986
- putActivate: (body) => {
987
- return API$x.put("/service-center/bulk", body);
988
- },
989
- getDetailList: (id) => {
990
- return API$x.get(`/service-center/${id}`);
991
- },
992
- getListOptions: (params) => {
993
- return API$x.get("/service-center/options", { params });
994
- },
995
- deleteList: (params) => {
996
- return API$x.delete("/service-center", { params });
997
- },
998
- // Activities
999
- getActivities: (params) => {
1000
- return API$x.get("/service-activities", { params });
1001
- },
1002
- getActivityOptions: (params) => {
1003
- return API$x.get("/service-activities/options", { params });
1004
- },
1005
- getActivityDetail: (id) => {
1006
- return API$x.get(`/service-activities/${id}`);
1007
- },
1008
- getActivityLog: (id) => {
1009
- return API$x.get(`/service-activities/${id}/activity-log`);
1010
- }
1011
- };
1012
- const API$w = createAxiosInstance({
1013
- prefix: "/settings-attribute/v2/brands"
1014
- });
1015
- const BrandServices = {
1016
- getDropdown: (params) => {
1017
- return API$w.get("/dropdown", { params });
1018
- }
1019
- };
1020
- const API$v = createAxiosInstance({
1021
- prefix: "/file-manager/v2"
1022
- });
1023
- const FileManagerServices$1 = {
1024
- /**
1025
- * Get storage information.
1026
- *
1027
- * @returns {Promise<AxiosResponse>} The Axios Response.
1028
- */
1029
- getStorageInformation: () => {
1030
- return API$v.get("/files/storage");
1031
- },
1032
- /**
1033
- * Get file manager data.
1034
- *
1035
- * @param {FileType} type - The type of the file.
1036
- * @param {FileManagerFilterParams} [params] - The parameters for filtering.
1037
- * @returns {Promise<AxiosResponse>} The Axios Response.
1038
- */
1039
- getFileManager: (type, params) => {
1040
- return API$v.get(`/${type}`, { params });
1041
- },
1042
- /**
1043
- * Get file manager options.
1044
- *
1045
- * @param {FileType} type - The type of the file.
1046
- * @param {FileManagerOptionBoolean} [params] - The parameters for options.
1047
- * @returns {Promise<AxiosResponse>} The Axios Response.
1048
- */
1049
- getFileManagerOption: (type, params) => {
1050
- return API$v.get(`/${type}/options`, { params });
1051
- },
1052
- /**
1053
- * Recover files.
1054
- *
1055
- * @param {FileType} type - The type of the file.
1056
- * @param {object} body - The body of the request.
1057
- * @returns {Promise<AxiosResponse>} The Axios Response.
1058
- */
1059
- recoverFiles: (type, body) => {
1060
- return API$v.put(`/${type}/recover`, body);
1061
- },
1062
- /**
1063
- * Delete files.
1064
- *
1065
- * @param {FileType} type - The type of the file.
1066
- * @param {DeleteFileManagerDto} params - The params of the request.
1067
- * @returns {Promise<AxiosResponse>} The Axios Response.
1068
- */
1069
- deleteFiles: (type, params) => {
1070
- return API$v.delete(`/${type}`, { params });
1071
- },
1072
- /**
1073
- * Delete files permanently.
1074
- *
1075
- * @param {FileType} type - The type of the file.
1076
- * @param {object} body - The body of the request.
1077
- * @returns {Promise<AxiosResponse>} The Axios Response.
1078
- */
1079
- deletePermanently: (type, params) => {
1080
- return API$v.delete(`/${type}/delete-permanent`, { params });
1081
- }
1082
- };
1083
- const API$u = createAxiosInstance({
1084
346
  prefix: "/utility/v2"
1085
347
  });
1086
348
  const FileManagerServices = {
@@ -1090,7 +352,7 @@ const FileManagerServices = {
1090
352
  * @returns {Promise<AxiosResponse>} The Axios Response.
1091
353
  */
1092
354
  getStorageInformation: () => {
1093
- return API$u.get("/files/storage");
355
+ return API$z.get("/files/storage");
1094
356
  },
1095
357
  /**
1096
358
  * Get file manager data.
@@ -1100,7 +362,7 @@ const FileManagerServices = {
1100
362
  * @returns {Promise<AxiosResponse>} The Axios Response.
1101
363
  */
1102
364
  getFileManager: (type, params) => {
1103
- return API$u.get(`/${type}`, { params });
365
+ return API$z.get(`/${type}`, { params });
1104
366
  },
1105
367
  /**
1106
368
  * Get file manager options.
@@ -1110,7 +372,7 @@ const FileManagerServices = {
1110
372
  * @returns {Promise<AxiosResponse>} The Axios Response.
1111
373
  */
1112
374
  getFileManagerOption: (type, params) => {
1113
- return API$u.get(`/${type}/options`, { params });
375
+ return API$z.get(`/${type}/options`, { params });
1114
376
  },
1115
377
  /**
1116
378
  * Recover files.
@@ -1120,7 +382,7 @@ const FileManagerServices = {
1120
382
  * @returns {Promise<AxiosResponse>} The Axios Response.
1121
383
  */
1122
384
  recoverFiles: (type, body) => {
1123
- return API$u.put(`/${type}/recover`, body);
385
+ return API$z.put(`/${type}/recover`, body);
1124
386
  },
1125
387
  /**
1126
388
  * Delete files.
@@ -1130,156 +392,21 @@ const FileManagerServices = {
1130
392
  * @returns {Promise<AxiosResponse>} The Axios Response.
1131
393
  */
1132
394
  deleteFiles: (type, params) => {
1133
- return API$u.delete(`/${type}`, { params });
395
+ return API$z.delete(`/${type}`, { params });
1134
396
  },
1135
397
  /**
1136
398
  * Delete files permanently.
1137
399
  *
1138
- * @param {FileType} type - The type of the file.
1139
- * @param {object} body - The body of the request.
1140
- * @returns {Promise<AxiosResponse>} The Axios Response.
1141
- */
1142
- deletePermanently: (type, params) => {
1143
- return API$u.delete(`/${type}/delete-permanent`, { params });
1144
- }
1145
- };
1146
- const API$t = createAxiosInstance({
1147
- prefix: "/iot/v2/reader"
1148
- });
1149
- const ReaderServices = {
1150
- getData: (params) => {
1151
- return API$t.get("/", { params });
1152
- },
1153
- getDataOptions: (params) => {
1154
- return API$t.get("/options", { params });
1155
- },
1156
- getActivityLogData: (params) => {
1157
- return API$t.get("/activity-log", { params });
1158
- },
1159
- getActivityLogOptions: (params) => {
1160
- return API$t.get("/activity-log/options", { params });
1161
- },
1162
- getDataById: (id) => {
1163
- return API$t.get(`/${id}`);
1164
- },
1165
- getChangeLog: (params) => {
1166
- return API$t.get(`/${params.id}/change-log`, { params });
1167
- },
1168
- getChangeLogOptions: (params) => {
1169
- return API$t.get(`/${params.id}/change-log/options`, { params });
1170
- },
1171
- putData: (id, body) => {
1172
- return API$t.put(`/${id}`, body);
1173
- }
1174
- };
1175
- const API$s = createAxiosInstance({
1176
- prefix: "/settings-user-role/v2"
1177
- });
1178
- const RoleServices$1 = {
1179
- /**
1180
- * Retrieves the transaction role for the given group and transaction name.
1181
- * @param {string} groupId - The ID of the group to retrieve the transaction role for.
1182
- * @param {string} transactionName - The name of the transaction to retrieve the role for.
1183
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1184
- */
1185
- getTransactionRole: (groupId, transactionName) => {
1186
- return API$s.get(`/transaction-roles/${groupId}/${transactionName}`);
1187
- },
1188
- /**
1189
- * Updates the users assigned to the given transaction role.
1190
- * @param {string} groupId - The ID of the group the transaction role belongs to.
1191
- * @param {string} transactionName - The name of the transaction to update.
1192
- * @param {UpdateUser} body - The request body containing the updated user information.
1193
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1194
- */
1195
- putUpdateUsers: (groupId, transactionName, body) => {
1196
- return API$s.put(
1197
- `/transaction-roles/${groupId}/${transactionName}/update-user`,
1198
- body
1199
- );
1200
- },
1201
- /**
1202
- * Updates the approval level for the given transaction role.
1203
- * @param {string} groupId - The ID of the group the transaction role belongs to.
1204
- * @param {string} transactionName - The name of the transaction to update.
1205
- * @param {UserApprovalLevel} body - The request body containing the updated approval level.
1206
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1207
- */
1208
- putUpdateLevel: (groupId, transactionName, body) => {
1209
- return API$s.put(
1210
- `/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
1211
- body
1212
- );
1213
- },
1214
- /**
1215
- * Updates the group management settings for the given transaction role.
1216
- * @param {string} groupId - The ID of the group the transaction role belongs to.
1217
- * @param {string} transactionName - The name of the transaction to update.
1218
- * @param {GroupManageByParent} body - The request body containing the updated management settings.
1219
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1220
- */
1221
- putUpdateGroupManage: (groupId, transactionName, body) => {
1222
- return API$s.put(
1223
- `/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
1224
- body
1225
- );
1226
- },
1227
- getUserAssignedSystemRole: (userId) => {
1228
- return API$s.get(`/system-roles/user/${userId}`);
1229
- },
1230
- getAssignedUserAmounts: () => {
1231
- return API$s.get("/system-roles/amounts");
1232
- },
1233
- getPermissionUser: (permissionType, params) => {
1234
- if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1235
- const type = permissionType === "totalControl" ? "total-control" : "read-only";
1236
- return API$s.get(`/system-roles/total-control-read-only/${type}`, {
1237
- params
1238
- });
1239
- }
1240
- return API$s.get(`/system-roles/permission/${permissionType}`, { params });
1241
- },
1242
- getPermissionUserOptions: (permissionType, params) => {
1243
- if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1244
- const type = permissionType === "totalControl" ? "total-control" : "read-only";
1245
- return API$s.get(`/system-roles/total-control-read-only/${type}/options`, {
1246
- params
1247
- });
1248
- }
1249
- return API$s.get(`/system-roles/permission/${permissionType}/options`, {
1250
- params
1251
- });
1252
- },
1253
- getUserGroups: (params, permissionType) => {
1254
- return API$s.get(`/system-roles/permission/${permissionType}/groups`, {
1255
- params
1256
- });
1257
- },
1258
- postAssignUser: (body, permissionType) => {
1259
- if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1260
- const type = permissionType === "totalControl" ? "total-control" : "read-only";
1261
- return API$s.post(`/system-roles/total-control-read-only/${type}`, body);
1262
- }
1263
- return API$s.post(`/system-roles/permission/${permissionType}`, body);
1264
- },
1265
- putEditUser: (body, roleId) => {
1266
- return API$s.put(`/system-roles/${roleId}`, body);
1267
- },
1268
- putRoleSetActive: (body) => {
1269
- return API$s.put("/system-roles/set-active", body);
1270
- },
1271
- deleteRemoveUser: (body, permissionType) => {
1272
- if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1273
- const type = permissionType === "totalControl" ? "total-control" : "read-only";
1274
- return API$s.delete(`/system-roles/total-control-read-only/${type}`, {
1275
- data: body
1276
- });
1277
- }
1278
- return API$s.delete("/system-roles", { data: body });
400
+ * @param {FileType} type - The type of the file.
401
+ * @param {object} body - The body of the request.
402
+ * @returns {Promise<AxiosResponse>} The Axios Response.
403
+ */
404
+ deletePermanently: (type, params) => {
405
+ return API$z.delete(`/${type}/delete-permanent`, { params });
1279
406
  }
1280
407
  };
1281
- const API$r = createAxiosInstance({
1282
- prefix: "/settings-user-role-go/v2"
408
+ const API$y = createAxiosInstance({
409
+ prefix: "/settings-user-role/v2"
1283
410
  });
1284
411
  const RoleServices = {
1285
412
  /**
@@ -1289,10 +416,10 @@ const RoleServices = {
1289
416
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1290
417
  */
1291
418
  getTransactionRole: (groupId, transactionName) => {
1292
- return API$r.get(`/transaction-roles/${groupId}/${transactionName}`);
419
+ return API$y.get(`/transaction-roles/${groupId}/${transactionName}`);
1293
420
  },
1294
421
  getTransactionRoleTypes: (groupKeys, transactionName) => {
1295
- return API$r.get(`/transaction-roles/${transactionName}/types`, {
422
+ return API$y.get(`/transaction-roles/${transactionName}/types`, {
1296
423
  params: { groupKeys }
1297
424
  });
1298
425
  },
@@ -1304,7 +431,7 @@ const RoleServices = {
1304
431
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1305
432
  */
1306
433
  putUpdateUsers: (groupId, transactionName, body) => {
1307
- return API$r.put(
434
+ return API$y.put(
1308
435
  `/transaction-roles/${groupId}/${transactionName}/update-user`,
1309
436
  body
1310
437
  );
@@ -1317,7 +444,7 @@ const RoleServices = {
1317
444
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1318
445
  */
1319
446
  putUpdateLevel: (groupId, transactionName, body) => {
1320
- return API$r.put(
447
+ return API$y.put(
1321
448
  `/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
1322
449
  body
1323
450
  );
@@ -1330,762 +457,435 @@ const RoleServices = {
1330
457
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1331
458
  */
1332
459
  putUpdateGroupManage: (groupId, transactionName, body) => {
1333
- return API$r.put(
460
+ return API$y.put(
1334
461
  `/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
1335
462
  body
1336
463
  );
1337
464
  },
1338
465
  getUserAssignedSystemRole: (userId) => {
1339
- return API$r.get(`/system-roles/user/${userId}`);
466
+ return API$y.get(`/system-roles/user/${userId}`);
1340
467
  },
1341
468
  getAssignedUserAmounts: () => {
1342
- return API$r.get("/system-roles/amounts");
469
+ return API$y.get("/system-roles/amounts");
1343
470
  },
1344
471
  getPermissionUser: (permissionType, params) => {
1345
472
  if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1346
473
  const type = permissionType === "totalControl" ? "total-control" : "read-only";
1347
- return API$r.get(`/system-roles/total-control-read-only/${type}`, {
474
+ return API$y.get(`/system-roles/total-control-read-only/${type}`, {
1348
475
  params
1349
476
  });
1350
477
  }
1351
- return API$r.get(`/system-roles/permission/${permissionType}`, { params });
478
+ return API$y.get(`/system-roles/permission/${permissionType}`, { params });
1352
479
  },
1353
480
  getPermissionUserOptions: (permissionType, params) => {
1354
481
  if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1355
482
  const type = permissionType === "totalControl" ? "total-control" : "read-only";
1356
- return API$r.get(`/system-roles/total-control-read-only/${type}/options`, {
483
+ return API$y.get(`/system-roles/total-control-read-only/${type}/options`, {
1357
484
  params
1358
485
  });
1359
486
  }
1360
- return API$r.get(`/system-roles/permission/${permissionType}/options`, {
487
+ return API$y.get(`/system-roles/permission/${permissionType}/options`, {
1361
488
  params
1362
489
  });
1363
490
  },
1364
491
  getUserGroups: (params, permissionType) => {
1365
- return API$r.get(`/system-roles/permission/${permissionType}/groups`, {
492
+ return API$y.get(`/system-roles/permission/${permissionType}/groups`, {
1366
493
  params
1367
494
  });
1368
495
  },
1369
496
  postAssignUser: (body, permissionType) => {
1370
497
  if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1371
498
  const type = permissionType === "totalControl" ? "total-control" : "read-only";
1372
- return API$r.post(`/system-roles/total-control-read-only/${type}`, body);
499
+ return API$y.post(`/system-roles/total-control-read-only/${type}`, body);
1373
500
  }
1374
- return API$r.post(`/system-roles/permission/${permissionType}`, body);
501
+ return API$y.post(`/system-roles/permission/${permissionType}`, body);
1375
502
  },
1376
503
  putEditUser: (body, roleId) => {
1377
- return API$r.put(`/system-roles/${roleId}`, body);
504
+ return API$y.put(`/system-roles/${roleId}`, body);
1378
505
  },
1379
506
  deleteRemoveUser: (body, permissionType) => {
1380
507
  if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1381
508
  const type = permissionType === "totalControl" ? "total-control" : "read-only";
1382
- return API$r.put(`/system-roles/total-control-read-only/${type}`, body);
509
+ return API$y.put(`/system-roles/total-control-read-only/${type}`, body);
1383
510
  }
1384
- return API$r.put("/system-roles", body);
511
+ return API$y.put("/system-roles", body);
1385
512
  }
1386
513
  };
1387
- const API$q = createAxiosInstance({
514
+ const API$x = createAxiosInstance({
1388
515
  prefix: "/settings-attribute/v2/open-api"
1389
516
  });
1390
- const OpenAPIServices$1 = {
1391
- getOpenAPIDocs: (params) => {
1392
- return API$q.get(`/${params.doc}`);
1393
- },
1394
- putGenerateToken: () => {
1395
- return API$q.put("/generate");
1396
- },
1397
- // This is if the dummy was not dummy
1398
- getToken: () => {
1399
- return API$q.get("");
1400
- },
1401
- putRequestOpenAPI: () => {
1402
- return API$q.put("/request");
1403
- },
1404
- putCancelRequestOpenAPI: () => {
1405
- return API$q.put("/cancel-request");
1406
- }
1407
- };
1408
- const API$p = createAxiosInstance({
1409
- prefix: "/settings-attribute-go/v2/open-api"
1410
- });
1411
517
  const OpenAPIServices = {
1412
518
  putGenerateToken: () => {
1413
- return API$p.put("/generate");
519
+ return API$x.put("/generate");
1414
520
  },
1415
521
  // This is if the dummy was not dummy
1416
522
  getToken: () => {
1417
- return API$p.get("");
523
+ return API$x.get("");
1418
524
  },
1419
525
  putRequestOpenAPI: () => {
1420
- return API$p.put("/request");
526
+ return API$x.put("/request");
1421
527
  },
1422
528
  putCancelRequestOpenAPI: () => {
1423
- return API$p.put("/cancel-request");
529
+ return API$x.put("/cancel-request");
1424
530
  }
1425
531
  };
1426
- const API$o = createAxiosInstance({
532
+ const API$w = createAxiosInstance({
1427
533
  prefix: "/import/v2"
1428
534
  });
1429
- const ImportServices$1 = {
1430
- getImport: (importUrl, params) => {
1431
- return API$o.get(`/${importUrl}`, { params });
1432
- },
1433
- postImportTemporary: (importUrl, data) => {
1434
- const headers = { "Content-Type": "multipart/form-data" };
1435
- return API$o.post(`/${importUrl}/temporary`, data, { headers });
1436
- },
1437
- deleteImportTemporary: (importUrl, data) => {
1438
- return API$o.delete(`/${importUrl}/temporary`, { data });
1439
- },
1440
- postDuplicateImport: (importUrl, body) => {
1441
- return API$o.post(`/${importUrl}/duplicate`, body);
1442
- },
1443
- putEditImport: (importUrl, body) => {
1444
- return API$o.put(`/${importUrl}`, body);
1445
- },
1446
- postImport: (importUrl, controller, body) => {
1447
- return API$o.post(importUrl, body, { signal: controller.signal });
1448
- },
1449
- putImportCancelProgress: (importUrl) => {
1450
- return API$o.put(`/${importUrl}/cancel-progress`);
1451
- }
1452
- };
1453
- const API$n = createAxiosInstance({
1454
- prefix: "/import-go/v2"
1455
- });
1456
535
  const ImportServices = {
1457
536
  getImport: (importUrl, params) => {
1458
- return API$n.get(`/${importUrl}`, { params });
537
+ return API$w.get(`/${importUrl}`, { params });
1459
538
  },
1460
539
  postImportTemporary: (importUrl, data) => {
1461
540
  const headers = { "Content-Type": "multipart/form-data" };
1462
- return API$n.post(`/${importUrl}/temporary`, data, { headers });
541
+ return API$w.post(`/${importUrl}/temporary`, data, { headers });
1463
542
  },
1464
543
  deleteImportTemporary: (importUrl, params) => {
1465
- return API$n.delete(`/${importUrl}/temporary`, { params });
544
+ return API$w.delete(`/${importUrl}/temporary`, { params });
1466
545
  },
1467
546
  postDuplicateImport: (importUrl, body) => {
1468
- return API$n.post(`/${importUrl}/duplicate`, body);
547
+ return API$w.post(`/${importUrl}/duplicate`, body);
1469
548
  },
1470
549
  putEditImport: (importUrl, body) => {
1471
- return API$n.put(`/${importUrl}`, body);
550
+ return API$w.put(`/${importUrl}`, body);
1472
551
  },
1473
552
  postImport: (importUrl, controller, body) => {
1474
- return API$n.post(importUrl, body, { signal: controller.signal });
553
+ return API$w.post(importUrl, body, { signal: controller.signal });
1475
554
  },
1476
555
  putImportCancelProgress: (importUrl) => {
1477
- return API$n.put(`/${importUrl}/cancel-progress`);
1478
- }
1479
- };
1480
- const API$m = createAxiosInstance({
1481
- prefix: "/settings-attribute/v2/asset-name"
1482
- });
1483
- const AssetNameServices = {
1484
- getDropdown: (params) => {
1485
- return API$m.get("/dropdown", { params });
1486
- },
1487
- getAssetNameDetail: (id) => {
1488
- return API$m.get(`/${id}`);
1489
- },
1490
- getAssetsByAssetName: (id, params) => {
1491
- return API$m.get(`/${id}/list-asset`, { params });
1492
- },
1493
- getAssetNameList: (params) => {
1494
- return API$m.get("/", { params });
1495
- },
1496
- getUnpairedAssetName: (params) => {
1497
- return API$m.get("/unpaired", { params });
1498
- },
1499
- getOptions: (params) => {
1500
- return API$m.get("/options", { params });
556
+ return API$w.put(`/${importUrl}/cancel-progress`);
1501
557
  }
1502
558
  };
1503
- const API$l = createAxiosInstance({
559
+ const API$v = createAxiosInstance({
1504
560
  prefix: "/assignment/v2"
1505
561
  });
1506
- const AssignmentServices$1 = {
1507
- getPreListData: (params) => {
1508
- return API$l.get("/prelist", { params });
1509
- },
1510
- getPreListOptions: (params) => {
1511
- return API$l.get("/prelist/options", { params });
1512
- },
1513
- getRequestData: (params) => {
1514
- return API$l.get("/prelist/request", { params });
1515
- },
1516
- postAddPrelistData: (body) => {
1517
- return API$l.post("/prelist", body);
1518
- },
1519
- getDetailRequestData: (id, params) => {
1520
- return API$l.get(`/transaction/${id}/request`, { params });
1521
- },
1522
- getDetailRequestOption: (params, id) => {
1523
- return API$l.get(`/transaction/${id}/request/options`, { params });
1524
- },
1525
- getTransactionData: (params) => {
1526
- return API$l.get("/transaction", { params });
1527
- },
1528
- getTransactionOptions: (params) => {
1529
- return API$l.get("/transaction/options", { params });
1530
- },
1531
- getDetailTransactionData: (id) => {
1532
- return API$l.get(`/transaction/${id}`);
1533
- },
1534
- getTransactionApproval: (params) => {
1535
- return API$l.get("/approval", { params });
1536
- },
1537
- getApprovalData: (transactionId, params) => {
1538
- return API$l.get(`/approval/transaction/${transactionId}`, { params });
1539
- },
1540
- getTransactionApprovalOptions: (params) => {
1541
- return API$l.get("/approval/options", { params });
1542
- },
1543
- getApprovalOptions: (transactionId, params) => {
1544
- return API$l.get(`/approval/transaction/${transactionId}/options`, {
1545
- params
1546
- });
1547
- },
1548
- getTransactionApprovers: (id) => {
1549
- return API$l.get(`/approval/transaction/${id}/transaction`);
1550
- },
1551
- putApproveApproval: (body) => {
1552
- return API$l.put("/approval/approve", body);
1553
- },
1554
- getDetailTransactionLog: (id) => {
1555
- return API$l.get(`/transaction/request/${id}/transaction-log`);
1556
- },
1557
- getVerifyAsset: (params, id) => {
1558
- return API$l.get(`/transaction/${id}/request/scan`, { params });
1559
- },
1560
- putEditAssignedUser: (id, body) => {
1561
- return API$l.put(`/transaction/${id}/user`, body);
1562
- },
1563
- putEditEmailConfirmation: (id, body) => {
1564
- return API$l.put(`/transaction/${id}/update-email-or-assigned-user`, body);
1565
- },
1566
- postSendConfirmationEmail: (id) => {
1567
- return API$l.post(`/transaction/${id}/send-confirmation-email`);
1568
- },
1569
- postTransaction: (body) => {
1570
- return API$l.post("/transaction", body);
1571
- },
1572
- putTransaction: (id, body) => {
1573
- return API$l.put(`/transaction/${id}/request`, body);
1574
- },
1575
- putCancelTransaction: (body) => {
1576
- return API$l.put("/transaction/cancel", body);
1577
- },
1578
- putCancelAssignmentRequest: (body) => {
1579
- return API$l.put("/transaction/request/cancel", body);
1580
- },
1581
- putVerifyRequest: (body, id) => {
1582
- return API$l.put(`/transaction/${id}/verify-requests`, body);
1583
- },
1584
- putVerifyToken: (body) => {
1585
- return API$l.put("/transaction/verify-token", body);
1586
- },
1587
- putHandoverConfirm: (body) => {
1588
- return API$l.put("/transaction/handover-confirmation", body);
1589
- },
1590
- putAssignHandover: (transaction) => {
1591
- return API$l.put(`/transaction/${transaction}/handover`);
1592
- },
1593
- deletePrelistData: (params) => {
1594
- return API$l.delete("/prelist", { params });
1595
- },
1596
- deleteRequestPrelistData: (body) => {
1597
- return API$l.delete("/prelist/request", { data: body });
1598
- },
1599
- getAssignedByAsset: (params) => {
1600
- return API$l.get("/transaction/request/assigned/by-asset", { params });
1601
- },
1602
- getAssignedByAssetOptions: (params) => {
1603
- return API$l.get("/transaction/request/assigned/by-asset/options", {
1604
- params
1605
- });
1606
- },
1607
- getAssignedByUser: (params) => {
1608
- return API$l.get("/transaction/request/assigned/by-user", { params });
1609
- },
1610
- getAssignedByUserOptions: (params) => {
1611
- return API$l.get("/transaction/request/assigned/by-user/options", { params });
1612
- },
1613
- postUnassignPrelistAsset: (body) => {
1614
- return API$l.post("/prelist", body);
1615
- },
1616
- postUnassignPrelistUser: (body) => {
1617
- return API$l.post("/prelist/unassign/by-user", body);
1618
- },
1619
- putUnassignRequest: (body) => {
1620
- return API$l.put("/transaction/request/unassign", body);
1621
- },
1622
- putReportDone: (id, body) => {
1623
- return API$l.put(`/transaction/${id}/confirm-report-done`, body);
1624
- },
1625
- getHistory: (type, params) => {
1626
- const urlType = type.split(" ").join("-").toLowerCase();
1627
- return API$l.get(`/transaction/history/${urlType}`, { params });
1628
- },
1629
- getHistoryOptions: (params) => {
1630
- return API$l.get("/transaction/history/options", { params });
1631
- },
1632
- getHistoryByTransactionOptions: (params) => {
1633
- return API$l.get("/transaction/history/by-transaction/options", { params });
1634
- },
1635
- putCancelReport: (body) => {
1636
- return API$l.put("/transaction/request/cancel-report", body);
1637
- },
1638
- getTaskAssignment: async (params) => {
1639
- return API$l.get("/transaction/my-asset/task", { params });
1640
- },
1641
- getTaskAssignmentOptions: async (params) => {
1642
- return API$l.get("/transaction/my-asset/task/options", { params });
1643
- },
1644
- getAssignedAsset: async (params) => {
1645
- return API$l.get("/transaction/my-asset/assigned-asset", { params });
1646
- },
1647
- getAssignedAssetOptions: async (params) => {
1648
- return API$l.get("/transaction/my-asset/assigned-asset/options", { params });
1649
- },
1650
- putCancelAssignment: async (body) => {
1651
- return API$l.put("/transaction/cancel", { id: body.id });
1652
- },
1653
- putCancelReportById: async (body) => {
1654
- return API$l.put(`/transaction/request/${body.id}/cancel-report`);
1655
- }
1656
- };
1657
- const API$k = createAxiosInstance({
1658
- prefix: "/assignment-go/v2"
1659
- });
1660
562
  const AssignmentServices = {
1661
563
  getTransactionData: (params) => {
1662
- return API$k.get("/transaction", { params });
564
+ return API$v.get("/transaction", { params });
1663
565
  },
1664
566
  getTransactionOptions: (params) => {
1665
- return API$k.get("/transaction/options", { params });
567
+ return API$v.get("/transaction/options", { params });
1666
568
  },
1667
569
  getDetailTransactionLog: (id) => {
1668
- return API$k.get(`/transaction/request/${id}/transaction-log`);
570
+ return API$v.get(`/transaction/request/${id}/transaction-log`);
1669
571
  },
1670
572
  postTransaction: (body) => {
1671
- return API$k.post("/transaction", body);
573
+ return API$v.post("/transaction", body);
1672
574
  },
1673
575
  putTransaction: (body) => {
1674
- return API$k.put("/transaction", body);
576
+ return API$v.put("/transaction", body);
1675
577
  },
1676
578
  putUnassignTransaction: (body) => {
1677
- return API$k.put("/transaction/unassign", body);
579
+ return API$v.put("/transaction/unassign", body);
1678
580
  },
1679
581
  putCancelReport: (body) => {
1680
- return API$k.put("/transaction/request/cancel-report", body);
582
+ return API$v.put("/transaction/request/cancel-report", body);
1681
583
  }
1682
584
  };
1683
- const API$j = createAxiosInstance({
585
+ const API$u = createAxiosInstance({
1684
586
  prefix: "/license/v2"
1685
587
  });
1686
- const TotalLicenseServices$1 = {
1687
- getTotalLicense: () => {
1688
- return API$j.get("/total-license");
1689
- },
1690
- getPurchasedData: (params) => {
1691
- return API$j.get("/purchase", { params });
1692
- },
1693
- getCompanyData: () => {
1694
- return API$j.get("/company");
1695
- }
1696
- };
1697
- const LicenseAssetAddonServices = {
1698
- getFixedAssetPerGroup: (groupId, params) => {
1699
- return API$j.get(`/${groupId}/fixed-asset-list`, { params });
1700
- },
1701
- getAssetNameList: (addOnType, groupId, params) => {
1702
- return API$j.get(`${groupId}/asset-list/${addOnType}`, { params });
1703
- },
1704
- // Get list of assets those already have licenses
1705
- getLicenseAddonAssetList: (groupId, addOnType, params) => {
1706
- return API$j.get(`/${groupId}/fixed-asset-list/${addOnType}`, { params });
1707
- },
1708
- removeAddOnLicense: (body, addOnType) => {
1709
- return API$j.put(`/remove-license/${addOnType}`, body);
1710
- },
1711
- addNewLicenses: (body, addOnType) => {
1712
- return API$j.put(`/add-license/${addOnType}`, body);
1713
- },
1714
- deleteAssetData: (body) => {
1715
- return API$j.delete("/assets", { data: body });
1716
- },
1717
- putManageLicense: (licenseType, body) => {
1718
- return API$j.put(
1719
- `/manage/${licenseType.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`,
1720
- body
1721
- );
1722
- }
1723
- };
1724
- const LicenseAllocationServices = {
1725
- getGroupQuota: (groupId) => {
1726
- return API$j.get(`/${groupId}/allocation-quota`);
1727
- },
1728
- getSubGroupQuota: (parentId, params) => {
1729
- return API$j.get(`/${parentId}/subgroup-quota`, { params });
1730
- },
1731
- editSubGroupQuota: (subGroupId, body) => {
1732
- return API$j.put(`/${subGroupId}/set-group-quota`, body);
1733
- }
1734
- };
1735
- const LicenseConcurrentServices$1 = {
1736
- getConcurrentUserData: () => {
1737
- return API$j.get("/concurrent-user-data");
1738
- },
1739
- getConcurrentUserList: (params) => {
1740
- return API$j.get("/concurrent-user", { params });
1741
- },
1742
- putLogoutUsers: (body) => {
1743
- return API$j.put("/concurrent-user", body);
1744
- }
1745
- };
1746
- const LicenseServices$1 = {
1747
- getFilterOptions: (path, params) => {
1748
- return API$j.get(`/${path}`, { params });
1749
- },
1750
- ...TotalLicenseServices$1,
1751
- ...LicenseConcurrentServices$1,
1752
- ...LicenseAllocationServices,
1753
- ...LicenseAssetAddonServices
1754
- };
1755
- const API$i = createAxiosInstance({
1756
- prefix: "/license-go/v2"
1757
- });
1758
588
  const TotalLicenseServices = {
1759
589
  getTotalLicense: () => {
1760
- return API$i.get("/total-license");
590
+ return API$u.get("/total-license");
1761
591
  },
1762
592
  getPurchasedData: (params) => {
1763
- return API$i.get("/purchase", { params });
593
+ return API$u.get("/purchase", { params });
1764
594
  }
1765
595
  };
1766
596
  const LicenseConcurrentServices = {
1767
597
  getConcurrentUserData: () => {
1768
- return API$i.get("/concurrent-user-data");
598
+ return API$u.get("/concurrent-user-data");
1769
599
  },
1770
600
  getConcurrentUserList: (params) => {
1771
- return API$i.get("/concurrent-user", { params });
601
+ return API$u.get("/concurrent-user", { params });
1772
602
  },
1773
603
  putLogoutUsers: (body) => {
1774
- return API$i.put("/concurrent-user", body);
604
+ return API$u.put("/concurrent-user", body);
1775
605
  }
1776
606
  };
1777
607
  const LicenseAssetServices = {
1778
608
  getFixedAssetPerGroup: (groupId, params) => {
1779
- return API$i.get(`/${groupId}/assets`, { params });
609
+ return API$u.get(`/${groupId}/assets`, { params });
1780
610
  },
1781
611
  deleteAssetData: (body) => {
1782
- return API$i.delete("/assets", { data: body });
612
+ return API$u.delete("/assets", { data: body });
1783
613
  }
1784
614
  };
1785
615
  const LicenseServices = {
1786
616
  getFilterOptions: (path, params) => {
1787
- return API$i.get(`/${path}`, { params });
617
+ return API$u.get(`/${path}`, { params });
1788
618
  },
1789
619
  ...TotalLicenseServices,
1790
620
  ...LicenseConcurrentServices,
1791
621
  ...LicenseAssetServices
1792
622
  };
1793
- const API$h = createAxiosInstance({
1794
- prefix: "/repair/v2/damage"
1795
- });
1796
- const DamageServices$1 = {
1797
- getDamageReportList: (params) => {
1798
- return API$h.get("/", { params });
1799
- },
1800
- getDamageReportListFilterOptions: (params) => {
1801
- return API$h.get("/options", { params });
1802
- },
1803
- getDamageReportDetail: (reportId) => {
1804
- return API$h.get(`/${reportId}`);
1805
- },
1806
- putReportDamage: (id, body) => {
1807
- const headers = { "Content-Type": "multipart/form-data" };
1808
- return API$h.put(`/report-damage/${id}`, body, { headers });
1809
- },
1810
- /**
1811
- * To mark as repaired.
1812
- * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1813
- */
1814
- putMarkAsRepaired: (body) => {
1815
- return API$h.put("/repair", body);
1816
- }
1817
- };
1818
- const API$g = createAxiosInstance({
623
+ const API$t = createAxiosInstance({
1819
624
  prefix: "/damage-repair-ticketing/v2"
1820
625
  });
1821
626
  const DamageServices = {
1822
627
  getDamageReportList: (params) => {
1823
- return API$g.get("/", { params });
628
+ return API$t.get("/", { params });
1824
629
  },
1825
630
  getDamageReportListFilterOptions: (params) => {
1826
- return API$g.get("/options", { params });
631
+ return API$t.get("/options", { params });
1827
632
  },
1828
633
  getDamageReportDetail: (reportId) => {
1829
- return API$g.get(`/${reportId}`);
634
+ return API$t.get(`/${reportId}`);
1830
635
  },
1831
636
  putReportDamage: (id, body) => {
1832
637
  const headers = { "Content-Type": "multipart/form-data" };
1833
- return API$g.put(`/${id}/report-damage`, body, { headers });
638
+ return API$t.put(`/${id}/report-damage`, body, { headers });
1834
639
  },
1835
640
  putMarkAsRepaired: (body) => {
1836
- return API$g.put("/repair", body);
641
+ return API$t.put("/repair", body);
1837
642
  }
1838
643
  };
1839
- const API$f = createAxiosInstance({
1840
- prefix: "/borrowing/v2"
644
+ const API$s = createAxiosInstance({
645
+ prefix: "/assets/v2/my-assets"
1841
646
  });
1842
- const BorrowServices = {
1843
- getTaskBorrowing: async (params) => {
1844
- return API$f.get("/transaction/my-asset/task", { params });
647
+ const MyAssetServices = {
648
+ getAssigned: async (params) => {
649
+ return API$s.get("/assigned", { params });
1845
650
  },
1846
- getTaskBorrowingOptions: async (params) => {
1847
- return API$f.get("/transaction/my-asset/task/options", { params });
651
+ getAssignedOptions: async (params) => {
652
+ return API$s.get("/assigned/options", { params });
1848
653
  },
1849
- getBorrowedAsset: async (params) => {
1850
- return API$f.get("/transaction/my-asset/borrowed-asset", { params });
654
+ getBorrowed: async (params) => {
655
+ return API$s.get("/borrowed", { params });
1851
656
  },
1852
657
  getBorrowedOptions: async (params) => {
1853
- return API$f.get("/transaction/my-asset/borrowed-asset/options", { params });
658
+ return API$s.get("/borrowed/options", { params });
1854
659
  },
1855
660
  getHistory: async (params) => {
1856
- return API$f.get("/transaction/my-asset/history", { params });
661
+ return API$s.get("/history", { params });
1857
662
  },
1858
663
  getHistoryOptions: async (params) => {
1859
- return API$f.get("/transaction/my-asset/history/options", { params });
1860
- },
1861
- postAddPrelistData: (body) => {
1862
- return API$f.post("/prelist", body);
1863
- },
1864
- putCancelBorrowing: async (body) => {
1865
- return API$f.put("/transaction/cancel", { id: body.id });
1866
- },
1867
- putCancelExtensionRequest: async (body) => {
1868
- return API$f.put(`/transaction/${body.id}/cancel-extension`);
1869
- },
1870
- putCancelRequestReport: async (body) => {
1871
- return API$f.put(`/transaction/request/${body.id}/cancel-report`);
1872
- },
1873
- putDeclineExtensionRequest: async (body) => {
1874
- return API$f.put("transaction/request/decline", body);
1875
- },
1876
- putUpdateRequestExtension: async (body) => {
1877
- return API$f.put("transaction/request/duration", body);
1878
- },
1879
- // ------------------------------------------------------------------------------------------------------------ //
1880
- getBorrowingPrelist: (params) => {
1881
- return API$f.get("/prelist", { params });
1882
- },
1883
- getBorrowingPrelistOptions: (params) => {
1884
- return API$f.get("/prelist/options", { params });
1885
- },
1886
- deleteBorrowingPrelist: (id) => {
1887
- return API$f.delete("/prelist", { data: { id } });
1888
- },
1889
- getBorrowingRequest: (params) => {
1890
- return API$f.get("/prelist/request", { params });
1891
- },
1892
- getBorrowingRequestOptions: (params) => {
1893
- return API$f.get("/prelist/request/options", { params });
1894
- },
1895
- postBorrowingRequest: (data) => {
1896
- return API$f.post("/prelist/request", data);
1897
- },
1898
- putBorrowingRequest: (data) => {
1899
- return API$f.put("/prelist/request", data);
1900
- },
1901
- deleteBorrowingRequest: (id) => {
1902
- return API$f.delete("/prelist/request", { data: { id } });
1903
- },
1904
- postBorrowingTransaction: (data) => {
1905
- return API$f.post("/transaction", data, { params: { sourceWeb: true } });
1906
- },
1907
- getBorrowingTransaction: (params) => {
1908
- return API$f.get("/transaction", { params });
1909
- },
1910
- getBorrowingTransactionOptions: (params) => {
1911
- return API$f.get("/transaction/options", { params });
1912
- },
1913
- putCancelBorrowingTransaction: (id) => {
1914
- return API$f.put("/transaction/cancel", { id });
1915
- },
1916
- putCancelBorrowingRequest: (id) => {
1917
- return API$f.put("/transaction/request/cancel", { id });
664
+ return API$s.get("/history/options", { params });
665
+ }
666
+ };
667
+ const API$r = createAxiosInstance({
668
+ prefix: "/transfer/v2"
669
+ });
670
+ const TransferServicesGo = {
671
+ getTransactionData: (params) => {
672
+ return API$r.get("/transaction", { params });
1918
673
  },
1919
- putCancelExtendBorrowingRequest: (id) => {
1920
- return API$f.put("/transaction/request/extend/cancel", { id });
674
+ getTransactionOptions: (params) => {
675
+ return API$r.get("/transaction/options", { params });
1921
676
  },
1922
- getBorrowingTransactionDetail: (id) => {
1923
- return API$f.get(`/transaction/${id}`);
677
+ getTransactionLog: (id) => {
678
+ return API$r.get(`/transaction/request/${id}/transaction-log`);
1924
679
  },
1925
- getBorrowingTransactionRequestList: (params) => {
1926
- return API$f.get("/transaction/request", { params });
680
+ postCreateTransaction: (body) => {
681
+ return API$r.post("/transaction", body);
682
+ }
683
+ };
684
+ const API$q = createAxiosInstance({
685
+ prefix: "/borrowing/v2"
686
+ });
687
+ const BorrowServicesGo = {
688
+ getTransactions: async (params) => {
689
+ return API$q.get("/transaction", { params });
1927
690
  },
1928
- getBorrowingTransactionRequest: (id, params) => {
1929
- return API$f.get(`/transaction/${id}/request`, { params });
691
+ getTransactionOptions: async (params) => {
692
+ return API$q.get("/transaction/options", { params });
1930
693
  },
1931
- getBorrowingTransactionRequestOptions: (id, params) => {
1932
- return API$f.get(`/transaction/${id}/request/options`, { params });
694
+ getTransactionLog: async (id) => {
695
+ return API$q.get(`/transaction/request/${id}/transaction-log`);
1933
696
  },
1934
- putBorrowingTransactionRequest: (id, data) => {
1935
- return API$f.put(`/transaction/${id}/request`, data);
697
+ postTransaction: async (body) => {
698
+ return API$q.post("/transaction", body);
1936
699
  },
1937
- getApprovalList: (id) => {
1938
- return API$f.get(`/approval/transaction/${id}/transaction`);
700
+ putTransaction: async (body) => {
701
+ return API$q.put("/transaction", body);
1939
702
  },
1940
- putUpdateEmailorBorrower: (id, data) => {
1941
- return API$f.put(`/transaction/${id}/update-email-or-borrower`, data);
703
+ putTransactionReturn: async (requestIds) => {
704
+ const body = { id: requestIds };
705
+ return API$q.put("/transaction/return", body);
1942
706
  },
1943
- getTransactionRequestScan: (id, tag) => {
1944
- return API$f.get(`/transaction/${id}/request/scan`, { params: { tag } });
707
+ putCancelReport: async (requestIds) => {
708
+ const body = { id: requestIds };
709
+ return API$q.put("/transaction/request/cancel-report", body);
710
+ }
711
+ };
712
+ const API$p = createAxiosInstance({
713
+ prefix: "/disposal/v2/"
714
+ });
715
+ const DisposalServices = {
716
+ getReportedDisposal: (params) => {
717
+ return API$p.get("/report", { params });
1945
718
  },
1946
- putUpdateBorrower: (id, userId) => {
1947
- return API$f.put(`/transaction/${id}/user`, { user: userId });
719
+ getReportedDisposalOptions: (params) => {
720
+ return API$p.get("/report/options", { params });
1948
721
  },
1949
- postSendConfirmationEmail: (id) => {
1950
- return API$f.post(`/transaction/${id}/send-confirmation-email`);
722
+ postReportDisposal: (body) => {
723
+ return API$p.post("/report", body);
1951
724
  },
1952
- putVerifyRequests: (id, data) => {
1953
- return API$f.put(`/transaction/${id}/verify-requests`, data);
725
+ deleteCancelReport: (params) => {
726
+ params.isFromDisposal = "false";
727
+ return API$p.delete("/report/cancel-report", { params });
1954
728
  },
1955
- getBorrowingTransactionHistoryByTransaction: (params) => {
1956
- return API$f.get("/transaction/history/by-transaction", { params });
729
+ deleteDeclineReport: (params) => {
730
+ params.isFromDisposal = "true";
731
+ return API$p.delete("/report/cancel-report", { params });
1957
732
  },
1958
- getBorrowingTransactionHistoryByAsset: (params) => {
1959
- return API$f.get("/transaction/history/by-asset", { params });
733
+ getDisposalHistory: (params) => {
734
+ return API$p.get("/transaction", { params });
1960
735
  },
1961
- getBorrowingTransactionHistoryOptions: (params) => {
1962
- return API$f.get("/transaction/history/options", { params });
736
+ getHistoryByAssetOptions: (params) => {
737
+ return API$p.get("/transaction/options", { params });
1963
738
  },
1964
- putBorrowingVerifyToken: (token) => {
1965
- return API$f.put("/transaction/verify-token", { token });
739
+ getDisposalTransactionLog: (requestId) => {
740
+ return API$p.get(`/transaction/request/${requestId}/transaction-log`);
1966
741
  },
1967
- putBorrowingHandoverConfirmation: (data) => {
1968
- return API$f.put("/transaction/handover-confirmation", data);
742
+ postCreateTransaction: (body) => {
743
+ return API$p.post("/transaction", body);
744
+ }
745
+ };
746
+ const API$o = createAxiosInstance({
747
+ prefix: "/report/v2/reports"
748
+ });
749
+ const ReportServices = {
750
+ getReportList: (params) => {
751
+ return API$o.get("/schedules", { params });
1969
752
  },
1970
- putBorrowingHandover: (id) => {
1971
- return API$f.put(`/transaction/${id}/handover`);
753
+ getReportSchedule: (scheduleId) => {
754
+ return API$o.get("/schedules/" + scheduleId);
1972
755
  },
1973
- putBorrowingExtendRequest: (data) => {
1974
- return API$f.put("/transaction/request/extend", data);
756
+ getUniqueScheduleName: (name) => {
757
+ return API$o.get("/schedules/unique-name", { params: { name } });
1975
758
  },
1976
- putBorrowingExtendApproval: (data) => {
1977
- return API$f.put("/approval/approve/request-extension", data, {
1978
- params: { sourceWeb: true }
1979
- });
759
+ getFilterOptions: (params) => {
760
+ return API$o.get("/schedules/options", { params });
1980
761
  },
1981
- putBorrowingDeclineExtendRequest: (id) => {
1982
- return API$f.put("/transaction/request/decline", { id });
762
+ putSetActive: (body) => {
763
+ return API$o.put("/schedules/set-active", body);
1983
764
  },
1984
- getBorrowingBorrowedAsset: (params) => {
1985
- return API$f.get("/transaction/request/borrowed/by-asset", { params });
765
+ putEditSchedule: (id, body) => {
766
+ return API$o.put(`/schedules/${id}`, body);
1986
767
  },
1987
- getBorrowingBorrowedAssetOptions: (params) => {
1988
- return API$f.get("/transaction/request/borrowed/by-asset/options", {
1989
- params
1990
- });
768
+ deleteReports: (id) => {
769
+ return API$o.delete("/schedules", { params: { id } });
1991
770
  },
1992
- getBorrowingBorrowedBorrower: (params) => {
1993
- return API$f.get("/transaction/request/borrowed/by-user", { params });
771
+ postCreateSchedule: (data) => {
772
+ return API$o.post("/schedules", data);
1994
773
  },
1995
- putBorrowingReportDamaged: (id, data) => {
1996
- return API$f.put(`/transaction/request/${id}/damaged`, data);
774
+ postDownloadReport: (data) => {
775
+ return API$o.post("/download", data, { responseType: "arraybuffer" });
1997
776
  },
1998
- putBorrowingReportMissing: (id, data) => {
1999
- return API$f.put(`/transaction/request/${id}/missing`, data);
777
+ postGenerateReport: (data) => {
778
+ return API$o.post("/generate", data);
779
+ }
780
+ };
781
+ const API$n = createAxiosInstance({
782
+ prefix: "/settings-attribute/v2"
783
+ });
784
+ const getEndpoint = (type) => {
785
+ return type === "category" ? "category" : "groups";
786
+ };
787
+ const GroupCategoryServices = {
788
+ getGroupCategory: (type, params) => {
789
+ return API$n.get(`/${getEndpoint(type)}/tree`, { params });
2000
790
  },
2001
- putBorrowingReturn: (id) => {
2002
- return API$f.put("/transaction/request/return", { id });
791
+ // Doesn't exist in company plan other than "Basic"
792
+ getGroupCategoryList: (type, groupId, params) => {
793
+ return API$n.get(`/${getEndpoint(type)}/${groupId}`, { params });
2003
794
  },
2004
- getBorrowingLog: (id) => {
2005
- return API$f.get(`/transaction/request/${id}/transaction-log`);
795
+ getNames: (type) => {
796
+ return API$n.get(`/${getEndpoint(type)}/names`);
2006
797
  },
2007
- putConfirmReportDone: (id, data) => {
2008
- return API$f.put(`/transaction/request/${id}/confirm-report-done`, data);
798
+ getCodes: (type) => {
799
+ return API$n.get(`/${getEndpoint(type)}/codes`);
2009
800
  },
2010
- putCancelReportBulk: (id) => {
2011
- return API$f.put("/transaction/request/cancel-report", {
2012
- id
2013
- });
801
+ postCreateGroupCategory: (type, body) => {
802
+ return API$n.post(`/${getEndpoint(type)}`, body);
2014
803
  },
2015
- putBorrowingEditExtension: (data) => {
2016
- return API$f.put("/transaction/request/duration", data);
804
+ putEditGroupCategory: (type, body, objectId) => {
805
+ return API$n.put(`/${getEndpoint(type)}/${objectId}`, body);
2017
806
  },
2018
- getApproval: (params) => {
2019
- return API$f.get("/approval", { params });
807
+ // Doesn't exist in company plan other than "Enterprise"
808
+ putMoveGroup: (body, objectId) => {
809
+ return API$n.put(`/groups/${objectId}/move-group`, body);
2020
810
  },
2021
- getApprovalOptions: (params) => {
2022
- return API$f.get("/approval/options", { params });
811
+ // Doesn't exist in company plan other than "Enterprise"
812
+ putEditBulkGroups: async (body) => {
813
+ return API$n.put("/groups/bulk", body);
2023
814
  },
2024
- getApprovalTransactionRequest: (id, params) => {
2025
- return API$f.get(`/approval/transaction/${id}`, { params });
815
+ deleteGroupCategory: (type, body, objectId) => {
816
+ return API$n.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
817
+ }
818
+ };
819
+ const API$m = createAxiosInstance({
820
+ prefix: "/settings-attribute/v2/alias-code"
821
+ });
822
+ const AliasCodeServices = {
823
+ getAliasCode: () => {
824
+ return API$m.get("/");
2026
825
  },
2027
- getApprovalTransactionRequestOptions: (id, params) => {
2028
- return API$f.get(`/approval/transaction/${id}/options`, { params });
826
+ postAliasCode: (data) => {
827
+ return API$m.post("/", data);
2029
828
  },
2030
- putApprovalApprove: (data) => {
2031
- return API$f.put("/approval/approve", data, {
2032
- params: { sourceWeb: true }
2033
- });
829
+ getAliasCodeList: (params) => {
830
+ return API$m.get(`/${params.object}/code-list`, { params });
2034
831
  }
2035
832
  };
2036
- const API$e = createAxiosInstance({
2037
- prefix: "/assets/v2"
833
+ const API$l = createAxiosInstance({
834
+ prefix: "/settings-attribute/v2/general-settings"
2038
835
  });
2039
- const MyAssetServices$1 = {
2040
- getHistory: async (params) => {
2041
- return API$e.get("/my-asset", { params });
836
+ const GeneralSettingsServices = {
837
+ getGeneralSettings: () => {
838
+ return API$l.get("/");
2042
839
  },
2043
- getHistoryOptions: async (params) => {
2044
- return API$e.get("/my-asset/options", { params });
840
+ putUpdateGeneralSettings: (data) => {
841
+ return API$l.put("/", data);
2045
842
  }
2046
843
  };
2047
- const API$d = createAxiosInstance({
2048
- prefix: "/assets-go/v2/my-assets"
844
+ const API$k = createAxiosInstance({
845
+ prefix: "/settings-attribute/v2/custom-field"
2049
846
  });
2050
- const MyAssetServices = {
2051
- getAssigned: async (params) => {
2052
- return API$d.get("/assigned", { params });
847
+ const CustomFieldServices = {
848
+ getCustomField: async (params) => {
849
+ return API$k.get("/", { params });
2053
850
  },
2054
- getAssignedOptions: async (params) => {
2055
- return API$d.get("/assigned/options", { params });
851
+ getCustomFieldsByCategory: (category, params) => {
852
+ return API$k.get(`/${category}`, { params });
2056
853
  },
2057
- getBorrowed: async (params) => {
2058
- return API$d.get("/borrowed", { params });
854
+ getOptions: async (params) => {
855
+ return API$k.get("/options", { params });
2059
856
  },
2060
- getBorrowedOptions: async (params) => {
2061
- return API$d.get("/borrowed/options", { params });
857
+ postCreateCustomField: async (params, data) => {
858
+ return API$k.post("/", data, { params });
2062
859
  },
2063
- getHistory: async (params) => {
2064
- return API$d.get("/history", { params });
860
+ putEditCustomField: async (params, data, id) => {
861
+ return API$k.put(`/${id}`, data, { params });
2065
862
  },
2066
- getHistoryOptions: async (params) => {
2067
- return API$d.get("/history/options", { params });
863
+ putChangeStatus: async (params, data) => {
864
+ return API$k.put("/bulk", data, { params });
865
+ },
866
+ deleteCustomField: async (params) => {
867
+ return API$k.delete("/bulk", { params });
868
+ },
869
+ getUsedCustomFields: async () => {
870
+ return API$k.get("/used-by-assets");
2068
871
  }
2069
872
  };
2070
- const API$c = createAxiosInstance({
2071
- prefix: "/repair/v2"
873
+ const API$j = createAxiosInstance({
874
+ prefix: "/settings-attribute/v2/asset-name-policy"
2072
875
  });
2073
- const RepairServices = {
2074
- getRepairList: (params) => {
2075
- return API$c.get("/my-asset/repair", { params });
2076
- },
2077
- getFilterOptions: (params) => {
2078
- return API$c.get("/my-asset/repair/options", { params });
876
+ const AssetPolicyServices = {
877
+ getList: (params) => {
878
+ return API$j.get("/", { params });
2079
879
  },
2080
- getAssetRepairTicketing: (assetId, params) => {
2081
- return API$c.get(`/repair/${assetId}/asset-repair-detail`, { params });
880
+ getListFilterOptions: (params) => {
881
+ return API$j.get("/options");
2082
882
  },
2083
- putConfirmRepair: (repairId) => {
2084
- return API$c.put(`/repair/${repairId}/confirm-repair`);
883
+ putUpdatePolicy: (body) => {
884
+ return API$j.put("/", body);
2085
885
  }
2086
886
  };
2087
- const API$b = createAxiosInstance({
2088
- prefix: "/settings-user-role-go/v2/auth"
887
+ const API$i = createAxiosInstance({
888
+ prefix: "/settings-user-role/v2/auth"
2089
889
  });
2090
890
  const onRejected$1 = (error) => {
2091
891
  var _a, _b, _c, _d;
@@ -2099,545 +899,522 @@ const onRejected$1 = (error) => {
2099
899
  };
2100
900
  const AuthServices$1 = {
2101
901
  reLogin: (body) => {
2102
- API$b.interceptors.response.use((response) => {
902
+ API$i.interceptors.response.use((response) => {
2103
903
  return response;
2104
904
  }, onRejected$1);
2105
- return API$b.post("/login", body);
905
+ return API$i.post("/login", body);
2106
906
  }
2107
907
  };
2108
- const API$a = createAxiosInstance({
2109
- env: "APP_GLOBAL_SETTINGS_API",
2110
- prefix: "/v1/global-settings/auth"
908
+ const API$h = createAxiosInstance({
909
+ prefix: "/settings-attribute/v2/asset-name"
2111
910
  });
2112
- const onRejected = (error) => {
2113
- var _a, _b, _c, _d;
2114
- if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
2115
- window.onblur = void 0;
2116
- window.onfocus = void 0;
2117
- window.sessionExpired = true;
2118
- return window.dispatchEvent(new CustomEvent("user:expired"));
2119
- }
2120
- return Promise.reject(error);
2121
- };
2122
- const AuthServices = {
2123
- login: (form) => {
2124
- const body = { ...form, isMobile: false };
2125
- return API$a.post("/login", body);
2126
- },
2127
- reLogin: (body) => {
2128
- API$a.interceptors.response.use((response) => {
2129
- return response;
2130
- }, onRejected);
2131
- return API$a.post("/login", body);
2132
- },
2133
- requestOTP: (email) => {
2134
- const body = { email };
2135
- return API$a.post("/request-otp", body);
911
+ const AssetNameServices = {
912
+ getDropdown: (params) => {
913
+ return API$h.get("/dropdown", { params });
2136
914
  },
2137
- requestResetPassLink: (email) => {
2138
- const body = { email };
2139
- return API$a.post("/request-reset-link", body);
915
+ getAssetNameDetail: (id) => {
916
+ return API$h.get(`/${id}`);
2140
917
  },
2141
- setPassword: (body) => {
2142
- return API$a.post("/set-password", body);
918
+ getAssetsByAssetName: (id, params) => {
919
+ return API$h.get(`/${id}/list-asset`, { params });
2143
920
  },
2144
- verifyToken: (token) => {
2145
- return API$a.get(`/verify-token/${token}`);
921
+ getAssetNameList: (params) => {
922
+ return API$h.get("/", { params });
2146
923
  },
2147
- confirmEmailChange: (token) => {
2148
- const body = { token };
2149
- return API$a.put("/confirm-email-change/confirm", body);
924
+ getUnpairedAssetName: (params) => {
925
+ return API$h.get("/unpaired", { params });
2150
926
  },
2151
- postLogout: () => {
2152
- return API$a.post("/logout");
927
+ getOptions: (params) => {
928
+ return API$h.get("/options", { params });
2153
929
  }
2154
930
  };
2155
- const PREFIX = "/transfer/v2";
2156
- const PrelistAPI = createAxiosInstance({
2157
- prefix: `${PREFIX}/prelist`
2158
- });
2159
- const TransactionAPI = createAxiosInstance({
2160
- prefix: `${PREFIX}/transaction`
2161
- });
2162
- const ApprovalAPI$1 = createAxiosInstance({
2163
- prefix: `${PREFIX}/approval`
931
+ const API$g = createAxiosInstance({
932
+ prefix: "/audit/v2"
2164
933
  });
2165
- const TransferServices = {
2166
- // ------ TRANSACTION ------
2167
- getTransactions: (params) => {
2168
- return TransactionAPI.get("/", { params });
2169
- },
2170
- getTransactionDetail: (id) => {
2171
- return TransactionAPI.get(`/${id}`);
2172
- },
2173
- getTransactionDetailAssets: (id, params) => {
2174
- return TransactionAPI.get(`/${id}/request`, { params });
2175
- },
2176
- getRequestFilterOptions: (id, field) => {
2177
- const params = {};
2178
- if (field) {
2179
- params[field] = true;
2180
- } else {
2181
- params.nameOptions = true;
2182
- params.brandOptions = true;
2183
- params.modelOptions = true;
2184
- }
2185
- return TransactionAPI.get(`/${id}/request/options`, { params });
2186
- },
2187
- getTransactionLog: (id) => {
2188
- return TransactionAPI.get(`/request/${id}/transaction-log`);
2189
- },
2190
- getTransactionOptions: (field) => {
2191
- const params = {};
2192
- params[field] = true;
2193
- return TransactionAPI.get("/options", { params });
2194
- },
2195
- postCreateTransaction: (body) => {
2196
- return TransactionAPI.post("/", body);
2197
- },
2198
- putCancelTransactions: (ids) => {
2199
- const body = { id: ids };
2200
- return TransactionAPI.put("/cancel", body);
2201
- },
2202
- putUpdateTransaction: (id, body) => {
2203
- return TransactionAPI.put(`/${id}`, body);
2204
- },
2205
- putCancelRequests: (ids) => {
2206
- const body = { id: ids };
2207
- return TransactionAPI.put("/request/cancel", body);
2208
- },
2209
- getHistoryByTransaction: (params) => {
2210
- return TransactionAPI.get("/history", { params });
2211
- },
2212
- getHistoryByTransactionOptions: (field) => {
2213
- const params = {};
2214
- params[field] = true;
2215
- return TransactionAPI.get("/history/options", { params });
2216
- },
2217
- getHistoryByAsset: (params) => {
2218
- return TransactionAPI.get("/history/by-asset", { params });
2219
- },
2220
- getHistoryByAssetOptions: (field) => {
2221
- const params = {};
2222
- params[field] = true;
2223
- return TransactionAPI.get("/history/by-asset/options", { params });
2224
- },
2225
- getApproverList: (tranasctionId) => {
2226
- return TransactionAPI.get(`/${tranasctionId}/approval-history`);
2227
- },
2228
- putHandoverTransaction: (id, body) => {
2229
- return TransactionAPI.put(`/${id}/handover`, body);
2230
- },
2231
- // ------ PRELIST ------
2232
- getPrelist: (params) => {
2233
- return PrelistAPI.get("/", { params });
2234
- },
2235
- postAddPrelistData: (body) => {
2236
- return PrelistAPI.post("/", body);
934
+ const AuditServices = {
935
+ getAudit: (assetId, params) => {
936
+ return API$g.get(`/audit/schedule/asset-detail/${assetId}`, { params });
2237
937
  },
2238
- deletePrelist: (ids) => {
2239
- return PrelistAPI.delete("/", {
2240
- params: {
2241
- id: JSON.stringify(ids)
2242
- }
938
+ getAuditOption: (assetId, params) => {
939
+ return API$g.get(`/audit/schedule/asset-detail/${assetId}/options`, {
940
+ params
2243
941
  });
2244
942
  },
2245
- getPrelistAssets: (id) => {
2246
- const params = { id };
2247
- return PrelistAPI.get("/request", { params });
2248
- },
2249
- // APPROVAL
2250
- getApprovals: (status, params) => {
2251
- const formattedParams = { ...params, status: JSON.stringify([status]) };
2252
- return ApprovalAPI$1.get("/", { params: formattedParams });
2253
- },
2254
- getApprovalOptions: (status, field) => {
2255
- const params = {
2256
- status: JSON.stringify([status])
2257
- };
2258
- params[field] = true;
2259
- return ApprovalAPI$1.get("/options", { params });
2260
- },
2261
- getApprovalDetail: (id, approvalType) => {
2262
- const params = {
2263
- groupType: approvalType
2264
- };
2265
- return ApprovalAPI$1.get(`/transaction/${id}`, { params });
2266
- },
2267
- getApprovalDetailOptions: (id, field, approvalType) => {
2268
- const params = {};
2269
- params[field] = true;
2270
- params.groupType = approvalType;
2271
- return ApprovalAPI$1.get(`/transaction/${id}/options`, { params });
2272
- },
2273
- putUpdateApproval: (body) => {
2274
- return ApprovalAPI$1.put("/approve", body);
943
+ putSetActive: (body) => {
944
+ return API$g.put("/audit/asset/activation", body);
2275
945
  }
2276
946
  };
2277
- const ReportAPI = createAxiosInstance({
2278
- prefix: "/disposal/v2/report"
2279
- });
2280
- const DisposalAPI = createAxiosInstance({
2281
- prefix: "/disposal/v2/disposal"
947
+ const API$f = createAxiosInstance({
948
+ prefix: "/settings-attribute/v2/brands"
2282
949
  });
2283
- const ApprovalAPI = createAxiosInstance({
2284
- prefix: "/disposal/v2/approval"
950
+ const BrandServices = {
951
+ getDropdown: (params) => {
952
+ return API$f.get("/dropdown", { params });
953
+ }
954
+ };
955
+ const API$e = createAxiosInstance({
956
+ prefix: "/v2",
957
+ env: "APP_LOGS_NOTIFICATION_API"
2285
958
  });
2286
- const DisposalServices$1 = {
2287
- getReportedDisposal: (params) => {
2288
- return ReportAPI.get("", { params });
2289
- },
2290
- getReportedDisposalOptions: (params) => {
2291
- return ReportAPI.get("/options", { params });
2292
- },
2293
- postReportDisposal: (body) => {
2294
- return ReportAPI.post("", body);
2295
- },
2296
- deleteCancelReport: (params) => {
2297
- params.isFromDisposal = "false";
2298
- return ReportAPI.delete("/cancel-report", { params });
2299
- },
2300
- deleteDeclineReport: (params) => {
2301
- params.isFromDisposal = "true";
2302
- return ReportAPI.delete("/cancel-report", { params });
2303
- },
2304
- getPrelistDisposal: (params) => {
2305
- return DisposalAPI.get("/prelist", { params });
2306
- },
2307
- getPrelistDisposalRequest: (params) => {
2308
- return DisposalAPI.get("/prelist/request", { params });
2309
- },
2310
- postCreatePrelist: (body) => {
2311
- return DisposalAPI.post("/prelist", body);
2312
- },
2313
- deletePrelistData: (params) => {
2314
- return DisposalAPI.delete("/prelist", { params });
959
+ const ChangelogServices = {
960
+ getActionLog: (params) => {
961
+ return API$e.get("/change-log", { params });
2315
962
  },
2316
- postCreateTransaction: (body) => {
2317
- return DisposalAPI.post("/transaction", body);
963
+ getActionLogOption: (params) => {
964
+ return API$e.get("/change-log/options", { params });
2318
965
  },
2319
- putTransaction: (id, body) => {
2320
- return DisposalAPI.put(`/disposal/${id}`, body);
966
+ getSessionLogList: (params) => {
967
+ return API$e.get("/session-log", { params });
2321
968
  },
2322
- getTransactionData: (params) => {
2323
- return DisposalAPI.get("/transaction", { params });
969
+ getUserDetailSystemLogList: (params) => {
970
+ return API$e.get("/change-log", { params });
2324
971
  },
2325
- getTransactionDetail: (transactionId) => {
2326
- return DisposalAPI.get(`/transaction/${transactionId}`);
972
+ getUserDetailSystemLogOption: (params) => {
973
+ return API$e.get("/change-log/options", { params });
2327
974
  },
2328
- getDisposalTransactionLog: (id) => {
2329
- return DisposalAPI.get(`/request/${id}/disposal-log`);
975
+ /**
976
+ * Retrieves the transaction log.
977
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
978
+ */
979
+ getTransactionLog: (params) => {
980
+ return API$e.get("/transaction-log", { params });
2330
981
  },
2331
- getTransactionApprovalHistory: (transactionId) => {
2332
- return ApprovalAPI.get(`/transaction/${transactionId}/approval-history`);
982
+ /**
983
+ * Retrieves the transaction log options.
984
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
985
+ */
986
+ getTransactionLogOption: (params) => {
987
+ return API$e.get("/transaction-log/options", { params });
2333
988
  },
2334
- getTransactionOptions: (params) => {
2335
- return DisposalAPI.get("/transaction/options", { params });
989
+ postScanLog: (body) => {
990
+ return API$e.post("/transaction-log/scan-log", body);
991
+ }
992
+ };
993
+ const API$d = ({ headers = {}, params = {} } = {}) => {
994
+ const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
995
+ const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
996
+ const instance = axios.create({
997
+ baseURL: `${BASE_URL}/v1`,
998
+ headers: {
999
+ "Content-type": "application/json",
1000
+ "X-CSCAPI-KEY": API_KEY,
1001
+ ...headers
1002
+ },
1003
+ params
1004
+ });
1005
+ return instance;
1006
+ };
1007
+ const CountryStateServices = {
1008
+ getCountry: () => {
1009
+ return API$d().get("/countries");
2336
1010
  },
2337
- putCancelTransaction: (params) => {
2338
- return DisposalAPI.put("/cancel", void 0, { params });
1011
+ getState: (country) => {
1012
+ return API$d().get(`/countries/${country}/states`);
2339
1013
  },
2340
- putCancelRequest: (body) => {
2341
- return DisposalAPI.put("/request/cancel", body);
1014
+ getCity: (country, state) => {
1015
+ return API$d().get(`/countries/${country}/states/${state}/cities`);
1016
+ }
1017
+ };
1018
+ const API$c = createAxiosInstance({
1019
+ prefix: "/dashboard/v2/dashboard"
1020
+ });
1021
+ const DashboardServices = {
1022
+ getLatestTask: (params) => {
1023
+ return API$c.get("/latest-task", { params });
2342
1024
  },
2343
- putDisposalVerification: (body, transactionId) => {
2344
- return DisposalAPI.put(`/${transactionId}/verification`, body);
1025
+ getSummary: (params) => {
1026
+ return API$c.get("/summary", { params });
1027
+ }
1028
+ };
1029
+ const API$b = createAxiosInstance({
1030
+ env: "APP_GLOBAL_SETTINGS_API",
1031
+ prefix: "/v1/global-settings/auth"
1032
+ });
1033
+ const onRejected = (error) => {
1034
+ var _a, _b, _c, _d;
1035
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
1036
+ window.onblur = void 0;
1037
+ window.onfocus = void 0;
1038
+ window.sessionExpired = true;
1039
+ return window.dispatchEvent(new CustomEvent("user:expired"));
1040
+ }
1041
+ return Promise.reject(error);
1042
+ };
1043
+ const AuthServices = {
1044
+ login: (form) => {
1045
+ const body = { ...form, isMobile: false };
1046
+ return API$b.post("/login", body);
2345
1047
  },
2346
- putDisposalCompletion: (body, transactionId) => {
2347
- const headers = { "Content-Type": "multipart/form-data" };
2348
- return DisposalAPI.put(`/${transactionId}/completion`, body, { headers });
1048
+ reLogin: (body) => {
1049
+ API$b.interceptors.response.use((response) => {
1050
+ return response;
1051
+ }, onRejected);
1052
+ return API$b.post("/login", body);
2349
1053
  },
2350
- getDisposalRequest: (params) => {
2351
- return DisposalAPI.get("/request", { params });
1054
+ requestOTP: (email) => {
1055
+ const body = { email };
1056
+ return API$b.post("/request-otp", body);
2352
1057
  },
2353
- getDisposalRequestOptions: (params) => {
2354
- return DisposalAPI.get("/request/options", { params });
1058
+ requestResetPassLink: (email) => {
1059
+ const body = { email };
1060
+ return API$b.post("/request-reset-link", body);
2355
1061
  },
2356
- getVerifyAsset: (params) => {
2357
- return DisposalAPI.get("/request/scan", { params });
1062
+ setPassword: (body) => {
1063
+ return API$b.post("/set-password", body);
2358
1064
  },
2359
- getDisposalHistory: (additionalPath, params) => {
2360
- return DisposalAPI.get(`/history${additionalPath}`, { params });
1065
+ verifyToken: (token) => {
1066
+ return API$b.get(`/verify-token/${token}`);
2361
1067
  },
2362
- getHistoryByTransactionOptions: (params) => {
2363
- return DisposalAPI.get("/history/options", { params });
1068
+ confirmEmailChange: (token) => {
1069
+ const body = { token };
1070
+ return API$b.put("/confirm-email-change/confirm", body);
2364
1071
  },
2365
- getHistoryByAssetOptions: (params) => {
2366
- return DisposalAPI.get("/history/by-asset/options", { params });
1072
+ postLogout: () => {
1073
+ return API$b.post("/logout");
2367
1074
  }
2368
1075
  };
2369
- const API$9 = createAxiosInstance({
2370
- prefix: "/transfer-go/v2"
1076
+ const API$a = createAxiosInstance({
1077
+ env: "APP_ADMIN_API",
1078
+ prefix: "/settings-attribute/languages"
2371
1079
  });
2372
- const TransferServicesGo = {
2373
- getTransactionData: (params) => {
2374
- return API$9.get("/transaction", { params });
1080
+ const I18nService = {
1081
+ /**
1082
+ * Fetch all translation messages for a specific locale.
1083
+ * @param locale The locale code (e.g., 'en', 'id').
1084
+ * @returns A promise resolving to a key-value record of messages.
1085
+ */
1086
+ getMessages: (isoCode) => {
1087
+ return API$a.get(`/${isoCode}/translations`);
2375
1088
  },
2376
- getTransactionOptions: (params) => {
2377
- return API$9.get("/transaction/options", { params });
1089
+ /**
1090
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
1091
+ *
1092
+ * @returns Promise Array of options
1093
+ */
1094
+ getLanguageOptions: async () => {
1095
+ const { data } = await API$a.get("/dropdown");
1096
+ return data.data;
2378
1097
  },
2379
- getTransactionLog: (id) => {
2380
- return API$9.get(`/transaction/request/${id}/transaction-log`);
1098
+ /**
1099
+ * Fetch single lang option meta data
1100
+ *
1101
+ * @param isoCode The locale code (e.g., 'en', 'id').
1102
+ * @returns Promise LanguageMeta
1103
+ */
1104
+ getLanguageOptionMeta: async (isoCode) => {
1105
+ const { data } = await API$a.get(
1106
+ "/dropdown/" + isoCode
1107
+ );
1108
+ return data.data;
2381
1109
  },
2382
- postCreateTransaction: (body) => {
2383
- return API$9.post("/transaction", body);
1110
+ /**
1111
+ * Translate a specific text to the target locale.
1112
+ *
1113
+ * @param key Unique translation key.
1114
+ * @param locale Target locale code.
1115
+ */
1116
+ translateText: async (key, locale) => {
1117
+ const { data } = await API$a.post("/translate", {
1118
+ q: key,
1119
+ target: locale
1120
+ });
1121
+ return data.data.translations[key];
1122
+ }
1123
+ };
1124
+ const API$9 = createAxiosInstance({
1125
+ prefix: "/settings-attribute/v2/models"
1126
+ });
1127
+ const ModelTypeServices = {
1128
+ getDropdown: (params) => {
1129
+ return API$9.get("/dropdown", { params });
2384
1130
  }
2385
1131
  };
2386
1132
  const API$8 = createAxiosInstance({
2387
- prefix: "/audit/v2"
1133
+ prefix: "/v2",
1134
+ env: "APP_LOGS_NOTIFICATION_API"
2388
1135
  });
2389
- const AuditServices = {
2390
- getAudit: (assetId, params) => {
2391
- return API$8.get(`/audit/schedule/asset-detail/${assetId}`, { params });
2392
- },
2393
- getAuditOption: (assetId, params) => {
2394
- return API$8.get(`/audit/schedule/asset-detail/${assetId}/options`, {
2395
- params
2396
- });
2397
- },
2398
- putSetActive: (body) => {
2399
- return API$8.put("/audit/asset/activation", body);
1136
+ const NotificationApprovalServices = {
1137
+ getTotalApprovals: () => {
1138
+ return API$8.get("/approval/count");
2400
1139
  }
2401
1140
  };
2402
1141
  const API$7 = createAxiosInstance({
2403
- prefix: "/routine/v2"
1142
+ prefix: "/iot/v2/reader"
2404
1143
  });
2405
- const RoutineServices = {
2406
- getMaintenance: (assetId, params) => {
2407
- return API$7.get(`/routine-task/${assetId}`, { params });
1144
+ const ReaderServices = {
1145
+ getData: (params) => {
1146
+ return API$7.get("/", { params });
2408
1147
  },
2409
- getMaintenanceOption: (assetId, params) => {
2410
- return API$7.get(`/routine-task/${assetId}/options`, { params });
1148
+ getDataOptions: (params) => {
1149
+ return API$7.get("/options", { params });
2411
1150
  },
2412
- putSetActive: (body) => {
2413
- return API$7.put("/maintenable-asset/set-active", body);
1151
+ getActivityLogData: (params) => {
1152
+ return API$7.get("/activity-log", { params });
1153
+ },
1154
+ getActivityLogOptions: (params) => {
1155
+ return API$7.get("/activity-log/options", { params });
1156
+ },
1157
+ getDataById: (id) => {
1158
+ return API$7.get(`/${id}`);
1159
+ },
1160
+ getChangeLog: (params) => {
1161
+ return API$7.get(`/${params.id}/change-log`, { params });
1162
+ },
1163
+ getChangeLogOptions: (params) => {
1164
+ return API$7.get(`/${params.id}/change-log/options`, { params });
1165
+ },
1166
+ putData: (id, body) => {
1167
+ return API$7.put(`/${id}`, body);
2414
1168
  }
2415
1169
  };
2416
1170
  const API$6 = createAxiosInstance({
2417
- prefix: "/settings-attribute/v2/models"
1171
+ prefix: "/repair/v2"
2418
1172
  });
2419
- const ModelTypeServices = {
2420
- getDropdown: (params) => {
2421
- return API$6.get("/dropdown", { params });
1173
+ const RepairServices = {
1174
+ getRepairList: (params) => {
1175
+ return API$6.get("/my-asset/repair", { params });
1176
+ },
1177
+ getFilterOptions: (params) => {
1178
+ return API$6.get("/my-asset/repair/options", { params });
1179
+ },
1180
+ getAssetRepairTicketing: (assetId, params) => {
1181
+ return API$6.get(`/repair/${assetId}/asset-repair-detail`, { params });
1182
+ },
1183
+ putConfirmRepair: (repairId) => {
1184
+ return API$6.put(`/repair/${repairId}/confirm-repair`);
2422
1185
  }
2423
1186
  };
2424
1187
  const API$5 = createAxiosInstance({
2425
- prefix: "/settings-attribute/v2/transaction-settings"
1188
+ prefix: "/routine/v2"
2426
1189
  });
2427
- const TransactionSettingServices = {
2428
- getData: () => {
2429
- return API$5.get("/");
1190
+ const RoutineServices = {
1191
+ getMaintenance: (assetId, params) => {
1192
+ return API$5.get(`/routine-task/${assetId}`, { params });
2430
1193
  },
2431
- putData: (data) => {
2432
- return API$5.put("/", data);
1194
+ getMaintenanceOption: (assetId, params) => {
1195
+ return API$5.get(`/routine-task/${assetId}/options`, { params });
1196
+ },
1197
+ putSetActive: (body) => {
1198
+ return API$5.put("/maintenable-asset/set-active", body);
2433
1199
  }
2434
1200
  };
2435
1201
  const API$4 = createAxiosInstance({
2436
- prefix: "/borrowing-go/v2"
1202
+ prefix: "/routine/v2"
2437
1203
  });
2438
- const BorrowServicesGo = {
2439
- getTransactions: async (params) => {
2440
- return API$4.get("/transaction", { params });
1204
+ const ServiceCenterServices = {
1205
+ getList: (params) => {
1206
+ return API$4.get("/service-center", { params });
2441
1207
  },
2442
- getTransactionOptions: async (params) => {
2443
- return API$4.get("/transaction/options", { params });
1208
+ postList: (body) => {
1209
+ return API$4.post("/service-center", body);
2444
1210
  },
2445
- getTransactionLog: async (id) => {
2446
- return API$4.get(`/transaction/request/${id}/transaction-log`);
1211
+ putList: (id, body) => {
1212
+ return API$4.put(`/service-center/${id}`, body);
2447
1213
  },
2448
- postTransaction: async (body) => {
2449
- return API$4.post("/transaction", body);
1214
+ putActivate: (body) => {
1215
+ return API$4.put("/service-center/bulk", body);
2450
1216
  },
2451
- putTransaction: async (body) => {
2452
- return API$4.put("/transaction", body);
1217
+ getDetailList: (id) => {
1218
+ return API$4.get(`/service-center/${id}`);
2453
1219
  },
2454
- putTransactionReturn: async (requestIds) => {
2455
- const body = { id: requestIds };
2456
- return API$4.put("/transaction/return", body);
1220
+ getListOptions: (params) => {
1221
+ return API$4.get("/service-center/options", { params });
2457
1222
  },
2458
- putCancelReport: async (requestIds) => {
2459
- const body = { id: requestIds };
2460
- return API$4.put("/transaction/request/cancel-report", body);
1223
+ deleteList: (params) => {
1224
+ return API$4.delete("/service-center", { params });
1225
+ },
1226
+ // Activities
1227
+ getActivities: (params) => {
1228
+ return API$4.get("/service-activities", { params });
1229
+ },
1230
+ getActivityOptions: (params) => {
1231
+ return API$4.get("/service-activities/options", { params });
1232
+ },
1233
+ getActivityDetail: (id) => {
1234
+ return API$4.get(`/service-activities/${id}`);
1235
+ },
1236
+ getActivityLog: (id) => {
1237
+ return API$4.get(`/service-activities/${id}/activity-log`);
2461
1238
  }
2462
1239
  };
2463
1240
  const API$3 = createAxiosInstance({
2464
- prefix: "/disposal-go/v2/"
1241
+ prefix: "/v2/session-log",
1242
+ env: "APP_LOGS_NOTIFICATION_API"
2465
1243
  });
2466
- const DisposalServices = {
2467
- getReportedDisposal: (params) => {
2468
- return API$3.get("/report", { params });
1244
+ const SessionLogServices = {
1245
+ postLogout: () => {
1246
+ return API$3.post("/logout");
1247
+ }
1248
+ };
1249
+ const API$2 = createAxiosInstance({
1250
+ prefix: "/tag/v2"
1251
+ });
1252
+ const TAGServices = {
1253
+ getScanQR: (tag) => {
1254
+ return API$2.get("/qr", { params: { tag } });
2469
1255
  },
2470
- getReportedDisposalOptions: (params) => {
2471
- return API$3.get("/report/options", { params });
1256
+ getScanRFID: (tag) => {
1257
+ return API$2.get("/rfid", { params: { tag } });
2472
1258
  },
2473
- postReportDisposal: (body) => {
2474
- return API$3.post("/report", body);
1259
+ getRFIDQRTAG: (params) => {
1260
+ return API$2.get("/rfid-qr/scan", { params });
2475
1261
  },
2476
- deleteCancelReport: (params) => {
2477
- params.isFromDisposal = "false";
2478
- return API$3.delete("/report/cancel-report", { params });
1262
+ getEventLog: (params) => {
1263
+ return API$2.get("/tag-transaction/event-log", { params });
2479
1264
  },
2480
- deleteDeclineReport: (params) => {
2481
- params.isFromDisposal = "true";
2482
- return API$3.delete("/report/cancel-report", { params });
1265
+ // Tab All
1266
+ getRfidQrAll: (path, params) => {
1267
+ return API$2.get(`/${path}`, { params });
2483
1268
  },
2484
- getDisposalHistory: (params) => {
2485
- return API$3.get("/transaction", { params });
1269
+ // Tab Paired
1270
+ getRfidQrPaired: (tagType, viewBy, params) => {
1271
+ return API$2.get(`/${tagType}/paired/${viewBy}`, { params });
2486
1272
  },
2487
- getHistoryByAssetOptions: (params) => {
2488
- return API$3.get("/transaction/options", { params });
1273
+ postAddTAGtoPrelist: (body, destination) => {
1274
+ return API$2.post(`/prelist/${destination}/asset-name`, body);
2489
1275
  },
2490
- getDisposalTransactionLog: (requestId) => {
2491
- return API$3.get(`/transaction/request/${requestId}/transaction-log`);
1276
+ postAddTAGtoReplacePrelist: (body) => {
1277
+ return API$2.post("/prelist/replace-tag", body);
2492
1278
  },
2493
- postCreateTransaction: (body) => {
2494
- return API$3.post("/transaction", body);
2495
- }
2496
- };
2497
- const API$2 = createAxiosInstance({
2498
- prefix: "/report/v2/reports"
2499
- });
2500
- const ReportServices$1 = {
2501
- getReportList: (params) => {
2502
- return API$2.get("/schedules", { params });
1279
+ postAddTAGToPrelistUnpair: (body) => {
1280
+ return API$2.post("/prelist/unpair-tag", body);
2503
1281
  },
2504
- getReportSchedule: (scheduleId) => {
2505
- return API$2.get("/schedules/" + scheduleId);
1282
+ postAddTAGtoPending: (body) => {
1283
+ return API$2.post("/pending-changes", body);
2506
1284
  },
2507
- getUniqueScheduleName: (name) => {
2508
- return API$2.get("/schedules/unique-name", { params: { name } });
1285
+ // Available Tab
1286
+ getRFIDQrAvailable: (tagType, params) => {
1287
+ return API$2.get(`/${tagType}/available`, { params });
2509
1288
  },
2510
- getFilterOptions: (params) => {
2511
- return API$2.get("/schedules/options", { params });
1289
+ // Damaged TAB
1290
+ getRFIDQrDamaged: (tagType, params) => {
1291
+ return API$2.get(`/${tagType}/damaged`, { params });
2512
1292
  },
2513
- putSetActive: (body) => {
2514
- return API$2.put("/schedules/activation", body);
1293
+ // RFID and QR Module
1294
+ getRFIDandQRList: (params) => {
1295
+ return API$2.get("/rfid-qr", { params });
2515
1296
  },
2516
- putEditSchedule: (body) => {
2517
- return API$2.put("/schedules/" + body._id, body);
1297
+ deleteUnpairTAG: (body) => {
1298
+ return API$2.delete("/rfid-qr", { data: { data: body } });
2518
1299
  },
2519
- deleteReports: (reportIds) => {
2520
- return API$2.delete("/schedules", { params: { reportIds } });
1300
+ postPairTAG: (body) => {
1301
+ return API$2.post("/rfid-qr", { body: { data: body } });
2521
1302
  },
2522
- postCreateSchedule: (data) => {
2523
- return API$2.post("/schedules/create", data);
1303
+ // RFID To Be Returned
1304
+ getToBeReturnedTAGList: (params) => {
1305
+ return API$2.get("/rfid/to-be-returned", { params });
2524
1306
  },
2525
- postDownloadReport: (data) => {
2526
- return API$2.post("/download", data, { responseType: "arraybuffer" });
1307
+ // Handover TAG
1308
+ putHandoverTAG: (body) => {
1309
+ return API$2.put("/rfid/handover", { body: { data: body } });
2527
1310
  },
2528
- postGenerateReport: (data) => {
2529
- return API$2.post("/generate", data);
2530
- }
2531
- };
2532
- const API$1 = createAxiosInstance({
2533
- prefix: "/report-go/v2/reports"
2534
- });
2535
- const ReportServices = {
2536
- getReportList: (params) => {
2537
- return API$1.get("/schedules", { params });
1311
+ // Table Filter
1312
+ getFilterOptions: (path, params) => {
1313
+ return API$2.get(`/${path}/options`, { params });
2538
1314
  },
2539
- getReportSchedule: (scheduleId) => {
2540
- return API$1.get("/schedules/" + scheduleId);
1315
+ getHolderListOptions: (params) => {
1316
+ return API$2.get("/rfid/holder-list/options", { params });
2541
1317
  },
2542
- getUniqueScheduleName: (name) => {
2543
- return API$1.get("/schedules/unique-name", { params: { name } });
1318
+ getHolderList: (params) => {
1319
+ return API$2.get("/rfid/holder-list", { params });
2544
1320
  },
2545
- getFilterOptions: (params) => {
2546
- return API$1.get("/schedules/options", { params });
1321
+ putAuditTAG: (body, tagType) => {
1322
+ return API$2.put(`/${tagType}/audit`, body);
2547
1323
  },
2548
- putSetActive: (body) => {
2549
- return API$1.put("/schedules/set-active", body);
1324
+ postLogAudit: (body) => {
1325
+ return API$2.post("/tag-transaction/log-audit", body);
2550
1326
  },
2551
- putEditSchedule: (id, body) => {
2552
- return API$1.put(`/schedules/${id}`, body);
1327
+ postCreateQr: (amount) => {
1328
+ const body = { amount };
1329
+ return API$2.post("/qr", body);
2553
1330
  },
2554
- deleteReports: (id) => {
2555
- return API$1.delete("/schedules", { params: { id } });
1331
+ putReportTAG: (id, body) => {
1332
+ return API$2.put(`/tag-transaction/report/${id}`, body);
2556
1333
  },
2557
- postCreateSchedule: (data) => {
2558
- return API$1.post("/schedules", data);
1334
+ putReportTAGBulk: (body) => {
1335
+ return API$2.put("/tag-transaction/report/bulk", body);
2559
1336
  },
2560
- postDownloadReport: (data) => {
2561
- return API$1.post("/download", data, { responseType: "arraybuffer" });
1337
+ putDeclineReport: (body, tagType) => {
1338
+ return API$2.put(`/report/decline-report/${tagType}`, body);
1339
+ }
1340
+ };
1341
+ const API$1 = createAxiosInstance({
1342
+ prefix: "/tracking/v2/tracking"
1343
+ });
1344
+ const MissingServices = {
1345
+ getTrackingDetail: (trackingId) => {
1346
+ return API$1.get(`/${trackingId}`);
2562
1347
  },
2563
- postGenerateReport: (data) => {
2564
- return API$1.post("/generate", data);
1348
+ putFoundAsset: (tag, groupId, serialNumber) => {
1349
+ const params = {
1350
+ tag,
1351
+ group: groupId,
1352
+ serialNumber,
1353
+ type: "Global"
1354
+ };
1355
+ return API$1.put("/scan", void 0, { params });
1356
+ },
1357
+ putReportPermanentlyMissing: (trackingId, body) => {
1358
+ return API$1.put(`/report-permanently-missing/${trackingId}`, body);
1359
+ },
1360
+ putMoveBack: (body) => {
1361
+ return API$1.put("/tracking/move-back", body);
2565
1362
  }
2566
1363
  };
2567
1364
  const API = createAxiosInstance({
2568
- prefix: `/${SERVER_PREFIX.SETTINGS_ATTRIBUTES}/v2/asset-name-policy`
1365
+ prefix: "/settings-attribute/v2/transaction-settings"
2569
1366
  });
2570
- const AssetPolicyServices = {
2571
- getList: (params) => {
2572
- return API.get("/", { params });
2573
- },
2574
- getListFilterOptions: (params) => {
2575
- return API.get("/options");
1367
+ const TransactionSettingServices = {
1368
+ getData: () => {
1369
+ return API.get("/");
2576
1370
  },
2577
- putUpdatePolicy: (body) => {
2578
- return API.put("/", body);
1371
+ putData: (data) => {
1372
+ return API.put("/", data);
2579
1373
  }
2580
1374
  };
2581
1375
  export {
2582
1376
  AliasCodeServices,
2583
1377
  AssetNameServices,
2584
1378
  AssetPolicyServices,
2585
- AssetServices$1 as AssetServices,
2586
- AssetServices as AssetServicesGo,
2587
- AssignmentServices$1 as AssignmentServices,
2588
- AssignmentServices as AssignmentServicesGo,
1379
+ AssetServices,
1380
+ AssignmentServices,
2589
1381
  AuditServices,
2590
1382
  AuthServices$1 as AuthServices,
2591
- BorrowServices,
2592
- BorrowServicesGo,
1383
+ BorrowServicesGo as BorrowServices,
2593
1384
  BrandServices,
2594
- ChangelogServices$1 as ChangelogServices,
1385
+ ChangelogServices,
2595
1386
  CountryStateServices,
2596
1387
  CustomFieldServices,
2597
- DamageServices$1 as DamageServices,
2598
- DamageServices as DamageServicesGo,
1388
+ DamageServices,
2599
1389
  DashboardServices,
2600
- DisposalServices$1 as DisposalServices,
2601
- DisposalServices as DisposalServicesGo,
2602
- FileManagerServices$1 as FileManagerServices,
2603
- FileManagerServices as FileManagerServicesGo,
1390
+ DisposalServices,
1391
+ FileManagerServices,
2604
1392
  GeneralSettingsServices,
2605
1393
  AuthServices as GlobalAuthServices,
2606
1394
  GroupCategoryServices,
2607
1395
  I18nService,
2608
- ImportServices$1 as ImportServices,
2609
- ImportServices as ImportServicesGo,
2610
- LicenseServices$1 as LicenseServices,
2611
- LicenseServices as LicenseServicesGo,
2612
- ChangelogServices as LogServicesGo,
2613
- MissingServices$2 as MissingServices,
2614
- MissingServices$1 as MissingServicesGo,
1396
+ ImportServices,
1397
+ LicenseServices,
1398
+ ChangelogServices$1 as LogServices,
1399
+ MissingServices$1 as MissingServices,
2615
1400
  ModelTypeServices,
2616
- MyAssetServices$1 as MyAssetServices,
2617
- MyAssetServices as MyAssetServicesGo,
1401
+ MyAssetServices,
2618
1402
  NotificationApprovalServices,
2619
- NotificationServices$1 as NotificationServices,
2620
- NotificationServices as NotificationServicesGo,
2621
- OpenAPIServices$1 as OpenAPIServices,
2622
- OpenAPIServices as OpenAPIServicesGo,
1403
+ NotificationServices,
1404
+ OpenAPIServices,
2623
1405
  ReaderServices,
2624
1406
  RepairServices,
2625
- ReportServices$1 as ReportServices,
2626
- ReportServices as ReportServicesGo,
2627
- RoleServices$1 as RoleServices,
2628
- RoleServices as RoleServicesGo,
1407
+ ReportServices,
1408
+ RoleServices,
2629
1409
  RoutineServices,
2630
1410
  ServiceCenterServices,
2631
1411
  SessionLogServices,
2632
- SubUserServices$1 as SubUserServices,
2633
- SubUserServices as SubUserServicesGo,
1412
+ SubUserServices,
2634
1413
  TAGServices,
2635
1414
  MissingServices as TrackingServices,
2636
1415
  TransactionSettingServices,
2637
- TransferServices,
2638
- TransferServicesGo,
2639
- UserServices$1 as UserServices,
2640
- UserServices as UserServicesGo,
1416
+ TransferServicesGo as TransferServices,
1417
+ UserServices,
2641
1418
  getAssetsFile,
2642
1419
  getBaseURL,
2643
1420
  getImageURL,