@tagsamurai/fats-api-services 1.0.1-beta.0 → 1.0.2-beta.1

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