@tagsamurai/fats-api-services 1.0.0-alpha.9 → 1.0.0-alpha.91

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 (86) hide show
  1. package/api-services.es.js +867 -97
  2. package/api-services.system.js +1 -1
  3. package/main.d.ts +33 -2
  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 +34 -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/oldDamageService.dto.d.ts +4 -0
  19. package/src/dto/oldTagService.dto.d.ts +41 -0
  20. package/src/dto/oldTrackingService.dto.d.ts +3 -0
  21. package/src/dto/openApi.dto.d.ts +3 -0
  22. package/src/dto/role.dto.d.ts +50 -0
  23. package/src/dto/serviceCenter.dto.d.ts +22 -0
  24. package/src/dto/subUser.dto.d.ts +46 -0
  25. package/src/dto/user.dto.d.ts +115 -22
  26. package/src/services/aliasCode.service.d.ts +10 -0
  27. package/src/services/assignment.service.d.ts +15 -0
  28. package/src/services/countryState.service.d.ts +7 -0
  29. package/src/services/customField.service.d.ts +18 -0
  30. package/src/services/fileManager.service.d.ts +53 -0
  31. package/src/services/generalSettings.service.d.ts +6 -0
  32. package/src/services/groupCategory.service.d.ts +3 -2
  33. package/src/services/i18n.service.d.ts +32 -0
  34. package/src/services/importData.service.d.ts +24 -0
  35. package/src/services/log.service.d.ts +20 -0
  36. package/src/services/notification.service.d.ts +9 -0
  37. package/src/services/oldAliasCode.service.d.ts +10 -0
  38. package/src/services/oldAsset.service.d.ts +17 -0
  39. package/src/services/oldAssetName.service.d.ts +14 -0
  40. package/src/services/oldAssignment.service.d.ts +68 -0
  41. package/src/services/oldBrand.service.d.ts +7 -0
  42. package/src/services/oldCustomField.service.d.ts +16 -0
  43. package/src/services/oldDamage.service.d.ts +6 -0
  44. package/src/services/oldDashboard.service.d.ts +7 -0
  45. package/src/services/oldFileManager.service.d.ts +53 -0
  46. package/src/services/oldGeneralSettings.service.d.ts +6 -0
  47. package/src/services/oldGroupCategory.service.d.ts +5 -4
  48. package/src/services/oldImportData.service.d.ts +22 -0
  49. package/src/services/oldLicense.service.d.ts +9 -0
  50. package/src/services/oldMissing.service.d.ts +2 -0
  51. package/src/services/oldOpenApi.service.d.ts +10 -0
  52. package/src/services/oldReader.service.d.ts +13 -0
  53. package/src/services/oldRole.service.d.ts +56 -0
  54. package/src/services/oldServiceCenter.service.d.ts +19 -0
  55. package/src/services/oldSubUser.service.d.ts +15 -0
  56. package/src/services/oldTag.service.d.ts +29 -0
  57. package/src/services/oldTracking.service.d.ts +3 -0
  58. package/src/services/oldUser.service.d.ts +25 -15
  59. package/src/services/openApi.service.d.ts +8 -0
  60. package/src/services/role.service.d.ts +58 -0
  61. package/src/services/subUser.service.d.ts +17 -0
  62. package/src/services/user.service.d.ts +41 -0
  63. package/src/types/aliasCode.type.d.ts +16 -0
  64. package/src/types/assignedAsset.type.d.ts +51 -0
  65. package/src/types/assignment.type.d.ts +307 -0
  66. package/src/types/customField.type.d.ts +43 -0
  67. package/src/types/dataTable.type.d.ts +7 -0
  68. package/src/types/fetchResponse.type.d.ts +7 -0
  69. package/src/types/fileManager.type.d.ts +24 -0
  70. package/src/types/groupCategoryData.type.d.ts +3 -10
  71. package/src/types/i18nService.type.d.ts +22 -0
  72. package/src/types/importData.type.d.ts +92 -0
  73. package/src/types/notification.type.d.ts +17 -0
  74. package/src/types/oldAssetService.type.d.ts +98 -0
  75. package/src/types/oldTagService.type.d.ts +118 -0
  76. package/src/types/reader.d.ts +55 -0
  77. package/src/types/role.type.d.ts +111 -6
  78. package/src/types/serviceCenter.type.d.ts +29 -0
  79. package/src/types/subUser.type.d.ts +28 -0
  80. package/src/types/user.type.d.ts +41 -0
  81. package/src/types/userGlobalRole.type.d.ts +1 -1
  82. package/src/types/userGroupRole.type.d.ts +1 -1
  83. package/src/types/userTransactionRole.type.d.ts +2 -0
  84. package/src/utils/getAssetsFile.util.d.ts +1 -0
  85. package/src/utils/index.d.ts +1 -0
  86. 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 Y from "axios";
