@tagsamurai/fats-api-services 1.0.0-alpha.15 → 1.0.0-alpha.150

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 (117) hide show
  1. package/api-services.es.js +1146 -113
  2. package/api-services.system.js +1 -1
  3. package/main.d.ts +43 -1
  4. package/package.json +1 -1
  5. package/src/dto/aliasCode.dto.d.ts +4 -0
  6. package/src/dto/assetDetail.dto.d.ts +89 -0
  7. package/src/dto/assetName.dto.d.ts +8 -0
  8. package/src/dto/assetService.dto.d.ts +110 -0
  9. package/src/dto/assignment.dto.d.ts +81 -0
  10. package/src/dto/audit.dto.d.ts +14 -0
  11. package/src/dto/customField.dto.d.ts +16 -0
  12. package/src/dto/damageService.dto.d.ts +23 -0
  13. package/src/dto/disposal.dto.d.ts +12 -0
  14. package/src/dto/fileManager.dto.d.ts +25 -0
  15. package/src/dto/groupCategoryService.dto.d.ts +3 -3
  16. package/src/dto/importData.dto.d.ts +7 -0
  17. package/src/dto/importTemporaryData.dto.d.ts +6 -0
  18. package/src/dto/license.dto.d.ts +4 -0
  19. package/src/dto/log.dto.d.ts +11 -11
  20. package/src/dto/maintenanceRoutine.dto.d.ts +12 -0
  21. package/src/dto/missing.dto.d.ts +12 -0
  22. package/src/dto/notification.dto.d.ts +3 -1
  23. package/src/dto/oldAuth.dto.d.ts +12 -0
  24. package/src/dto/oldBorrowService.dto.d.ts +47 -0
  25. package/src/dto/oldDamageService.dto.d.ts +7 -0
  26. package/src/dto/oldDisposalService.dto.d.ts +8 -0
  27. package/src/dto/oldRepairService.dto.d.ts +29 -0
  28. package/src/dto/oldTagService.dto.d.ts +50 -0
  29. package/src/dto/oldTrackingService.dto.d.ts +6 -0
  30. package/src/dto/oldTransferService.dto.d.ts +221 -0
  31. package/src/dto/openApi.dto.d.ts +3 -0
  32. package/src/dto/role.dto.d.ts +50 -0
  33. package/src/dto/serviceCenter.dto.d.ts +22 -0
  34. package/src/dto/subUser.dto.d.ts +46 -0
  35. package/src/dto/transactionLog.dto.d.ts +17 -0
  36. package/src/dto/transfer.dto.d.ts +29 -0
  37. package/src/dto/user.dto.d.ts +126 -33
  38. package/src/services/aliasCode.service.d.ts +10 -0
  39. package/src/services/asset.service.d.ts +43 -0
  40. package/src/services/assignment.service.d.ts +15 -0
  41. package/src/services/countryState.service.d.ts +7 -0
  42. package/src/services/customField.service.d.ts +18 -0
  43. package/src/services/damage.service.d.ts +13 -0
  44. package/src/services/damageService.type.d.ts +103 -0
  45. package/src/services/fileManager.service.d.ts +53 -0
  46. package/src/services/generalSettings.service.d.ts +6 -0
  47. package/src/services/groupCategory.service.d.ts +1 -0
  48. package/src/services/importData.service.d.ts +24 -0
  49. package/src/services/log.service.d.ts +20 -0
  50. package/src/services/missing.service.d.ts +12 -0
  51. package/src/services/notification.service.d.ts +9 -0
  52. package/src/services/oldAliasCode.service.d.ts +10 -0
  53. package/src/services/oldAsset.service.d.ts +47 -0
  54. package/src/services/oldAssetName.service.d.ts +14 -0
  55. package/src/services/oldAssignment.service.d.ts +84 -0
  56. package/src/services/oldAudit.service.d.ts +11 -0
  57. package/src/services/oldAuth.service.d.ts +29 -0
  58. package/src/services/oldBorrow.service.d.ts +18 -0
  59. package/src/services/oldBrand.service.d.ts +7 -0
  60. package/src/services/oldCustomField.service.d.ts +19 -0
  61. package/src/services/oldDamage.service.d.ts +11 -0
  62. package/src/services/oldDisposal.service.d.ts +9 -0
  63. package/src/services/oldFileManager.service.d.ts +53 -0
  64. package/src/services/oldGeneralSettings.service.d.ts +6 -0
  65. package/src/services/oldGroupCategory.service.d.ts +3 -2
  66. package/src/services/oldImportData.service.d.ts +22 -0
  67. package/src/services/oldLicense.service.d.ts +9 -0
  68. package/src/services/oldLog.service.d.ts +16 -0
  69. package/src/services/oldMaintenanceRoutine.service.d.ts +11 -0
  70. package/src/services/oldMissing.service.d.ts +12 -1
  71. package/src/services/oldModelType.service.d.ts +7 -0
  72. package/src/services/oldMyAsset.service.d.ts +7 -0
  73. package/src/services/oldOpenApi.service.d.ts +10 -0
  74. package/src/services/oldReader.service.d.ts +13 -0
  75. package/src/services/oldRepair.service.d.ts +10 -0
  76. package/src/services/oldRole.service.d.ts +56 -0
  77. package/src/services/oldServiceCenter.service.d.ts +19 -0
  78. package/src/services/oldSubUser.service.d.ts +15 -0
  79. package/src/services/oldTag.service.d.ts +27 -0
  80. package/src/services/oldTracking.service.d.ts +4 -0
  81. package/src/services/oldTransfer.service.d.ts +30 -0
  82. package/src/services/oldUser.service.d.ts +26 -15
  83. package/src/services/openApi.service.d.ts +8 -0
  84. package/src/services/role.service.d.ts +58 -0
  85. package/src/services/subUser.service.d.ts +17 -0
  86. package/src/services/transfer.service.d.ts +11 -0
  87. package/src/services/user.service.d.ts +42 -0
  88. package/src/types/aliasCode.type.d.ts +16 -0
  89. package/src/types/asset.type.d.ts +205 -0
  90. package/src/types/assetDetail.type.d.ts +120 -0
  91. package/src/types/assignedAsset.type.d.ts +60 -0
  92. package/src/types/assignment.type.d.ts +334 -0
  93. package/src/types/audit.type.d.ts +13 -0
  94. package/src/types/customField.type.d.ts +43 -0
  95. package/src/types/dataTable.type.d.ts +7 -0
  96. package/src/types/disposal.type.d.ts +1 -0
  97. package/src/types/fetchResponse.type.d.ts +9 -2
  98. package/src/types/fileManager.type.d.ts +24 -0
  99. package/src/types/groupCategoryData.type.d.ts +3 -10
  100. package/src/types/importData.type.d.ts +92 -0
  101. package/src/types/maintenanceRoutine.type.d.ts +10 -0
  102. package/src/types/notification.type.d.ts +17 -0
  103. package/src/types/oldAssetService.type.d.ts +98 -0
  104. package/src/types/oldTagService.type.d.ts +118 -0
  105. package/src/types/options.type.d.ts +6 -10
  106. package/src/types/reader.d.ts +55 -0
  107. package/src/types/role.type.d.ts +111 -6
  108. package/src/types/serviceCenter.type.d.ts +29 -0
  109. package/src/types/subUser.type.d.ts +28 -0
  110. package/src/types/transfer.type.d.ts +64 -0
  111. package/src/types/user.type.d.ts +42 -0
  112. package/src/types/userGlobalRole.type.d.ts +1 -1
  113. package/src/types/userGroupRole.type.d.ts +1 -1
  114. package/src/types/userTransactionRole.type.d.ts +2 -0
  115. package/src/utils/getAssetsFile.util.d.ts +1 -0
  116. package/src/utils/index.d.ts +1 -0
  117. package/src/types/userSystemRole.type.d.ts +0 -14
@@ -1,16 +1,16 @@
1
- import v from "axios";
2
- const S = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_ADMIN_API: "https://dev-admin-api.tagsamurai.com", VITE_APP_API: "https://dev-api.tagsamurai.com", VITE_APP_COUNTRY_STATE_API: "https://api.countrystatecity.in", VITE_APP_COUNTRY_STATE_API_KEY: "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, P = (t = "APP_API") => S["VITE_" + t], n = (t = {}, e = !1) => {
3
- const { env: r = "APP_API", prefix: a = "", headers: u = {}, ...I } = t, _ = `${P(r)}${a}`, c = JSON.parse(localStorage.getItem("user") ?? "{}"), d = c.jwt ?? c.token ?? "";
4
- return v.create({
5
- ...I,
6
- baseURL: _,
7
- headers: e ? u : {
1
+ import lt from "axios";
2
+ const $t = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_ADMIN_API: "https://dev-admin-api.tagsamurai.com", VITE_APP_API: "https://dev-api.tagsamurai.com", VITE_APP_ASSETS_URL: "https://assets.tagsamurai.com", VITE_APP_COUNTRY_STATE_API: "https://api.countrystatecity.in", VITE_APP_COUNTRY_STATE_API_KEY: "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, G = (t = "APP_API") => $t["VITE_" + t], s = (t = {}, e = !1) => {
3
+ const { env: r = "APP_API", prefix: o = "", headers: v = {}, ..._ } = t, dt = `${G(r)}${o}`, rt = JSON.parse(localStorage.getItem("user") ?? "{}"), At = rt.jwt ?? rt.token ?? "";
4
+ return lt.create({
5
+ ..._,
6
+ baseURL: dt,
7
+ headers: e ? v : {
8
8
  "Content-Type": "application/json",
9
- Authorization: `Bearer ${d}`,
10
- ...u
9
+ Authorization: `Bearer ${At}`,
10
+ ...v
11
11
  }
12
12
  });
13
- }, y = (t) => {
13
+ }, ft = (t) => {
14
14
  if (!t || typeof t == "string")
15
15
  return;
16
16
  const e = {};
@@ -21,149 +21,468 @@ const S = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
21
21
  [r]: t[r]
22
22
  });
23
23
  }), e;
