@tagsamurai/fats-api-services 1.0.0-alpha.6 → 1.0.0-alpha.61

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 (78) hide show
  1. package/api-services.es.js +666 -38
  2. package/api-services.system.js +1 -1
  3. package/main.d.ts +31 -2
  4. package/package.json +1 -1
  5. package/src/dto/aliasCode.dto.d.ts +4 -0
  6. package/src/dto/customField.dto.d.ts +16 -0
  7. package/src/dto/dashboard.dto.d.ts +15 -0
  8. package/src/dto/fileManager.dto.d.ts +25 -0
  9. package/src/dto/groupCategoryService.dto.d.ts +4 -3
  10. package/src/dto/importData.dto.d.ts +7 -0
  11. package/src/dto/importTemporaryData.dto.d.ts +6 -0
  12. package/src/dto/log.dto.d.ts +63 -0
  13. package/src/dto/notification.dto.d.ts +9 -0
  14. package/src/dto/oldAssetService.dto.d.ts +27 -0
  15. package/src/dto/openApi.dto.d.ts +3 -0
  16. package/src/dto/role.dto.d.ts +52 -0
  17. package/src/dto/serviceCenter.dto.d.ts +22 -0
  18. package/src/dto/subUser.dto.d.ts +46 -0
  19. package/src/dto/user.dto.d.ts +263 -0
  20. package/src/services/aliasCode.service.d.ts +10 -0
  21. package/src/services/countryState.service.d.ts +7 -0
  22. package/src/services/customField.service.d.ts +18 -0
  23. package/src/services/fileManager.service.d.ts +53 -0
  24. package/src/services/generalSettings.service.d.ts +6 -0
  25. package/src/services/groupCategory.service.d.ts +3 -2
  26. package/src/services/i18n.service.d.ts +32 -0
  27. package/src/services/importData.service.d.ts +24 -0
  28. package/src/services/notification.service.d.ts +9 -0
  29. package/src/services/oldAliasCode.service.d.ts +10 -0
  30. package/src/services/oldAsset.service.d.ts +21 -0
  31. package/src/services/oldBrand.service.d.ts +7 -0
  32. package/src/services/oldCustomField.service.d.ts +16 -0
  33. package/src/services/oldDashboard.service.d.ts +7 -0
  34. package/src/services/oldFileManager.service.d.ts +53 -0
  35. package/src/services/oldGeneralSettings.service.d.ts +6 -0
  36. package/src/services/oldGroupCategory.service.d.ts +5 -4
  37. package/src/services/oldImportData.service.d.ts +22 -0
  38. package/src/services/oldLog.service.d.ts +14 -0
  39. package/src/services/oldMissing.service.d.ts +5 -0
  40. package/src/services/oldNotification.service.d.ts +7 -0
  41. package/src/services/oldOpenApi.service.d.ts +10 -0
  42. package/src/services/oldReader.service.d.ts +13 -0
  43. package/src/services/oldRole.service.d.ts +56 -0
  44. package/src/services/oldServiceCenter.service.d.ts +19 -0
  45. package/src/services/oldSessionLog.service.d.ts +5 -0
  46. package/src/services/oldSubUser.service.d.ts +15 -0
  47. package/src/services/oldTag.service.d.ts +29 -0
  48. package/src/services/oldTracking.service.d.ts +5 -0
  49. package/src/services/oldUser.service.d.ts +68 -0
  50. package/src/services/openApi.service.d.ts +8 -0
  51. package/src/types/aliasCode.type.d.ts +16 -0
  52. package/src/types/customField.type.d.ts +43 -0
  53. package/src/types/dataTable.type.d.ts +7 -0
  54. package/src/types/fetchResponse.type.d.ts +7 -0
  55. package/src/types/fileManager.type.d.ts +24 -0
  56. package/src/types/group.type.d.ts +5 -0
  57. package/src/types/groupCategoryData.type.d.ts +1 -10
  58. package/src/types/i18nService.type.d.ts +22 -0
  59. package/src/types/importData.type.d.ts +92 -0
  60. package/src/types/{changelog.type.d.ts → log.type.d.ts} +21 -0
  61. package/src/types/notification.type.d.ts +17 -0
  62. package/src/types/oldAssetService.type.d.ts +98 -0
  63. package/src/types/oldTagService.type.d.ts +154 -0
  64. package/src/types/reader.d.ts +55 -0
  65. package/src/types/role.type.d.ts +121 -0
  66. package/src/types/serviceCenter.type.d.ts +29 -0
  67. package/src/types/subUser.type.d.ts +28 -0
  68. package/src/types/user.type.d.ts +212 -0
  69. package/src/types/userAsset.type.d.ts +18 -0
  70. package/src/types/userGlobalRole.type.d.ts +28 -0
  71. package/src/types/userGroupRole.type.d.ts +30 -0
  72. package/src/types/userLog.type.d.ts +18 -0
  73. package/src/types/userSystemRole.type.d.ts +14 -0
  74. package/src/types/userTransactionRole.type.d.ts +9 -0
  75. package/src/utils/getAssetsFile.util.d.ts +1 -0
  76. package/src/utils/index.d.ts +1 -0
  77. package/src/dto/changelog.dto.d.ts +0 -30
  78. package/src/services/oldChangelog.service.d.ts +0 -9