2
+ const K = { 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" }, O = (t = "APP_API") => K["VITE_" + t], s = (t = {}, e = !1) => {
3
+ const { env: r = "APP_API", prefix: a = "", headers: I = {}, ...D } = t, H = `${O(r)}${a}`, k = JSON.parse(localStorage.getItem("user") ?? "{}"), J = k.jwt ?? k.token ?? "";
4
+ return Y.create({
5
+ ...D,
6
+ baseURL: H,
7
+ headers: e ? I : {
8
8
  "Content-Type": "application/json",
9
- Authorization: `Bearer ${I}`,
10
- ...a
9
+ Authorization: `Bearer ${J}`,
10
+ ...I
11
11
  }
12
12
  });
13
- }, L = (t) => {
13
+ }, et = (t) => {
14
14
  if (!t || typeof t == "string")
15
15
  return;
16
16
  const e = {};
@@ -21,143 +21,913 @@ 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
+ }, rt = (t, e, r) => {
25
25
  if (!t) return;
26
- const e = l("APP_TAGSAMURAI_API");
26
+ const a = O("APP_API"), I = 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())), `${I}?${D.toString()}`;
30
+ }
31
+ return I;
32
+ }, st = (t) => {
33
+ if (!t) return;
34
+ const e = O("APP_TAGSAMURAI_API");
27
35
  return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
28
- }, n = o({
36
+ }, nt = async (t, e = "excel") => await fetch(
37
+ `${O("APP_ASSETS_URL")}/${e}/${t}`
38
+ ), $ = s({
29
39
  prefix: "/settings-attribute/v2",
30
40
  env: "APP_TAGSAMURAI_API"
31
- }), U = {
32
- getGroupCategory: (t) => {
41
+ }), ot = {
42
+ getGroupCategory: (t, e) => {
43
+ const r = t === "category" ? t : "groups";
44
+ return $.get(`/${r}/tree`, { params: e });
45
+ },
46
+ getGroupCategoryList: (t, e, r) => {
47
+ const a = t === "category" ? t : "groups";
48
+ return $.get(`/${a}/${e}`, { params: r });
49
+ },
50
+ getNames: (t) => {
51
+ const e = t === "category" ? t : "groups";
52
+ return $.get(`/${e}/names`);
53
+ },
54
+ getCodes: (t) => {
33
55
  const e = t === "category" ? t : "groups";
34
- return n.get(`/${e}/tree`);
56
+ return $.get(`/${e}/codes`);
57
+ },
58
+ postCreateGroupCategory: (t, e) => {
59
+ const r = t === "category" ? t : "groups";
60
+ return $.post(`/${r}`, e);
61
+ },
62
+ putEditGroupCategory: (t, e, r) => {
63
+ const a = t === "category" ? t : "groups";
64
+ return $.put(`/${a}/${r}`, e);
65
+ },
66
+ putMoveGroup: (t, e) => $.put(`/groups/${e}/move-group`, t),
67
+ putEditBulkGroups: async (t) => $.put("/groups/bulk", t),
68
+ deleteGroupCategory: (t, e, r) => {
69
+ const a = t === "category" ? t : "groups";
70
+ return $.delete(`/${a}/${r}`, { data: e });
71
+ }
72
+ }, y = s({
73
+ prefix: "/settings-attribute-go/v2"
74
+ }), at = {
75
+ getGroupCategory: (t, e) => {
76
+ const r = t === "category" ? t : "groups";
77
+ return y.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 y.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 y.get(`/${e}/names`);
86
+ },
87
+ getCodes: (t) => {
88
+ const e = t === "category" ? t : "groups";
89
+ return y.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 y.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 y.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 y.delete(`/${a}/${r}`, { data: e });
57
102
  }
58
- }, S = o({
103
+ }, W = s({
59
104
  prefix: "/v2",
60
105
  env: "APP_LOGS_NOTIFICATION_API"
61
- }), y = {
62
- getTotalApprovals: () => S.get("/approval/count")
63
- }, g = o({
106
+ }), it = {
107
+ getTotalApprovals: () => W.get("/approval/count")
108
+ }, R = 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
+ }), ut = {
112
+ getActionLog: (t) => R.get("/change-log", { params: t }),
113
+ getActionLogOption: (t) => R.get("/change-log/options", { params: t }),
114
+ getSessionLogList: (t) => R.get("/session-log", { params: t }),
115
+ getUserDetailSystemLogList: (t) => R.get("/change-log", { params: t }),
116
+ getUserDetailSystemLogOption: (t) => R.get("/change-log/options", { params: t })
117
+ }, A = s({
118
+ prefix: "/utility/v2"
119
+ }), gt = {
120
+ getActionLog: (t) => A.get("/change-log", { params: t }),
121
+ getActionLogOption: (t) => A.get("/change-log/options", { params: t }),
122
+ getSessionLogList: (t) => A.get("/session-log", { params: t }),
123
+ getUserDetailSystemLogList: (t) => A.get("/change-log", { params: t }),
124
+ getUserDetailSystemLogOption: (t) => A.get("/change-log/options", { params: t }),
125
+ getUserDetailUserLogBorrowingList: (t, e) => A.get(`/borrowing-log/${t}`, { params: e }),
126
+ getUserDetailUserLogAssignmentList: (t, e) => A.get(`/assignment-log/${t}`, { params: e }),
127
+ getUserDetailUserLogBorrowingOption: (t, e) => A.get(`/borrowing-log/${t}/options`, { params: e }),
128
+ getUserDetailUserLogAssignmentOption: (t, e) => A.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
+ }), pt = {
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
+ }, N = s({
77
150
  prefix: "/tracking/v2/missing"
78
- }), D = {
151
+ }), ct = {
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 N.put("/found", r);
155
+ },
156
+ putReportMissing: (t, e) => N.put(`/report-missing/${t}`, e)
157
+ }, B = 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
+ }), lt = {
161
+ getNotifications: (t) => B.get("/", { params: t }),
162
+ readNotification: (t) => B.put(`/${t}`)
163
+ }, M = s({
164
+ prefix: "/utility/v2/notification"
165
+ }), dt = {
166
+ getNotifications: (t) => M.get("/", { params: t }),
167
+ readNotification: (t) => M.put(`/${t}`)
168
+ }, z = s({
90
169
  prefix: "/v2/session-log",
91
170
  env: "APP_LOGS_NOTIFICATION_API"
92
- }), R = {
93
- postLogout: () => $.post("/logout")
94
- }, p = o({
171
+ }), $t = {
172
+ postLogout: () => z.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
+ }), At = {
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
+ }), vt = {
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
+ }), mt = {
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
+ }), yt = {
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
+ // TODO
296
+ postUserDetailAddTransactionRole: (t, e) => u.post(`/users/${t}/add-transaction-role`, e),
297
+ // TODO
298
+ deleteUserDetailTransactionRole: (t, e) => u.delete(`/users/${t}/delete-transaction-role`, {
299
+ data: e
300
+ }),
301
+ // TODO
302
+ putUserDetailEditTransactionRole: (t, e) => u.put(`/users/${t}/edit-transaction-role`, e),
303
+ putAssignGroup: (t, e, r) => u.put(`/users/${r}/system-roles/${e}/groups`, t),
304
+ putRoleSetActive: (t, e) => u.put(`/users/${e}/system-roles/set-active-bulk`, t),
305
+ getUserDetailTransactionAdminLogList: (t, e) => u.get(`/users/${t}/transaction-log`, { params: e }),
306
+ getUserDetailTransactionAdminLogOption: (t, e) => u.get(`/users/${t}/transaction-log/option`, { params: e }),
307
+ getUserDetailUserAssetBorrowedList: (t, e) => u.get(`/users/${t}/borrowed-asset`, { params: e }),
308
+ getUserDetailUserAssetAssignedList: (t, e) => u.get(`/users/${t}/assigned-asset`, { params: e }),
309
+ getUserDetailUserAssetBorrowedOption: (t, e) => u.get(`/users/${t}/borrowed-asset/option`, { params: e }),
310
+ getUserDetailUserAssetAssignedOption: (t, e) => u.get(`/users/${t}/assigned-asset/option`, { params: e })
311
+ }, v = s({
312
+ prefix: "/settings-user-role/v2/sub-users"
313
+ }), St = {
314
+ // Sub User
315
+ getSubUserList: (t, e) => v.get(`/${t}`, { params: e }),
316
+ getSubUserOptions: (t, e) => v.get(`/${t}/option`, { params: e }),
317
+ postCreateSubUser: (t, e) => {
318
+ const r = { "Content-Type": "multipart/form-data" };
319
+ return v.post(`/${t}`, e, { headers: r });
320
+ },
321
+ putSubUserSetActiveBulk: (t) => v.put("/set-active-bulk", t),
322
+ deleteSubUser: (t) => v.delete("/bulk", { data: { subUserIds: t } }),
323
+ putEditSubUser: (t, e) => {
324
+ const r = { "Content-Type": "multipart/form-data" };
325
+ return v.put(`/${t}`, e, { headers: r });
326
+ },
327
+ getBorrowedAsset: (t, e) => v.get(`/${t}/borrowed-asset`, { params: e }),
328
+ getBorrowedAssetOptions: (t, e) => v.get(`/${t}/borrowed-asset/options`, { params: e })
329
+ }, d = s({
330
+ prefix: "/settings-user-role-go/v2/users"
331
+ }), Pt = {
332
+ // Sub User
333
+ getSubUserList: (t, e) => d.get(`/${t}/sub-users`, { params: e }),
334
+ getSubUserOptions: (t, e) => d.get(`/${t}/sub-users/option`, { params: e }),
335
+ postCreateSubUser: (t, e) => {
336
+ const r = { "Content-Type": "multipart/form-data" };
337
+ return d.post(`/${t}/sub-users`, e, { headers: r });
338
+ },
339
+ putSubUserSetActiveBulk: (t, e) => d.put(`/${t}/sub-users/set-active-bulk`, e),
340
+ deleteSubUser: (t, e) => d.put(`/${t}/sub-users/bulk`, { subUserIds: e }),
341
+ putEditSubUser: (t, e, r) => {
342
+ const a = { "Content-Type": "multipart/form-data" };
343
+ return d.put(`/${t}/sub-users/${e}`, r, {
344
+ headers: a
345
+ });
346
+ },
347
+ getBorrowedAsset: (t, e, r) => d.get(`/${t}/sub-users/${e}/borrowed-asset`, {
348
+ params: r
349
+ }),
350
+ getBorrowedAssetOptions: (t, e, r) => d.get(`/${t}/sub-users/${e}/borrowed-asset/options`, {
351
+ params: r
352
+ }),
353
+ getAssignedAsset: (t, e, r) => d.get(`/${t}/sub-users/${e}/assigned-asset`, {
354
+ params: r
355
+ }),
356
+ getAssignedAssetOptions: (t, e, r) => d.get(`/${t}/sub-users/${e}/assigned-asset/options`, {
357
+ params: r
358
+ })
359
+ }, G = s({
360
+ env: "APP_ADMIN_API",
361
+ prefix: "/settings-attribute/languages"
362
+ }), Ut = {
363
+ /**
364
+ * Fetch all translation messages for a specific locale.
365
+ * @param locale The locale code (e.g., 'en', 'id').
366
+ * @returns A promise resolving to a key-value record of messages.
367
+ */
368
+ getMessages: (t) => G.get(`/${t}/translations`),
369
+ /**
370
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
371
+ *
372
+ * @returns Promise Array of options
373
+ */
374
+ getLanguageOptions: async () => {
375
+ const { data: t } = await G.get(
376
+ "/dropdown"
377
+ );
378
+ return t.data;
379
+ },
380
+ /**
381
+ * Fetch single lang option meta data
382
+ *
383
+ * @param isoCode The locale code (e.g., 'en', 'id').
384
+ * @returns Promise LanguageMeta
385
+ */
386
+ getLanguageOptionMeta: async (t) => {
387
+ const { data: e } = await G.get(
388
+ "/dropdown/" + t
389
+ );
390
+ return e.data;
391
+ },
392
+ /**
393
+ * Translate a specific text to the target locale.
394
+ *
395
+ * @param key Unique translation key.
396
+ * @param locale Target locale code.
397
+ */
398
+ translateText: async (t, e) => {
399
+ const { data: r } = await G.post("/translate", {
400
+ q: t,
401
+ target: e
402
+ });
403
+ return r.data.translations[t];
404
+ }
405
+ }, V = s({
406
+ prefix: "/dashboard/v2/dashboard"
407
+ }), It = {
408
+ getLatestTask: (t) => V.get("/latest-task", { params: t }),
409
+ getSummary: (t) => V.get("/summary", { params: t })
410
+ }, q = s({
411
+ prefix: "/alias-code/api/alias-code"
412
+ }), ft = {
413
+ getAliasCode: () => q.get("/"),
414
+ postAliasCode: (t) => q.post("/", t),
415
+ getAliasCodeList: (t) => q.get(`/${t.object}/code-list`, { params: t })
416
+ }, w = s({
417
+ prefix: "/settings-attribute-go/v2/alias-code"
418
+ }), Ct = {
419
+ getAliasCode: () => w.get("/"),
420
+ postAliasCode: (t) => w.post("/", t),
421
+ getAliasCodeList: (t) => w.get(`/${t.object}/code-list`, { params: t })
422
+ }, j = s({
423
+ prefix: "/settings-attribute/v2/general-settings"
424
+ }), Lt = {
425
+ getGeneralSettings: () => j.get("/"),
426
+ putUpdateGeneralSettings: (t) => j.put("/", t)
427
+ }, Q = s({
428
+ prefix: "/settings-attribute-go/v2/general-settings"
429
+ }), Tt = {
430
+ getGeneralSettings: () => Q.get("/"),
431
+ putUpdateGeneralSettings: (t) => Q.put("/", t)
432
+ }, f = s({
433
+ prefix: "/settings-attribute/v2/custom-field"
434
+ }), bt = {
435
+ getCustomField: async (t) => f.get("/", { params: t }),
436
+ getOptions: async (t) => f.get("/options", { params: t }),
437
+ postCreateCustomField: async (t, e) => f.post("/", e, { params: t }),
438
+ putEditCustomField: async (t, e, r) => f.put(`/${r}`, e, { params: t }),
439
+ putChangeStatus: async (t, e) => f.put("/bulk", e, { params: t }),
440
+ deleteCustomField: async (t) => f.delete("/bulk", { data: t })
441
+ }, C = s({
442
+ prefix: "/settings-attribute-go/v2/custom-field"
443
+ }), Ot = {
444
+ getCustomField: async (t) => C.get("/", { params: t }),
445
+ getOptions: async (t) => C.get("/options", { params: t }),
446
+ postCreateCustomField: async (t, e) => C.post("/", e, { params: t }),
447
+ putEditCustomField: async (t, e, r) => C.put(`/${r}`, e, { params: t }),
448
+ putChangeStatus: async (t, e) => C.put("/bulk", e, { params: t }),
449
+ deleteCustomField: async (t) => C.delete("/bulk", { params: t })
450
+ }, F = ({ headers: t = {}, params: e = {} } = {}) => {
451
+ const r = O("APP_COUNTRY_STATE_API"), a = O("APP_COUNTRY_STATE_API_KEY");
452
+ return Y.create({
453
+ baseURL: `${r}/v1`,
454
+ headers: {
455
+ "Content-type": "application/json",
456
+ "X-CSCAPI-KEY": a,
457
+ ...t
458
+ },
459
+ params: e
460
+ });
461
+ }, Dt = {
462
+ getCountry: () => F().get("/countries"),
463
+ getState: (t) => F().get(`/countries/${t}/states`),
464
+ getCity: (t, e) => F().get(`/countries/${t}/states/${e}/cities`)
465
+ }, l = s({
466
+ prefix: "/routine/v2"
467
+ }), Rt = {
468
+ getList: (t) => l.get("/service-center", { params: t }),
469
+ postList: (t) => l.post("/service-center", t),
470
+ putList: (t, e) => l.put(`/service-center/${t}`, e),
471
+ putActivate: (t) => l.put("/service-center/bulk", t),
472
+ getDetailList: (t) => l.get(`/service-center/${t}`),
473
+ getListOptions: (t) => l.get("/service-center/options", { params: t }),
474
+ deleteList: (t) => l.delete("/service-center", { params: t }),
475
+ // Activities
476
+ getActivities: (t) => l.get("/service-activities", { params: t }),
477
+ getActivityOptions: (t) => l.get("/service-activities/options", { params: t }),
478
+ getActivityDetail: (t) => l.get(`/service-activities/${t}`),
479
+ getActivityLog: (t) => l.get(`/service-activities/${t}/activity-log`)
480
+ }, Z = s({
481
+ prefix: "/settings-attribute/v2/brands"
482
+ }), _t = {
483
+ getDropdown: (t) => Z.get("/dropdown", { params: t })
484
+ }, L = s({
485
+ prefix: "/file-manager/v2"
486
+ }), Gt = {
487
+ /**
488
+ * Get storage information.
489
+ *
490
+ * @returns {Promise<AxiosResponse>} The Axios Response.
491
+ */
492
+ getStorageInformation: () => L.get("/files/storage"),
493
+ /**
494
+ * Get file manager data.
495
+ *
496
+ * @param {FileType} type - The type of the file.
497
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
498
+ * @returns {Promise<AxiosResponse>} The Axios Response.
499
+ */
500
+ getFileManager: (t, e) => L.get(`/${t}`, { params: e }),
501
+ /**
502
+ * Get file manager options.
503
+ *
504
+ * @param {FileType} type - The type of the file.
505
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
506
+ * @returns {Promise<AxiosResponse>} The Axios Response.
507
+ */
508
+ getFileManagerOption: (t, e) => L.get(`/${t}/options`, { params: e }),
509
+ /**
510
+ * Recover files.
511
+ *
512
+ * @param {FileType} type - The type of the file.
513
+ * @param {object} body - The body of the request.
514
+ * @returns {Promise<AxiosResponse>} The Axios Response.
515
+ */
516
+ recoverFiles: (t, e) => L.put(`/${t}/recover`, e),
517
+ /**
518
+ * Delete files.
519
+ *
520
+ * @param {FileType} type - The type of the file.
521
+ * @param {DeleteFileManagerDto} params - The params of the request.
522
+ * @returns {Promise<AxiosResponse>} The Axios Response.
523
+ */
524
+ deleteFiles: (t, e) => L.delete(`/${t}`, { params: e }),
525
+ /**
526
+ * Delete files permanently.
527
+ *
528
+ * @param {FileType} type - The type of the file.
529
+ * @param {object} body - The body of the request.
530
+ * @returns {Promise<AxiosResponse>} The Axios Response.
531
+ */
532
+ deletePermanently: (t, e) => L.delete(`/${t}/delete-permanent`, { params: e })
533
+ }, T = s({
534
+ prefix: "/utility/v2"
535
+ }), ht = {
536
+ /**
537
+ * Get storage information.
538
+ *
539
+ * @returns {Promise<AxiosResponse>} The Axios Response.
540
+ */
541
+ getStorageInformation: () => T.get("/files/storage"),
542
+ /**
543
+ * Get file manager data.
544
+ *
545
+ * @param {FileType} type - The type of the file.
546
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
547
+ * @returns {Promise<AxiosResponse>} The Axios Response.
548
+ */
549
+ getFileManager: (t, e) => T.get(`/${t}`, { params: e }),
550
+ /**
551
+ * Get file manager options.
552
+ *
553
+ * @param {FileType} type - The type of the file.
554
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
555
+ * @returns {Promise<AxiosResponse>} The Axios Response.
556
+ */
557
+ getFileManagerOption: (t, e) => T.get(`/${t}/options`, { params: e }),
558
+ /**
559
+ * Recover files.
560
+ *
561
+ * @param {FileType} type - The type of the file.
562
+ * @param {object} body - The body of the request.
563
+ * @returns {Promise<AxiosResponse>} The Axios Response.
564
+ */
565
+ recoverFiles: (t, e) => T.put(`/${t}/recover`, e),
566
+ /**
567
+ * Delete files.
568
+ *
569
+ * @param {FileType} type - The type of the file.
570
+ * @param {DeleteFileManagerDto} params - The params of the request.
571
+ * @returns {Promise<AxiosResponse>} The Axios Response.
572
+ */
573
+ deleteFiles: (t, e) => T.delete(`/${t}`, { params: e }),
574
+ /**
575
+ * Delete files permanently.
576
+ *
577
+ * @param {FileType} type - The type of the file.
578
+ * @param {object} body - The body of the request.
579
+ * @returns {Promise<AxiosResponse>} The Axios Response.
580
+ */
581
+ deletePermanently: (t, e) => T.delete(`/${t}/delete-permanent`, { params: e })
582
+ }, m = s({
583
+ prefix: "/iot/v2/reader"
584
+ }), xt = {
585
+ getData: (t) => m.get("/", { params: t }),
586
+ getDataOptions: (t) => m.get("/options", { params: t }),
587
+ getActivityLogData: (t) => m.get("/activity-log", { params: t }),
588
+ getActivityLogOptions: (t) => m.get("/activity-log/options", { params: t }),
589
+ getDataById: (t) => m.get(`/${t}`),
590
+ getChangeLog: (t) => m.get(`/${t.id}/change-log`, { params: t }),
591
+ getChangeLogOptions: (t) => m.get(`/${t.id}/change-log/options`, { params: t }),
592
+ putData: (t, e) => m.put(`/${t}`, e)
593
+ }, g = s({
594
+ prefix: "/settings-user-role/v2"
595
+ }), Et = {
596
+ /**
597
+ * Retrieves the transaction role for the given group and transaction name.
598
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
599
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
600
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
601
+ */
602
+ getTransactionRole: (t, e) => g.get(`/transaction-roles/${t}/${e}`),
603
+ /**
604
+ * Updates the users assigned to the given transaction role.
605
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
606
+ * @param {string} transactionName - The name of the transaction to update.
607
+ * @param {UpdateUser} body - The request body containing the updated user information.
608
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
609
+ */
610
+ putUpdateUsers: (t, e, r) => g.put(
611
+ `/transaction-roles/${t}/${e}/update-user`,
612
+ r
613
+ ),
614
+ /**
615
+ * Updates the approval level for the given transaction role.
616
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
617
+ * @param {string} transactionName - The name of the transaction to update.
618
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
619
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
620
+ */
621
+ putUpdateLevel: (t, e, r) => g.put(
622
+ `/transaction-roles/${t}/${e}/update-approval-level`,
623
+ r
624
+ ),
625
+ /**
626
+ * Updates the group management settings for the given transaction role.
627
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
628
+ * @param {string} transactionName - The name of the transaction to update.
629
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
630
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
631
+ */
632
+ putUpdateGroupManage: (t, e, r) => g.put(
633
+ `/transaction-roles/${t}/${e}/update-manage-by-parent`,
634
+ r
635
+ ),
636
+ getUserAssignedSystemRole: (t) => g.get(`/system-roles/user/${t}`),
637
+ getAssignedUserAmounts: () => g.get("/system-roles/amounts"),
638
+ getPermissionUser: (t, e) => {
639
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
640
+ const r = t === "totalControl" ? "total-control" : "read-only";
641
+ return g.get(`/system-roles/total-control-read-only/${r}`, {
642
+ params: e
643
+ });
644
+ }
645
+ return g.get(`/system-roles/permission/${t}`, { params: e });
646
+ },
647
+ getPermissionUserOptions: (t, e) => {
648
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
649
+ const r = t === "totalControl" ? "total-control" : "read-only";
650
+ return g.get(`/system-roles/total-control-read-only/${r}/options`, {
651
+ params: e
652
+ });
136
653
  }
