@tagsamurai/fats-api-services 1.0.0-alpha.17 → 1.0.0-alpha.170

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