@@ -1,16 +1,16 @@
1
- import P from "axios";
2
- const _ = { 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" }, g = (t = "APP_API") => _["VITE_" + t], s = (t = {}, e = !1) => {
3
- const { env: r = "APP_API", prefix: n = "", headers: a = {}, ...p } = t, u = `${g(r)}${n}`, i = JSON.parse(localStorage.getItem("user") ?? "{}"), A = i.jwt ?? i.token ?? "";
4
- return P.create({
5
- ...p,
6
- baseURL: u,
7
- headers: e ? a : {
1
+ import x from "axios";
2
+ const w = { 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" }, y = (t = "APP_API") => w["VITE_" + t], n = (t = {}, e = !1) => {
3
+ const { env: r = "APP_API", prefix: i = "", headers: v = {}, ...f } = t, N = `${y(r)}${i}`, b = JSON.parse(localStorage.getItem("user") ?? "{}"), k = b.jwt ?? b.token ?? "";
4
+ return x.create({
5
+ ...f,
6
+ baseURL: N,
7
+ headers: e ? v : {
8
8
  "Content-Type": "application/json",
9
- Authorization: `Bearer ${A}`,
10
- ...a
9
+ Authorization: `Bearer ${k}`,
10
+ ...v
11
11
  }
12
12
  });
13
- }, l = (t) => {
13
+ }, Q = (t) => {
14
14
  if (!t || typeof t == "string")
15
15
  return;
16
16
  const e = {};
@@ -21,57 +21,685 @@ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
21
21
  [r]: t[r]
22
22
  });
23
23
  }), e;
24
- }, f = (t) => {
24
+ }, J = (t, e, r) => {
25
25
  if (!t) return;
26
- const e = g("APP_TAGSAMURAI_API");
26
+ const i = y("APP_API"), v = t.startsWith("http") ? t : `${i}/utility/v2/files/${t.replace(/^\/+/, "")}`;
27
+ if (e || r) {
28
+ const f = new URLSearchParams();
29
+ return e && (f.set("width", e.toString()), f.set("height", r ? r == null ? void 0 : r.toString() : e.toString())), `${v}?${f.toString()}`;
30
+ }
31
+ return v;
32
+ }, H = (t) => {
33
+ if (!t) return;
34
+ const e = y("APP_TAGSAMURAI_API");
27
35
  return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
28
- }, o = s({
36
+ }, K = async (t, e = "excel") => await fetch(
37
+ `${y("APP_ASSETS_URL")}/${e}/${t}`
38
+ ), p = n({
29
39
  prefix: "/settings-attribute/v2",
30
40
  env: "APP_TAGSAMURAI_API"
31
- }), v = {
32
- getGroupCategory: (t) => {
41
+ }), W = {
42
+ getGroupCategory: (t, e) => {
43
+ const r = t === "category" ? t : "groups";
44
+ return p.get(`/${r}/tree`, { params: e });
45
+ },
46
+ getGroupCategoryList: (t, e, r) => {
47
+ const i = t === "category" ? t : "groups";
48
+ return p.get(`/${i}/${e}`, { params: r });
49
+ },
50
+ getNames: (t) => {
33
51
  const e = t === "category" ? t : "groups";
34
- return o.get(`/${e}/tree`);
52
+ return p.get(`/${e}/names`);
53
+ },
54
+ getCodes: (t) => {
55
+ const e = t === "category" ? t : "groups";
56
+ return p.get(`/${e}/codes`);
57
+ },
58
+ postCreateGroupCategory: (t, e) => {
59
+ const r = t === "category" ? t : "groups";
60
+ return p.post(`/${r}`, e);
61
+ },
62
+ putEditGroupCategory: (t, e, r) => {
63
+ const i = t === "category" ? t : "groups";
64
+ return p.put(`/${i}/${r}`, e);
65
+ },
66
+ putMoveGroup: (t, e) => p.put(`/groups/${e}/move-group`, t),
67
+ putEditBulkGroups: async (t) => p.put("/groups/bulk", t),
68
+ deleteGroupCategory: (t, e, r) => {
69
+ const i = t === "category" ? t : "groups";
70
+ return p.delete(`/${i}/${r}`, { data: e });
71
+ }
72
+ }, d = n({
73
+ prefix: "/settings-attribute-go/v2"
74
+ }), z = {
75
+ getGroupCategory: (t, e) => {
76
+ const r = t === "category" ? t : "groups";
77
+ return d.get(`/${r}/tree`, { params: e });
35
78
  },
36
79
  getGroupCategoryList: (t, e) => {
37
80
  const r = t === "category" ? t : "groups";
38
- return o.get(`/${r}/${e}`);
81
+ return d.get(`/${r}/${e}`);
39
82
  },
40
83
  getNames: (t) => {
41
84
  const e = t === "category" ? t : "groups";
42
- return o.get(`/${e}/names`);
85
+ return d.get(`/${e}/names`);
86
+ },
87
+ getCodes: (t) => {
88
+ const e = t === "category" ? t : "groups";
89
+ return d.get(`/${e}/codes`);
43
90
  },
44
91
  postCreateGroupCategory: (t, e) => {
45
92
  const r = t === "category" ? t : "groups";
46
- return o.post(`/${r}`, e);
93
+ return d.post(`/${r}`, e);
47
94
  },
48
95
  putEditGroupCategory: (t, e, r) => {
49
- const n = t === "category" ? t : "groups";
50
- return o.put(`/${n}/${r}`, e);
96
+ const i = t === "category" ? t : "groups";
97
+ return d.put(`/${i}/${r}`, e);
51
98
  },
52
- putMoveGroup: (t, e) => o.put(`/groups/${e}/move-group`, t),
53
- putEditBulkGroups: async (t) => o.put("/bulk", t),
54
99
  deleteGroupCategory: (t, e, r) => {
55
- const n = t === "category" ? t : "groups";
56
- return o.delete(`/${n}/${r}`, { data: e });
100
+ const i = t === "category" ? t : "groups";
101
+ return d.delete(`/${i}/${r}`, { data: e });
57
102
  }
58
- }, I = s({
103
+ }, B = n({
59
104
  prefix: "/v2",
60
105
  env: "APP_LOGS_NOTIFICATION_API"
61
- }), O = {
62
- getTotalApprovals: () => I.get("/approval/count")
63
- }, c = s({
106
+ }), Z = {
107
+ getTotalApprovals: () => B.get("/approval/count")
108
+ }, C = n({
64
109
  prefix: "/v2",
65
110
  env: "APP_LOGS_NOTIFICATION_API"
66
- }), S = {
67
- getActionLog: (t) => c.get("/change-log", { params: t }),
68
- getActionLogOption: (t) => c.get("/change-log/options", { params: t })
111
+ }), X = {
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
+ }, g = n({
118
+ prefix: "/assets/v2/assets"
119
+ }), tt = {
120
+ getScanTag: (t) => g.get("/scan", { params: { tag: t } }),
121
+ getAllAssets: (t) => g.get("/", { params: t }),
122
+ getAvailableAssets: (t) => g.get("/available", { params: t }),
123
+ scanAsset: (t) => g.get("", { params: { tag: t } }),
124
+ getAssetsById: (t, e) => g.get("/by-id", { params: { _id: t, ...e } }),
125
+ getOptions: (t, e) => g.get(t ? `/${t}/options` : "/options", { params: e }),
126
+ getUnlinkedAssets: (t) => g.get("/unlinked", { params: t }),
127
+ getAssetDetail: (t, e) => g.get(`/${t}`, { params: e }),
128
+ getLinkedAssetFamily: (t) => g.get("/family", { params: { id: t } }),
129
+ matchAssetWithTag: (t, e) => {
130
+ const r = {
131
+ _id: JSON.stringify([t]),
132
+ tag: e
133
+ };
134
+ return g.get("/by-id", { params: r });
135
+ }
136
+ }, M = n({
137
+ prefix: "/tracking/v2/missing"
138
+ }), et = {
139
+ putFoundAsset: (t, e) => {
140
+ const r = { ids: [t], serialNumber: e };
141
+ return M.put("/found", r);
142
+ }
143
+ }, R = n({
144
+ prefix: "/v2/notification",
145
+ env: "APP_LOGS_NOTIFICATION_API"
146
+ }), rt = {
147
+ getNotifications: (t) => R.get("/", { params: t }),
148
+ readNotification: (t) => R.put(`/${t}`)
149
+ }, D = n({
150
+ prefix: "/utility/v2/notification"
151
+ }), st = {
152
+ getNotifications: (t) => D.get("/", { params: t }),
153
+ readNotification: (t) => D.put(`/${t}`)
154
+ }, q = n({
155
+ prefix: "/v2/session-log",
156
+ env: "APP_LOGS_NOTIFICATION_API"
157
+ }), nt = {
158
+ postLogout: () => q.post("/logout")
159
+ }, o = n({
160
+ prefix: "/tag/v2"
161
+ }), ot = {
162
+ getScanQR: (t) => o.get("/qr", { params: { tag: t } }),
163
+ getScanRFID: (t) => o.get("/rfid", { params: { tag: t } }),
164
+ getRFIDQRTAG: (t) => o.get("/rfid-qr/scan", { params: t }),
165
+ getEventLog: (t) => o.get("/tag-transaction/event-log", { params: t }),
166
+ // Tab All
167
+ getRfidQrAll: (t, e) => o.get(`/${t}`, { params: e }),
168
+ // Tab Paired
169
+ getRfidQrPaired: (t, e, r) => o.get(`/${t}/paired/${e}`, { params: r }),
170
+ postAddTAGtoPrelist: (t, e) => o.post(`/prelist/${e}/asset-name`, { body: t }),
171
+ postAddTAGToPrelistUnpair: (t) => o.post("/prelist/unpair-tag", { body: t }),
172
+ postAddTAGtoPending: (t) => o.post("/pending-changes", { body: t }),
173
+ // Available Tab
174
+ getRFIDQrAvailable: (t, e) => o.get(`/${t}/available`, { params: e }),
175
+ // Damaged TAB
176
+ getRFIDQrDamaged: (t, e) => o.get(`/${t}/damaged`, { params: e }),
177
+ // RFID and QR Module
178
+ getRFIDandQRList: (t) => o.get("/rfid-qr", { params: t }),
179
+ deleteUnpairTAG: (t) => o.delete("/rfid-qr", { data: { data: t } }),
180
+ postPairTAG: (t) => o.post("/rfid-qr", { body: { data: t } }),
181
+ // RFID To Be Returned
182
+ getToBeReturnedTAGList: (t) => o.get("/rfid/to-be-returned", { params: t }),
183
+ // Handover TAG
184
+ putHandoverTAG: (t) => o.put("/rfid/handover", { body: { data: t } }),
185
+ // Table Filter
186
+ getFilterOptions: (t, e) => o.get(`/${t}/options`, { params: e }),
187
+ getHolderListOptions: (t) => o.get("/rfid/holder-list/options", { params: t }),
188
+ getHolderList: (t) => o.get("/rfid/holder-list", { params: t }),
189
+ putAuditTAG: (t, e) => o.put(`/${e}/audit`, { body: t }),
190
+ postLogAudit: (t) => o.post("/tag-transaction/log-audit", { body: t }),
191
+ postCreateQr: (t) => {
192
+ const e = { amount: t };
193
+ return o.post("/qr", e);
194
+ }
195
+ }, V = n({
196
+ prefix: "/tracking/v2/tracking"
197
+ }), it = {
198
+ putFoundAsset: (t, e, r) => {
199
+ const i = {
200
+ tag: t,
201
+ group: e,
202
+ serialNumber: r,
203
+ type: "Global"
204
+ };
205
+ return V.put("/found", { params: i });
206
+ }
207
+ }, s = n({
208
+ prefix: "/settings-user-role/v2"
209
+ }), at = {
210
+ reLogin: (t) => s.post("/auth/login", t),
211
+ changePassword: (t) => s.put("/users/change-password", t),
212
+ /**
213
+ * Retrieves the user list as dropdown options.
214
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
215
+ */
216
+ getUserDropdown: (t) => s.get("/users/dropdown", { params: t }),
217
+ getUserOptions: (t) => s.get("/users/options", { params: t }),
218
+ getUserList: (t) => s.get("/users", { params: t }),
219
+ getUserDetail: (t) => s.get(`/users/${t}`),
220
+ putEditUser: (t, e) => {
221
+ const r = { "Content-Type": "multipart/form-data" };
222
+ return s.put(`/users/${t}`, e, { headers: r });
223
+ },
224
+ putSetActiveBulk: (t) => s.put("/users/set-active-bulk", t),
225
+ deleteUser: (t) => s.delete("/users/bulk", { data: { userIds: t } }),
226
+ putDeleteProfilePicture: (t) => s.put(`/users/${t}/delete-profile-picture`),
227
+ putCancelEmailChange: (t, e) => s.put("/auth/confirm-email-change/cancel", {
228
+ user: t,
229
+ companyCode: e
230
+ }),
231
+ /**
232
+ *
233
+ * @param id {string} User's _id
234
+ * @param type {"Global" | "Group"} Whether the system role's type is global or group
235
+ * @param params {Record<string, unknown>}
236
+ */
237
+ getUserDetailSystemRoles: (t, e, r) => s.get(`/user-detail/${t}/system-roles`, {
238
+ params: {
239
+ ...r,
240
+ type: e
241
+ }
242
+ }),
243
+ // User Detail
244
+ getUserDetailSystemRoleList: (t, e) => s.get(`/user-detail/${t}/system-role-list`, { params: e }),
245
+ getUserDetailSystemRoleOptions: (t, e) => s.get(`/user-detail/${t}/system-role/option`, { params: e }),
246
+ getUserDetailTransactionRoleList: (t, e) => s.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
247
+ putUserDetailTransactionRoleSetActiveStatus: (t, e) => s.put(
248
+ `/user-detail/${t}/transaction-role/set-active-status`,
249
+ e
250
+ ),
251
+ postUserDetailAddTransactionRole: (t, e) => s.post(`/user-detail/${t}/add-transaction-role`, e),
252
+ deleteUserDetailTransactionRole: (t, e) => s.delete(`/user-detail/${t}/delete-transaction-role`, {
253
+ data: e
254
+ }),
255
+ putUserDetailEditTransactionRole: (t, e) => s.put(`/user-detail/${t}/edit-transaction-role`, e),
256
+ postAddSystemRoleBulk: (t, e) => s.post(`/user-detail/${t}/add-system-role`, e),
257
+ putAssignGroup: (t, e, r) => s.put(`/user-detail/${r}/system-roles/${e}`, t),
258
+ putEditPermissionEachGroup: (t, e, r, i) => s.put(
259
+ `/user-detail/${r}/system-roles/${e}/${i}`,
260
+ t
261
+ ),
262
+ putSetActiveEachGroup: (t, e, r) => s.put(
263
+ `/user-detail/${r}/system-roles/${e}/is-active`,
264
+ t
265
+ ),
266
+ deleteRemoveGroup: (t, e) => s.delete(`/user-detail/${e}/system-roles`, {
267
+ data: t
268
+ }),
269
+ getUserDetailUserLogBorrowingList: (t, e) => s.get(`/users-log/${t}/borrowing`, { params: e }),
270
+ getUserDetailUserLogAssignmentList: (t, e) => s.get(`/users-log/${t}/assignment`, { params: e }),
271
+ getUserDetailUserLogBorrowingOption: (t, e) => s.get(`/users-log/${t}/borrowing/option`, { params: e }),
272
+ getUserDetailUserLogAssignmentOption: (t, e) => s.get(`/users-log/${t}/assignment/option`, { params: e }),
273
+ getUserDetailTransactionAdminLogList: (t, e) => s.get(`/users-log/${t}/transaction-log`, { params: e }),
274
+ getUserDetailTransactionAdminLogOption: (t, e) => s.get(`/users-log/${t}/transaction-log/option`, { params: e }),
275
+ getUserDetailUserAssetBorrowedList: (t, e) => s.get(`/user-detail/${t}/assets/borrowed`, { params: e }),
276
+ getUserDetailUserAssetAssignedList: (t, e) => s.get(`/user-detail/${t}/assets/assigned`, { params: e }),
277
+ getUserDetailUserAssetBorrowedOption: (t, e) => s.get(`/user-detail/${t}/assets/borrowed/option`, { params: e }),
278
+ getUserDetailUserAssetAssignedOption: (t, e) => s.get(`/user-detail/${t}/assets/assigned/option`, { params: e })
279
+ }, c = n({
280
+ prefix: "/settings-user-role/v2/sub-users"
281
+ }), ut = {
282
+ // Sub User
283
+ getSubUserList: (t, e) => c.get(`/${t}`, { params: e }),
284
+ getSubUserOptions: (t, e) => c.get(`/${t}/option`, { params: e }),
285
+ postCreateSubUser: (t, e) => {
286
+ const r = { "Content-Type": "multipart/form-data" };
287
+ return c.post(`sub-users/${t}`, e, { headers: r });
288
+ },
289
+ putSubUserSetActiveBulk: (t) => c.put("/set-active-bulk", t),
290
+ deleteSubUser: (t) => c.delete("/bulk", { data: { subUserIds: t } }),
291
+ putEditSubUser: (t, e) => {
292
+ const r = { "Content-Type": "multipart/form-data" };
293
+ return c.put(`/${t}`, e, { headers: r });
294
+ },
295
+ getBorrowedAsset: (t, e) => c.get(`/sub-users/${t}/borrowed-asset`, { params: e }),
296
+ getBorrowedAssetOptions: (t, e) => c.get(`/sub-users/${t}/borrowed-asset/options`, { params: e })
297
+ }, T = n({
298
+ env: "APP_ADMIN_API",
299
+ prefix: "/settings-attribute/languages"
300
+ }), gt = {
301
+ /**
302
+ * Fetch all translation messages for a specific locale.
303
+ * @param locale The locale code (e.g., 'en', 'id').
304
+ * @returns A promise resolving to a key-value record of messages.
305
+ */
306
+ getMessages: (t) => T.get(`/${t}/translations`),
307
+ /**
308
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
309
+ *
310
+ * @returns Promise Array of options
311
+ */
312
+ getLanguageOptions: async () => {
313
+ const { data: t } = await T.get(
314
+ "/dropdown"
315
+ );
316
+ return t.data;
317
+ },
318
+ /**
319
+ * Fetch single lang option meta data
320
+ *
321
+ * @param isoCode The locale code (e.g., 'en', 'id').
322
+ * @returns Promise LanguageMeta
323
+ */
324
+ getLanguageOptionMeta: async (t) => {
325
+ const { data: e } = await T.get(
326
+ "/dropdown/" + t
327
+ );
328
+ return e.data;
329
+ },
330
+ /**
331
+ * Translate a specific text to the target locale.
332
+ *
333
+ * @param key Unique translation key.
334
+ * @param locale Target locale code.
335
+ */
336
+ translateText: async (t, e) => {
337
+ const { data: r } = await T.post("/translate", {
338
+ q: t,
339
+ target: e
340
+ });
341
+ return r.data.translations[t];
342
+ }
343
+ }, h = n({
344
+ prefix: "/dashboard/v2/dashboard"
345
+ }), pt = {
346
+ getLatestTask: (t) => h.get("/latest-task", { params: t }),
347
+ getSummary: (t) => h.get("/summary", { params: t })
348
+ }, L = n({
349
+ prefix: "/alias-code/api/alias-code"
350
+ }), ct = {
351
+ getAliasCode: () => L.get("/"),
352
+ postAliasCode: (t) => L.post("/", t),
353
+ getAliasCodeList: (t) => L.get(`/${t.object}/code-list`, { params: t })
354
+ }, O = n({
355
+ prefix: "/settings-attribute-go/v2/alias-code"
356
+ }), lt = {
357
+ getAliasCode: () => O.get("/"),
358
+ postAliasCode: (t) => O.post("/", t),
359
+ getAliasCodeList: (t) => O.get(`/${t.object}/code-list`, { params: t })
360
+ }, E = n({
361
+ prefix: "/settings-attribute/v2/general-settings"
362
+ }), dt = {
363
+ getGeneralSettings: () => E.get("/"),
364
+ putUpdateGeneralSettings: (t) => E.put("/", t)
365
+ }, F = n({
366
+ prefix: "/settings-attribute-go/v2/general-settings"
367
+ }), At = {
368
+ getGeneralSettings: () => F.get("/"),
369
+ putUpdateGeneralSettings: (t) => F.put("/", t)
370
+ }, m = n({
371
+ prefix: "/settings-attribute/v2/custom-field"
372
+ }), $t = {
373
+ getCustomField: async (t) => m.get("/", { params: t }),
374
+ getOptions: async (t) => m.get("/options", { params: t }),
375
+ postCreateCustomField: async (t, e) => m.post("/", e, { params: t }),
376
+ putEditCustomField: async (t, e, r) => m.put(`/${r}`, e, { params: t }),
377
+ putChangeStatus: async (t, e) => m.put("/bulk", e, { params: t }),
378
+ deleteCustomField: async (t) => m.delete("/bulk", { data: t })
379
+ }, S = n({
380
+ prefix: "/settings-attribute-go/v2/custom-field"
381
+ }), vt = {
382
+ getCustomField: async (t) => S.get("/", { params: t }),
383
+ getOptions: async (t) => S.get("/options", { params: t }),
384
+ postCreateCustomField: async (t, e) => S.post("/", e, { params: t }),
385
+ putEditCustomField: async (t, e, r) => S.put(`/${r}`, e, { params: t }),
386
+ putChangeStatus: async (t, e) => S.put("/bulk", e, { params: t }),
387
+ deleteCustomField: async (t) => S.delete("/bulk", { params: t })
388
+ }, G = ({ headers: t = {}, params: e = {} } = {}) => {
389
+ const r = y("APP_COUNTRY_STATE_API"), i = y("APP_COUNTRY_STATE_API_KEY");
390
+ return x.create({
391
+ baseURL: `${r}/v1`,
392
+ headers: {
393
+ "Content-type": "application/json",
394
+ "X-CSCAPI-KEY": i,
395
+ ...t
396
+ },
397
+ params: e
398
+ });
399
+ }, mt = {
400
+ getCountry: () => G().get("/countries"),
401
+ getState: (t) => G().get(`/countries/${t}/states`),
402
+ getCity: (t, e) => G().get(`/countries/${t}/states/${e}/cities`)
403
+ }, u = n({
404
+ prefix: "/routine/v2"
405
+ }), St = {
406
+ getList: (t) => u.get("/service-center", { params: t }),
407
+ postList: (t) => u.post("/service-center", t),
408
+ putList: (t, e) => u.put(`/service-center/${t}`, e),
409
+ putActivate: (t) => u.put("/service-center/bulk", t),
410
+ getDetailList: (t) => u.get(`/service-center/${t}`),
411
+ getListOptions: (t) => u.get("/service-center/options", { params: t }),
412
+ deleteList: (t) => u.delete("/service-center", { params: t }),
413
+ // Activities
414
+ getActivities: (t) => u.get("/service-activities", { params: t }),
415
+ getActivityOptions: (t) => u.get("/service-activities/options", { params: t }),
416
+ getActivityDetail: (t) => u.get(`/service-activities/${t}`),
417
+ getActivityLog: (t) => u.get(`/service-activities/${t}/activity-log`)
418
+ }, j = n({
419
+ prefix: "/settings-attribute/v2/brands"
420
+ }), It = {
421
+ getDropdown: (t) => j.get("/dropdown", { params: t })
422
+ }, I = n({
423
+ prefix: "/file-manager/v2"
424
+ }), Pt = {
425
+ /**
426
+ * Get storage information.
427
+ *
428
+ * @returns {Promise<AxiosResponse>} The Axios Response.
429
+ */
430
+ getStorageInformation: () => I.get("/files/storage"),
431
+ /**
432
+ * Get file manager data.
433
+ *
434
+ * @param {FileType} type - The type of the file.
435
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
436
+ * @returns {Promise<AxiosResponse>} The Axios Response.
437
+ */
438
+ getFileManager: (t, e) => I.get(`/${t}`, { params: e }),
439
+ /**
440
+ * Get file manager options.
441
+ *
442
+ * @param {FileType} type - The type of the file.
443
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
444
+ * @returns {Promise<AxiosResponse>} The Axios Response.
445
+ */
446
+ getFileManagerOption: (t, e) => I.get(`/${t}/options`, { params: e }),
447
+ /**
448
+ * Recover files.
449
+ *
450
+ * @param {FileType} type - The type of the file.
451
+ * @param {object} body - The body of the request.
452
+ * @returns {Promise<AxiosResponse>} The Axios Response.
453
+ */
454
+ recoverFiles: (t, e) => I.put(`/${t}/recover`, e),
455
+ /**
456
+ * Delete files.
457
+ *
458
+ * @param {FileType} type - The type of the file.
459
+ * @param {DeleteFileManagerDto} params - The params of the request.
460
+ * @returns {Promise<AxiosResponse>} The Axios Response.
461
+ */
462
+ deleteFiles: (t, e) => I.delete(`/${t}`, { params: e }),
463
+ /**
464
+ * Delete files permanently.
465
+ *
466
+ * @param {FileType} type - The type of the file.
467
+ * @param {object} body - The body of the request.
468
+ * @returns {Promise<AxiosResponse>} The Axios Response.
469
+ */
470
+ deletePermanently: (t, e) => I.delete(`/${t}/delete-permanent`, { params: e })
471
+ }, P = n({
472
+ prefix: "/utility/v2"
473
+ }), yt = {
474
+ /**
475
+ * Get storage information.
476
+ *
477
+ * @returns {Promise<AxiosResponse>} The Axios Response.
478
+ */
479
+ getStorageInformation: () => P.get("/files/storage"),
480
+ /**
481
+ * Get file manager data.
482
+ *
483
+ * @param {FileType} type - The type of the file.
484
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
485
+ * @returns {Promise<AxiosResponse>} The Axios Response.
486
+ */
487
+ getFileManager: (t, e) => P.get(`/${t}`, { params: e }),
488
+ /**
489
+ * Get file manager options.
490
+ *
491
+ * @param {FileType} type - The type of the file.
492
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
493
+ * @returns {Promise<AxiosResponse>} The Axios Response.
494
+ */
495
+ getFileManagerOption: (t, e) => P.get(`/${t}/options`, { params: e }),
496
+ /**
497
+ * Recover files.
498
+ *
499
+ * @param {FileType} type - The type of the file.
500
+ * @param {object} body - The body of the request.
501
+ * @returns {Promise<AxiosResponse>} The Axios Response.
502
+ */
503
+ recoverFiles: (t, e) => P.put(`/${t}/recover`, e),
504
+ /**
505
+ * Delete files.
506
+ *
507
+ * @param {FileType} type - The type of the file.
508
+ * @param {DeleteFileManagerDto} params - The params of the request.
509
+ * @returns {Promise<AxiosResponse>} The Axios Response.
510
+ */
511
+ deleteFiles: (t, e) => P.delete(`/${t}`, { params: e }),
512
+ /**
513
+ * Delete files permanently.
514
+ *
515
+ * @param {FileType} type - The type of the file.
516
+ * @param {object} body - The body of the request.
517
+ * @returns {Promise<AxiosResponse>} The Axios Response.
518
+ */
519
+ deletePermanently: (t, e) => P.delete(`/${t}/delete-permanent`, { params: e })
520
+ }, l = n({
521
+ prefix: "/iot/v2/reader"
522
+ }), ft = {
523
+ getData: (t) => l.get("/", { params: t }),
524
+ getDataOptions: (t) => l.get("/options", { params: t }),
525
+ getActivityLogData: (t) => l.get("/activity-log", { params: t }),
526
+ getActivityLogOptions: (t) => l.get("/activity-log/options", { params: t }),
527
+ getDataById: (t) => l.get(`/${t}`),
528
+ getChangeLog: (t) => l.get(`/${t.id}/change-log`, { params: t }),
529
+ getChangeLogOptions: (t) => l.get(`/${t.id}/change-log/options`, { params: t }),
530
+ putData: (t, e) => l.put(`/${t}`, e)
531
+ }, a = n({
532
+ prefix: "/settings-user-role/v2"
533
+ }), Ct = {
534
+ /**
535
+ * Retrieves the transaction role for the given group and transaction name.
536
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
537
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
538
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
539
+ */
540
+ getTransactionRole: (t, e) => a.get(`/transaction-roles/${t}/${e}`),
541
+ /**
542
+ * Updates the users assigned to the given transaction role.
543
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
544
+ * @param {string} transactionName - The name of the transaction to update.
545
+ * @param {UpdateUser} body - The request body containing the updated user information.
546
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
547
+ */
548
+ putUpdateUsers: (t, e, r) => a.put(
549
+ `/transaction-roles/${t}/${e}/update-user`,
550
+ r
551
+ ),
552
+ /**
553
+ * Updates the approval level for the given transaction role.
554
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
555
+ * @param {string} transactionName - The name of the transaction to update.
556
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
557
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
558
+ */
559
+ putUpdateLevel: (t, e, r) => a.put(
560
+ `/transaction-roles/${t}/${e}/update-approval-level`,
561
+ r
562
+ ),
563
+ /**
564
+ * Updates the group management settings for the given transaction role.
565
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
566
+ * @param {string} transactionName - The name of the transaction to update.
567
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
568
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
569
+ */
570
+ putUpdateGroupManage: (t, e, r) => a.put(
571
+ `/transaction-roles/${t}/${e}/update-manage-by-parent`,
572
+ r
573
+ ),
574
+ getUserAssignedSystemRole: (t) => a.get(`/system-roles/user/${t}`),
575
+ getAssignedUserAmounts: () => a.get("/system-roles/amounts"),
576
+ getPermissionUser: (t, e) => {
577
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
578
+ const r = t === "totalControl" ? "total-control" : "read-only";
579
+ return a.get(`/system-roles/total-control-read-only/${r}`, {
580
+ params: e
581
+ });
582
+ }
583
+ return a.get(`/system-roles/permission/${t}`, { params: e });
584
+ },
585
+ getPermissionUserOptions: (t, e) => {
586
+ if (["totalControl", "readOnly"].includes(t ?? "")) {
587
+ const r = t === "totalControl" ? "total-control" : "read-only";
588
+ return a.get(`/system-roles/total-control-read-only/${r}/options`, {
589
+ params: e
590
+ });
591
+ }
592
+ return a.get(`/system-roles/permission/${t}/options`, {
593
+ params: e
594
+ });
595
+ },
596
+ getUserGroups: (t, e) => a.get(`/system-roles/permission/${e}/groups`, {
597
+ params: t
598
+ }),
599
+ postAssignUser: (t, e) => {
600
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
601
+ const r = e === "totalControl" ? "total-control" : "read-only";
602
+ return a.post(`/system-roles/total-control-read-only/${r}`, t);
603
+ }
604
+ return a.post(`/system-roles/permission/${e}`, t);
605
+ },
606
+ putEditUser: (t, e) => a.put(`/system-roles/${e}`, t),
607
+ putSetActive: (t, e) => {
608
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
609
+ const r = e === "totalControl" ? "total-control" : "read-only";
610
+ return a.put(`/system-roles/total-control-read-only/${r}`, t);
611
+ }
612
+ return a.put("/system-roles/set-active", t);
613
+ },
614
+ deleteRemoveUser: (t, e) => {
615
+ if (["totalControl", "readOnly"].includes(e ?? "")) {
616
+ const r = e === "totalControl" ? "total-control" : "read-only";
617
+ return a.delete(`/system-roles/total-control-read-only/${r}`, {
618
+ data: t
619
+ });
620
+ }
621
+ return a.delete("/system-roles", { data: t });
622
+ }
623
+ }, U = n({
624
+ prefix: "/settings-attribute/v2/open-api"
625
+ }), Ut = {
626
+ getOpenAPIDocs: (t) => U.get(`/${t.doc}`),
627
+ putGenerateToken: () => U.put("/generate"),
628
+ // This is if the dummy was not dummy
629
+ getToken: () => U.get(""),
630
+ putRequestOpenAPI: () => U.put("/request"),
631
+ putCancelRequestOpenAPI: () => U.put("/cancel-request")
632
+ }, _ = n({
633
+ prefix: "/settings-attribute-go/v2/open-api"
634
+ }), Tt = {
635
+ putGenerateToken: () => _.put("/generate"),
636
+ // This is if the dummy was not dummy
637
+ getToken: () => _.get(""),
638
+ putRequestOpenAPI: () => _.put("/request"),
639
+ putCancelRequestOpenAPI: () => _.put("/cancel-request")
640
+ }, A = n({
641
+ prefix: "/import/v2"
642
+ }), _t = {
643
+ getImport: (t, e) => A.get(`/${t}`, { params: e }),
644
+ postImportTemporary: (t, e) => {
645
+ const r = { "Content-Type": "multipart/form-data" };
646
+ return A.post(`/${t}/temporary`, e, { headers: r });
647
+ },
648
+ deleteImportTemporary: (t, e) => A.delete(`/${t}/temporary`, { data: e }),
649
+ postDuplicateImport: (t, e) => A.post(`/${t}/duplicate`, e),
650
+ putEditImport: (t, e) => A.put(`/${t}`, e),
651
+ postImport: (t, e, r) => A.post(t, r, { signal: e.signal }),
652
+ putImportCancelProgress: (t) => A.put(`/${t}/cancel-progress`)
653
+ }, $ = n({
654
+ prefix: "/import-go/v2"
655
+ }), Lt = {
656
+ getImport: (t, e) => $.get(`/${t}`, { params: e }),
657
+ postImportTemporary: (t, e) => {
658
+ const r = { "Content-Type": "multipart/form-data" };
659
+ return $.post(`/${t}/temporary`, e, { headers: r });
660
+ },
661
+ deleteImportTemporary: (t, e) => $.delete(`/${t}/temporary`, { params: e }),
662
+ postDuplicateImport: (t, e) => $.post(`/${t}/duplicate`, e),
663
+ putEditImport: (t, e) => $.put(`/${t}`, e),
664
+ postImport: (t, e, r) => $.post(t, r, { signal: e.signal }),
665
+ putImportCancelProgress: (t) => $.put(`/${t}/cancel-progress`)
69
666
  };