654
+ return g.get(`/system-roles/permission/${t}/options`, {
655
+ params: e
656
+ });
657
+ },
658
+ getUserGroups: (t, e) => g.get(`/system-roles/permission/${e}/groups`, {
659
+ params: t
137
660
  }),
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 })
661
+ postAssignUser: (t, e) => {
662
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
663
+ const r = e === "totalControl" ? "total-control" : "read-only";
664
+ return g.post(`/system-roles/total-control-read-only/${r}`, t);
665
+ }
666
+ return g.post(`/system-roles/permission/${e}`, t);
667
+ },
668
+ putEditUser: (t, e) => g.put(`/system-roles/${e}`, t),
669
+ putRoleSetActive: (t) => g.put("/system-roles/set-active", t),
670
+ deleteRemoveUser: (t, e) => {
671
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
672
+ const r = e === "totalControl" ? "total-control" : "read-only";
673
+ return g.delete(`/system-roles/total-control-read-only/${r}`, {
674
+ data: t
675
+ });
676
+ }
677
+ return g.delete("/system-roles", { data: t });
678
+ }
679
+ }, p = s({
680
+ prefix: "/settings-user-role-go/v2"
681
+ }), qt = {
682
+ /**
683
+ * Retrieves the transaction role for the given group and transaction name.
684
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
685
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
686
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
687
+ */
688
+ getTransactionRole: (t, e) => p.get(`/transaction-roles/${t}/${e}`),
689
+ getTransactionRoleTypes: (t, e) => p.get(`/transaction-roles/${e}/types`, {
690
+ params: { groupKeys: t }
691
+ }),
692
+ /**
693
+ * Updates the users assigned to the given transaction role.
694
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
695
+ * @param {string} transactionName - The name of the transaction to update.
696
+ * @param {UpdateUser} body - The request body containing the updated user information.
697
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
698
+ */
699
+ putUpdateUsers: (t, e, r) => p.put(
700
+ `/transaction-roles/${t}/${e}/update-user`,
701
+ r
702
+ ),
703
+ /**
704
+ * Updates the approval level for the given transaction role.
705
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
706
+ * @param {string} transactionName - The name of the transaction to update.
707
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
708
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
709
+ */
710
+ putUpdateLevel: (t, e, r) => p.put(
711
+ `/transaction-roles/${t}/${e}/update-approval-level`,
712
+ r
713
+ ),
714
+ /**
715
+ * Updates the group management settings for the given transaction role.
716
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
717
+ * @param {string} transactionName - The name of the transaction to update.
718
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
719
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
720
+ */
721
+ putUpdateGroupManage: (t, e, r) => p.put(
722
+ `/transaction-roles/${t}/${e}/update-manage-by-parent`,
723
+ r
724
+ ),
725
+ getUserAssignedSystemRole: (t) => p.get(`/system-roles/user/${t}`),
726
+ getAssignedUserAmounts: () => p.get("/system-roles/amounts"),
727
+ getPermissionUser: (t, e) => {
728
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
729
+ const r = t === "totalControl" ? "total-control" : "read-only";
730
+ return p.get(`/system-roles/total-control-read-only/${r}`, {
731
+ params: e
732
+ });
733
+ }
734
+ return p.get(`/system-roles/permission/${t}`, { params: e });
735
+ },
736
+ getPermissionUserOptions: (t, e) => {
737
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
738
+ const r = t === "totalControl" ? "total-control" : "read-only";
739
+ return p.get(`/system-roles/total-control-read-only/${r}/options`, {
740
+ params: e
741
+ });
742
+ }
743
+ return p.get(`/system-roles/permission/${t}/options`, {
744
+ params: e
745
+ });
746
+ },
747
+ getUserGroups: (t, e) => p.get(`/system-roles/permission/${e}/groups`, {
748
+ params: t
749
+ }),
750
+ postAssignUser: (t, e) => {
751
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
752
+ const r = e === "totalControl" ? "total-control" : "read-only";
753
+ return p.post(`/system-roles/total-control-read-only/${r}`, t);
754
+ }
755
+ return p.post(`/system-roles/permission/${e}`, t);
756
+ },
757
+ putEditUser: (t, e) => p.put(`/system-roles/${e}`, t),
758
+ deleteRemoveUser: (t, e) => {
759
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
760
+ const r = e === "totalControl" ? "total-control" : "read-only";
761
+ return p.put(`/system-roles/total-control-read-only/${r}`, t);
762
+ }
763
+ return p.put("/system-roles", t);
764
+ }
765
+ }, _ = s({
766
+ prefix: "/settings-attribute/v2/open-api"
767
+ }), wt = {
768
+ getOpenAPIDocs: (t) => _.get(`/${t.doc}`),
769
+ putGenerateToken: () => _.put("/generate"),
770
+ // This is if the dummy was not dummy
771
+ getToken: () => _.get(""),
772
+ putRequestOpenAPI: () => _.put("/request"),
773
+ putCancelRequestOpenAPI: () => _.put("/cancel-request")
774
+ }, h = s({
775
+ prefix: "/settings-attribute-go/v2/open-api"
776
+ }), Ft = {
777
+ putGenerateToken: () => h.put("/generate"),
778
+ // This is if the dummy was not dummy
779
+ getToken: () => h.get(""),
780
+ putRequestOpenAPI: () => h.put("/request"),
781
+ putCancelRequestOpenAPI: () => h.put("/cancel-request")
782
+ }, S = s({
783
+ prefix: "/import/v2"
784
+ }), kt = {
785
+ getImport: (t, e) => S.get(`/${t}`, { params: e }),
786
+ postImportTemporary: (t, e) => {
787
+ const r = { "Content-Type": "multipart/form-data" };
788
+ return S.post(`/${t}/temporary`, e, { headers: r });
789
+ },
790
+ deleteImportTemporary: (t, e) => S.delete(`/${t}/temporary`, { data: e }),
791
+ postDuplicateImport: (t, e) => S.post(`/${t}/duplicate`, e),
792
+ putEditImport: (t, e) => S.put(`/${t}`, e),
793
+ postImport: (t, e, r) => S.post(t, r, { signal: e.signal }),
794
+ putImportCancelProgress: (t) => S.put(`/${t}/cancel-progress`)
795
+ }, P = s({
796
+ prefix: "/import-go/v2"
797
+ }), Nt = {
798
+ getImport: (t, e) => P.get(`/${t}`, { params: e }),
799
+ postImportTemporary: (t, e) => {
800
+ const r = { "Content-Type": "multipart/form-data" };
801
+ return P.post(`/${t}/temporary`, e, { headers: r });
802
+ },
803
+ deleteImportTemporary: (t, e) => P.delete(`/${t}/temporary`, { params: e }),
804
+ postDuplicateImport: (t, e) => P.post(`/${t}/duplicate`, e),
805
+ putEditImport: (t, e) => P.put(`/${t}`, e),
806
+ postImport: (t, e, r) => P.post(t, r, { signal: e.signal }),
807
+ putImportCancelProgress: (t) => P.put(`/${t}/cancel-progress`)
808
+ }, b = s({
809
+ prefix: "/settings-attribute/v2/asset-name"
810
+ }), Bt = {
811
+ getDropdown: (t) => b.get("/dropdown", { params: t }),
812
+ getAssetNameDetail: (t) => b.get(`/${t}`),
813
+ getAssetsByAssetName: (t, e) => b.get(`/${t}/list-asset`, { params: e }),
814
+ getAssetNameList: (t) => b.get("/", { params: t }),
815
+ getUnpairedAssetName: (t) => b.get("/unpaired", { params: t }),
816
+ getOptions: (t) => b.get("/options", { params: t })
817
+ }, n = s({
818
+ prefix: "/assignment/v2"
819
+ }), Mt = {
820
+ getPreListData: (t) => n.get("/prelist", { params: t }),
821
+ getPreListOptions: (t) => n.get("/prelist/options", { params: t }),
822
+ getRequestData: (t) => n.get("/prelist/request", { params: t }),
823
+ getDetailRequestData: (t, e) => n.get(`/transaction/${t}/request`, { params: e }),
824
+ getDetailRequestOption: (t, e) => n.get(`/transaction/${e}/request/options`, { params: t }),
825
+ getTransactionData: (t) => n.get("/transaction", { params: t }),
826
+ getTransactionOptions: (t) => n.get("/transaction/options", { params: t }),
827
+ getDetailTransactionData: (t) => n.get(`/transaction/${t}`),
828
+ getTransactionApprovals: (t) => n.get(`/approval/transaction/${t}/transaction`),
829
+ getDetailTransactionLog: (t) => n.get(`/transaction/request/${t}/transaction-log`),
830
+ getVerifyAsset: (t, e) => n.get(`/transaction/${e}/request/scan`, { params: t }),
831
+ putEditAssignedUser: (t, e) => n.put(`/transaction/${t}/user`, e),
832
+ putEditEmailConfirmation: (t, e) => n.put(`/transaction/${t}/update-email-or-assigned-user`, e),
833
+ postSendConfirmationEmail: (t) => n.post(`/transaction/${t}/send-confirmation-email`),
834
+ postTransaction: (t) => n.post("/transaction", t),
835
+ putTransaction: (t, e) => n.put(`/transaction/${t}/request`, e),
836
+ putCancelTransaction: (t) => n.put("/transaction/cancel", t),
837
+ putCancelAssignmentRequest: (t) => n.put("/transaction/request/cancel", t),
838
+ putVerifyRequest: (t, e) => n.put(`/transaction/${e}/verify-requests`, t),
839
+ putVerifyToken: (t) => n.put("/transaction/verify-token", t),
840
+ putHandoverConfirm: (t) => n.put("/transaction/handover-confirmation", t),
841
+ putAssignHandover: (t) => n.put(`/transaction/${t}/handover`),
842
+ deletePrelistData: (t) => n.delete("/prelist", { params: t }),
843
+ deleteRequestPrelistData: (t) => n.delete("/prelist/request", { data: t }),
844
+ getAssignedByAsset: (t) => n.get("/transaction/request/assigned/by-asset", { params: t }),
845
+ getAssignedByAssetOptions: (t) => n.get("/transaction/request/assigned/by-asset/options", {
846
+ params: t
847
+ }),
848
+ getAssignedByUser: (t) => n.get("/transaction/request/assigned/by-user", { params: t }),
849
+ getAssignedByUserOptions: (t) => n.get("/transaction/request/assigned/by-user/options", { params: t }),
850
+ postUnassignPrelistAsset: (t) => n.post("/prelist", t),
851
+ postUnassignPrelistUser: (t) => n.post("/prelist/unassign/by-user", t),
852
+ putUnassignRequest: (t) => n.put("/transaction/request/unassign", t),
853
+ putReportDone: (t, e) => n.put(`/transaction/${t}/confirm-report-done`, e),
854
+ getHistory: (t, e) => {
855
+ const r = t.split(" ").join("-").toLowerCase();
856
+ return n.get(`/transaction/history/${r}`, { params: e });
857
+ },
858
+ getHistoryOptions: (t) => n.get("/transaction/history/options", { params: t }),
859
+ getHistoryByTransactionOptions: (t) => n.get("/transaction/history/by-transaction/options", { params: t }),
860
+ putCancelReport: (t) => n.put("/transaction/request/cancel-report", t)
861
+ }, U = s({
862
+ prefix: "/assignment-go/v2"
863
+ }), Vt = {
864
+ getTransactionData: (t) => U.get("/transaction", { params: t }),
865
+ getTransactionOptions: (t) => U.get("/transaction/options", { params: t }),
866
+ getDetailTransactionLog: (t) => U.get(`/transaction/request/${t}/transaction-log`),
867
+ postTransaction: (t) => U.post("/transaction", t),
868
+ putTransaction: (t) => U.put("/transaction", t),
869
+ putUnassignTransaction: (t) => U.put("/transaction/unassign", t),
870
+ putCancelReport: (t) => U.put("/transaction/request/cancel-report", t)
871
+ }, x = s({
872
+ prefix: "/license/v2"
873
+ }), jt = {
874
+ getGroupQuota: (t) => x.get(`/${t}/allocation-quota`),
875
+ getSubGroupQuota: (t) => x.get(`/${t}/subgroup-quota`),
876
+ editSubGroupQuota: (t, e) => x.put(`/${t}/set-group-quota`, e),
877
+ getTotalLicense: () => x.get("/total-license")
878
+ }, X = s({
879
+ prefix: "/repair/v2/damage"
880
+ }), Qt = {
881
+ putReportDamage: (t, e) => {
882
+ const r = { "Content-Type": "multipart/form-data" };
883
+ return X.put(`/report-damage/${t}`, e, { headers: r });
884
+ }
148
885
  };