24
- }, U = (t) => {
24
+ }, It = (t, e, r) => {
25
25
  if (!t) return;
26
- const e = P("APP_TAGSAMURAI_API");
26
+ const o = G("APP_API"), v = t.startsWith("http") ? t : `${o}/utility/v2/files/${t.replace(/^\/+/, "")}`;
27
+ if (e || r) {
28
+ const _ = new URLSearchParams();
29
+ return e && (_.set("width", e.toString()), _.set("height", r ? r == null ? void 0 : r.toString() : e.toString())), `${v}?${_.toString()}`;
30
+ }
31
+ return v;
32
+ }, Tt = (t) => {
33
+ if (!t) return;
34
+ const e = G("APP_TAGSAMURAI_API");
27
35
  return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
28
- }, o = n({
36
+ }, Ut = async (t, e = "excel") => await fetch(
37
+ `${G("APP_ASSETS_URL")}/${e}/${t}`
38
+ ), y = s({
29
39
  prefix: "/settings-attribute/v2",
30
40
  env: "APP_TAGSAMURAI_API"
31
- }), h = {
41
+ }), Ct = {
32
42
  getGroupCategory: (t, e) => {
33
43
  const r = t === "category" ? t : "groups";
34
- return o.get(`/${r}/tree`, { params: e });
44
+ return y.get(`/${r}/tree`, { params: e });
45
+ },
46
+ getGroupCategoryList: (t, e, r) => {
47
+ const o = t === "category" ? t : "groups";
48
+ return y.get(`/${o}/${e}`, { params: r });
49
+ },
50
+ getNames: (t) => {
51
+ const e = t === "category" ? t : "groups";
52
+ return y.get(`/${e}/names`);
53
+ },
54
+ getCodes: (t) => {
55
+ const e = t === "category" ? t : "groups";
56
+ return y.get(`/${e}/codes`);
57
+ },
58
+ postCreateGroupCategory: (t, e) => {
59
+ const r = t === "category" ? t : "groups";
60
+ return y.post(`/${r}`, e);
61
+ },
62
+ putEditGroupCategory: (t, e, r) => {
63
+ const o = t === "category" ? t : "groups";
64
+ return y.put(`/${o}/${r}`, e);
65
+ },
66
+ putMoveGroup: (t, e) => y.put(`/groups/${e}/move-group`, t),
67
+ putEditBulkGroups: async (t) => y.put("/groups/bulk", t),
68
+ deleteGroupCategory: (t, e, r) => {
69
+ const o = t === "category" ? t : "groups";
70
+ return y.delete(`/${o}/${r}`, { data: e });
71
+ }
72
+ }, T = s({
73
+ prefix: "/settings-attribute-go/v2"
74
+ }), Ot = {
75
+ getGroupCategory: (t, e) => {
76
+ const r = t === "category" ? t : "groups";
77
+ return T.get(`/${r}/tree`, { params: e });
35
78
  },
36
79
  getGroupCategoryList: (t, e) => {
37
80
  const r = t === "category" ? t : "groups";
38
- return o.get(`/${r}/${e}`);
81
+ return T.get(`/${r}/${e}`);
39
82
  },
40
83
  getNames: (t) => {
41
84
  const e = t === "category" ? t : "groups";
42
- return o.get(`/${e}/names`);
85
+ return T.get(`/${e}/names`);
86
+ },
87
+ getCodes: (t) => {
88
+ const e = t === "category" ? t : "groups";
89
+ return T.get(`/${e}/codes`);
43
90
  },
44
91
  postCreateGroupCategory: (t, e) => {
45
92
  const r = t === "category" ? t : "groups";
46
- return o.post(`/${r}`, e);
93
+ return T.post(`/${r}`, e);
47
94
  },
48
95
  putEditGroupCategory: (t, e, r) => {
49
- const a = t === "category" ? t : "groups";
50
- return o.put(`/${a}/${r}`, e);
96
+ const o = t === "category" ? t : "groups";
97
+ return T.put(`/${o}/${r}`, e);
51
98
  },
52
- putMoveGroup: (t, e) => o.put(`/groups/${e}/move-group`, t),
53
- putEditBulkGroups: async (t) => o.put("/bulk", t),
54
99
  deleteGroupCategory: (t, e, r) => {
55
- const a = t === "category" ? t : "groups";
56
- return o.delete(`/${a}/${r}`, { data: e });
100
+ const o = t === "category" ? t : "groups";
101
+ return T.delete(`/${o}/${r}`, { data: e });
57
102
  }
58
- }, f = n({
103
+ }, mt = s({
59
104
  prefix: "/v2",
60
105
  env: "APP_LOGS_NOTIFICATION_API"
61
- }), D = {
62
- getTotalApprovals: () => f.get("/approval/count")
63
- }, i = n({
106
+ }), Lt = {
107
+ getTotalApprovals: () => mt.get("/approval/count")
108
+ }, P = s({
64
109
  prefix: "/v2",
65
110
  env: "APP_LOGS_NOTIFICATION_API"
66
- }), N = {
67
- getActionLog: (t) => i.get("/change-log", { params: t }),
68
- getActionLogOption: (t) => i.get("/change-log/options", { params: t }),
69
- getSessionLogList: (t) => i.get("/session-log", { params: t }),
70
- getUserDetailSystemLogList: (t) => i.get("/change-log", { params: t }),
71
- getUserDetailSystemLogOption: (t) => i.get("/change-log/options", { params: t })
72
- }, T = n({
111
+ }), bt = {
112
+ getActionLog: (t) => P.get("/change-log", { params: t }),
113
+ getActionLogOption: (t) => P.get("/change-log/options", { params: t }),
114
+ getSessionLogList: (t) => P.get("/session-log", { params: t }),
115
+ getUserDetailSystemLogList: (t) => P.get("/change-log", { params: t }),
116
+ getUserDetailSystemLogOption: (t) => P.get("/change-log/options", { params: t }),
117
+ /**
118
+ * Retrieves the transaction log.
119
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
120
+ */
121
+ getTransactionLog: (t) => P.get("/transaction-log", { params: t }),
122
+ /**
123
+ * Retrieves the transaction log options.
124
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
125
+ */
126
+ getTransactionLogOption: (t) => P.get("/transaction-log/options", { params: t }),
127
+ postScanLog: (t) => P.post("/transaction-log/scan-log", t)
128
+ }, S = s({
129
+ prefix: "/utility/v2"
130
+ }), Dt = {
131
+ getActionLog: (t) => S.get("/change-log", { params: t }),
132
+ getActionLogOption: (t) => S.get("/change-log/options", { params: t }),
133
+ getSessionLogList: (t) => S.get("/session-log", { params: t }),
134
+ getUserDetailSystemLogList: (t) => S.get("/change-log", { params: t }),
135
+ getUserDetailSystemLogOption: (t) => S.get("/change-log/options", { params: t }),
136
+ getUserDetailUserLogBorrowingList: (t, e) => S.get(`/borrowing-log/${t}`, { params: e }),
137
+ getUserDetailUserLogAssignmentList: (t, e) => S.get(`/assignment-log/${t}`, { params: e }),
138
+ getUserDetailUserLogBorrowingOption: (t, e) => S.get(`/borrowing-log/${t}/options`, { params: e }),
139
+ getUserDetailUserLogAssignmentOption: (t, e) => S.get(`/assignment-log/${t}/options`, { params: e })
140
+ }, i = s({
73
141
  prefix: "/assets/v2/assets"
74
- }), C = {
75
- getScanTag: (t) => T.get("/scan", { params: { tag: t } })
76
- }, $ = n({
142
+ }), B = s({
143
+ prefix: "/assets/v2/attachment"
144
+ }), Rt = {
145
+ getScanTag: (t) => i.get("/scan", { params: { tag: t } }),
146
+ getAllAssets: (t) => i.get("/", { params: t }),
147
+ getAllAssetsOptions: (t) => i.get("/options", { params: t }),
148
+ getAvailableAssets: (t) => i.get("/available", { params: t }),
149
+ getAvailableAssetOptions: (t) => i.get("/available/options", { params: t }),
150
+ scanAsset: (t) => i.get("", { params: { tag: t } }),
151
+ getAssetsById: (t, e) => i.get("/by-id", { params: { _id: t, ...e } }),
152
+ getOptions: (t, e) => i.get(t ? `/${t}/options` : "/options", {
153
+ params: e
154
+ }),
155
+ getUnlinkedAssets: (t) => i.get("/unlinked", { params: t }),
156
+ getAssetDetail: (t, e) => i.get(`/${t}`, { params: e }),
157
+ getAssetNameTotal: (t) => i.get(`/name-amount/${t}`),
158
+ getLinkedAssetFamily: (t) => i.get("/family", { params: { id: t } }),
159
+ matchAssetWithTag: (t, e) => {
160
+ const r = {
161
+ _id: JSON.stringify([t]),
162
+ tag: e
163
+ };
164
+ return i.get("/by-id", { params: r });
165
+ },
166
+ postRegisterAsset: (t) => {
167
+ const e = { "Content-Type": "multipart/form-data" };
168
+ return i.post("/bulk", t, { headers: e });
169
+ },
170
+ putEditAsset: (t, e) => {
171
+ const r = { "Content-Type": "multipart/form-data" };
172
+ return i.put(`/${t}`, e, { headers: r });
173
+ },
174
+ putEditDetailCustomField: (t, e) => {
175
+ const r = { "Content-Type": "multipart/form-data" };
176
+ return i.put(`/${t}`, e, { headers: r });
177
+ },
178
+ getLinkedAsset: (t, e) => i.get(`/${t}/linked`, { params: e }),
179
+ getPurchase: (t) => i.get(`/${t}/purchase`),
180
+ putPurchase: (t, e) => i.put(`/${e}/purchase`, t),
181
+ getAccounting: (t, e) => i.get(`/${t}/accounting`, { params: e }),
182
+ getAssetFamily: (t) => i.get(`/${t}/family`),
183
+ getLinkedAssetOption: (t, e) => i.get(`/${t}/linked/options`, { params: e }),
184
+ putLinkAsset: (t, e) => i.put(`/${e}/link-assets`, t),
185
+ putUnlinkAsset: (t, e) => i.put(`/${e}/remove-link-assets`, t),
186
+ // Asset Services prefixed by "attachment"
187
+ getAttachment: (t) => B.get("", { params: t }),
188
+ postAttachment: (t) => {
189
+ const e = { "Content-Type": "multipart/form-data" };
190
+ return B.post("", t, { headers: e });
191
+ },
192
+ putAttachment: (t, e) => {
193
+ const r = { "Content-Type": "multipart/form-data" };
194
+ return B.put(`/${e}`, t, { headers: r });
195
+ },
196
+ /**
197
+ * Deletes the attachment with the given IDs.
198
+ * @param {object} params - The request params containing the IDs of the attachments to delete.
199
+ * @returns {Promise<AxiosResponse>}
200
+ */
201
+ deleteAttachment: (t) => B.delete("/bulk", { params: t })
202
+ }, g = s({
203
+ prefix: "/assets-go/v2/assets"
204
+ }), st = s({
205
+ prefix: "/assets-go/v2/attachment"
206
+ }), ht = {
207
+ getAllAssets: (t) => g.get("/", { params: t }),
208
+ getAllAssetsOptions: (t) => g.get("/options", { params: t }),
209
+ getOptions: (t, e) => g.get(t ? `/${t}/options` : "/options", {
210
+ params: e
211
+ }),
212
+ getUnlinkedAssets: (t) => g.get("/unlinked", { params: t }),
213
+ getAssetDetail: (t, e) => g.get(`/${t}`, { params: e }),
214
+ getAssetNameTotal: (t) => g.get(`/name-amount/${t}`),
215
+ postRegisterAsset: (t) => {
216
+ const e = { "Content-Type": "multipart/form-data" };
217
+ return g.post("/bulk", t, { headers: e });
218
+ },
219
+ putEditAsset: (t, e) => {
220
+ const r = { "Content-Type": "multipart/form-data" };
221
+ return g.put(`/${t}`, e, { headers: r });
222
+ },
223
+ putEditDetailCustomField: (t, e) => {
224
+ const r = { "Content-Type": "multipart/form-data" };
225
+ return g.put(`/${t}`, e, { headers: r });
226
+ },
227
+ getLinkedAsset: (t, e) => g.get(`/${t}/linked`, { params: e }),
228
+ getPurchase: (t) => g.get(`/${t}/purchase`),
229
+ putPurchase: (t, e) => g.put(`/${e}/purchase`, t),
230
+ getAccounting: (t, e) => g.get(`/${t}/accounting`, { params: e }),
231
+ getLinkedAssetOption: (t, e) => g.get(`/${t}/linked/options`, { params: e }),
232
+ putLinkAsset: (t, e) => g.put(`/${e}/link-assets`, t),
233
+ putUnlinkAsset: (t, e) => g.put(`/${e}/remove-link-assets`, t),
234
+ // Asset Services prefixed by "attachment"
235
+ getAttachment: (t, e) => st.get(`/${t}`, { params: e }),
236
+ postAttachment: (t) => {
237
+ const e = { "Content-Type": "multipart/form-data" };
238
+ return st.post("", t, { headers: e });
239
+ },
240
+ putAttachment: (t, e) => {
241
+ const r = { "Content-Type": "multipart/form-data" };
242
+ return g.put(`/attachment/${e}`, t, { headers: r });
243
+ },
244
+ /**
245
+ * Deletes the attachment with the given IDs.
246
+ * @param {object} params - The request params containing the IDs of the attachments to delete.
247
+ * @returns {Promise<AxiosResponse>}
248
+ */
249
+ deleteAttachment: (t) => g.delete("/attachment/bulk", { params: t })
250
+ }, x = s({
77
251
  prefix: "/tracking/v2/missing"
78
- }), E = {
79
- putFoundAsset: (t, e) => {
80
- const r = { ids: [t], serialNumber: e };
81
- return $.put("/found", r);
82
- }
83
- }, p = n({
252
+ }), kt = {
253
+ /**
254
+ * To mark as found.
255
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
256
+ */
257
+ putMarkAsFound: (t) => x.put("/found", t),
258
+ putReportMissing: (t, e) => x.put(`/report-missing/${t}`, e),
259
+ getData: (t) => x.get("/", { params: t }),
260
+ getDetail: (t) => x.get(`/${t}`),
261
+ getOptions: (t) => x.get("/options", { params: t })
262
+ }, w = s({
263
+ prefix: "/missing-tracking/v2"
264
+ }), Gt = {
265
+ putFoundAsset: (t) => w.put("/found", t),
266
+ putReportMissing: (t, e) => w.put(`/${t}/report-missing`, e),
267
+ getData: (t) => w.get("/", { params: t }),
268
+ getDataOptions: (t) => w.get("/options", { params: t }),
269
+ getDetail: (t) => w.get(`/${t}`)
270
+ }, nt = s({
84
271
  prefix: "/v2/notification",
85
272
  env: "APP_LOGS_NOTIFICATION_API"
86
- }), R = {
87
- getNotifications: (t) => p.get("/", { params: t }),
88
- readNotification: (t) => p.put(`/${t}`)
89
- }, m = n({
273
+ }), _t = {
274
+ getNotifications: (t) => nt.get("/", { params: t }),
275
+ readNotification: (t) => nt.put(`/${t}`)
276
+ }, ot = s({
277
+ prefix: "/utility/v2/notification"
278
+ }), xt = {
279
+ getNotifications: (t) => ot.get("/", { params: t }),
280
+ readNotification: (t) => ot.put(`/${t}`)
281
+ }, vt = s({
90
282
  prefix: "/v2/session-log",
91
283
  env: "APP_LOGS_NOTIFICATION_API"
92
- }), G = {
93
- postLogout: () => m.post("/logout")
94
- }, l = n({
284
+ }), wt = {
285
+ postLogout: () => vt.post("/logout")
286
+ }, a = s({
95
287
  prefix: "/tag/v2"
96
- }), x = {
97
- getScanQR: (t) => l.get("/qr", { params: { tag: t } }),
98
- getScanRFID: (t) => l.get("/rfid", { params: { tag: t } })
99
- }, L = n({
288
+ }), qt = {
289
+ getScanQR: (t) => a.get("/qr", { params: { tag: t } }),
290
+ getScanRFID: (t) => a.get("/rfid", { params: { tag: t } }),
291
+ getRFIDQRTAG: (t) => a.get("/rfid-qr/scan", { params: t }),
292
+ getEventLog: (t) => a.get("/tag-transaction/event-log", { params: t }),
293
+ // Tab All
294
+ getRfidQrAll: (t, e) => a.get(`/${t}`, { params: e }),
295
+ // Tab Paired
296
+ getRfidQrPaired: (t, e, r) => a.get(`/${t}/paired/${e}`, { params: r }),
297
+ postAddTAGtoPrelist: (t, e) => a.post(`/prelist/${e}/asset-name`, t),
298
+ postAddTAGtoReplacePrelist: (t) => a.post("/prelist/replace-tag", t),
299
+ postAddTAGToPrelistUnpair: (t) => a.post("/prelist/unpair-tag", t),
300
+ postAddTAGtoPending: (t) => a.post("/pending-changes", t),
301
+ // Available Tab
302
+ getRFIDQrAvailable: (t, e) => a.get(`/${t}/available`, { params: e }),
303
+ // Damaged TAB
304
+ getRFIDQrDamaged: (t, e) => a.get(`/${t}/damaged`, { params: e }),
305
+ // RFID and QR Module
306
+ getRFIDandQRList: (t) => a.get("/rfid-qr", { params: t }),
307
+ deleteUnpairTAG: (t) => a.delete("/rfid-qr", { data: { data: t } }),
308
+ postPairTAG: (t) => a.post("/rfid-qr", { body: { data: t } }),
309
+ // RFID To Be Returned
310
+ getToBeReturnedTAGList: (t) => a.get("/rfid/to-be-returned", { params: t }),
311
+ // Handover TAG
312
+ putHandoverTAG: (t) => a.put("/rfid/handover", { body: { data: t } }),
313
+ // Table Filter
314
+ getFilterOptions: (t, e) => a.get(`/${t}/options`, { params: e }),
315
+ getHolderListOptions: (t) => a.get("/rfid/holder-list/options", { params: t }),
316
+ getHolderList: (t) => a.get("/rfid/holder-list", { params: t }),
317
+ putAuditTAG: (t, e) => a.put(`/${e}/audit`, t),
318
+ postLogAudit: (t) => a.post("/tag-transaction/log-audit", t),
319
+ postCreateQr: (t) => {
320
+ const e = { amount: t };
321
+ return a.post("/qr", e);
322
+ },
323
+ putReportTAG: (t, e) => a.put(`/tag-transaction/report/${t}`, e),
324
+ putDeclineReport: (t, e) => a.put(`/report/decline-report/${e}`, t)
325
+ }, N = s({
100
326
  prefix: "/tracking/v2/tracking"
101
- }), b = {
327
+ }), Et = {
328
+ getTrackingDetail: (t) => N.get(`/${t}`),
102
329
  putFoundAsset: (t, e, r) => {
103
- const a = {
330
+ const o = {
104
331
  tag: t,
105
332
  group: e,
106
333
  serialNumber: r,
107
334
  type: "Global"
108
335
  };
109
- return L.put("/found", { params: a });
110
- }
111
- }, s = n({
336
+ return N.put("/found", { params: o });
337
+ },
338
+ putReportPermanentlyMissing: (t, e) => N.put(`/report-permanently-missing/${t}`, e),
339
+ putMoveBack: (t) => N.put("/tracking/move-back", t)
340
+ }, u = s({
112
341
  prefix: "/settings-user-role/v2"
113
- }), w = {
114
- reLogin: (t) => s.post("/auth/login", t),
115
- changePassword: (t) => s.put("/users/change-password", t),
116
- getUserDetail: (t) => s.get(`/users/${t}`),
117
- putEditUser: (t, e) => {
118
- const r = { "Content-Type": "multipart/form-data" };
119
- return s.put(`/users/${t}`, e, { headers: r });
342
+ }), Ft = {
343
+ reLogin: (t) => u.post("/auth/login", t),
344
+ changePassword: (t) => u.put("/users/change-password", t),
345
+ /**
346
+ * Retrieves the user list as dropdown options.
347
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
348
+ */
349
+ getUserDropdown: (t) => u.get("/users/dropdown", { params: t }),
350
+ getUserOptions: (t) => u.get("/users/options", { params: t }),
351
+ getUserList: (t) => u.get("/users", { params: t }),
352
+ getUserDetail: (t) => u.get(`/users/${t}`),
353
+ putSetActiveBulk: (t) => u.put("/users/set-active-bulk", t),
354
+ // User Detail
355
+ /**
356
+ *
357
+ * @param id {string} User's _id
358
+ * @param type {"Global" | "Group"} Whether the system role's type is global or group
359
+ * @param params {Record<string, unknown>}
360
+ */
361
+ getUserDetailSystemRoles: (t, e, r) => {
362
+ const o = r ? `/${r}` : "";
363
+ return u.get(`/user-detail/${t}/system-roles${o}`, {
364
+ params: e
365
+ });
120
366
  },
121
- putDeleteProfilePicture: (t) => s.put(`/users/${t}/delete-profile-picture`),
122
- putCancelEmailChange: (t, e) => s.put("/auth/confirm-email-change/cancel", {
123
- user: t,
124
- companyCode: e
367
+ getUserDetailTransactionRoleList: (t, e) => u.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
368
+ postUserDetailAddTransactionRole: (t, e) => u.post(`/user-detail/${t}/add-transaction-role`, e),
369
+ deleteUserDetailTransactionRole: (t, e) => u.delete(`/user-detail/${t}/delete-transaction-role`, {
370
+ data: e
125
371
  }),
372
+ putUserDetailEditTransactionRole: (t, e) => u.put(`/user-detail/${t}/edit-transaction-role`, e),
373
+ putAssignGroup: (t, e, r) => u.put(`/user-detail/${r}/system-roles/${e}`, t),
374
+ getUserDetailUserLogBorrowingList: (t, e) => u.get(`/users-log/${t}/borrowing`, { params: e }),
375
+ getUserDetailUserLogAssignmentList: (t, e) => u.get(`/users-log/${t}/assignment`, { params: e }),
376
+ getUserDetailUserLogBorrowingOption: (t, e) => u.get(`/users-log/${t}/borrowing/option`, { params: e }),
377
+ getUserDetailUserLogAssignmentOption: (t, e) => u.get(`/users-log/${t}/assignment/option`, { params: e }),
378
+ getUserDetailTransactionAdminLogList: (t, e) => u.get(`/users-log/${t}/transaction-log`, { params: e }),
379
+ getUserDetailTransactionAdminLogOption: (t, e) => u.get(`/users-log/${t}/transaction-log/option`, { params: e }),
380
+ getUserDetailUserAssetBorrowedList: (t, e) => u.get(`/user-detail/${t}/assets/borrowed`, { params: e }),
381
+ getUserDetailUserAssetAssignedList: (t, e) => u.get(`/user-detail/${t}/assets/assigned`, { params: e }),
382
+ getUserDetailUserAssetBorrowedOption: (t, e) => u.get(`/user-detail/${t}/assets/borrowed/option`, { params: e }),
383
+ getUserDetailUserAssetAssignedOption: (t, e) => u.get(`/user-detail/${t}/assets/assigned/option`, { params: e })
384
+ }, p = s({
385
+ prefix: "/settings-user-role-go/v2"
386
+ }), Bt = {
387
+ /**
388
+ * Retrieves the user list as dropdown options.
389
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
390
+ */
391
+ getUserDropdown: (t) => p.get("/users/dropdown", { params: t }),
392
+ getUserOptions: (t) => p.get("/users/options", { params: t }),
393
+ getUserList: (t) => p.get("/users", { params: t }),
394
+ getUserDetail: (t) => p.get(`/users/${t}`),
395
+ putSetActiveBulk: (t) => p.put("/users/set-active-bulk", t),
396
+ // User Detail
126
397
  /**
127
398
  *
128
399
  * @param id {string} User's _id
129
400
  * @param type {"Global" | "Group"} Whether the system role's type is global or group
130
401
  * @param params {Record<string, unknown>}
131
402
  */
132
- getUserDetailSystemRoles: (t, e, r) => s.get(`/user-detail/${t}/system-roles`, {
133
- params: {
134
- ...r,
135
- type: e
136
- }
403
+ getUserDetailSystemRoles: (t, e, r) => {
404
+ const o = r ? `/${r}/groups` : "";
405
+ return p.get(`/users/${t}/system-roles${o}`, {
406
+ params: e
407
+ });
408
+ },
409
+ getUserDetailTransactionRoleList: (t, e) => p.get(`/users/${t}/transaction-roles`, { params: e }),
410
+ postUserDetailAddTransactionRole: (t, e) => p.post(`/users/${t}/add-transaction-role`, e),
411
+ deleteUserDetailTransactionRole: (t, e) => p.put(`/users/${t}/delete-transaction-role`, e),
412
+ putUserDetailEditTransactionRole: (t, e) => p.put(`/users/${t}/edit-transaction-role`, e),
413
+ putAssignGroup: (t, e, r) => p.put(`/users/${r}/system-roles/${e}/groups`, t),
414
+ putRoleSetActive: (t, e) => p.put(`/users/${e}/system-roles/set-active-bulk`, t),
415
+ getUserDetailTransactionAdminLogList: (t, e) => p.get(`/users/${t}/transaction-log`, { params: e }),
416
+ getUserDetailTransactionAdminLogOption: (t, e) => p.get(`/users/${t}/transaction-log/option`, { params: e }),
417
+ getUserDetailUserAssetBorrowedList: (t, e) => p.get(`/users/${t}/borrowed-asset`, { params: e }),
418
+ getUserDetailUserAssetAssignedList: (t, e) => p.get(`/users/${t}/assigned-asset`, { params: e }),
419
+ getUserDetailUserAssetBorrowedOption: (t, e) => p.get(`/users/${t}/borrowed-asset/option`, { params: e }),
420
+ getUserDetailUserAssetAssignedOption: (t, e) => p.get(`/users/${t}/assigned-asset/option`, { params: e })
421
+ }, f = s({
422
+ prefix: "/settings-user-role/v2/sub-users"
423
+ }), Nt = {
424
+ // Sub User
425
+ getSubUserList: (t, e) => f.get(`/${t}`, { params: e }),
426
+ getSubUserOptions: (t, e) => f.get(`/${t}/option`, { params: e }),
427
+ postCreateSubUser: (t, e) => {
428
+ const r = { "Content-Type": "multipart/form-data" };
429
+ return f.post(`/${t}`, e, { headers: r });
430
+ },
431
+ putSubUserSetActiveBulk: (t) => f.put("/set-active-bulk", t),
432
+ deleteSubUser: (t) => f.delete("/bulk", { data: { subUserIds: t } }),
433
+ putEditSubUser: (t, e) => {
434
+ const r = { "Content-Type": "multipart/form-data" };
435
+ return f.put(`/${t}`, e, { headers: r });
436
+ },
437
+ getBorrowedAsset: (t, e) => f.get(`/${t}/borrowed-asset`, { params: e }),
438
+ getBorrowedAssetOptions: (t, e) => f.get(`/${t}/borrowed-asset/options`, { params: e })
439
+ }, m = s({
440
+ prefix: "/settings-user-role-go/v2/users"
441
+ }), Mt = {
442
+ // Sub User
443
+ getSubUserList: (t, e) => m.get(`/${t}/sub-users`, { params: e }),
444
+ getSubUserOptions: (t, e) => m.get(`/${t}/sub-users/option`, { params: e }),
445
+ postCreateSubUser: (t, e) => {
446
+ const r = { "Content-Type": "multipart/form-data" };
447
+ return m.post(`/${t}/sub-users`, e, { headers: r });
448
+ },
449
+ putSubUserSetActiveBulk: (t, e) => m.put(`/${t}/sub-users/set-active-bulk`, e),
450
+ deleteSubUser: (t, e) => m.put(`/${t}/sub-users/bulk`, { subUserIds: e }),
451
+ putEditSubUser: (t, e, r) => {
452
+ const o = { "Content-Type": "multipart/form-data" };
453
+ return m.put(`/${t}/sub-users/${e}`, r, {
454
+ headers: o
455
+ });
456
+ },
457
+ getBorrowedAsset: (t, e, r) => m.get(`/${t}/sub-users/${e}/borrowed-asset`, {
458
+ params: r
137
459
  }),
138
- // User Detail
139
- getUserDetailSystemRoleList: (t, e) => s.get(`/user-detail/${t}/system-role-list`, { params: e }),
140
- getUserDetailSystemRoleOptions: (t, e) => s.get(`/user-detail/${t}/system-role/option`, { params: e }),
141
- getUserDetailTransactionRoleList: (t, e) => s.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
142
- getUserDetailUserLogBorrowingList: (t, e) => s.get(`/users-log/${t}/borrowing`, { params: e }),
143
- getUserDetailUserLogAssignmentList: (t, e) => s.get(`/users-log/${t}/assignment`, { params: e }),
144
- getUserDetailUserLogBorrowingOption: (t, e) => s.get(`/users-log/${t}/borrowing/option`, { params: e }),
145
- getUserDetailUserLogAssignmentOption: (t, e) => s.get(`/users-log/${t}/assignment/option`, { params: e }),
146
- getUserDetailTransactionAdminLogList: (t, e) => s.get(`/users-log/${t}/transaction-log`, { params: e }),
147
- getUserDetailTransactionAdminLogOption: (t, e) => s.get(`/users-log/${t}/transaction-log/option`, { params: e })
148
- }, g = n({
460
+ getBorrowedAssetOptions: (t, e, r) => m.get(`/${t}/sub-users/${e}/borrowed-asset/options`, {
461
+ params: r
462
+ }),
463
+ getAssignedAsset: (t, e, r) => m.get(`/${t}/sub-users/${e}/assigned-asset`, {
464
+ params: r
465
+ }),
466
+ getAssignedAssetOptions: (t, e, r) => m.get(`/${t}/sub-users/${e}/assigned-asset/options`, {
467
+ params: r
468
+ })
469
+ }, M = s({
149
470
  env: "APP_ADMIN_API",
150
471
  prefix: "/settings-attribute/languages"
151
- }), M = {
472
+ }), Ht = {
152
473
  /**
153
474
  * Fetch all translation messages for a specific locale.
154
475
  * @param locale The locale code (e.g., 'en', 'id').
155
476
  * @returns A promise resolving to a key-value record of messages.
156
477
  */
157
- getMessages: (t) => g.get(`/${t}/translations`),
478
+ getMessages: (t) => M.get(`/${t}/translations`),
158
479
  /**
159
480
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
160
481
  *
161
482
  * @returns Promise Array of options
162
483
  */
163
484
  getLanguageOptions: async () => {
164
- const { data: t } = await g.get(
165
- "/dropdown"
166
- );
485
+ const { data: t } = await M.get("/dropdown");
167
486
  return t.data;
168
487
  },
169
488
  /**
@@ -173,7 +492,7 @@ const S = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
173
492
  * @returns Promise LanguageMeta
174
493
  */
175
494
  getLanguageOptionMeta: async (t) => {
176
- const { data: e } = await g.get(
495
+ const { data: e } = await M.get(
177
496
  "/dropdown/" + t
178
497
  );
179
498
  return e.data;
@@ -185,32 +504,746 @@ const S = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
185
504
  * @param locale Target locale code.
186
505
  */
187
506
  translateText: async (t, e) => {
188
- const { data: r } = await g.post("/translate", {
507
+ const { data: r } = await M.post("/translate", {
189
508
  q: t,
190
509
  target: e
191
510
  });
192
511
  return r.data.translations[t];
193
512
  }
194
- }, A = n({
513
+ }, at = s({
195
514
  prefix: "/dashboard/v2/dashboard"
196
- }), F = {
197
- getLatestTask: (t) => A.get("/latest-task", { params: t }),
198
- getSummary: (t) => A.get("/summary", { params: t })
515
+ }), Vt = {
516
+ getLatestTask: (t) => at.get("/latest-task", { params: t }),
517
+ getSummary: (t) => at.get("/summary", { params: t })
518
+ }, J = s({
519
+ prefix: "/alias-code/api/alias-code"
520
+ }), jt = {
521
+ getAliasCode: () => J.get("/"),
522
+ postAliasCode: (t) => J.post("/", t),
523
+ getAliasCodeList: (t) => J.get(`/${t.object}/code-list`, { params: t })
524
+ }, K = s({
525
+ prefix: "/settings-attribute-go/v2/alias-code"
526
+ }), Qt = {
527
+ getAliasCode: () => K.get("/"),
528
+ postAliasCode: (t) => K.post("/", t),
529
+ getAliasCodeList: (t) => K.get(`/${t.object}/code-list`, { params: t })
530
+ }, it = s({
531
+ prefix: "/settings-attribute/v2/general-settings"
532
+ }), Yt = {
533
+ getGeneralSettings: () => it.get("/"),
534
+ putUpdateGeneralSettings: (t) => it.put("/", t)
535
+ }, ut = s({
536
+ prefix: "/settings-attribute-go/v2/general-settings"
537
+ }), Jt = {
538
+ getGeneralSettings: () => ut.get("/"),
539
+ putUpdateGeneralSettings: (t) => ut.put("/", t)
540
+ }, U = s({
541
+ prefix: "/settings-attribute/v2/custom-field"
542
+ }), Kt = {
543
+ getCustomField: async (t) => U.get("/", { params: t }),
544
+ getCustomFieldsByCategory: (t, e) => U.get(`/${t}`, { params: e }),
545
+ getOptions: async (t) => U.get("/options", { params: t }),
546
+ postCreateCustomField: async (t, e) => U.post("/", e, { params: t }),
547
+ putEditCustomField: async (t, e, r) => U.put(`/${r}`, e, { params: t }),
548
+ putChangeStatus: async (t, e) => U.put("/bulk", e, { params: t }),
549
+ deleteCustomField: async (t) => U.delete("/bulk", { data: t })
550
+ }, D = s({
551
+ prefix: "/settings-attribute-go/v2/custom-field"
552
+ }), Wt = {
553
+ getCustomField: async (t) => D.get("/", { params: t }),
554
+ getOptions: async (t) => D.get("/options", { params: t }),
555
+ postCreateCustomField: async (t, e) => D.post("/", e, { params: t }),
556
+ putEditCustomField: async (t, e, r) => D.put(`/${r}`, e, { params: t }),
557
+ putChangeStatus: async (t, e) => D.put("/bulk", e, { params: t }),
558
+ deleteCustomField: async (t) => D.delete("/bulk", { params: t })
559
+ }, W = ({ headers: t = {}, params: e = {} } = {}) => {
560
+ const r = G("APP_COUNTRY_STATE_API"), o = G("APP_COUNTRY_STATE_API_KEY");
561
+ return lt.create({
562
+ baseURL: `${r}/v1`,
563
+ headers: {
564
+ "Content-type": "application/json",
565
+ "X-CSCAPI-KEY": o,
566
+ ...t
567
+ },
568
+ params: e
569
+ });
570
+ }, zt = {
571
+ getCountry: () => W().get("/countries"),
572
+ getState: (t) => W().get(`/countries/${t}/states`),
573
+ getCity: (t, e) => W().get(`/countries/${t}/states/${e}/cities`)
574
+ }, $ = s({
575
+ prefix: "/routine/v2"
576
+ }), Xt = {
577
+ getList: (t) => $.get("/service-center", { params: t }),
578
+ postList: (t) => $.post("/service-center", t),
579
+ putList: (t, e) => $.put(`/service-center/${t}`, e),
580
+ putActivate: (t) => $.put("/service-center/bulk", t),
581
+ getDetailList: (t) => $.get(`/service-center/${t}`),
582
+ getListOptions: (t) => $.get("/service-center/options", { params: t }),
583
+ deleteList: (t) => $.delete("/service-center", { params: t }),
584
+ // Activities
585
+ getActivities: (t) => $.get("/service-activities", { params: t }),
586
+ getActivityOptions: (t) => $.get("/service-activities/options", { params: t }),
587
+ getActivityDetail: (t) => $.get(`/service-activities/${t}`),
588
+ getActivityLog: (t) => $.get(`/service-activities/${t}/activity-log`)
589
+ }, yt = s({
590
+ prefix: "/settings-attribute/v2/brands"
591
+ }), Zt = {
592
+ getDropdown: (t) => yt.get("/dropdown", { params: t })
593
+ }, R = s({
594
+ prefix: "/file-manager/v2"
595
+ }), te = {
596
+ /**
597
+ * Get storage information.
598
+ *
599
+ * @returns {Promise<AxiosResponse>} The Axios Response.
600
+ */
601
+ getStorageInformation: () => R.get("/files/storage"),
602
+ /**
603
+ * Get file manager data.
604
+ *
605
+ * @param {FileType} type - The type of the file.
606
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
607
+ * @returns {Promise<AxiosResponse>} The Axios Response.
608
+ */
609
+ getFileManager: (t, e) => R.get(`/${t}`, { params: e }),
610
+ /**
611
+ * Get file manager options.
612
+ *
613
+ * @param {FileType} type - The type of the file.
614
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
615
+ * @returns {Promise<AxiosResponse>} The Axios Response.
616
+ */
617
+ getFileManagerOption: (t, e) => R.get(`/${t}/options`, { params: e }),
618
+ /**
619
+ * Recover files.
620
+ *
621
+ * @param {FileType} type - The type of the file.
622
+ * @param {object} body - The body of the request.
623
+ * @returns {Promise<AxiosResponse>} The Axios Response.
624
+ */
625
+ recoverFiles: (t, e) => R.put(`/${t}/recover`, e),
626
+ /**
627
+ * Delete files.
628
+ *
629
+ * @param {FileType} type - The type of the file.
630
+ * @param {DeleteFileManagerDto} params - The params of the request.
631
+ * @returns {Promise<AxiosResponse>} The Axios Response.
632
+ */
633
+ deleteFiles: (t, e) => R.delete(`/${t}`, { params: e }),
634
+ /**
635
+ * Delete files permanently.
636
+ *
637
+ * @param {FileType} type - The type of the file.
638
+ * @param {object} body - The body of the request.
639
+ * @returns {Promise<AxiosResponse>} The Axios Response.
640
+ */
641
+ deletePermanently: (t, e) => R.delete(`/${t}/delete-permanent`, { params: e })
642
+ }, h = s({
643
+ prefix: "/utility/v2"
644
+ }), ee = {
645
+ /**
646
+ * Get storage information.
647
+ *
648
+ * @returns {Promise<AxiosResponse>} The Axios Response.
649
+ */
650
+ getStorageInformation: () => h.get("/files/storage"),
651
+ /**
652
+ * Get file manager data.
653
+ *
654
+ * @param {FileType} type - The type of the file.
655
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
656
+ * @returns {Promise<AxiosResponse>} The Axios Response.
657
+ */
658
+ getFileManager: (t, e) => h.get(`/${t}`, { params: e }),
659
+ /**
660
+ * Get file manager options.
661
+ *
662
+ * @param {FileType} type - The type of the file.
663
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
664
+ * @returns {Promise<AxiosResponse>} The Axios Response.
665
+ */
666
+ getFileManagerOption: (t, e) => h.get(`/${t}/options`, { params: e }),
667
+ /**
668
+ * Recover files.
669
+ *
670
+ * @param {FileType} type - The type of the file.
671
+ * @param {object} body - The body of the request.
672
+ * @returns {Promise<AxiosResponse>} The Axios Response.
673
+ */
674
+ recoverFiles: (t, e) => h.put(`/${t}/recover`, e),
675
+ /**
676
+ * Delete files.
677
+ *
678
+ * @param {FileType} type - The type of the file.
679
+ * @param {DeleteFileManagerDto} params - The params of the request.
680
+ * @returns {Promise<AxiosResponse>} The Axios Response.
681
+ */
682
+ deleteFiles: (t, e) => h.delete(`/${t}`, { params: e }),
683
+ /**
684
+ * Delete files permanently.
685
+ *
686
+ * @param {FileType} type - The type of the file.
687
+ * @param {object} body - The body of the request.
688
+ * @returns {Promise<AxiosResponse>} The Axios Response.
689
+ */
690
+ deletePermanently: (t, e) => h.delete(`/${t}/delete-permanent`, { params: e })
691
+ }, I = s({
692
+ prefix: "/iot/v2/reader"
693
+ }), re = {
694
+ getData: (t) => I.get("/", { params: t }),
695
+ getDataOptions: (t) => I.get("/options", { params: t }),
696
+ getActivityLogData: (t) => I.get("/activity-log", { params: t }),
697
+ getActivityLogOptions: (t) => I.get("/activity-log/options", { params: t }),
698
+ getDataById: (t) => I.get(`/${t}`),
699
+ getChangeLog: (t) => I.get(`/${t.id}/change-log`, { params: t }),
700
+ getChangeLogOptions: (t) => I.get(`/${t.id}/change-log/options`, { params: t }),
701
+ putData: (t, e) => I.put(`/${t}`, e)
702
+ }, c = s({
703
+ prefix: "/settings-user-role/v2"
704
+ }), se = {
705
+ /**
706
+ * Retrieves the transaction role for the given group and transaction name.
707
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
708
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
709
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
710
+ */
711
+ getTransactionRole: (t, e) => c.get(`/transaction-roles/${t}/${e}`),
712
+ /**
713
+ * Updates the users assigned to the given transaction role.
714
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
715
+ * @param {string} transactionName - The name of the transaction to update.
716
+ * @param {UpdateUser} body - The request body containing the updated user information.
717
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
718
+ */
719
+ putUpdateUsers: (t, e, r) => c.put(
720
+ `/transaction-roles/${t}/${e}/update-user`,
721
+ r
722
+ ),
723
+ /**
724
+ * Updates the approval level for the given transaction role.
725
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
726
+ * @param {string} transactionName - The name of the transaction to update.
727
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
728
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
729
+ */
730
+ putUpdateLevel: (t, e, r) => c.put(
731
+ `/transaction-roles/${t}/${e}/update-approval-level`,
732
+ r
733
+ ),
734
+ /**
735
+ * Updates the group management settings for the given transaction role.
736
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
737
+ * @param {string} transactionName - The name of the transaction to update.
738
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
739
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
740
+ */
741
+ putUpdateGroupManage: (t, e, r) => c.put(
742
+ `/transaction-roles/${t}/${e}/update-manage-by-parent`,
743
+ r
744
+ ),
745
+ getUserAssignedSystemRole: (t) => c.get(`/system-roles/user/${t}`),
746
+ getAssignedUserAmounts: () => c.get("/system-roles/amounts"),
747
+ getPermissionUser: (t, e) => {
748
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
749
+ const r = t === "totalControl" ? "total-control" : "read-only";
750
+ return c.get(`/system-roles/total-control-read-only/${r}`, {
751
+ params: e
752
+ });
753
+ }
754
+ return c.get(`/system-roles/permission/${t}`, { params: e });
755
+ },
756
+ getPermissionUserOptions: (t, e) => {
757
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
758
+ const r = t === "totalControl" ? "total-control" : "read-only";
759
+ return c.get(`/system-roles/total-control-read-only/${r}/options`, {
760
+ params: e
761
+ });
762
+ }
763
+ return c.get(`/system-roles/permission/${t}/options`, {
764
+ params: e
765
+ });
766
+ },
767
+ getUserGroups: (t, e) => c.get(`/system-roles/permission/${e}/groups`, {
768
+ params: t
769
+ }),
770
+ postAssignUser: (t, e) => {
771
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
772
+ const r = e === "totalControl" ? "total-control" : "read-only";
773
+ return c.post(`/system-roles/total-control-read-only/${r}`, t);
774
+ }
775
+ return c.post(`/system-roles/permission/${e}`, t);
776
+ },
777
+ putEditUser: (t, e) => c.put(`/system-roles/${e}`, t),
778
+ putRoleSetActive: (t) => c.put("/system-roles/set-active", t),
779
+ deleteRemoveUser: (t, e) => {
780
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
781
+ const r = e === "totalControl" ? "total-control" : "read-only";
782
+ return c.delete(`/system-roles/total-control-read-only/${r}`, {
783
+ data: t
784
+ });
785
+ }
786
+ return c.delete("/system-roles", { data: t });
787
+ }
788
+ }, l = s({
789
+ prefix: "/settings-user-role-go/v2"
790
+ }), ne = {
791
+ /**
792
+ * Retrieves the transaction role for the given group and transaction name.
793
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
794
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
795
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
796
+ */
797
+ getTransactionRole: (t, e) => l.get(`/transaction-roles/${t}/${e}`),
798
+ getTransactionRoleTypes: (t, e) => l.get(`/transaction-roles/${e}/types`, {
799
+ params: { groupKeys: t }
800
+ }),
801
+ /**
802
+ * Updates the users assigned to the given transaction role.
803
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
804
+ * @param {string} transactionName - The name of the transaction to update.
805
+ * @param {UpdateUser} body - The request body containing the updated user information.
806
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
807
+ */
808
+ putUpdateUsers: (t, e, r) => l.put(
809
+ `/transaction-roles/${t}/${e}/update-user`,
810
+ r
811
+ ),
812
+ /**
813
+ * Updates the approval level for the given transaction role.
814
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
815
+ * @param {string} transactionName - The name of the transaction to update.
816
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
817
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
818
+ */
819
+ putUpdateLevel: (t, e, r) => l.put(
820
+ `/transaction-roles/${t}/${e}/update-approval-level`,
821
+ r
822
+ ),
823
+ /**
824
+ * Updates the group management settings for the given transaction role.
825
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
826
+ * @param {string} transactionName - The name of the transaction to update.
827
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
828
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
829
+ */
830
+ putUpdateGroupManage: (t, e, r) => l.put(
831
+ `/transaction-roles/${t}/${e}/update-manage-by-parent`,
832
+ r
833
+ ),
834
+ getUserAssignedSystemRole: (t) => l.get(`/system-roles/user/${t}`),
835
+ getAssignedUserAmounts: () => l.get("/system-roles/amounts"),
836
+ getPermissionUser: (t, e) => {
837
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
838
+ const r = t === "totalControl" ? "total-control" : "read-only";
839
+ return l.get(`/system-roles/total-control-read-only/${r}`, {
840
+ params: e
841
+ });
842
+ }
843
+ return l.get(`/system-roles/permission/${t}`, { params: e });
844
+ },
845
+ getPermissionUserOptions: (t, e) => {
846
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
847
+ const r = t === "totalControl" ? "total-control" : "read-only";
848
+ return l.get(`/system-roles/total-control-read-only/${r}/options`, {
849
+ params: e
850
+ });
851
+ }
852
+ return l.get(`/system-roles/permission/${t}/options`, {
853
+ params: e
854
+ });
855
+ },
856
+ getUserGroups: (t, e) => l.get(`/system-roles/permission/${e}/groups`, {
857
+ params: t
858
+ }),
859
+ postAssignUser: (t, e) => {
860
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
861
+ const r = e === "totalControl" ? "total-control" : "read-only";
862
+ return l.post(`/system-roles/total-control-read-only/${r}`, t);
863
+ }
864
+ return l.post(`/system-roles/permission/${e}`, t);
865
+ },
866
+ putEditUser: (t, e) => l.put(`/system-roles/${e}`, t),
867
+ deleteRemoveUser: (t, e) => {
868
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
869
+ const r = e === "totalControl" ? "total-control" : "read-only";
870
+ return l.put(`/system-roles/total-control-read-only/${r}`, t);
871
+ }
872
+ return l.put("/system-roles", t);
873
+ }
874
+ }, q = s({
875
+ prefix: "/settings-attribute/v2/open-api"
876
+ }), oe = {
877
+ getOpenAPIDocs: (t) => q.get(`/${t.doc}`),
878
+ putGenerateToken: () => q.put("/generate"),
879
+ // This is if the dummy was not dummy
880
+ getToken: () => q.get(""),
881
+ putRequestOpenAPI: () => q.put("/request"),
882
+ putCancelRequestOpenAPI: () => q.put("/cancel-request")
883
+ }, H = s({
884
+ prefix: "/settings-attribute-go/v2/open-api"
885
+ }), ae = {
886
+ putGenerateToken: () => H.put("/generate"),
887
+ // This is if the dummy was not dummy
888
+ getToken: () => H.get(""),
889
+ putRequestOpenAPI: () => H.put("/request"),
890
+ putCancelRequestOpenAPI: () => H.put("/cancel-request")
891
+ }, C = s({
892
+ prefix: "/import/v2"
893
+ }), ie = {
894
+ getImport: (t, e) => C.get(`/${t}`, { params: e }),
895
+ postImportTemporary: (t, e) => {
896
+ const r = { "Content-Type": "multipart/form-data" };
897
+ return C.post(`/${t}/temporary`, e, { headers: r });
898
+ },
899
+ deleteImportTemporary: (t, e) => C.delete(`/${t}/temporary`, { data: e }),
900
+ postDuplicateImport: (t, e) => C.post(`/${t}/duplicate`, e),
901
+ putEditImport: (t, e) => C.put(`/${t}`, e),
902
+ postImport: (t, e, r) => C.post(t, r, { signal: e.signal }),
903
+ putImportCancelProgress: (t) => C.put(`/${t}/cancel-progress`)
904
+ }, O = s({
905
+ prefix: "/import-go/v2"
906
+ }), ue = {
907
+ getImport: (t, e) => O.get(`/${t}`, { params: e }),
908
+ postImportTemporary: (t, e) => {
909
+ const r = { "Content-Type": "multipart/form-data" };
910
+ return O.post(`/${t}/temporary`, e, { headers: r });
911
+ },
912
+ deleteImportTemporary: (t, e) => O.delete(`/${t}/temporary`, { params: e }),
913
+ postDuplicateImport: (t, e) => O.post(`/${t}/duplicate`, e),
914
+ putEditImport: (t, e) => O.put(`/${t}`, e),
915
+ postImport: (t, e, r) => O.post(t, r, { signal: e.signal }),
916
+ putImportCancelProgress: (t) => O.put(`/${t}/cancel-progress`)
917
+ }, k = s({
918
+ prefix: "/settings-attribute/v2/asset-name"
919
+ }), ge = {
920
+ getDropdown: (t) => k.get("/dropdown", { params: t }),
921
+ getAssetNameDetail: (t) => k.get(`/${t}`),
922
+ getAssetsByAssetName: (t, e) => k.get(`/${t}/list-asset`, { params: e }),
923
+ getAssetNameList: (t) => k.get("/", { params: t }),
924
+ getUnpairedAssetName: (t) => k.get("/unpaired", { params: t }),
925
+ getOptions: (t) => k.get("/options", { params: t })
926
+ }, n = s({
927
+ prefix: "/assignment/v2"
928
+ }), pe = {
929
+ getPreListData: (t) => n.get("/prelist", { params: t }),
930
+ getPreListOptions: (t) => n.get("/prelist/options", { params: t }),
931
+ getRequestData: (t) => n.get("/prelist/request", { params: t }),
932
+ postAddPrelistData: (t) => n.post("/prelist", t),
933
+ getDetailRequestData: (t, e) => n.get(`/transaction/${t}/request`, { params: e }),
934
+ getDetailRequestOption: (t, e) => n.get(`/transaction/${e}/request/options`, { params: t }),
935
+ getTransactionData: (t) => n.get("/transaction", { params: t }),
936
+ getTransactionOptions: (t) => n.get("/transaction/options", { params: t }),
937
+ getDetailTransactionData: (t) => n.get(`/transaction/${t}`),
938
+ getTransactionApproval: (t) => n.get("/approval", { params: t }),
939
+ getApprovalData: (t, e) => n.get(`/approval/transaction/${t}`, { params: e }),
940
+ getTransactionApprovalOptions: (t) => n.get("/approval/options", { params: t }),
941
+ getApprovalOptions: (t, e) => n.get(`/approval/transaction/${t}/options`, {
942
+ params: e
943
+ }),
944
+ getTransactionApprovers: (t) => n.get(`/approval/transaction/${t}/transaction`),
945
+ putApproveApproval: (t) => n.put("/approval/approve", t),
946
+ getDetailTransactionLog: (t) => n.get(`/transaction/request/${t}/transaction-log`),
947
+ getVerifyAsset: (t, e) => n.get(`/transaction/${e}/request/scan`, { params: t }),
948
+ putEditAssignedUser: (t, e) => n.put(`/transaction/${t}/user`, e),
949
+ putEditEmailConfirmation: (t, e) => n.put(`/transaction/${t}/update-email-or-assigned-user`, e),
950
+ postSendConfirmationEmail: (t) => n.post(`/transaction/${t}/send-confirmation-email`),
951
+ postTransaction: (t) => n.post("/transaction", t),
952
+ putTransaction: (t, e) => n.put(`/transaction/${t}/request`, e),
953
+ putCancelTransaction: (t) => n.put("/transaction/cancel", t),
954
+ putCancelAssignmentRequest: (t) => n.put("/transaction/request/cancel", t),
955
+ putVerifyRequest: (t, e) => n.put(`/transaction/${e}/verify-requests`, t),
956
+ putVerifyToken: (t) => n.put("/transaction/verify-token", t),
957
+ putHandoverConfirm: (t) => n.put("/transaction/handover-confirmation", t),
958
+ putAssignHandover: (t) => n.put(`/transaction/${t}/handover`),
959
+ deletePrelistData: (t) => n.delete("/prelist", { params: t }),
960
+ deleteRequestPrelistData: (t) => n.delete("/prelist/request", { data: t }),
961
+ getAssignedByAsset: (t) => n.get("/transaction/request/assigned/by-asset", { params: t }),
962
+ getAssignedByAssetOptions: (t) => n.get("/transaction/request/assigned/by-asset/options", {
963
+ params: t
964
+ }),
965
+ getAssignedByUser: (t) => n.get("/transaction/request/assigned/by-user", { params: t }),
966
+ getAssignedByUserOptions: (t) => n.get("/transaction/request/assigned/by-user/options", { params: t }),
967
+ postUnassignPrelistAsset: (t) => n.post("/prelist", t),
968
+ postUnassignPrelistUser: (t) => n.post("/prelist/unassign/by-user", t),
969
+ putUnassignRequest: (t) => n.put("/transaction/request/unassign", t),
970
+ putReportDone: (t, e) => n.put(`/transaction/${t}/confirm-report-done`, e),
971
+ getHistory: (t, e) => {
972
+ const r = t.split(" ").join("-").toLowerCase();
973
+ return n.get(`/transaction/history/${r}`, { params: e });
974
+ },
975
+ getHistoryOptions: (t) => n.get("/transaction/history/options", { params: t }),
976
+ getHistoryByTransactionOptions: (t) => n.get("/transaction/history/by-transaction/options", { params: t }),
977
+ putCancelReport: (t) => n.put("/transaction/request/cancel-report", t),
978
+ getTaskAssignment: async (t) => n.get("/transaction/my-asset/task", { params: t }),
979
+ getTaskAssignmentOptions: async (t) => n.get("/transaction/my-asset/task/options", { params: t }),
980
+ getAssignedAsset: async (t) => n.get("/transaction/my-asset/assigned-asset", { params: t }),
981
+ getAssignedAssetOptions: async (t) => n.get("/transaction/my-asset/assigned-asset/options", { params: t }),
982
+ putCancelAssignment: async (t) => n.put("/transaction/cancel", { id: t.id }),
983
+ putCancelReportById: async (t) => n.put(`/transaction/request/${t.id}/cancel-report`)
984
+ }, L = s({
985
+ prefix: "/assignment-go/v2"
986
+ }), ce = {
987
+ getTransactionData: (t) => L.get("/transaction", { params: t }),
988
+ getTransactionOptions: (t) => L.get("/transaction/options", { params: t }),
989
+ getDetailTransactionLog: (t) => L.get(`/transaction/request/${t}/transaction-log`),
990
+ postTransaction: (t) => L.post("/transaction", t),
991
+ putTransaction: (t) => L.put("/transaction", t),
992
+ putUnassignTransaction: (t) => L.put("/transaction/unassign", t),
993
+ putCancelReport: (t) => L.put("/transaction/request/cancel-report", t)
994
+ }, V = s({
995
+ prefix: "/license/v2"
996
+ }), le = {
997
+ getGroupQuota: (t) => V.get(`/${t}/allocation-quota`),
998
+ getSubGroupQuota: (t) => V.get(`/${t}/subgroup-quota`),
999
+ editSubGroupQuota: (t, e) => V.put(`/${t}/set-group-quota`, e),
1000
+ getTotalLicense: () => V.get("/total-license")
1001
+ }, gt = s({
1002
+ prefix: "/repair/v2/damage"
1003
+ }), de = {
1004
+ putReportDamage: (t, e) => {
1005
+ const r = { "Content-Type": "multipart/form-data" };
1006
+ return gt.put(`/report-damage/${t}`, e, { headers: r });
1007
+ },
1008
+ /**
1009
+ * To mark as repaired.
1010
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1011
+ */
1012
+ putMarkAsRepaired: (t) => gt.put("/repair", t)
1013
+ }, E = s({
1014
+ prefix: "/damage-repair-ticketing/v2"
1015
+ }), Ae = {
1016
+ getDamageReportList: (t) => E.get("/", { params: t }),
1017
+ getDamageReportListFilterOptions: (t) => E.get("/options", { params: t }),
1018
+ getDamageReportDetail: (t) => E.get(`/${t}`),
1019
+ putReportDamage: (t, e) => {
1020
+ const r = { "Content-Type": "multipart/form-data" };
1021
+ return E.put(`/${t}/report-damage`, e, { headers: r });
1022
+ },
1023
+ putMarkAsRepaired: (t) => E.put("/repair", t)
1024
+ }, A = s({
1025
+ prefix: "/borrowing/v2"
1026
+ }), $e = {
1027
+ getTaskBorrowing: async (t) => A.get("/transaction/my-asset/task", { params: t }),
1028
+ getTaskBorrowingOptions: async (t) => A.get("/transaction/my-asset/task/options", { params: t }),
1029
+ getBorrowedAsset: async (t) => A.get("/transaction/my-asset/borrowed-asset", { params: t }),
1030
+ getBorrowedOptions: async (t) => A.get("/transaction/my-asset/borrowed-asset/options", { params: t }),
1031
+ getHistory: async (t) => A.get("/transaction/my-asset/history", { params: t }),
1032
+ getHistoryOptions: async (t) => A.get("/transaction/my-asset/history/options", { params: t }),
1033
+ postAddPrelistData: (t) => A.post("/prelist", t),
1034
+ putCancelBorrowing: async (t) => A.put("/transaction/cancel", { id: t.id }),
1035
+ putCancelExtensionRequest: async (t) => A.put(`/transaction/${t.id}/cancel-extension`),
1036
+ putCancelRequestReport: async (t) => A.put(`/transaction/request/${t.id}/cancel-report`),
1037
+ putDeclineExtensionRequest: async (t) => A.put("transaction/request/decline", t),
1038
+ putUpdateRequestExtension: async (t) => A.put("transaction/request/duration", t)
1039
+ }, pt = s({
1040
+ prefix: "/assets/v2"
1041
+ }), me = {
1042
+ getHistory: async (t) => pt.get("/my-asset", { params: t }),
1043
+ getHistoryOptions: async (t) => pt.get("/my-asset/options", { params: t })
1044
+ }, j = s({
1045
+ prefix: "/repair/v2"
1046
+ }), ve = {
1047
+ getRepairList: (t) => j.get("/my-asset/repair", { params: t }),
1048
+ getFilterOptions: (t) => j.get("/my-asset/repair/options", { params: t }),
1049
+ getAssetRepairTicketing: (t, e) => j.get(`/repair/${t}/asset-repair-detail`, { params: e }),
1050
+ putConfirmRepair: (t) => j.put(`/repair/${t}/confirm-repair`)
1051
+ }, z = s({
1052
+ env: "APP_GLOBAL_SETTINGS_API",
1053
+ prefix: "/v1/global-settings/auth"
1054
+ }), b = s({
1055
+ env: "APP_TAGSAMURAI_API",
1056
+ prefix: "/settings-user-role/v2/auth"
1057
+ }), ct = (t) => {
1058
+ var e, r, o, v;
1059
+ return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((v = (o = t.response) == null ? void 0 : o.data) == null ? void 0 : v.message) === "jwt malformed" ? (window.onblur = void 0, window.onfocus = void 0, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
1060
+ }, ye = {
1061
+ login: (t) => {
1062
+ const e = { ...t, isMobile: !1 };
1063
+ return z.post("/login", e);
1064
+ },
1065
+ reLoginGlobal: (t) => (z.interceptors.response.use((e) => e, ct), z.post("/login", t)),
1066
+ reLogin: (t) => (b.interceptors.response.use((e) => e, ct), b.post("/login", t)),
1067
+ requestOTP: (t) => {
1068
+ const e = { email: t };
1069
+ return b.post("/request-otp", e);
1070
+ },
1071
+ requestResetPassLink: (t) => {
1072
+ const e = { email: t };
1073
+ return b.post("/request-reset-link", e);
1074
+ },
1075
+ setPassword: (t) => b.post("/set-password", t),
1076
+ verifyToken: (t) => b.get(`/verify-token/${t}`),
1077
+ confirmEmailChange: (t) => {
1078
+ const e = { token: t };
1079
+ return b.put("/confirm-email-change/confirm", e);
1080
+ }
1081
+ }, et = "/transfer/v2", Q = s({
1082
+ prefix: `${et}/prelist`
1083
+ }), d = s({
1084
+ prefix: `${et}/transaction`
1085
+ }), F = s({
1086
+ prefix: `${et}/approval`
1087
+ }), Se = {
1088
+ // ------ TRANSACTION ------
1089
+ getTransactions: (t) => d.get("/", { params: t }),
1090
+ getTransactionDetail: (t) => d.get(`/${t}`),
1091
+ getTransactionDetailAssets: (t, e) => d.get(`/${t}/request`, { params: e }),
1092
+ getRequestFilterOptions: (t, e) => {
1093
+ const r = {};
1094
+ return e ? r[e] = !0 : (r.nameOptions = !0, r.brandOptions = !0, r.modelOptions = !0), d.get(`/${t}/request/options`, { params: r });
1095
+ },
1096
+ getTransactionLog: (t) => d.get(`/request/${t}/transaction-log`),
1097
+ getTransactionOptions: (t) => {
1098
+ const e = {};
1099
+ return e[t] = !0, d.get("/options", { params: e });
1100
+ },
1101
+ postCreateTransaction: (t) => d.post("/", t),
1102
+ putCancelTransactions: (t) => {
1103
+ const e = { id: t };
1104
+ return d.put("/cancel", e);
1105
+ },
1106
+ putUpdateTransaction: (t, e) => d.put(`/${t}`, e),
1107
+ putCancelRequests: (t) => {
1108
+ const e = { id: t };
1109
+ return d.put("/request/cancel", e);
1110
+ },
1111
+ getHistoryByTransaction: (t) => d.get("/history", { params: t }),
1112
+ getHistoryByTransactionOptions: (t) => {
1113
+ const e = {};
1114
+ return e[t] = !0, d.get("/history/options", { params: e });
1115
+ },
1116
+ getHistoryByAsset: (t) => d.get("/history/by-asset", { params: t }),
1117
+ getHistoryByAssetOptions: (t) => {
1118
+ const e = {};
1119
+ return e[t] = !0, d.get("/history/by-asset/options", { params: e });
1120
+ },
1121
+ getApproverList: (t) => d.get(`/${t}/approval-history`),
1122
+ putHandoverTransaction: (t, e) => d.put(`/${t}/handover`, e),
1123
+ // ------ PRELIST ------
1124
+ getPrelist: (t) => Q.get("/", { params: t }),
1125
+ postAddPrelistData: (t) => Q.post("/", t),
1126
+ deletePrelist: (t) => Q.delete("/", {
1127
+ params: {
1128
+ id: JSON.stringify(t)
1129
+ }
1130
+ }),
1131
+ getPrelistAssets: (t) => {
1132
+ const e = { id: t };
1133
+ return Q.get("/request", { params: e });
1134
+ },
1135
+ // APPROVAL
1136
+ getApprovals: (t, e) => {
1137
+ const r = { ...e, status: JSON.stringify([t]) };
1138
+ return F.get("/", { params: r });
1139
+ },
1140
+ getApprovalOptions: (t, e) => {
1141
+ const r = {
1142
+ status: JSON.stringify([t])
1143
+ };
1144
+ return r[e] = !0, F.get("/options", { params: r });
1145
+ },
1146
+ getApprovalDetail: (t, e) => {
1147
+ const r = {
1148
+ groupType: e
1149
+ };
1150
+ return F.get(`/transaction/${t}`, { params: r });
1151
+ },
1152
+ getApprovalDetailOptions: (t, e, r) => {
1153
+ const o = {};
1154
+ return o[e] = !0, o.groupType = r, F.get(`/transaction/${t}/options`, { params: o });
1155
+ },
1156
+ putUpdateApproval: (t) => F.put("/approve", t)
1157
+ }, X = s({
1158
+ prefix: "/disposal/v2/report"
1159
+ }), Pe = {
1160
+ getReportedDisposal: (t) => X.get("", { params: t }),
1161
+ postReportDisposal: (t) => X.post("", t),
1162
+ deleteCancelReport: (t) => X.delete("/cancel-report", { params: t })
1163
+ }, Y = s({
1164
+ prefix: "/transfer-go/v2"
1165
+ }), fe = {
1166
+ getTransactionData: (t) => Y.get("/transaction", { params: t }),
1167
+ getTransactionOptions: (t) => Y.get("/transaction/options", { params: t }),
1168
+ getTransactionLog: (t) => Y.get(`/transaction/request/${t}/transaction-log`),
1169
+ postCreateTransaction: (t) => Y.post("/transaction", t)
1170
+ }, Z = s({
1171
+ prefix: "/audit/v2"
1172
+ }), Ie = {
1173
+ getAudit: (t, e) => Z.get(`/audit/schedule/asset-detail/${t}`, { params: e }),
1174
+ getAuditOption: (t, e) => Z.get(`/audit/schedule/asset-detail/${t}/options`, {
1175
+ params: e
1176
+ }),
1177
+ putSetActive: (t) => Z.put("/audit/asset/activation", t)
1178
+ }, tt = s({
1179
+ prefix: "/routine/v2"
1180
+ }), Te = {
1181
+ getMaintenance: (t, e) => tt.get(`/routine-task/${t}`, { params: e }),
1182
+ getMaintenanceOption: (t, e) => tt.get(`/routine-task/${t}/options`, { params: e }),
1183
+ putSetActive: (t) => tt.put("/maintenable-asset/set-active", t)
1184
+ }, St = s({
1185
+ prefix: "/settings-attribute/v2/models"
1186
+ }), Ue = {
1187
+ getDropdown: (t) => St.get("/dropdown", { params: t })
199
1188
  };
200
1189
  export {
201
- C as AssetServices,
202
- N as ChangelogServices,
203
- F as DashboardServices,
204
- h as GroupCategoryServices,
205
- M as I18nService,
206
- E as MissingServices,
207
- D as NotificationApprovalServices,
208
- R as NotificationServices,
209
- G as SessionLogServices,
210
- x as TAGServices,
211
- b as TrackingServices,
212
- w as UserServices,
213
- P as getBaseURL,
214
- U as getImageURL,
215
- y as queryParamsStringfy
1190
+ jt as AliasCodeServices,
1191
+ Qt as AliasCodeServicesGo,
1192
+ ge as AssetNameServices,
1193
+ Rt as AssetServices,
1194
+ ht as AssetServicesGo,
1195
+ pe as AssignmentServices,
1196
+ ce as AssignmentServicesGo,
1197
+ Ie as AuditServices,
1198
+ ye as AuthServices,
1199
+ $e as BorrowServices,
1200
+ Zt as BrandServices,
1201
+ bt as ChangelogServices,
1202
+ zt as CountryStateServices,
1203
+ Kt as CustomFieldServices,
1204
+ Wt as CustomFieldServicesGo,
1205
+ de as DamageServices,
1206
+ Ae as DamageServicesGo,
1207
+ Vt as DashboardServices,
1208
+ Pe as DisposalServices,
1209
+ te as FileManagerServices,
1210
+ ee as FileManagerServicesGo,
1211
+ Yt as GeneralSettingsServices,
1212
+ Jt as GeneralSettingsServicesGo,
1213
+ Ct as GroupCategoryServices,
1214
+ Ot as GroupCategoryServicesGo,
1215
+ Ht as I18nService,
1216
+ ie as ImportServices,
1217
+ ue as ImportServicesGo,
1218
+ le as LicenseServices,
1219
+ Dt as LogServicesGo,
1220
+ kt as MissingServices,
1221
+ Gt as MissingServicesGo,
1222
+ Ue as ModelTypeServices,
1223
+ me as MyAssetServices,
1224
+ Lt as NotificationApprovalServices,
1225
+ _t as NotificationServices,
1226
+ xt as NotificationServicesGo,
1227
+ oe as OpenAPIServices,
1228
+ ae as OpenAPIServicesGo,
1229
+ re as ReaderServices,
1230
+ ve as RepairServices,
1231
+ se as RoleServices,
1232
+ ne as RoleServicesGo,
1233
+ Te as RoutineServices,
1234
+ Xt as ServiceCenterServices,
1235
+ wt as SessionLogServices,
1236
+ Nt as SubUserServices,
1237
+ Mt as SubUserServicesGo,
1238
+ qt as TAGServices,
1239
+ Et as TrackingServices,
1240
+ Se as TransferServices,
1241
+ fe as TransferServicesGo,
1242
+ Ft as UserServices,
1243
+ Bt as UserServicesGo,
1244
+ Ut as getAssetsFile,
1245
+ G as getBaseURL,
1246
+ Tt as getImageURL,
1247
+ It as getImageURLGo,
1248
+ ft as queryParamsStringfy
216
1249
  };