@tagsamurai/fats-api-services 1.0.0-alpha.11 → 1.0.0-alpha.111

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