149
886
  export {
150
- C as AssetServices,
151
- h as ChangelogServices,
152
- U as GroupCategoryServices,
153
- D as MissingServices,
154
- y as NotificationApprovalServices,
155
- R as SessionLogServices,
156
- E as TAGServices,
157
- G as TrackingServices,
158
- x as UserServices,
159
- l as getBaseURL,
160
- O as getImageURL,
161
- N as notificationServices,
162
- L as queryParamsStringfy
887
+ ft as AliasCodeServices,
888
+ Ct as AliasCodeServicesGo,
889
+ Bt as AssetNameServices,
890
+ pt as AssetServices,
891
+ Mt as AssignmentServices,
892
+ Vt as AssignmentServicesGo,
893
+ _t as BrandServices,
894
+ ut as ChangelogServices,
895
+ Dt as CountryStateServices,
896
+ bt as CustomFieldServices,
897
+ Ot as CustomFieldServicesGo,
898
+ Qt as DamageServices,
899
+ It as DashboardServices,
900
+ Gt as FileManagerServices,
901
+ ht as FileManagerServicesGo,
902
+ Lt as GeneralSettingsServices,
903
+ Tt as GeneralSettingsServicesGo,
904
+ ot as GroupCategoryServices,
905
+ at as GroupCategoryServicesGo,
906
+ Ut as I18nService,
907
+ kt as ImportServices,
908
+ Nt as ImportServicesGo,
909
+ jt as LicenseServices,
910
+ gt as LogServicesGo,
911
+ ct as MissingServices,
912
+ it as NotificationApprovalServices,
913
+ lt as NotificationServices,
914
+ dt as NotificationServicesGo,
915
+ wt as OpenAPIServices,
916
+ Ft as OpenAPIServicesGo,
917
+ xt as ReaderServices,
918
+ Et as RoleServices,
919
+ qt as RoleServicesGo,
920
+ Rt as ServiceCenterServices,
921
+ $t as SessionLogServices,
922
+ St as SubUserServices,
923
+ Pt as SubUserServicesGo,
924
+ At as TAGServices,
925
+ vt as TrackingServices,
926
+ mt as UserServices,
927
+ yt as UserServicesGo,
928
+ nt as getAssetsFile,
929
+ O as getBaseURL,
930
+ st as getImageURL,
931
+ rt as getImageURLGo,
932
+ et as queryParamsStringfy
163
933
  };