@tagsamurai/fats-api-services 1.0.0-alpha.10 → 1.0.0-alpha.100

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