70
667
  export {
71
- S as ChangelogServices,
72
- v as GroupCategoryServices,
73
- O as NotificationApprovalServices,
74
- g as getBaseURL,
75
- f as getImageURL,
76
- l as queryParamsStringfy
668
+ ct as AliasCodeServices,
669
+ lt as AliasCodeServicesGo,
670
+ tt as AssetServices,
671
+ It as BrandServices,
672
+ X as ChangelogServices,
673
+ mt as CountryStateServices,
674
+ $t as CustomFieldServices,
675
+ vt as CustomFieldServicesGo,
676
+ pt as DashboardServices,
677
+ Pt as FileManagerServices,
678
+ yt as FileManagerServicesGo,
679
+ dt as GeneralSettingsServices,
680
+ At as GeneralSettingsServicesGo,
681
+ W as GroupCategoryServices,
682
+ z as GroupCategoryServicesGo,
683
+ gt as I18nService,
684
+ _t as ImportServices,
685
+ Lt as ImportServicesGo,
686
+ et as MissingServices,
687
+ Z as NotificationApprovalServices,
688
+ rt as NotificationServices,
689
+ st as NotificationServicesGo,
690
+ Ut as OpenAPIServices,
691
+ Tt as OpenAPIServicesGo,
692
+ ft as ReaderServices,
693
+ Ct as RoleServices,
694
+ St as ServiceCenterServices,
695
+ nt as SessionLogServices,
696
+ ut as SubUserServices,
697
+ ot as TAGServices,
698
+ it as TrackingServices,
699
+ at as UserServices,
700
+ K as getAssetsFile,
701
+ y as getBaseURL,
702
+ H as getImageURL,
703
+ J as getImageURLGo,
704
+ Q as queryParamsStringfy
77
705
  };