@tagsamurai/fats-api-services 1.0.0-alpha.98 → 1.0.0-beta.0

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 (104) hide show
  1. package/api-services.es.js +2398 -696
  2. package/api-services.system.js +2616 -1
  3. package/main.d.ts +21 -6
  4. package/package.json +6 -3
  5. package/src/dto/assetDetail.dto.d.ts +91 -0
  6. package/src/dto/assetPolicyService.dto.d.ts +19 -0
  7. package/src/dto/assetService.dto.d.ts +115 -15
  8. package/src/dto/assignment.dto.d.ts +43 -6
  9. package/src/dto/audit.dto.d.ts +14 -0
  10. package/src/dto/borrow.dto.d.ts +35 -0
  11. package/src/dto/damageService.dto.d.ts +23 -0
  12. package/src/dto/disposal.dto.d.ts +66 -0
  13. package/src/dto/fileManager.dto.d.ts +5 -5
  14. package/src/dto/globalAuth.dto.d.ts +18 -0
  15. package/src/dto/groupCategoryService.dto.d.ts +1 -1
  16. package/src/dto/license.dto.d.ts +73 -1
  17. package/src/dto/log.dto.d.ts +10 -10
  18. package/src/dto/maintenanceRoutine.dto.d.ts +12 -0
  19. package/src/dto/missing.dto.d.ts +12 -0
  20. package/src/dto/myAsset.dro.d.ts +12 -0
  21. package/src/dto/oldBorrowService.dto.d.ts +59 -0
  22. package/src/dto/oldRepairService.dto.d.ts +7 -0
  23. package/src/dto/oldReportService.dto.d.ts +80 -0
  24. package/src/dto/oldTagService.dto.d.ts +18 -0
  25. package/src/dto/oldTrackingService.dto.d.ts +3 -0
  26. package/src/dto/oldTransferService.dto.d.ts +221 -0
  27. package/src/dto/report.dto.d.ts +42 -0
  28. package/src/dto/subUser.dto.d.ts +5 -5
  29. package/src/dto/transactionLog.dto.d.ts +17 -0
  30. package/src/dto/transfer.dto.d.ts +29 -0
  31. package/src/dto/user.dto.d.ts +24 -24
  32. package/src/services/asset.service.d.ts +44 -0
  33. package/src/services/assetPolicy.service.d.ts +10 -0
  34. package/src/services/borrow.service.d.ts +14 -0
  35. package/src/services/customField.service.d.ts +4 -0
  36. package/src/services/damage.service.d.ts +6 -0
  37. package/src/services/damageService.type.d.ts +104 -0
  38. package/src/services/disposal.service.d.ts +18 -0
  39. package/src/services/globalAuth.service.d.ts +27 -0
  40. package/src/services/groupCategory.service.d.ts +3 -1
  41. package/src/services/license.service.d.ts +23 -0
  42. package/src/services/log.service.d.ts +9 -0
  43. package/src/services/missing.service.d.ts +12 -0
  44. package/src/services/moduleAuth.service.d.ts +19 -0
  45. package/src/services/myAsset.service.d.ts +13 -0
  46. package/src/services/oldAsset.service.d.ts +36 -5
  47. package/src/services/oldAssetName.service.d.ts +1 -1
  48. package/src/services/oldAssignment.service.d.ts +10 -4
  49. package/src/services/oldAudit.service.d.ts +11 -0
  50. package/src/services/oldBorrow.service.d.ts +61 -1
  51. package/src/services/oldBrand.service.d.ts +1 -1
  52. package/src/services/oldCustomField.service.d.ts +13 -0
  53. package/src/services/oldDamage.service.d.ts +12 -1
  54. package/src/services/oldDisposal.service.d.ts +44 -0
  55. package/src/services/oldLicense.service.d.ts +34 -4
  56. package/src/services/oldLog.service.d.ts +17 -0
  57. package/src/services/oldMaintenanceRoutine.service.d.ts +11 -0
  58. package/src/services/oldMissing.service.d.ts +10 -1
  59. package/src/services/oldModelType.service.d.ts +7 -0
  60. package/src/services/oldRepair.service.d.ts +3 -1
  61. package/src/services/oldReport.service.d.ts +31 -0
  62. package/src/services/oldTag.service.d.ts +4 -5
  63. package/src/services/oldTracking.service.d.ts +3 -2
  64. package/src/services/oldTransactionSetting.service.d.ts +21 -0
  65. package/src/services/oldTransfer.service.d.ts +30 -0
  66. package/src/services/oldUser.service.d.ts +5 -2
  67. package/src/services/report.service.d.ts +32 -0
  68. package/src/services/transfer.service.d.ts +11 -0
  69. package/src/services/user.service.d.ts +2 -1
  70. package/src/types/approval.type.d.ts +17 -0
  71. package/src/types/asset.type.d.ts +225 -0
  72. package/src/types/assetDetail.type.d.ts +120 -0
  73. package/src/types/assetPolicyService.type.d.ts +18 -0
  74. package/src/types/assignedAsset.type.d.ts +11 -11
  75. package/src/types/assignment.type.d.ts +42 -51
  76. package/src/types/audit.type.d.ts +13 -0
  77. package/src/types/borrow.type.d.ts +86 -0
  78. package/src/types/disposal/history.type.d.ts +51 -0
  79. package/src/types/disposal/prelist.type.d.ts +18 -0
  80. package/src/types/disposal/reported.type.d.ts +54 -0
  81. package/src/types/disposal/requestDisposal.type.d.ts +80 -0
  82. package/src/types/disposal/transaction.type.d.ts +62 -0
  83. package/src/types/disposal/user.type.d.ts +5 -0
  84. package/src/types/disposal.type.d.ts +1 -0
  85. package/src/types/fetchResponse.type.d.ts +4 -2
  86. package/src/types/license.type.d.ts +43 -0
  87. package/src/types/licenseAddon.type.d.ts +35 -0
  88. package/src/types/licenseAllocation.type.d.ts +64 -0
  89. package/src/types/licenseAsset.type.d.ts +77 -0
  90. package/src/types/licenseConcurrent.type.d.ts +11 -0
  91. package/src/types/licensePurchased.type.d.ts +16 -0
  92. package/src/types/maintenanceRoutine.type.d.ts +10 -0
  93. package/src/types/myAsset.type.d.ts +65 -0
  94. package/src/types/oldBorrowingService.type.d.ts +549 -0
  95. package/src/types/oldTagService.type.d.ts +7 -7
  96. package/src/types/options.type.d.ts +6 -10
  97. package/src/types/transfer.type.d.ts +64 -0
  98. package/src/types/user.type.d.ts +2 -1
  99. package/src/types/userGroupRole.type.d.ts +2 -1
  100. package/src/types/userTransactionRole.type.d.ts +1 -1
  101. package/src/utils/createInstance.util.d.ts +17 -0
  102. package/src/services/oldAliasCode.service.d.ts +0 -10
  103. package/src/services/oldGeneralSettings.service.d.ts +0 -6
  104. package/src/services/oldGroupCategory.service.d.ts +0 -15
@@ -1,241 +1,634 @@
1
- import W from "axios";
2
- const X = { 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" }, D = (t = "APP_API") => X["VITE_" + t], s = (t = {}, e = !1) => {
3
- const { env: r = "APP_API", prefix: a = "", headers: f = {}, ...R } = t, z = `${D(r)}${a}`, N = JSON.parse(localStorage.getItem("user") ?? "{}"), Z = N.jwt ?? N.token ?? "";
4
- return W.create({
5
- ...R,
6
- baseURL: z,
7
- headers: e ? f : {
1
+ import axios from "axios";
2
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_ADMIN_API": "https://dev-admin-api.tagsamurai.com", "VITE_APP_API": "https://staging-api.tagsamurai.com/fam/", "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://staging-api-logs-notification.tagsamurai.com" };
3
+ const getBaseURL = (env = "APP_API") => {
4
+ return __vite_import_meta_env__["VITE_" + env];
5
+ };
6
+ const createAxiosInstance = (config = {}, useDifferentHeaders = false) => {
7
+ const { env = "APP_API", prefix = "", headers = {}, ...restConfig } = config;
8
+ const baseURL = `${getBaseURL(env)}${prefix}`;
9
+ const instance = axios.create({
10
+ ...restConfig,
11
+ baseURL,
12
+ headers: useDifferentHeaders ? headers : {
8
13
  "Content-Type": "application/json",
9
- Authorization: `Bearer ${Z}`,
10
- ...f
14
+ ...headers
11
15
  }
12
16
  });
13
- }, ot = (t) => {
14
- if (!t || typeof t == "string")
17
+ instance.interceptors.request.use((request) => {
18
+ const user = JSON.parse(localStorage.getItem("user") ?? "{}");
19
+ const jwt = user.jwt ?? user.token ?? "";
20
+ request.headers["Authorization"] = `Bearer ${jwt}`;
21
+ return request;
22
+ });
23
+ return instance;
24
+ };
25
+ const queryParamsStringfy = (data) => {
26
+ if (!data || typeof data === "string") {
15
27
  return;
16
- const e = {};
17
- return Object.keys(t).forEach((r) => {
18
- Array.isArray(t[r]) ? t[r].length > 0 && Object.assign(e, {
19
- [r]: JSON.stringify(t[r])
20
- }) : t[r] !== void 0 && Object.assign(e, {
21
- [r]: t[r]
22
- });
23
- }), e;
24
- }, at = (t, e, r) => {
25
- if (!t) return;
26
- const a = D("APP_API"), f = t.startsWith("http") ? t : `${a}/utility/v2/files/${t.replace(/^\/+/, "")}`;
27
- if (e || r) {
28
- const R = new URLSearchParams();
29
- return e && (R.set("width", e.toString()), R.set("height", r ? r == null ? void 0 : r.toString() : e.toString())), `${f}?${R.toString()}`;
30
- }
31
- return f;
32
- }, it = (t) => {
33
- if (!t) return;
34
- const e = D("APP_TAGSAMURAI_API");
35
- return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
36
- }, ut = async (t, e = "excel") => await fetch(
37
- `${D("APP_ASSETS_URL")}/${e}/${t}`
38
- ), A = s({
39
- prefix: "/settings-attribute/v2",
40
- env: "APP_TAGSAMURAI_API"
41
- }), gt = {
42
- getGroupCategory: (t, e) => {
43
- const r = t === "category" ? t : "groups";
44
- return A.get(`/${r}/tree`, { params: e });
45
- },
46
- getGroupCategoryList: (t, e, r) => {
47
- const a = t === "category" ? t : "groups";
48
- return A.get(`/${a}/${e}`, { params: r });
49
- },
50
- getNames: (t) => {
51
- const e = t === "category" ? t : "groups";
52
- return A.get(`/${e}/names`);
53
- },
54
- getCodes: (t) => {
55
- const e = t === "category" ? t : "groups";
56
- return A.get(`/${e}/codes`);
57
- },
58
- postCreateGroupCategory: (t, e) => {
59
- const r = t === "category" ? t : "groups";
60
- return A.post(`/${r}`, e);
61
- },
62
- putEditGroupCategory: (t, e, r) => {
63
- const a = t === "category" ? t : "groups";
64
- return A.put(`/${a}/${r}`, e);
65
- },
66
- putMoveGroup: (t, e) => A.put(`/groups/${e}/move-group`, t),
67
- putEditBulkGroups: async (t) => A.put("/groups/bulk", t),
68
- deleteGroupCategory: (t, e, r) => {
69
- const a = t === "category" ? t : "groups";
70
- return A.delete(`/${a}/${r}`, { data: e });
71
- }
72
- }, S = s({
73
- prefix: "/settings-attribute-go/v2"
74
- }), pt = {
75
- getGroupCategory: (t, e) => {
76
- const r = t === "category" ? t : "groups";
77
- return S.get(`/${r}/tree`, { params: e });
78
- },
79
- getGroupCategoryList: (t, e) => {
80
- const r = t === "category" ? t : "groups";
81
- return S.get(`/${r}/${e}`);
82
- },
83
- getNames: (t) => {
84
- const e = t === "category" ? t : "groups";
85
- return S.get(`/${e}/names`);
86
- },
87
- getCodes: (t) => {
88
- const e = t === "category" ? t : "groups";
89
- return S.get(`/${e}/codes`);
90
- },
91
- postCreateGroupCategory: (t, e) => {
92
- const r = t === "category" ? t : "groups";
93
- return S.post(`/${r}`, e);
94
- },
95
- putEditGroupCategory: (t, e, r) => {
96
- const a = t === "category" ? t : "groups";
97
- return S.put(`/${a}/${r}`, e);
98
- },
99
- deleteGroupCategory: (t, e, r) => {
100
- const a = t === "category" ? t : "groups";
101
- return S.delete(`/${a}/${r}`, { data: e });
102
- }
103
- }, tt = s({
28
+ }
29
+ const assignedData = {};
30
+ Object.keys(data).forEach((item) => {
31
+ if (Array.isArray(data[item])) {
32
+ if (data[item].length > 0) {
33
+ Object.assign(assignedData, {
34
+ [item]: JSON.stringify(data[item])
35
+ });
36
+ }
37
+ } else if (data[item] !== void 0) {
38
+ Object.assign(assignedData, {
39
+ [item]: data[item]
40
+ });
41
+ }
42
+ });
43
+ return assignedData;
44
+ };
45
+ const getImageURL$1 = (name, width, height) => {
46
+ if (!name) return;
47
+ const BASE_URL = getBaseURL("APP_API");
48
+ const filePath = name.startsWith("http") ? name : `${BASE_URL}/utility/v2/files/${name.replace(/^\/+/, "")}`;
49
+ if (width || height) {
50
+ const params = new URLSearchParams();
51
+ if (width) {
52
+ params.set("width", width.toString());
53
+ params.set("height", height ? height == null ? void 0 : height.toString() : width.toString());
54
+ }
55
+ return `${filePath}?${params.toString()}`;
56
+ }
57
+ return filePath;
58
+ };
59
+ const getImageURL = (name) => {
60
+ if (!name) return;
61
+ const BASE_URL = getBaseURL();
62
+ const filePath = name.startsWith("http") ? name : `${BASE_URL}/file-manager/v2/files/${name}`;
63
+ return filePath;
64
+ };
65
+ const getAssetsFile = async (file, type = "excel") => {
66
+ const response = await fetch(
67
+ `${getBaseURL("APP_ASSETS_URL")}/${type}/${file}`
68
+ );
69
+ return response;
70
+ };
71
+ const API$T = createAxiosInstance({
72
+ prefix: "/settings-attribute/v2"
73
+ });
74
+ const getEndpoint = (type) => {
75
+ return type === "category" ? "category" : "groups";
76
+ };
77
+ const GroupCategoryServices = {
78
+ getGroupCategory: (type, params) => {
79
+ return API$T.get(`/${getEndpoint(type)}/tree`, { params });
80
+ },
81
+ // Doesn't exist in company plan other than "Basic"
82
+ getGroupCategoryList: (type, groupId) => {
83
+ return API$T.get(`/${getEndpoint(type)}/${groupId}`);
84
+ },
85
+ getNames: (type) => {
86
+ return API$T.get(`/${getEndpoint(type)}/names`);
87
+ },
88
+ getCodes: (type) => {
89
+ return API$T.get(`/${getEndpoint(type)}/codes`);
90
+ },
91
+ postCreateGroupCategory: (type, body) => {
92
+ return API$T.post(`/${getEndpoint(type)}`, body);
93
+ },
94
+ putEditGroupCategory: (type, body, objectId) => {
95
+ return API$T.put(`/${getEndpoint(type)}/${objectId}`, body);
96
+ },
97
+ // Doesn't exist in company plan other than "Enterprise"
98
+ putMoveGroup: (body, objectId) => {
99
+ return API$T.put(`/groups/${objectId}/move-group`, body);
100
+ },
101
+ // Doesn't exist in company plan other than "Enterprise"
102
+ putEditBulkGroups: async (body) => {
103
+ return API$T.put("/groups/bulk", body);
104
+ },
105
+ deleteGroupCategory: (type, body, objectId) => {
106
+ return API$T.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
107
+ }
108
+ };
109
+ const API$S = createAxiosInstance({
110
+ prefix: "/settings-attribute/v2/alias-code"
111
+ });
112
+ const AliasCodeServices = {
113
+ getAliasCode: () => {
114
+ return API$S.get("/");
115
+ },
116
+ postAliasCode: (data) => {
117
+ return API$S.post("/", data);
118
+ },
119
+ getAliasCodeList: (params) => {
120
+ return API$S.get(`/${params.object}/code-list`, { params });
121
+ }
122
+ };
123
+ const API$R = createAxiosInstance({
124
+ prefix: "/settings-attribute/v2/general-settings"
125
+ });
126
+ const GeneralSettingsServices = {
127
+ getGeneralSettings: () => {
128
+ return API$R.get("/");
129
+ },
130
+ putUpdateGeneralSettings: (data) => {
131
+ return API$R.put("/", data);
132
+ }
133
+ };
134
+ const API$Q = createAxiosInstance({
104
135
  prefix: "/v2",
105
136
  env: "APP_LOGS_NOTIFICATION_API"
106
- }), ct = {
107
- getTotalApprovals: () => tt.get("/approval/count")
108
- }, G = s({
137
+ });
138
+ const NotificationApprovalServices = {
139
+ getTotalApprovals: () => {
140
+ return API$Q.get("/approval/count");
141
+ }
142
+ };
143
+ const API$P = createAxiosInstance({
109
144
  prefix: "/v2",
110
145
  env: "APP_LOGS_NOTIFICATION_API"
111
- }), lt = {
112
- getActionLog: (t) => G.get("/change-log", { params: t }),
113
- getActionLogOption: (t) => G.get("/change-log/options", { params: t }),
114
- getSessionLogList: (t) => G.get("/session-log", { params: t }),
115
- getUserDetailSystemLogList: (t) => G.get("/change-log", { params: t }),
116
- getUserDetailSystemLogOption: (t) => G.get("/change-log/options", { params: t })
117
- }, y = s({
146
+ });
147
+ const ChangelogServices$1 = {
148
+ getActionLog: (params) => {
149
+ return API$P.get("/change-log", { params });
150
+ },
151
+ getActionLogOption: (params) => {
152
+ return API$P.get("/change-log/options", { params });
153
+ },
154
+ getSessionLogList: (params) => {
155
+ return API$P.get("/session-log", { params });
156
+ },
157
+ getUserDetailSystemLogList: (params) => {
158
+ return API$P.get("/change-log", { params });
159
+ },
160
+ getUserDetailSystemLogOption: (params) => {
161
+ return API$P.get("/change-log/options", { params });
162
+ },
163
+ /**
164
+ * Retrieves the transaction log.
165
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
166
+ */
167
+ getTransactionLog: (params) => {
168
+ return API$P.get("/transaction-log", { params });
169
+ },
170
+ /**
171
+ * Retrieves the transaction log options.
172
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
173
+ */
174
+ getTransactionLogOption: (params) => {
175
+ return API$P.get("/transaction-log/options", { params });
176
+ },
177
+ postScanLog: (body) => {
178
+ return API$P.post("/transaction-log/scan-log", body);
179
+ }
180
+ };
181
+ const API$O = createAxiosInstance({
118
182
  prefix: "/utility/v2"
119
- }), dt = {
120
- getActionLog: (t) => y.get("/change-log", { params: t }),
121
- getActionLogOption: (t) => y.get("/change-log/options", { params: t }),
122
- getSessionLogList: (t) => y.get("/session-log", { params: t }),
123
- getUserDetailSystemLogList: (t) => y.get("/change-log", { params: t }),
124
- getUserDetailSystemLogOption: (t) => y.get("/change-log/options", { params: t }),
125
- getUserDetailUserLogBorrowingList: (t, e) => y.get(`/borrowing-log/${t}`, { params: e }),
126
- getUserDetailUserLogAssignmentList: (t, e) => y.get(`/assignment-log/${t}`, { params: e }),
127
- getUserDetailUserLogBorrowingOption: (t, e) => y.get(`/borrowing-log/${t}/options`, { params: e }),
128
- getUserDetailUserLogAssignmentOption: (t, e) => y.get(`/assignment-log/${t}/options`, { params: e })
129
- }, c = s({
183
+ });
184
+ const ChangelogServices = {
185
+ getActionLog: (params) => {
186
+ return API$O.get("/change-log", { params });
187
+ },
188
+ getActionLogOption: (params) => {
189
+ return API$O.get("/change-log/options", { params });
190
+ },
191
+ getSessionLogList: (params) => {
192
+ return API$O.get("/session-log", { params });
193
+ },
194
+ getTransactionLog: (params) => {
195
+ return API$O.get("/transaction-log", { params });
196
+ },
197
+ /**
198
+ * Retrieves the transaction log options.
199
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
200
+ */
201
+ getTransactionLogOption: (params) => {
202
+ return API$O.get("/transaction-log/options", { params });
203
+ },
204
+ getUserDetailSystemLogList: (params) => {
205
+ return API$O.get("/change-log", { params });
206
+ },
207
+ getUserDetailSystemLogOption: (params) => {
208
+ return API$O.get("/change-log/options", { params });
209
+ },
210
+ getUserDetailUserLogBorrowingList: (userId, params) => {
211
+ return API$O.get(`/borrowing-log/${userId}`, { params });
212
+ },
213
+ getUserDetailUserLogAssignmentList: (userId, params) => {
214
+ return API$O.get(`/assignment-log/${userId}`, { params });
215
+ },
216
+ getUserDetailUserLogBorrowingOption: (userId, params) => {
217
+ return API$O.get(`/borrowing-log/${userId}/options`, { params });
218
+ },
219
+ getUserDetailUserLogAssignmentOption: (userId, params) => {
220
+ return API$O.get(`/assignment-log/${userId}/options`, { params });
221
+ }
222
+ };
223
+ const AssetsAPIs$1 = createAxiosInstance({
130
224
  prefix: "/assets/v2/assets"
131
- }), $t = {
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
225
+ });
226
+ const AttachmentAPIs = createAxiosInstance({
227
+ prefix: "/assets/v2/attachment"
228
+ });
229
+ const AssetServices$1 = {
230
+ getScanTag: (tag) => {
231
+ return AssetsAPIs$1.get("/scan", { params: { tag } });
232
+ },
233
+ getAllAssets: (params) => {
234
+ return AssetsAPIs$1.get("/", { params });
235
+ },
236
+ getAllAssetsOptions: (params) => {
237
+ return AssetsAPIs$1.get("/options", { params });
238
+ },
239
+ getAvailableAssets: (params) => {
240
+ return AssetsAPIs$1.get("/available", { params });
241
+ },
242
+ getAvailableAssetOptions: (params) => {
243
+ return AssetsAPIs$1.get("/available/options", { params });
244
+ },
245
+ scanAsset: (tag) => {
246
+ return AssetsAPIs$1.get("", { params: { tag } });
247
+ },
248
+ getAssetsById: (_id, params) => {
249
+ return AssetsAPIs$1.get("/by-id", { params: { _id, ...params } });
250
+ },
251
+ getOptions: (endpoint, params) => {
252
+ return AssetsAPIs$1.get(endpoint ? `/${endpoint}/options` : "/options", {
253
+ params
254
+ });
255
+ },
256
+ getUnlinkedAssets: (params) => {
257
+ return AssetsAPIs$1.get("/unlinked", { params });
258
+ },
259
+ getAssetDetail: (id, params) => {
260
+ return AssetsAPIs$1.get(`/${id}`, { params });
261
+ },
262
+ getAssetNameTotal: (assetNameId) => {
263
+ return AssetsAPIs$1.get(`/name-amount/${assetNameId}`);
264
+ },
265
+ getLinkedAssetFamily: (id) => {
266
+ return AssetsAPIs$1.get("/family", { params: { id } });
267
+ },
268
+ matchAssetWithTag: (id, tag) => {
269
+ const params = {
270
+ _id: JSON.stringify([id]),
271
+ tag
146
272
  };
147
- return c.get("/by-id", { params: r });
273
+ return AssetsAPIs$1.get("/by-id", { params });
274
+ },
275
+ postRegisterAsset: (body) => {
276
+ const headers = { "Content-Type": "multipart/form-data" };
277
+ return AssetsAPIs$1.post("/bulk", body, { headers });
278
+ },
279
+ putEditAsset: (id, body) => {
280
+ const headers = { "Content-Type": "multipart/form-data" };
281
+ return AssetsAPIs$1.put(`/${id}`, body, { headers });
282
+ },
283
+ putEditDetailCustomField: (id, body) => {
284
+ const headers = { "Content-Type": "multipart/form-data" };
285
+ return AssetsAPIs$1.put(`/${id}`, body, { headers });
286
+ },
287
+ getLinkedAsset: (assetId, params) => {
288
+ return AssetsAPIs$1.get(`/${assetId}/linked`, { params });
289
+ },
290
+ getPurchase: (assetId) => {
291
+ return AssetsAPIs$1.get(`/${assetId}/purchase`);
292
+ },
293
+ putPurchase: (body, assetId) => {
294
+ return AssetsAPIs$1.put(`/${assetId}/purchase`, body);
295
+ },
296
+ getAccounting: (assetId, params) => {
297
+ return AssetsAPIs$1.get(`/${assetId}/accounting`, { params });
298
+ },
299
+ getAssetFamily: (parentId) => {
300
+ return AssetsAPIs$1.get(`/${parentId}/family`);
301
+ },
302
+ getLinkedAssetOption: (parentId, params) => {
303
+ return AssetsAPIs$1.get(`/${parentId}/linked/options`, { params });
304
+ },
305
+ putLinkAsset: (body, parentId) => {
306
+ return AssetsAPIs$1.put(`/${parentId}/link-assets`, body);
307
+ },
308
+ putUnlinkAsset: (body, parentId) => {
309
+ return AssetsAPIs$1.put(`/${parentId}/remove-link-assets`, body);
310
+ },
311
+ // Asset Services prefixed by "attachment"
312
+ getAttachment: (params) => {
313
+ return AttachmentAPIs.get("", { params });
314
+ },
315
+ postAttachment: (body) => {
316
+ const headers = { "Content-Type": "multipart/form-data" };
317
+ return AttachmentAPIs.post("", body, { headers });
318
+ },
319
+ putAttachment: (body, id) => {
320
+ const headers = { "Content-Type": "multipart/form-data" };
321
+ return AttachmentAPIs.put(`/${id}`, body, { headers });
322
+ },
323
+ /**
324
+ * Deletes the attachment with the given IDs.
325
+ * @param {object} params - The request params containing the IDs of the attachments to delete.
326
+ * @returns {Promise<AxiosResponse>}
327
+ */
328
+ deleteAttachment: (params) => {
329
+ return AttachmentAPIs.delete("/bulk", { params });
330
+ }
331
+ };
332
+ const AssetsAPIs = createAxiosInstance({
333
+ prefix: "/assets/v2/assets"
334
+ });
335
+ const AssetServices = {
336
+ getAllAssets: (params) => {
337
+ return AssetsAPIs.get("/", { params });
338
+ },
339
+ getAllAssetsOptions: (params) => {
340
+ return AssetsAPIs.get("/options", { params });
341
+ },
342
+ getOptions: (endpoint, params) => {
343
+ return AssetsAPIs.get(endpoint ? `/${endpoint}/options` : "/options", {
344
+ params
345
+ });
346
+ },
347
+ getUnlinkedAssets: (params) => {
348
+ return AssetsAPIs.get("/unlinked", { params });
349
+ },
350
+ getAssetDetail: (id, params) => {
351
+ return AssetsAPIs.get(`/${id}`, { params });
352
+ },
353
+ getAssetNameTotal: () => {
354
+ return AssetsAPIs.get("/name-amount");
355
+ },
356
+ postRegisterAsset: (body) => {
357
+ const headers = { "Content-Type": "multipart/form-data" };
358
+ return AssetsAPIs.post("", body, { headers });
359
+ },
360
+ putEditAsset: (id, body) => {
361
+ const headers = { "Content-Type": "multipart/form-data" };
362
+ return AssetsAPIs.put(`/${id}`, body, { headers });
363
+ },
364
+ putEditDetailCustomField: (id, body) => {
365
+ const headers = { "Content-Type": "multipart/form-data" };
366
+ return AssetsAPIs.put(`/${id}`, body, { headers });
367
+ },
368
+ getLinkedAsset: (assetId, params) => {
369
+ return AssetsAPIs.get(`/${assetId}/linked-assets`, { params });
370
+ },
371
+ getPurchase: (assetId) => {
372
+ return AssetsAPIs.get(`/${assetId}/purchase`);
373
+ },
374
+ putPurchase: (body, assetId) => {
375
+ return AssetsAPIs.put(`/${assetId}/purchase`, body);
376
+ },
377
+ getAccounting: (assetId, params) => {
378
+ return AssetsAPIs.get(`/${assetId}/accounting`, { params });
379
+ },
380
+ getLinkedAssetOption: (parentId, params) => {
381
+ return AssetsAPIs.get(`/${parentId}/linked-assets/options`, { params });
382
+ },
383
+ putLinkAsset: (body, parentId) => {
384
+ return AssetsAPIs.put(`/${parentId}/linked-assets`, body);
385
+ },
386
+ putUnlinkAsset: (body, parentId) => {
387
+ return AssetsAPIs.put(`/${parentId}/unlink-assets`, body);
388
+ },
389
+ putEditUsefulLife: (body) => {
390
+ return AssetsAPIs.put("/useful-life", body);
391
+ },
392
+ getAttachment: (assetId, params) => {
393
+ return AssetsAPIs.get(`/attachment/${assetId}`, { params });
394
+ },
395
+ postAttachment: (body, assetId) => {
396
+ const headers = { "Content-Type": "multipart/form-data" };
397
+ return AssetsAPIs.post(`/attachment/${assetId}`, body, { headers });
398
+ },
399
+ putAttachment: (body, id) => {
400
+ const headers = { "Content-Type": "multipart/form-data" };
401
+ return AssetsAPIs.put(`/attachment/${id}`, body, { headers });
402
+ },
403
+ /**
404
+ * Deletes the attachment with the given IDs.
405
+ * @param {object} params - The request params containing the IDs of the attachments to delete.
406
+ * @returns {Promise<AxiosResponse>}
407
+ */
408
+ deleteAttachment: (params) => {
409
+ return AssetsAPIs.delete("/attachment/bulk", { params });
148
410
  }
149
- }, M = s({
411
+ };
412
+ const API$N = createAxiosInstance({
150
413
  prefix: "/tracking/v2/missing"
151
- }), At = {
152
- putFoundAsset: (t, e) => {
153
- const r = { ids: [t], serialNumber: e };
154
- return M.put("/found", r);
414
+ });
415
+ const MissingServices$2 = {
416
+ /**
417
+ * To mark as found.
418
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
419
+ */
420
+ putMarkAsFound: (body) => {
421
+ return API$N.put("/found", body);
422
+ },
423
+ putReportMissing: (id, body) => {
424
+ return API$N.put(`/report-missing/${id}`, body);
425
+ },
426
+ getData: (params) => {
427
+ return API$N.get("/", { params });
428
+ },
429
+ getDetail: (id) => {
430
+ return API$N.get(`/${id}`);
155
431
  },
156
- putReportMissing: (t, e) => M.put(`/report-missing/${t}`, e)
157
- }, V = s({
432
+ getOptions: (params) => {
433
+ return API$N.get("/options", { params });
434
+ }
435
+ };
436
+ const API$M = createAxiosInstance({
437
+ prefix: "/missing-tracking/v2"
438
+ });
439
+ const MissingServices$1 = {
440
+ putFoundAsset: (body) => {
441
+ return API$M.put("/found", body);
442
+ },
443
+ putReportMissing: (id, body) => {
444
+ return API$M.put(`/${id}/report-missing`, body);
445
+ },
446
+ getData: (params) => {
447
+ return API$M.get("/", { params });
448
+ },
449
+ getDataOptions: (params) => {
450
+ return API$M.get("/options", { params });
451
+ },
452
+ getDetail: (id) => {
453
+ return API$M.get(`/${id}`);
454
+ }
455
+ };
456
+ const API$L = createAxiosInstance({
158
457
  prefix: "/v2/notification",
159
458
  env: "APP_LOGS_NOTIFICATION_API"
160
- }), yt = {
161
- getNotifications: (t) => V.get("/", { params: t }),
162
- readNotification: (t) => V.put(`/${t}`)
163
- }, H = s({
459
+ });
460
+ const NotificationServices$1 = {
461
+ getNotifications: (params) => {
462
+ return API$L.get("/", { params });
463
+ },
464
+ readNotification: (id) => {
465
+ return API$L.put(`/${id}`);
466
+ }
467
+ };
468
+ const API$K = createAxiosInstance({
164
469
  prefix: "/utility/v2/notification"
165
- }), vt = {
166
- getNotifications: (t) => H.get("/", { params: t }),
167
- readNotification: (t) => H.put(`/${t}`)
168
- }, et = s({
470
+ });
471
+ const NotificationServices = {
472
+ getNotifications: (params) => {
473
+ return API$K.get("/", { params });
474
+ },
475
+ readNotification: (id) => {
476
+ return API$K.put(`/${id}`);
477
+ }
478
+ };
479
+ const API$J = createAxiosInstance({
169
480
  prefix: "/v2/session-log",
170
481
  env: "APP_LOGS_NOTIFICATION_API"
171
- }), mt = {
172
- postLogout: () => et.post("/logout")
173
- }, o = s({
482
+ });
483
+ const SessionLogServices = {
484
+ postLogout: () => {
485
+ return API$J.post("/logout");
486
+ }
487
+ };
488
+ const API$I = createAxiosInstance({
174
489
  prefix: "/tag/v2"
175
- }), St = {
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 }),
490
+ });
491
+ const TAGServices = {
492
+ getScanQR: (tag) => {
493
+ return API$I.get("/qr", { params: { tag } });
494
+ },
495
+ getScanRFID: (tag) => {
496
+ return API$I.get("/rfid", { params: { tag } });
497
+ },
498
+ getRFIDQRTAG: (params) => {
499
+ return API$I.get("/rfid-qr/scan", { params });
500
+ },
501
+ getEventLog: (params) => {
502
+ return API$I.get("/tag-transaction/event-log", { params });
503
+ },
180
504
  // Tab All
181
- getRfidQrAll: (t, e) => o.get(`/${t}`, { params: e }),
505
+ getRfidQrAll: (path, params) => {
506
+ return API$I.get(`/${path}`, { params });
507
+ },
182
508
  // 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),
509
+ getRfidQrPaired: (tagType, viewBy, params) => {
510
+ return API$I.get(`/${tagType}/paired/${viewBy}`, { params });
511
+ },
512
+ postAddTAGtoPrelist: (body, destination) => {
513
+ return API$I.post(`/prelist/${destination}/asset-name`, body);
514
+ },
515
+ postAddTAGtoReplacePrelist: (body) => {
516
+ return API$I.post("/prelist/replace-tag", body);
517
+ },
518
+ postAddTAGToPrelistUnpair: (body) => {
519
+ return API$I.post("/prelist/unpair-tag", body);
520
+ },
521
+ postAddTAGtoPending: (body) => {
522
+ return API$I.post("/pending-changes", body);
523
+ },
187
524
  // Available Tab
188
- getRFIDQrAvailable: (t, e) => o.get(`/${t}/available`, { params: e }),
525
+ getRFIDQrAvailable: (tagType, params) => {
526
+ return API$I.get(`/${tagType}/available`, { params });
527
+ },
189
528
  // Damaged TAB
190
- getRFIDQrDamaged: (t, e) => o.get(`/${t}/damaged`, { params: e }),
529
+ getRFIDQrDamaged: (tagType, params) => {
530
+ return API$I.get(`/${tagType}/damaged`, { params });
531
+ },
191
532
  // 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 } }),
533
+ getRFIDandQRList: (params) => {
534
+ return API$I.get("/rfid-qr", { params });
535
+ },
536
+ deleteUnpairTAG: (body) => {
537
+ return API$I.delete("/rfid-qr", { data: { data: body } });
538
+ },
539
+ postPairTAG: (body) => {
540
+ return API$I.post("/rfid-qr", { body: { data: body } });
541
+ },
195
542
  // RFID To Be Returned
196
- getToBeReturnedTAGList: (t) => o.get("/rfid/to-be-returned", { params: t }),
543
+ getToBeReturnedTAGList: (params) => {
544
+ return API$I.get("/rfid/to-be-returned", { params });
545
+ },
197
546
  // Handover TAG
198
- putHandoverTAG: (t) => o.put("/rfid/handover", { body: { data: t } }),
547
+ putHandoverTAG: (body) => {
548
+ return API$I.put("/rfid/handover", { body: { data: body } });
549
+ },
199
550
  // 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
- }, q = s({
551
+ getFilterOptions: (path, params) => {
552
+ return API$I.get(`/${path}/options`, { params });
553
+ },
554
+ getHolderListOptions: (params) => {
555
+ return API$I.get("/rfid/holder-list/options", { params });
556
+ },
557
+ getHolderList: (params) => {
558
+ return API$I.get("/rfid/holder-list", { params });
559
+ },
560
+ putAuditTAG: (body, tagType) => {
561
+ return API$I.put(`/${tagType}/audit`, body);
562
+ },
563
+ postLogAudit: (body) => {
564
+ return API$I.post("/tag-transaction/log-audit", body);
565
+ },
566
+ postCreateQr: (amount) => {
567
+ const body = { amount };
568
+ return API$I.post("/qr", body);
569
+ },
570
+ putReportTAG: (id, body) => {
571
+ return API$I.put(`/tag-transaction/report/${id}`, body);
572
+ },
573
+ putReportTAGBulk: (body) => {
574
+ return API$I.put("/tag-transaction/report/bulk", body);
575
+ },
576
+ putDeclineReport: (body, tagType) => {
577
+ return API$I.put(`/report/decline-report/${tagType}`, body);
578
+ }
579
+ };
580
+ const API$H = createAxiosInstance({
212
581
  prefix: "/tracking/v2/tracking"
213
- }), Pt = {
214
- putFoundAsset: (t, e, r) => {
215
- const a = {
216
- tag: t,
217
- group: e,
218
- serialNumber: r,
582
+ });
583
+ const MissingServices = {
584
+ getTrackingDetail: (trackingId) => {
585
+ return API$H.get(`/${trackingId}`);
586
+ },
587
+ putFoundAsset: (tag, groupId, serialNumber) => {
588
+ const params = {
589
+ tag,
590
+ group: groupId,
591
+ serialNumber,
219
592
  type: "Global"
220
593
  };
221
- return q.put("/found", { params: a });
594
+ return API$H.put("/scan", void 0, { params });
222
595
  },
223
- putReportPermanentlyMissing: (t, e) => q.put(`/report-permanently-missing/${t}`, e),
224
- getTrackingDetail: (t) => q.get(`/${t}`)
225
- }, i = s({
596
+ putReportPermanentlyMissing: (trackingId, body) => {
597
+ return API$H.put(`/report-permanently-missing/${trackingId}`, body);
598
+ },
599
+ putMoveBack: (body) => {
600
+ return API$H.put("/tracking/move-back", body);
601
+ }
602
+ };
603
+ const API$G = createAxiosInstance({
226
604
  prefix: "/settings-user-role/v2"
227
- }), It = {
228
- reLogin: (t) => i.post("/auth/login", t),
229
- changePassword: (t) => i.put("/users/change-password", t),
605
+ });
606
+ const UserServices$1 = {
607
+ reLogin: (body) => {
608
+ return API$G.post("/auth/login", body);
609
+ },
610
+ changePassword: (body) => {
611
+ return API$G.put("/users/change-password", body);
612
+ },
230
613
  /**
231
614
  * Retrieves the user list as dropdown options.
232
615
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
233
616
  */
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),
617
+ getUserDropdown: (params) => {
618
+ return API$G.get("/users/dropdown", { params });
619
+ },
620
+ getUserOptions: (params) => {
621
+ return API$G.get("/users/options", { params });
622
+ },
623
+ getUserList: (params) => {
624
+ return API$G.get("/users", { params });
625
+ },
626
+ getUserDetail: (id) => {
627
+ return API$G.get(`/users/${id}`);
628
+ },
629
+ putSetActiveBulk: (data) => {
630
+ return API$G.put("/users/set-active-bulk", data);
631
+ },
239
632
  // User Detail
240
633
  /**
241
634
  *
@@ -243,41 +636,94 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
243
636
  * @param type {"Global" | "Group"} Whether the system role's type is global or group
244
637
  * @param params {Record<string, unknown>}
245
638
  */
246
- getUserDetailSystemRoles: (t, e, r) => {
247
- const a = r ? `/${r}` : "";
248
- return i.get(`/user-detail/${t}/system-roles${a}`, {
249
- params: e
639
+ getUserDetailSystemRoles: (id, params, permissionType) => {
640
+ const additionalPath = permissionType ? `/${permissionType}` : "";
641
+ return API$G.get(`/user-detail/${id}/system-roles${additionalPath}`, {
642
+ params
643
+ });
644
+ },
645
+ getUserDetailTransactionRoleList: (id, params) => {
646
+ return API$G.get(`/user-detail/${id}/transaction-role-list`, { params });
647
+ },
648
+ postUserDetailAddTransactionRole: (userId, data) => {
649
+ return API$G.post(`/user-detail/${userId}/add-transaction-role`, data);
650
+ },
651
+ deleteUserDetailTransactionRole: (userId, data) => {
652
+ return API$G.delete(`/user-detail/${userId}/delete-transaction-role`, {
653
+ data
250
654
  });
251
655
  },
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
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
- }), Ut = {
656
+ putUserDetailEditTransactionRole: (userId, data) => {
657
+ return API$G.put(`/user-detail/${userId}/edit-transaction-role`, data);
658
+ },
659
+ putAssignGroup: (data, permissionType, id) => {
660
+ return API$G.put(`/user-detail/${id}/system-roles/${permissionType}`, data);
661
+ },
662
+ getUserDetailUserLogBorrowingList: (userId, params) => {
663
+ return API$G.get(`/users-log/${userId}/borrowing`, { params });
664
+ },
665
+ getUserDetailUserLogAssignmentList: (userId, params) => {
666
+ return API$G.get(`/users-log/${userId}/assignment`, { params });
667
+ },
668
+ getUserDetailUserLogBorrowingOption: (userId, params) => {
669
+ return API$G.get(`/users-log/${userId}/borrowing/option`, { params });
670
+ },
671
+ getUserDetailUserLogAssignmentOption: (userId, params) => {
672
+ return API$G.get(`/users-log/${userId}/assignment/option`, { params });
673
+ },
674
+ getUserDetailTransactionAdminLogList: (userId, params) => {
675
+ return API$G.get(`/users-log/${userId}/transaction-log`, { params });
676
+ },
677
+ getUserDetailTransactionAdminLogOption: (userId, params) => {
678
+ return API$G.get(`/users-log/${userId}/transaction-log/option`, { params });
679
+ },
680
+ getUserDetailUserAssetBorrowedList: (userId, params) => {
681
+ return API$G.get(`/user-detail/${userId}/assets/borrowed`, { params });
682
+ },
683
+ getUserDetailUserAssetAssignedList: (userId, params) => {
684
+ return API$G.get(`/user-detail/${userId}/assets/assigned`, { params });
685
+ },
686
+ getUserDetailUserAssetBorrowedOption: (userId, params) => {
687
+ return API$G.get(`/user-detail/${userId}/assets/borrowed/option`, { params });
688
+ },
689
+ getUserDetailUserAssetAssignedOption: (userId, params) => {
690
+ return API$G.get(`/user-detail/${userId}/assets/assigned/option`, { params });
691
+ },
692
+ getUserAndSubUser: (params) => {
693
+ return API$G.get("/users/user-and-sub-user", { params });
694
+ },
695
+ getUserAndSubUserOptions: () => {
696
+ return API$G.get("/users/user-and-sub-user/options", {
697
+ params: {
698
+ divisionOptions: "true",
699
+ positionOptions: "true"
700
+ }
701
+ });
702
+ }
703
+ };
704
+ const API$F = createAxiosInstance({
705
+ prefix: "/settings-user-role/v2"
706
+ });
707
+ const UserServices = {
272
708
  /**
273
709
  * Retrieves the user list as dropdown options.
274
710
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
275
711
  */
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),
712
+ getUserDropdown: (params) => {
713
+ return API$F.get("/users/dropdown", { params });
714
+ },
715
+ getUserOptions: (params) => {
716
+ return API$F.get("/users/options", { params });
717
+ },
718
+ getUserList: (params) => {
719
+ return API$F.get("/users", { params });
720
+ },
721
+ getUserDetail: (id) => {
722
+ return API$F.get(`/users/${id}`);
723
+ },
724
+ putSetActiveBulk: (data) => {
725
+ return API$F.put("/users/set-active-bulk", data);
726
+ },
281
727
  // User Detail
282
728
  /**
283
729
  *
@@ -285,92 +731,150 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
285
731
  * @param type {"Global" | "Group"} Whether the system role's type is global or group
286
732
  * @param params {Record<string, unknown>}
287
733
  */
288
- getUserDetailSystemRoles: (t, e, r) => {
289
- const a = r ? `/${r}/groups` : "";
290
- return u.get(`/users/${t}/system-roles${a}`, {
291
- params: e
734
+ getUserDetailSystemRoles: (id, params, permissionType) => {
735
+ const additionalPath = permissionType ? `/${permissionType}/groups` : "";
736
+ return API$F.get(`/users/${id}/system-roles${additionalPath}`, {
737
+ params
292
738
  });
293
739
  },
294
- getUserDetailTransactionRoleList: (t, e) => u.get(`/users/${t}/transaction-roles`, { params: e }),
295
- postUserDetailAddTransactionRole: (t, e) => u.post(`/users/${t}/add-transaction-role`, e),
296
- deleteUserDetailTransactionRole: (t, e) => u.put(`/users/${t}/delete-transaction-role`, e),
297
- putUserDetailEditTransactionRole: (t, e) => u.put(`/users/${t}/edit-transaction-role`, e),
298
- putAssignGroup: (t, e, r) => u.put(`/users/${r}/system-roles/${e}/groups`, t),
299
- putRoleSetActive: (t, e) => u.put(`/users/${e}/system-roles/set-active-bulk`, t),
300
- getUserDetailTransactionAdminLogList: (t, e) => u.get(`/users/${t}/transaction-log`, { params: e }),
301
- getUserDetailTransactionAdminLogOption: (t, e) => u.get(`/users/${t}/transaction-log/option`, { params: e }),
302
- getUserDetailUserAssetBorrowedList: (t, e) => u.get(`/users/${t}/borrowed-asset`, { params: e }),
303
- getUserDetailUserAssetAssignedList: (t, e) => u.get(`/users/${t}/assigned-asset`, { params: e }),
304
- getUserDetailUserAssetBorrowedOption: (t, e) => u.get(`/users/${t}/borrowed-asset/option`, { params: e }),
305
- getUserDetailUserAssetAssignedOption: (t, e) => u.get(`/users/${t}/assigned-asset/option`, { params: e })
306
- }, v = s({
740
+ getUserDetailTransactionRoleList: (id, params) => {
741
+ return API$F.get(`/users/${id}/transaction-roles`, { params });
742
+ },
743
+ postUserDetailAddTransactionRole: (userId, data) => {
744
+ return API$F.post(`/users/${userId}/add-transaction-role`, data);
745
+ },
746
+ deleteUserDetailTransactionRole: (userId, body) => {
747
+ return API$F.put(`/users/${userId}/delete-transaction-role`, body);
748
+ },
749
+ putUserDetailEditTransactionRole: (userId, data) => {
750
+ return API$F.put(`/users/${userId}/edit-transaction-role`, data);
751
+ },
752
+ putAssignGroup: (data, permissionType, id) => {
753
+ return API$F.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
754
+ },
755
+ putRoleSetActive: (body, userId) => {
756
+ return API$F.put(`/users/${userId}/system-roles/set-active-bulk`, body);
757
+ },
758
+ getUserDetailTransactionAdminLogList: (userId, params) => {
759
+ return API$F.get(`/users/${userId}/transaction-log`, { params });
760
+ },
761
+ getUserDetailTransactionAdminLogOption: (userId, params) => {
762
+ return API$F.get(`/users/${userId}/transaction-log/option`, { params });
763
+ },
764
+ getUserDetailUserAssetBorrowedList: (userId, params) => {
765
+ return API$F.get(`/users/${userId}/borrowed-asset`, { params });
766
+ },
767
+ getUserDetailUserAssetAssignedList: (userId, params) => {
768
+ return API$F.get(`/users/${userId}/assigned-asset`, { params });
769
+ },
770
+ getUserDetailUserAssetBorrowedOption: (userId, params) => {
771
+ return API$F.get(`/users/${userId}/borrowed-asset/option`, { params });
772
+ },
773
+ getUserDetailUserAssetAssignedOption: (userId, params) => {
774
+ return API$F.get(`/users/${userId}/assigned-asset/option`, { params });
775
+ }
776
+ };
777
+ const API$E = createAxiosInstance({
307
778
  prefix: "/settings-user-role/v2/sub-users"
308
- }), ft = {
779
+ });
780
+ const SubUserServices$1 = {
309
781
  // Sub User
310
- getSubUserList: (t, e) => v.get(`/${t}`, { params: e }),
311
- getSubUserOptions: (t, e) => v.get(`/${t}/option`, { params: e }),
312
- postCreateSubUser: (t, e) => {
313
- const r = { "Content-Type": "multipart/form-data" };
314
- return v.post(`/${t}`, e, { headers: r });
315
- },
316
- putSubUserSetActiveBulk: (t) => v.put("/set-active-bulk", t),
317
- deleteSubUser: (t) => v.delete("/bulk", { data: { subUserIds: t } }),
318
- putEditSubUser: (t, e) => {
319
- const r = { "Content-Type": "multipart/form-data" };
320
- return v.put(`/${t}`, e, { headers: r });
321
- },
322
- getBorrowedAsset: (t, e) => v.get(`/${t}/borrowed-asset`, { params: e }),
323
- getBorrowedAssetOptions: (t, e) => v.get(`/${t}/borrowed-asset/options`, { params: e })
324
- }, $ = s({
325
- prefix: "/settings-user-role-go/v2/users"
326
- }), Ct = {
782
+ getSubUserList: (userId, params) => {
783
+ return API$E.get(`/${userId}`, { params });
784
+ },
785
+ getSubUserOptions: (userId, params) => {
786
+ return API$E.get(`/${userId}/option`, { params });
787
+ },
788
+ postCreateSubUser: (userId, data) => {
789
+ const headers = { "Content-Type": "multipart/form-data" };
790
+ return API$E.post(`/${userId}`, data, { headers });
791
+ },
792
+ putSubUserSetActiveBulk: (data) => {
793
+ return API$E.put("/set-active-bulk", data);
794
+ },
795
+ deleteSubUser: (subUserIds) => {
796
+ return API$E.delete("/bulk", { data: { subUserIds } });
797
+ },
798
+ putEditSubUser: (userId, data) => {
799
+ const headers = { "Content-Type": "multipart/form-data" };
800
+ return API$E.put(`/${userId}`, data, { headers });
801
+ },
802
+ getBorrowedAsset: (id, params) => {
803
+ return API$E.get(`/${id}/borrowed-asset`, { params });
804
+ },
805
+ getBorrowedAssetOptions: (id, params) => {
806
+ return API$E.get(`/${id}/borrowed-asset/options`, { params });
807
+ }
808
+ };
809
+ const API$D = createAxiosInstance({
810
+ prefix: "/settings-user-role/v2/users"
811
+ });
812
+ const SubUserServices = {
327
813
  // Sub User
328
- getSubUserList: (t, e) => $.get(`/${t}/sub-users`, { params: e }),
329
- getSubUserOptions: (t, e) => $.get(`/${t}/sub-users/option`, { params: e }),
330
- postCreateSubUser: (t, e) => {
331
- const r = { "Content-Type": "multipart/form-data" };
332
- return $.post(`/${t}/sub-users`, e, { headers: r });
333
- },
334
- putSubUserSetActiveBulk: (t, e) => $.put(`/${t}/sub-users/set-active-bulk`, e),
335
- deleteSubUser: (t, e) => $.put(`/${t}/sub-users/bulk`, { subUserIds: e }),
336
- putEditSubUser: (t, e, r) => {
337
- const a = { "Content-Type": "multipart/form-data" };
338
- return $.put(`/${t}/sub-users/${e}`, r, {
339
- headers: a
814
+ getSubUserList: (userId, params) => {
815
+ return API$D.get(`/${userId}/sub-users`, { params });
816
+ },
817
+ getSubUserOptions: (userId, params) => {
818
+ return API$D.get(`/${userId}/sub-users/option`, { params });
819
+ },
820
+ postCreateSubUser: (userId, data) => {
821
+ const headers = { "Content-Type": "multipart/form-data" };
822
+ return API$D.post(`/${userId}/sub-users`, data, { headers });
823
+ },
824
+ putSubUserSetActiveBulk: (userId, data) => {
825
+ return API$D.put(`/${userId}/sub-users/set-active-bulk`, data);
826
+ },
827
+ deleteSubUser: (userId, subUserIds) => {
828
+ return API$D.put(`/${userId}/sub-users/bulk`, { subUserIds });
829
+ },
830
+ putEditSubUser: (userId, subUserId, data) => {
831
+ const headers = { "Content-Type": "multipart/form-data" };
832
+ return API$D.put(`/${userId}/sub-users/${subUserId}`, data, {
833
+ headers
834
+ });
835
+ },
836
+ getBorrowedAsset: (userId, subUserId, params) => {
837
+ return API$D.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
838
+ params
839
+ });
840
+ },
841
+ getBorrowedAssetOptions: (userId, subUserId, params) => {
842
+ return API$D.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
843
+ params
844
+ });
845
+ },
846
+ getAssignedAsset: (userId, subUserId, params) => {
847
+ return API$D.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
848
+ params
340
849
  });
341
850
  },
342
- getBorrowedAsset: (t, e, r) => $.get(`/${t}/sub-users/${e}/borrowed-asset`, {
343
- params: r
344
- }),
345
- getBorrowedAssetOptions: (t, e, r) => $.get(`/${t}/sub-users/${e}/borrowed-asset/options`, {
346
- params: r
347
- }),
348
- getAssignedAsset: (t, e, r) => $.get(`/${t}/sub-users/${e}/assigned-asset`, {
349
- params: r
350
- }),
351
- getAssignedAssetOptions: (t, e, r) => $.get(`/${t}/sub-users/${e}/assigned-asset/options`, {
352
- params: r
353
- })
354
- }, h = s({
851
+ getAssignedAssetOptions: (userId, subUserId, params) => {
852
+ return API$D.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
853
+ params
854
+ });
855
+ }
856
+ };
857
+ const API$C = createAxiosInstance({
355
858
  env: "APP_ADMIN_API",
356
859
  prefix: "/settings-attribute/languages"
357
- }), Lt = {
860
+ });
861
+ const I18nService = {
358
862
  /**
359
863
  * Fetch all translation messages for a specific locale.
360
864
  * @param locale The locale code (e.g., 'en', 'id').
361
865
  * @returns A promise resolving to a key-value record of messages.
362
866
  */
363
- getMessages: (t) => h.get(`/${t}/translations`),
867
+ getMessages: (isoCode) => {
868
+ return API$C.get(`/${isoCode}/translations`);
869
+ },
364
870
  /**
365
871
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
366
872
  *
367
873
  * @returns Promise Array of options
368
874
  */
369
875
  getLanguageOptions: async () => {
370
- const { data: t } = await h.get(
371
- "/dropdown"
372
- );
373
- return t.data;
876
+ const { data } = await API$C.get("/dropdown");
877
+ return data.data;
374
878
  },
375
879
  /**
376
880
  * Fetch single lang option meta data
@@ -378,11 +882,11 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
378
882
  * @param isoCode The locale code (e.g., 'en', 'id').
379
883
  * @returns Promise LanguageMeta
380
884
  */
381
- getLanguageOptionMeta: async (t) => {
382
- const { data: e } = await h.get(
383
- "/dropdown/" + t
885
+ getLanguageOptionMeta: async (isoCode) => {
886
+ const { data } = await API$C.get(
887
+ "/dropdown/" + isoCode
384
888
  );
385
- return e.data;
889
+ return data.data;
386
890
  },
387
891
  /**
388
892
  * Translate a specific text to the target locale.
@@ -390,101 +894,167 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
390
894
  * @param key Unique translation key.
391
895
  * @param locale Target locale code.
392
896
  */
393
- translateText: async (t, e) => {
394
- const { data: r } = await h.post("/translate", {
395
- q: t,
396
- target: e
897
+ translateText: async (key, locale) => {
898
+ const { data } = await API$C.post("/translate", {
899
+ q: key,
900
+ target: locale
397
901
  });
398
- return r.data.translations[t];
902
+ return data.data.translations[key];
399
903
  }
400
- }, j = s({
904
+ };
905
+ const API$B = createAxiosInstance({
401
906
  prefix: "/dashboard/v2/dashboard"
402
- }), Tt = {
403
- getLatestTask: (t) => j.get("/latest-task", { params: t }),
404
- getSummary: (t) => j.get("/summary", { params: t })
405
- }, E = s({
406
- prefix: "/alias-code/api/alias-code"
407
- }), Ot = {
408
- getAliasCode: () => E.get("/"),
409
- postAliasCode: (t) => E.post("/", t),
410
- getAliasCodeList: (t) => E.get(`/${t.object}/code-list`, { params: t })
411
- }, k = s({
412
- prefix: "/settings-attribute-go/v2/alias-code"
413
- }), bt = {
414
- getAliasCode: () => k.get("/"),
415
- postAliasCode: (t) => k.post("/", t),
416
- getAliasCodeList: (t) => k.get(`/${t.object}/code-list`, { params: t })
417
- }, Q = s({
418
- prefix: "/settings-attribute/v2/general-settings"
419
- }), Dt = {
420
- getGeneralSettings: () => Q.get("/"),
421
- putUpdateGeneralSettings: (t) => Q.put("/", t)
422
- }, Y = s({
423
- prefix: "/settings-attribute-go/v2/general-settings"
424
- }), Rt = {
425
- getGeneralSettings: () => Y.get("/"),
426
- putUpdateGeneralSettings: (t) => Y.put("/", t)
427
- }, C = s({
907
+ });
908
+ const DashboardServices = {
909
+ getLatestTask: (params) => {
910
+ return API$B.get("/latest-task", { params });
911
+ },
912
+ getSummary: (params) => {
913
+ return API$B.get("/summary", { params });
914
+ }
915
+ };
916
+ const API$A = createAxiosInstance({
428
917
  prefix: "/settings-attribute/v2/custom-field"
429
- }), Gt = {
430
- getCustomField: async (t) => C.get("/", { params: t }),
431
- getOptions: async (t) => C.get("/options", { params: t }),
432
- postCreateCustomField: async (t, e) => C.post("/", e, { params: t }),
433
- putEditCustomField: async (t, e, r) => C.put(`/${r}`, e, { params: t }),
434
- putChangeStatus: async (t, e) => C.put("/bulk", e, { params: t }),
435
- deleteCustomField: async (t) => C.delete("/bulk", { data: t })
436
- }, L = s({
437
- prefix: "/settings-attribute-go/v2/custom-field"
438
- }), _t = {
439
- getCustomField: async (t) => L.get("/", { params: t }),
440
- getOptions: async (t) => L.get("/options", { params: t }),
441
- postCreateCustomField: async (t, e) => L.post("/", e, { params: t }),
442
- putEditCustomField: async (t, e, r) => L.put(`/${r}`, e, { params: t }),
443
- putChangeStatus: async (t, e) => L.put("/bulk", e, { params: t }),
444
- deleteCustomField: async (t) => L.delete("/bulk", { params: t })
445
- }, F = ({ headers: t = {}, params: e = {} } = {}) => {
446
- const r = D("APP_COUNTRY_STATE_API"), a = D("APP_COUNTRY_STATE_API_KEY");
447
- return W.create({
448
- baseURL: `${r}/v1`,
449
- headers: {
450
- "Content-type": "application/json",
451
- "X-CSCAPI-KEY": a,
452
- ...t
453
- },
454
- params: e
455
- });
456
- }, ht = {
457
- getCountry: () => F().get("/countries"),
458
- getState: (t) => F().get(`/countries/${t}/states`),
459
- getCity: (t, e) => F().get(`/countries/${t}/states/${e}/cities`)
460
- }, l = s({
461
- prefix: "/routine/v2"
462
- }), xt = {
463
- getList: (t) => l.get("/service-center", { params: t }),
464
- postList: (t) => l.post("/service-center", t),
465
- putList: (t, e) => l.put(`/service-center/${t}`, e),
466
- putActivate: (t) => l.put("/service-center/bulk", t),
467
- getDetailList: (t) => l.get(`/service-center/${t}`),
468
- getListOptions: (t) => l.get("/service-center/options", { params: t }),
469
- deleteList: (t) => l.delete("/service-center", { params: t }),
918
+ });
919
+ const CustomFieldServices$1 = {
920
+ getCustomField: async (params) => {
921
+ return API$A.get("/", { params });
922
+ },
923
+ getCustomFieldsByCategory: (category, params) => {
924
+ return API$A.get(`/${category}`, { params });
925
+ },
926
+ getOptions: async (params) => {
927
+ return API$A.get("/options", { params });
928
+ },
929
+ postCreateCustomField: async (params, data) => {
930
+ return API$A.post("/", data, { params });
931
+ },
932
+ putEditCustomField: async (params, data, id) => {
933
+ return API$A.put(`/${id}`, data, { params });
934
+ },
935
+ putChangeStatus: async (params, data) => {
936
+ return API$A.put("/bulk", data, { params });
937
+ },
938
+ deleteCustomField: async (data) => {
939
+ return API$A.delete("/bulk", { data });
940
+ },
941
+ getUsedCustomFields: async () => {
942
+ return API$A.get("/used-by-assets");
943
+ }
944
+ };
945
+ const API$z = createAxiosInstance({
946
+ prefix: "/settings-attribute/v2/custom-field"
947
+ });
948
+ const CustomFieldServices = {
949
+ getCustomField: async (params) => {
950
+ return API$z.get("/", { params });
951
+ },
952
+ getCustomFieldsByCategory: (category, params) => {
953
+ return API$z.get(`/${category}`, { params });
954
+ },
955
+ getOptions: async (params) => {
956
+ return API$z.get("/options", { params });
957
+ },
958
+ postCreateCustomField: async (params, data) => {
959
+ return API$z.post("/", data, { params });
960
+ },
961
+ putEditCustomField: async (params, data, id) => {
962
+ return API$z.put(`/${id}`, data, { params });
963
+ },
964
+ putChangeStatus: async (params, data) => {
965
+ return API$z.put("/bulk", data, { params });
966
+ },
967
+ deleteCustomField: async (params) => {
968
+ return API$z.delete("/bulk", { params });
969
+ },
970
+ getUsedCustomFields: async () => {
971
+ return API$z.get("/used-by-assets");
972
+ }
973
+ };
974
+ const API$y = ({ headers = {}, params = {} } = {}) => {
975
+ const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
976
+ const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
977
+ const instance = axios.create({
978
+ baseURL: `${BASE_URL}/v1`,
979
+ headers: {
980
+ "Content-type": "application/json",
981
+ "X-CSCAPI-KEY": API_KEY,
982
+ ...headers
983
+ },
984
+ params
985
+ });
986
+ return instance;
987
+ };
988
+ const CountryStateServices = {
989
+ getCountry: () => {
990
+ return API$y().get("/countries");
991
+ },
992
+ getState: (country) => {
993
+ return API$y().get(`/countries/${country}/states`);
994
+ },
995
+ getCity: (country, state) => {
996
+ return API$y().get(`/countries/${country}/states/${state}/cities`);
997
+ }
998
+ };
999
+ const API$x = createAxiosInstance({
1000
+ prefix: "/routine/v2"
1001
+ });
1002
+ const ServiceCenterServices = {
1003
+ getList: (params) => {
1004
+ return API$x.get("/service-center", { params });
1005
+ },
1006
+ postList: (body) => {
1007
+ return API$x.post("/service-center", body);
1008
+ },
1009
+ putList: (id, body) => {
1010
+ return API$x.put(`/service-center/${id}`, body);
1011
+ },
1012
+ putActivate: (body) => {
1013
+ return API$x.put("/service-center/bulk", body);
1014
+ },
1015
+ getDetailList: (id) => {
1016
+ return API$x.get(`/service-center/${id}`);
1017
+ },
1018
+ getListOptions: (params) => {
1019
+ return API$x.get("/service-center/options", { params });
1020
+ },
1021
+ deleteList: (params) => {
1022
+ return API$x.delete("/service-center", { params });
1023
+ },
470
1024
  // Activities
471
- getActivities: (t) => l.get("/service-activities", { params: t }),
472
- getActivityOptions: (t) => l.get("/service-activities/options", { params: t }),
473
- getActivityDetail: (t) => l.get(`/service-activities/${t}`),
474
- getActivityLog: (t) => l.get(`/service-activities/${t}/activity-log`)
475
- }, rt = s({
1025
+ getActivities: (params) => {
1026
+ return API$x.get("/service-activities", { params });
1027
+ },
1028
+ getActivityOptions: (params) => {
1029
+ return API$x.get("/service-activities/options", { params });
1030
+ },
1031
+ getActivityDetail: (id) => {
1032
+ return API$x.get(`/service-activities/${id}`);
1033
+ },
1034
+ getActivityLog: (id) => {
1035
+ return API$x.get(`/service-activities/${id}/activity-log`);
1036
+ }
1037
+ };
1038
+ const API$w = createAxiosInstance({
476
1039
  prefix: "/settings-attribute/v2/brands"
477
- }), wt = {
478
- getDropdown: (t) => rt.get("/dropdown", { params: t })
479
- }, T = s({
1040
+ });
1041
+ const BrandServices = {
1042
+ getDropdown: (params) => {
1043
+ return API$w.get("/dropdown", { params });
1044
+ }
1045
+ };
1046
+ const API$v = createAxiosInstance({
480
1047
  prefix: "/file-manager/v2"
481
- }), qt = {
1048
+ });
1049
+ const FileManagerServices$1 = {
482
1050
  /**
483
1051
  * Get storage information.
484
1052
  *
485
1053
  * @returns {Promise<AxiosResponse>} The Axios Response.
486
1054
  */
487
- getStorageInformation: () => T.get("/files/storage"),
1055
+ getStorageInformation: () => {
1056
+ return API$v.get("/files/storage");
1057
+ },
488
1058
  /**
489
1059
  * Get file manager data.
490
1060
  *
@@ -492,7 +1062,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
492
1062
  * @param {FileManagerFilterParams} [params] - The parameters for filtering.
493
1063
  * @returns {Promise<AxiosResponse>} The Axios Response.
494
1064
  */
495
- getFileManager: (t, e) => T.get(`/${t}`, { params: e }),
1065
+ getFileManager: (type, params) => {
1066
+ return API$v.get(`/${type}`, { params });
1067
+ },
496
1068
  /**
497
1069
  * Get file manager options.
498
1070
  *
@@ -500,7 +1072,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
500
1072
  * @param {FileManagerOptionBoolean} [params] - The parameters for options.
501
1073
  * @returns {Promise<AxiosResponse>} The Axios Response.
502
1074
  */
503
- getFileManagerOption: (t, e) => T.get(`/${t}/options`, { params: e }),
1075
+ getFileManagerOption: (type, params) => {
1076
+ return API$v.get(`/${type}/options`, { params });
1077
+ },
504
1078
  /**
505
1079
  * Recover files.
506
1080
  *
@@ -508,7 +1082,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
508
1082
  * @param {object} body - The body of the request.
509
1083
  * @returns {Promise<AxiosResponse>} The Axios Response.
510
1084
  */
511
- recoverFiles: (t, e) => T.put(`/${t}/recover`, e),
1085
+ recoverFiles: (type, body) => {
1086
+ return API$v.put(`/${type}/recover`, body);
1087
+ },
512
1088
  /**
513
1089
  * Delete files.
514
1090
  *
@@ -516,7 +1092,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
516
1092
  * @param {DeleteFileManagerDto} params - The params of the request.
517
1093
  * @returns {Promise<AxiosResponse>} The Axios Response.
518
1094
  */
519
- deleteFiles: (t, e) => T.delete(`/${t}`, { params: e }),
1095
+ deleteFiles: (type, params) => {
1096
+ return API$v.delete(`/${type}`, { params });
1097
+ },
520
1098
  /**
521
1099
  * Delete files permanently.
522
1100
  *
@@ -524,16 +1102,22 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
524
1102
  * @param {object} body - The body of the request.
525
1103
  * @returns {Promise<AxiosResponse>} The Axios Response.
526
1104
  */
527
- deletePermanently: (t, e) => T.delete(`/${t}/delete-permanent`, { params: e })
528
- }, O = s({
1105
+ deletePermanently: (type, params) => {
1106
+ return API$v.delete(`/${type}/delete-permanent`, { params });
1107
+ }
1108
+ };
1109
+ const API$u = createAxiosInstance({
529
1110
  prefix: "/utility/v2"
530
- }), Et = {
1111
+ });
1112
+ const FileManagerServices = {
531
1113
  /**
532
1114
  * Get storage information.
533
1115
  *
534
1116
  * @returns {Promise<AxiosResponse>} The Axios Response.
535
1117
  */
536
- getStorageInformation: () => O.get("/files/storage"),
1118
+ getStorageInformation: () => {
1119
+ return API$u.get("/files/storage");
1120
+ },
537
1121
  /**
538
1122
  * Get file manager data.
539
1123
  *
@@ -541,7 +1125,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
541
1125
  * @param {FileManagerFilterParams} [params] - The parameters for filtering.
542
1126
  * @returns {Promise<AxiosResponse>} The Axios Response.
543
1127
  */
544
- getFileManager: (t, e) => O.get(`/${t}`, { params: e }),
1128
+ getFileManager: (type, params) => {
1129
+ return API$u.get(`/${type}`, { params });
1130
+ },
545
1131
  /**
546
1132
  * Get file manager options.
547
1133
  *
@@ -549,7 +1135,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
549
1135
  * @param {FileManagerOptionBoolean} [params] - The parameters for options.
550
1136
  * @returns {Promise<AxiosResponse>} The Axios Response.
551
1137
  */
552
- getFileManagerOption: (t, e) => O.get(`/${t}/options`, { params: e }),
1138
+ getFileManagerOption: (type, params) => {
1139
+ return API$u.get(`/${type}/options`, { params });
1140
+ },
553
1141
  /**
554
1142
  * Recover files.
555
1143
  *
@@ -557,7 +1145,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
557
1145
  * @param {object} body - The body of the request.
558
1146
  * @returns {Promise<AxiosResponse>} The Axios Response.
559
1147
  */
560
- recoverFiles: (t, e) => O.put(`/${t}/recover`, e),
1148
+ recoverFiles: (type, body) => {
1149
+ return API$u.put(`/${type}/recover`, body);
1150
+ },
561
1151
  /**
562
1152
  * Delete files.
563
1153
  *
@@ -565,7 +1155,9 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
565
1155
  * @param {DeleteFileManagerDto} params - The params of the request.
566
1156
  * @returns {Promise<AxiosResponse>} The Axios Response.
567
1157
  */
568
- deleteFiles: (t, e) => O.delete(`/${t}`, { params: e }),
1158
+ deleteFiles: (type, params) => {
1159
+ return API$u.delete(`/${type}`, { params });
1160
+ },
569
1161
  /**
570
1162
  * Delete files permanently.
571
1163
  *
@@ -573,28 +1165,52 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
573
1165
  * @param {object} body - The body of the request.
574
1166
  * @returns {Promise<AxiosResponse>} The Axios Response.
575
1167
  */
576
- deletePermanently: (t, e) => O.delete(`/${t}/delete-permanent`, { params: e })
577
- }, m = s({
1168
+ deletePermanently: (type, params) => {
1169
+ return API$u.delete(`/${type}/delete-permanent`, { params });
1170
+ }
1171
+ };
1172
+ const API$t = createAxiosInstance({
578
1173
  prefix: "/iot/v2/reader"
579
- }), kt = {
580
- getData: (t) => m.get("/", { params: t }),
581
- getDataOptions: (t) => m.get("/options", { params: t }),
582
- getActivityLogData: (t) => m.get("/activity-log", { params: t }),
583
- getActivityLogOptions: (t) => m.get("/activity-log/options", { params: t }),
584
- getDataById: (t) => m.get(`/${t}`),
585
- getChangeLog: (t) => m.get(`/${t.id}/change-log`, { params: t }),
586
- getChangeLogOptions: (t) => m.get(`/${t.id}/change-log/options`, { params: t }),
587
- putData: (t, e) => m.put(`/${t}`, e)
588
- }, g = s({
1174
+ });
1175
+ const ReaderServices = {
1176
+ getData: (params) => {
1177
+ return API$t.get("/", { params });
1178
+ },
1179
+ getDataOptions: (params) => {
1180
+ return API$t.get("/options", { params });
1181
+ },
1182
+ getActivityLogData: (params) => {
1183
+ return API$t.get("/activity-log", { params });
1184
+ },
1185
+ getActivityLogOptions: (params) => {
1186
+ return API$t.get("/activity-log/options", { params });
1187
+ },
1188
+ getDataById: (id) => {
1189
+ return API$t.get(`/${id}`);
1190
+ },
1191
+ getChangeLog: (params) => {
1192
+ return API$t.get(`/${params.id}/change-log`, { params });
1193
+ },
1194
+ getChangeLogOptions: (params) => {
1195
+ return API$t.get(`/${params.id}/change-log/options`, { params });
1196
+ },
1197
+ putData: (id, body) => {
1198
+ return API$t.put(`/${id}`, body);
1199
+ }
1200
+ };
1201
+ const API$s = createAxiosInstance({
589
1202
  prefix: "/settings-user-role/v2"
590
- }), Ft = {
1203
+ });
1204
+ const RoleServices$1 = {
591
1205
  /**
592
1206
  * Retrieves the transaction role for the given group and transaction name.
593
1207
  * @param {string} groupId - The ID of the group to retrieve the transaction role for.
594
1208
  * @param {string} transactionName - The name of the transaction to retrieve the role for.
595
1209
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
596
1210
  */
597
- getTransactionRole: (t, e) => g.get(`/transaction-roles/${t}/${e}`),
1211
+ getTransactionRole: (groupId, transactionName) => {
1212
+ return API$s.get(`/transaction-roles/${groupId}/${transactionName}`);
1213
+ },
598
1214
  /**
599
1215
  * Updates the users assigned to the given transaction role.
600
1216
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -602,10 +1218,12 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
602
1218
  * @param {UpdateUser} body - The request body containing the updated user information.
603
1219
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
604
1220
  */
605
- putUpdateUsers: (t, e, r) => g.put(
606
- `/transaction-roles/${t}/${e}/update-user`,
607
- r
608
- ),
1221
+ putUpdateUsers: (groupId, transactionName, body) => {
1222
+ return API$s.put(
1223
+ `/transaction-roles/${groupId}/${transactionName}/update-user`,
1224
+ body
1225
+ );
1226
+ },
609
1227
  /**
610
1228
  * Updates the approval level for the given transaction role.
611
1229
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -613,10 +1231,12 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
613
1231
  * @param {UserApprovalLevel} body - The request body containing the updated approval level.
614
1232
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
615
1233
  */
616
- putUpdateLevel: (t, e, r) => g.put(
617
- `/transaction-roles/${t}/${e}/update-approval-level`,
618
- r
619
- ),
1234
+ putUpdateLevel: (groupId, transactionName, body) => {
1235
+ return API$s.put(
1236
+ `/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
1237
+ body
1238
+ );
1239
+ },
620
1240
  /**
621
1241
  * Updates the group management settings for the given transaction role.
622
1242
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -624,66 +1244,84 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
624
1244
  * @param {GroupManageByParent} body - The request body containing the updated management settings.
625
1245
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
626
1246
  */
627
- putUpdateGroupManage: (t, e, r) => g.put(
628
- `/transaction-roles/${t}/${e}/update-manage-by-parent`,
629
- r
630
- ),
631
- getUserAssignedSystemRole: (t) => g.get(`/system-roles/user/${t}`),
632
- getAssignedUserAmounts: () => g.get("/system-roles/amounts"),
633
- getPermissionUser: (t, e) => {
634
- if (["totalControl", "readOnly"].includes(t ?? "")) {
635
- const r = t === "totalControl" ? "total-control" : "read-only";
636
- return g.get(`/system-roles/total-control-read-only/${r}`, {
637
- params: e
1247
+ putUpdateGroupManage: (groupId, transactionName, body) => {
1248
+ return API$s.put(
1249
+ `/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
1250
+ body
1251
+ );
1252
+ },
1253
+ getUserAssignedSystemRole: (userId) => {
1254
+ return API$s.get(`/system-roles/user/${userId}`);
1255
+ },
1256
+ getAssignedUserAmounts: () => {
1257
+ return API$s.get("/system-roles/amounts");
1258
+ },
1259
+ getPermissionUser: (permissionType, params) => {
1260
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1261
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1262
+ return API$s.get(`/system-roles/total-control-read-only/${type}`, {
1263
+ params
638
1264
  });
639
1265
  }
640
- return g.get(`/system-roles/permission/${t}`, { params: e });
1266
+ return API$s.get(`/system-roles/permission/${permissionType}`, { params });
641
1267
  },
642
- getPermissionUserOptions: (t, e) => {
643
- if (["totalControl", "readOnly"].includes(t ?? "")) {
644
- const r = t === "totalControl" ? "total-control" : "read-only";
645
- return g.get(`/system-roles/total-control-read-only/${r}/options`, {
646
- params: e
1268
+ getPermissionUserOptions: (permissionType, params) => {
1269
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1270
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1271
+ return API$s.get(`/system-roles/total-control-read-only/${type}/options`, {
1272
+ params
647
1273
  });
648
1274
  }
649
- return g.get(`/system-roles/permission/${t}/options`, {
650
- params: e
1275
+ return API$s.get(`/system-roles/permission/${permissionType}/options`, {
1276
+ params
1277
+ });
1278
+ },
1279
+ getUserGroups: (params, permissionType) => {
1280
+ return API$s.get(`/system-roles/permission/${permissionType}/groups`, {
1281
+ params
651
1282
  });
652
1283
  },
653
- getUserGroups: (t, e) => g.get(`/system-roles/permission/${e}/groups`, {
654
- params: t
655
- }),
656
- postAssignUser: (t, e) => {
657
- if (["totalControl", "readOnly"].includes(e ?? "")) {
658
- const r = e === "totalControl" ? "total-control" : "read-only";
659
- return g.post(`/system-roles/total-control-read-only/${r}`, t);
1284
+ postAssignUser: (body, permissionType) => {
1285
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1286
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1287
+ return API$s.post(`/system-roles/total-control-read-only/${type}`, body);
660
1288
  }
661
- return g.post(`/system-roles/permission/${e}`, t);
662
- },
663
- putEditUser: (t, e) => g.put(`/system-roles/${e}`, t),
664
- putRoleSetActive: (t) => g.put("/system-roles/set-active", t),
665
- deleteRemoveUser: (t, e) => {
666
- if (["totalControl", "readOnly"].includes(e ?? "")) {
667
- const r = e === "totalControl" ? "total-control" : "read-only";
668
- return g.delete(`/system-roles/total-control-read-only/${r}`, {
669
- data: t
1289
+ return API$s.post(`/system-roles/permission/${permissionType}`, body);
1290
+ },
1291
+ putEditUser: (body, roleId) => {
1292
+ return API$s.put(`/system-roles/${roleId}`, body);
1293
+ },
1294
+ putRoleSetActive: (body) => {
1295
+ return API$s.put("/system-roles/set-active", body);
1296
+ },
1297
+ deleteRemoveUser: (body, permissionType) => {
1298
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1299
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1300
+ return API$s.delete(`/system-roles/total-control-read-only/${type}`, {
1301
+ data: body
670
1302
  });
671
1303
  }
672
- return g.delete("/system-roles", { data: t });
1304
+ return API$s.delete("/system-roles", { data: body });
673
1305
  }
674
- }, p = s({
675
- prefix: "/settings-user-role-go/v2"
676
- }), Bt = {
1306
+ };
1307
+ const API$r = createAxiosInstance({
1308
+ prefix: "/settings-user-role/v2"
1309
+ });
1310
+ const RoleServices = {
677
1311
  /**
678
1312
  * Retrieves the transaction role for the given group and transaction name.
679
1313
  * @param {string} groupId - The ID of the group to retrieve the transaction role for.
680
1314
  * @param {string} transactionName - The name of the transaction to retrieve the role for.
681
1315
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
682
1316
  */
683
- getTransactionRole: (t, e) => p.get(`/transaction-roles/${t}/${e}`),
684
- getTransactionRoleTypes: (t, e) => p.get(`/transaction-roles/${e}/types`, {
685
- params: { groupKeys: t }
686
- }),
1317
+ getTransactionRole: (groupId, transactionName) => {
1318
+ return API$r.get(`/transaction-roles/${groupId}/${transactionName}`);
1319
+ },
1320
+ getTransactionRoleTypes: (groupKeys, transactionName) => {
1321
+ return API$r.get(`/transaction-roles/${transactionName}/types`, {
1322
+ params: { groupKeys }
1323
+ });
1324
+ },
687
1325
  /**
688
1326
  * Updates the users assigned to the given transaction role.
689
1327
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -691,10 +1329,12 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
691
1329
  * @param {UpdateUser} body - The request body containing the updated user information.
692
1330
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
693
1331
  */
694
- putUpdateUsers: (t, e, r) => p.put(
695
- `/transaction-roles/${t}/${e}/update-user`,
696
- r
697
- ),
1332
+ putUpdateUsers: (groupId, transactionName, body) => {
1333
+ return API$r.put(
1334
+ `/transaction-roles/${groupId}/${transactionName}/update-user`,
1335
+ body
1336
+ );
1337
+ },
698
1338
  /**
699
1339
  * Updates the approval level for the given transaction role.
700
1340
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -702,10 +1342,12 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
702
1342
  * @param {UserApprovalLevel} body - The request body containing the updated approval level.
703
1343
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
704
1344
  */
705
- putUpdateLevel: (t, e, r) => p.put(
706
- `/transaction-roles/${t}/${e}/update-approval-level`,
707
- r
708
- ),
1345
+ putUpdateLevel: (groupId, transactionName, body) => {
1346
+ return API$r.put(
1347
+ `/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
1348
+ body
1349
+ );
1350
+ },
709
1351
  /**
710
1352
  * Updates the group management settings for the given transaction role.
711
1353
  * @param {string} groupId - The ID of the group the transaction role belongs to.
@@ -713,259 +1355,1319 @@ const X = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
713
1355
  * @param {GroupManageByParent} body - The request body containing the updated management settings.
714
1356
  * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
715
1357
  */
716
- putUpdateGroupManage: (t, e, r) => p.put(
717
- `/transaction-roles/${t}/${e}/update-manage-by-parent`,
718
- r
719
- ),
720
- getUserAssignedSystemRole: (t) => p.get(`/system-roles/user/${t}`),
721
- getAssignedUserAmounts: () => p.get("/system-roles/amounts"),
722
- getPermissionUser: (t, e) => {
723
- if (["totalControl", "readOnly"].includes(t ?? "")) {
724
- const r = t === "totalControl" ? "total-control" : "read-only";
725
- return p.get(`/system-roles/total-control-read-only/${r}`, {
726
- params: e
1358
+ putUpdateGroupManage: (groupId, transactionName, body) => {
1359
+ return API$r.put(
1360
+ `/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
1361
+ body
1362
+ );
1363
+ },
1364
+ getUserAssignedSystemRole: (userId) => {
1365
+ return API$r.get(`/system-roles/user/${userId}`);
1366
+ },
1367
+ getAssignedUserAmounts: () => {
1368
+ return API$r.get("/system-roles/amounts");
1369
+ },
1370
+ getPermissionUser: (permissionType, params) => {
1371
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1372
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1373
+ return API$r.get(`/system-roles/total-control-read-only/${type}`, {
1374
+ params
727
1375
  });
728
1376
  }
729
- return p.get(`/system-roles/permission/${t}`, { params: e });
1377
+ return API$r.get(`/system-roles/permission/${permissionType}`, { params });
730
1378
  },
731
- getPermissionUserOptions: (t, e) => {
732
- if (["totalControl", "readOnly"].includes(t ?? "")) {
733
- const r = t === "totalControl" ? "total-control" : "read-only";
734
- return p.get(`/system-roles/total-control-read-only/${r}/options`, {
735
- params: e
1379
+ getPermissionUserOptions: (permissionType, params) => {
1380
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1381
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1382
+ return API$r.get(`/system-roles/total-control-read-only/${type}/options`, {
1383
+ params
736
1384
  });
737
1385
  }
738
- return p.get(`/system-roles/permission/${t}/options`, {
739
- params: e
1386
+ return API$r.get(`/system-roles/permission/${permissionType}/options`, {
1387
+ params
1388
+ });
1389
+ },
1390
+ getUserGroups: (params, permissionType) => {
1391
+ return API$r.get(`/system-roles/permission/${permissionType}/groups`, {
1392
+ params
740
1393
  });
741
1394
  },
742
- getUserGroups: (t, e) => p.get(`/system-roles/permission/${e}/groups`, {
743
- params: t
744
- }),
745
- postAssignUser: (t, e) => {
746
- if (["totalControl", "readOnly"].includes(e ?? "")) {
747
- const r = e === "totalControl" ? "total-control" : "read-only";
748
- return p.post(`/system-roles/total-control-read-only/${r}`, t);
1395
+ postAssignUser: (body, permissionType) => {
1396
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1397
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1398
+ return API$r.post(`/system-roles/total-control-read-only/${type}`, body);
749
1399
  }
750
- return p.post(`/system-roles/permission/${e}`, t);
1400
+ return API$r.post(`/system-roles/permission/${permissionType}`, body);
1401
+ },
1402
+ putEditUser: (body, roleId) => {
1403
+ return API$r.put(`/system-roles/${roleId}`, body);
751
1404
  },
752
- putEditUser: (t, e) => p.put(`/system-roles/${e}`, t),
753
- deleteRemoveUser: (t, e) => {
754
- if (["totalControl", "readOnly"].includes(e ?? "")) {
755
- const r = e === "totalControl" ? "total-control" : "read-only";
756
- return p.put(`/system-roles/total-control-read-only/${r}`, t);
1405
+ deleteRemoveUser: (body, permissionType) => {
1406
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
1407
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
1408
+ return API$r.put(`/system-roles/total-control-read-only/${type}`, body);
757
1409
  }
758
- return p.put("/system-roles", t);
1410
+ return API$r.put("/system-roles", body);
759
1411
  }
760
- }, _ = s({
1412
+ };
1413
+ const API$q = createAxiosInstance({
761
1414
  prefix: "/settings-attribute/v2/open-api"
762
- }), Nt = {
763
- getOpenAPIDocs: (t) => _.get(`/${t.doc}`),
764
- putGenerateToken: () => _.put("/generate"),
1415
+ });
1416
+ const OpenAPIServices$1 = {
1417
+ getOpenAPIDocs: (params) => {
1418
+ return API$q.get(`/${params.doc}`);
1419
+ },
1420
+ putGenerateToken: () => {
1421
+ return API$q.put("/generate");
1422
+ },
765
1423
  // This is if the dummy was not dummy
766
- getToken: () => _.get(""),
767
- putRequestOpenAPI: () => _.put("/request"),
768
- putCancelRequestOpenAPI: () => _.put("/cancel-request")
769
- }, x = s({
770
- prefix: "/settings-attribute-go/v2/open-api"
771
- }), Mt = {
772
- putGenerateToken: () => x.put("/generate"),
1424
+ getToken: () => {
1425
+ return API$q.get("");
1426
+ },
1427
+ putRequestOpenAPI: () => {
1428
+ return API$q.put("/request");
1429
+ },
1430
+ putCancelRequestOpenAPI: () => {
1431
+ return API$q.put("/cancel-request");
1432
+ }
1433
+ };
1434
+ const API$p = createAxiosInstance({
1435
+ prefix: "/settings-attribute/v2/open-api"
1436
+ });
1437
+ const OpenAPIServices = {
1438
+ putGenerateToken: () => {
1439
+ return API$p.put("/generate");
1440
+ },
773
1441
  // This is if the dummy was not dummy
774
- getToken: () => x.get(""),
775
- putRequestOpenAPI: () => x.put("/request"),
776
- putCancelRequestOpenAPI: () => x.put("/cancel-request")
777
- }, P = s({
1442
+ getToken: () => {
1443
+ return API$p.get("");
1444
+ },
1445
+ putRequestOpenAPI: () => {
1446
+ return API$p.put("/request");
1447
+ },
1448
+ putCancelRequestOpenAPI: () => {
1449
+ return API$p.put("/cancel-request");
1450
+ }
1451
+ };
1452
+ const API$o = createAxiosInstance({
1453
+ prefix: "/import/v2"
1454
+ });
1455
+ const ImportServices$1 = {
1456
+ getImport: (importUrl, params) => {
1457
+ return API$o.get(`/${importUrl}`, { params });
1458
+ },
1459
+ postImportTemporary: (importUrl, data) => {
1460
+ const headers = { "Content-Type": "multipart/form-data" };
1461
+ return API$o.post(`/${importUrl}/temporary`, data, { headers });
1462
+ },
1463
+ deleteImportTemporary: (importUrl, data) => {
1464
+ return API$o.delete(`/${importUrl}/temporary`, { data });
1465
+ },
1466
+ postDuplicateImport: (importUrl, body) => {
1467
+ return API$o.post(`/${importUrl}/duplicate`, body);
1468
+ },
1469
+ putEditImport: (importUrl, body) => {
1470
+ return API$o.put(`/${importUrl}`, body);
1471
+ },
1472
+ postImport: (importUrl, controller, body) => {
1473
+ return API$o.post(importUrl, body, { signal: controller.signal });
1474
+ },
1475
+ putImportCancelProgress: (importUrl) => {
1476
+ return API$o.put(`/${importUrl}/cancel-progress`);
1477
+ }
1478
+ };
1479
+ const API$n = createAxiosInstance({
778
1480
  prefix: "/import/v2"
779
- }), Vt = {
780
- getImport: (t, e) => P.get(`/${t}`, { params: e }),
781
- postImportTemporary: (t, e) => {
782
- const r = { "Content-Type": "multipart/form-data" };
783
- return P.post(`/${t}/temporary`, e, { headers: r });
784
- },
785
- deleteImportTemporary: (t, e) => P.delete(`/${t}/temporary`, { data: e }),
786
- postDuplicateImport: (t, e) => P.post(`/${t}/duplicate`, e),
787
- putEditImport: (t, e) => P.put(`/${t}`, e),
788
- postImport: (t, e, r) => P.post(t, r, { signal: e.signal }),
789
- putImportCancelProgress: (t) => P.put(`/${t}/cancel-progress`)
790
- }, I = s({
791
- prefix: "/import-go/v2"
792
- }), Ht = {
793
- getImport: (t, e) => I.get(`/${t}`, { params: e }),
794
- postImportTemporary: (t, e) => {
795
- const r = { "Content-Type": "multipart/form-data" };
796
- return I.post(`/${t}/temporary`, e, { headers: r });
797
- },
798
- deleteImportTemporary: (t, e) => I.delete(`/${t}/temporary`, { params: e }),
799
- postDuplicateImport: (t, e) => I.post(`/${t}/duplicate`, e),
800
- putEditImport: (t, e) => I.put(`/${t}`, e),
801
- postImport: (t, e, r) => I.post(t, r, { signal: e.signal }),
802
- putImportCancelProgress: (t) => I.put(`/${t}/cancel-progress`)
803
- }, b = s({
1481
+ });
1482
+ const ImportServices = {
1483
+ getImport: (importUrl, params) => {
1484
+ return API$n.get(`/${importUrl}`, { params });
1485
+ },
1486
+ postImportTemporary: (importUrl, data) => {
1487
+ const headers = { "Content-Type": "multipart/form-data" };
1488
+ return API$n.post(`/${importUrl}/temporary`, data, { headers });
1489
+ },
1490
+ deleteImportTemporary: (importUrl, params) => {
1491
+ return API$n.delete(`/${importUrl}/temporary`, { params });
1492
+ },
1493
+ postDuplicateImport: (importUrl, body) => {
1494
+ return API$n.post(`/${importUrl}/duplicate`, body);
1495
+ },
1496
+ putEditImport: (importUrl, body) => {
1497
+ return API$n.put(`/${importUrl}`, body);
1498
+ },
1499
+ postImport: (importUrl, controller, body) => {
1500
+ return API$n.post(importUrl, body, { signal: controller.signal });
1501
+ },
1502
+ putImportCancelProgress: (importUrl) => {
1503
+ return API$n.put(`/${importUrl}/cancel-progress`);
1504
+ }
1505
+ };
1506
+ const API$m = createAxiosInstance({
804
1507
  prefix: "/settings-attribute/v2/asset-name"
805
- }), jt = {
806
- getDropdown: (t) => b.get("/dropdown", { params: t }),
807
- getAssetNameDetail: (t) => b.get(`/${t}`),
808
- getAssetsByAssetName: (t, e) => b.get(`/${t}/list-asset`, { params: e }),
809
- getAssetNameList: (t) => b.get("/", { params: t }),
810
- getUnpairedAssetName: (t) => b.get("/unpaired", { params: t }),
811
- getOptions: (t) => b.get("/options", { params: t })
812
- }, n = s({
1508
+ });
1509
+ const AssetNameServices = {
1510
+ getDropdown: (params) => {
1511
+ return API$m.get("/dropdown", { params });
1512
+ },
1513
+ getAssetNameDetail: (id) => {
1514
+ return API$m.get(`/${id}`);
1515
+ },
1516
+ getAssetsByAssetName: (id, params) => {
1517
+ return API$m.get(`/${id}/list-asset`, { params });
1518
+ },
1519
+ getAssetNameList: (params) => {
1520
+ return API$m.get("/", { params });
1521
+ },
1522
+ getUnpairedAssetName: (params) => {
1523
+ return API$m.get("/unpaired", { params });
1524
+ },
1525
+ getOptions: (params) => {
1526
+ return API$m.get("/options", { params });
1527
+ }
1528
+ };
1529
+ const API$l = createAxiosInstance({
813
1530
  prefix: "/assignment/v2"
814
- }), Qt = {
815
- getPreListData: (t) => n.get("/prelist", { params: t }),
816
- getPreListOptions: (t) => n.get("/prelist/options", { params: t }),
817
- getRequestData: (t) => n.get("/prelist/request", { params: t }),
818
- getDetailRequestData: (t, e) => n.get(`/transaction/${t}/request`, { params: e }),
819
- getDetailRequestOption: (t, e) => n.get(`/transaction/${e}/request/options`, { params: t }),
820
- getTransactionData: (t) => n.get("/transaction", { params: t }),
821
- getTransactionOptions: (t) => n.get("/transaction/options", { params: t }),
822
- getDetailTransactionData: (t) => n.get(`/transaction/${t}`),
823
- getTransactionApprovals: (t) => n.get(`/approval/transaction/${t}/transaction`),
824
- getDetailTransactionLog: (t) => n.get(`/transaction/request/${t}/transaction-log`),
825
- getVerifyAsset: (t, e) => n.get(`/transaction/${e}/request/scan`, { params: t }),
826
- putEditAssignedUser: (t, e) => n.put(`/transaction/${t}/user`, e),
827
- putEditEmailConfirmation: (t, e) => n.put(`/transaction/${t}/update-email-or-assigned-user`, e),
828
- postSendConfirmationEmail: (t) => n.post(`/transaction/${t}/send-confirmation-email`),
829
- postTransaction: (t) => n.post("/transaction", t),
830
- putTransaction: (t, e) => n.put(`/transaction/${t}/request`, e),
831
- putCancelTransaction: (t) => n.put("/transaction/cancel", t),
832
- putCancelAssignmentRequest: (t) => n.put("/transaction/request/cancel", t),
833
- putVerifyRequest: (t, e) => n.put(`/transaction/${e}/verify-requests`, t),
834
- putVerifyToken: (t) => n.put("/transaction/verify-token", t),
835
- putHandoverConfirm: (t) => n.put("/transaction/handover-confirmation", t),
836
- putAssignHandover: (t) => n.put(`/transaction/${t}/handover`),
837
- deletePrelistData: (t) => n.delete("/prelist", { params: t }),
838
- deleteRequestPrelistData: (t) => n.delete("/prelist/request", { data: t }),
839
- getAssignedByAsset: (t) => n.get("/transaction/request/assigned/by-asset", { params: t }),
840
- getAssignedByAssetOptions: (t) => n.get("/transaction/request/assigned/by-asset/options", {
841
- params: t
842
- }),
843
- getAssignedByUser: (t) => n.get("/transaction/request/assigned/by-user", { params: t }),
844
- getAssignedByUserOptions: (t) => n.get("/transaction/request/assigned/by-user/options", { params: t }),
845
- postUnassignPrelistAsset: (t) => n.post("/prelist", t),
846
- postUnassignPrelistUser: (t) => n.post("/prelist/unassign/by-user", t),
847
- putUnassignRequest: (t) => n.put("/transaction/request/unassign", t),
848
- putReportDone: (t, e) => n.put(`/transaction/${t}/confirm-report-done`, e),
849
- getHistory: (t, e) => {
850
- const r = t.split(" ").join("-").toLowerCase();
851
- return n.get(`/transaction/history/${r}`, { params: e });
852
- },
853
- getHistoryOptions: (t) => n.get("/transaction/history/options", { params: t }),
854
- getHistoryByTransactionOptions: (t) => n.get("/transaction/history/by-transaction/options", { params: t }),
855
- putCancelReport: (t) => n.put("/transaction/request/cancel-report", t),
856
- getTaskAssignment: async (t) => n.get("/transaction/my-asset/task", { params: t }),
857
- getTaskAssignmentOptions: async (t) => n.get("/transaction/my-asset/task/options", { params: t }),
858
- getAssignedAsset: async (t) => n.get("/transaction/my-asset/assigned-asset", { params: t }),
859
- getAssignedAssetOptions: async (t) => n.get("/transaction/my-asset/assigned-asset/options", { params: t }),
860
- putCancelAssignment: async (t) => n.put("/transaction/cancel", { id: t.id }),
861
- putCancelReportById: async (t) => n.put(`/transaction/request/${t.id}/cancel-report`)
862
- }, U = s({
863
- prefix: "/assignment-go/v2"
864
- }), Yt = {
865
- getTransactionData: (t) => U.get("/transaction", { params: t }),
866
- getTransactionOptions: (t) => U.get("/transaction/options", { params: t }),
867
- getDetailTransactionLog: (t) => U.get(`/transaction/request/${t}/transaction-log`),
868
- postTransaction: (t) => U.post("/transaction", t),
869
- putTransaction: (t) => U.put("/transaction", t),
870
- putUnassignTransaction: (t) => U.put("/transaction/unassign", t),
871
- putCancelReport: (t) => U.put("/transaction/request/cancel-report", t)
872
- }, w = s({
1531
+ });
1532
+ const AssignmentServices$1 = {
1533
+ getPreListData: (params) => {
1534
+ return API$l.get("/prelist", { params });
1535
+ },
1536
+ getPreListOptions: (params) => {
1537
+ return API$l.get("/prelist/options", { params });
1538
+ },
1539
+ getRequestData: (params) => {
1540
+ return API$l.get("/prelist/request", { params });
1541
+ },
1542
+ postAddPrelistData: (body) => {
1543
+ return API$l.post("/prelist", body);
1544
+ },
1545
+ getDetailRequestData: (id, params) => {
1546
+ return API$l.get(`/transaction/${id}/request`, { params });
1547
+ },
1548
+ getDetailRequestOption: (params, id) => {
1549
+ return API$l.get(`/transaction/${id}/request/options`, { params });
1550
+ },
1551
+ getTransactionData: (params) => {
1552
+ return API$l.get("/transaction", { params });
1553
+ },
1554
+ getTransactionOptions: (params) => {
1555
+ return API$l.get("/transaction/options", { params });
1556
+ },
1557
+ getDetailTransactionData: (id) => {
1558
+ return API$l.get(`/transaction/${id}`);
1559
+ },
1560
+ getTransactionApproval: (params) => {
1561
+ return API$l.get("/approval", { params });
1562
+ },
1563
+ getApprovalData: (transactionId, params) => {
1564
+ return API$l.get(`/approval/transaction/${transactionId}`, { params });
1565
+ },
1566
+ getTransactionApprovalOptions: (params) => {
1567
+ return API$l.get("/approval/options", { params });
1568
+ },
1569
+ getApprovalOptions: (transactionId, params) => {
1570
+ return API$l.get(`/approval/transaction/${transactionId}/options`, {
1571
+ params
1572
+ });
1573
+ },
1574
+ getTransactionApprovers: (id) => {
1575
+ return API$l.get(`/approval/transaction/${id}/transaction`);
1576
+ },
1577
+ putApproveApproval: (body) => {
1578
+ return API$l.put("/approval/approve", body);
1579
+ },
1580
+ getDetailTransactionLog: (id) => {
1581
+ return API$l.get(`/transaction/request/${id}/transaction-log`);
1582
+ },
1583
+ getVerifyAsset: (params, id) => {
1584
+ return API$l.get(`/transaction/${id}/request/scan`, { params });
1585
+ },
1586
+ putEditAssignedUser: (id, body) => {
1587
+ return API$l.put(`/transaction/${id}/user`, body);
1588
+ },
1589
+ putEditEmailConfirmation: (id, body) => {
1590
+ return API$l.put(`/transaction/${id}/update-email-or-assigned-user`, body);
1591
+ },
1592
+ postSendConfirmationEmail: (id) => {
1593
+ return API$l.post(`/transaction/${id}/send-confirmation-email`);
1594
+ },
1595
+ postTransaction: (body) => {
1596
+ return API$l.post("/transaction", body);
1597
+ },
1598
+ putTransaction: (id, body) => {
1599
+ return API$l.put(`/transaction/${id}/request`, body);
1600
+ },
1601
+ putCancelTransaction: (body) => {
1602
+ return API$l.put("/transaction/cancel", body);
1603
+ },
1604
+ putCancelAssignmentRequest: (body) => {
1605
+ return API$l.put("/transaction/request/cancel", body);
1606
+ },
1607
+ putVerifyRequest: (body, id) => {
1608
+ return API$l.put(`/transaction/${id}/verify-requests`, body);
1609
+ },
1610
+ putVerifyToken: (body) => {
1611
+ return API$l.put("/transaction/verify-token", body);
1612
+ },
1613
+ putHandoverConfirm: (body) => {
1614
+ return API$l.put("/transaction/handover-confirmation", body);
1615
+ },
1616
+ putAssignHandover: (transaction) => {
1617
+ return API$l.put(`/transaction/${transaction}/handover`);
1618
+ },
1619
+ deletePrelistData: (params) => {
1620
+ return API$l.delete("/prelist", { params });
1621
+ },
1622
+ deleteRequestPrelistData: (body) => {
1623
+ return API$l.delete("/prelist/request", { data: body });
1624
+ },
1625
+ getAssignedByAsset: (params) => {
1626
+ return API$l.get("/transaction/request/assigned/by-asset", { params });
1627
+ },
1628
+ getAssignedByAssetOptions: (params) => {
1629
+ return API$l.get("/transaction/request/assigned/by-asset/options", {
1630
+ params
1631
+ });
1632
+ },
1633
+ getAssignedByUser: (params) => {
1634
+ return API$l.get("/transaction/request/assigned/by-user", { params });
1635
+ },
1636
+ getAssignedByUserOptions: (params) => {
1637
+ return API$l.get("/transaction/request/assigned/by-user/options", { params });
1638
+ },
1639
+ postUnassignPrelistAsset: (body) => {
1640
+ return API$l.post("/prelist", body);
1641
+ },
1642
+ postUnassignPrelistUser: (body) => {
1643
+ return API$l.post("/prelist/unassign/by-user", body);
1644
+ },
1645
+ putUnassignRequest: (body) => {
1646
+ return API$l.put("/transaction/request/unassign", body);
1647
+ },
1648
+ putReportDone: (id, body) => {
1649
+ return API$l.put(`/transaction/${id}/confirm-report-done`, body);
1650
+ },
1651
+ getHistory: (type, params) => {
1652
+ const urlType = type.split(" ").join("-").toLowerCase();
1653
+ return API$l.get(`/transaction/history/${urlType}`, { params });
1654
+ },
1655
+ getHistoryOptions: (params) => {
1656
+ return API$l.get("/transaction/history/options", { params });
1657
+ },
1658
+ getHistoryByTransactionOptions: (params) => {
1659
+ return API$l.get("/transaction/history/by-transaction/options", { params });
1660
+ },
1661
+ putCancelReport: (body) => {
1662
+ return API$l.put("/transaction/request/cancel-report", body);
1663
+ },
1664
+ getTaskAssignment: async (params) => {
1665
+ return API$l.get("/transaction/my-asset/task", { params });
1666
+ },
1667
+ getTaskAssignmentOptions: async (params) => {
1668
+ return API$l.get("/transaction/my-asset/task/options", { params });
1669
+ },
1670
+ getAssignedAsset: async (params) => {
1671
+ return API$l.get("/transaction/my-asset/assigned-asset", { params });
1672
+ },
1673
+ getAssignedAssetOptions: async (params) => {
1674
+ return API$l.get("/transaction/my-asset/assigned-asset/options", { params });
1675
+ },
1676
+ putCancelAssignment: async (body) => {
1677
+ return API$l.put("/transaction/cancel", { id: body.id });
1678
+ },
1679
+ putCancelReportById: async (body) => {
1680
+ return API$l.put(`/transaction/request/${body.id}/cancel-report`);
1681
+ }
1682
+ };
1683
+ const API$k = createAxiosInstance({
1684
+ prefix: "/assignment/v2"
1685
+ });
1686
+ const AssignmentServices = {
1687
+ getTransactionData: (params) => {
1688
+ return API$k.get("/transaction", { params });
1689
+ },
1690
+ getTransactionOptions: (params) => {
1691
+ return API$k.get("/transaction/options", { params });
1692
+ },
1693
+ getDetailTransactionLog: (id) => {
1694
+ return API$k.get(`/transaction/request/${id}/transaction-log`);
1695
+ },
1696
+ postTransaction: (body) => {
1697
+ return API$k.post("/transaction", body);
1698
+ },
1699
+ putTransaction: (body) => {
1700
+ return API$k.put("/transaction", body);
1701
+ },
1702
+ putUnassignTransaction: (body) => {
1703
+ return API$k.put("/transaction/unassign", body);
1704
+ },
1705
+ putCancelReport: (body) => {
1706
+ return API$k.put("/transaction/request/cancel-report", body);
1707
+ }
1708
+ };
1709
+ const API$j = createAxiosInstance({
873
1710
  prefix: "/license/v2"
874
- }), Jt = {
875
- getGroupQuota: (t) => w.get(`/${t}/allocation-quota`),
876
- getSubGroupQuota: (t) => w.get(`/${t}/subgroup-quota`),
877
- editSubGroupQuota: (t, e) => w.put(`/${t}/set-group-quota`, e),
878
- getTotalLicense: () => w.get("/total-license")
879
- }, st = s({
1711
+ });
1712
+ const TotalLicenseServices$1 = {
1713
+ getTotalLicense: () => {
1714
+ return API$j.get("/total-license");
1715
+ },
1716
+ getPurchasedData: (params) => {
1717
+ return API$j.get("/purchase", { params });
1718
+ },
1719
+ getCompanyData: () => {
1720
+ return API$j.get("/company");
1721
+ }
1722
+ };
1723
+ const LicenseAssetAddonServices = {
1724
+ getFixedAssetPerGroup: (groupId, params) => {
1725
+ return API$j.get(`/${groupId}/fixed-asset-list`, { params });
1726
+ },
1727
+ getAssetNameList: (addOnType, groupId, params) => {
1728
+ return API$j.get(`${groupId}/asset-list/${addOnType}`, { params });
1729
+ },
1730
+ // Get list of assets those already have licenses
1731
+ getLicenseAddonAssetList: (groupId, addOnType, params) => {
1732
+ return API$j.get(`/${groupId}/fixed-asset-list/${addOnType}`, { params });
1733
+ },
1734
+ removeAddOnLicense: (body, addOnType) => {
1735
+ return API$j.put(`/remove-license/${addOnType}`, body);
1736
+ },
1737
+ addNewLicenses: (body, addOnType) => {
1738
+ return API$j.put(`/add-license/${addOnType}`, body);
1739
+ },
1740
+ deleteAssetData: (body) => {
1741
+ return API$j.delete("/assets", { data: body });
1742
+ },
1743
+ putManageLicense: (licenseType, body) => {
1744
+ return API$j.put(
1745
+ `/manage/${licenseType.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`,
1746
+ body
1747
+ );
1748
+ }
1749
+ };
1750
+ const LicenseAllocationServices = {
1751
+ getGroupQuota: (groupId) => {
1752
+ return API$j.get(`/${groupId}/allocation-quota`);
1753
+ },
1754
+ getSubGroupQuota: (parentId, params) => {
1755
+ return API$j.get(`/${parentId}/subgroup-quota`, { params });
1756
+ },
1757
+ editSubGroupQuota: (subGroupId, body) => {
1758
+ return API$j.put(`/${subGroupId}/set-group-quota`, body);
1759
+ }
1760
+ };
1761
+ const LicenseConcurrentServices$1 = {
1762
+ getConcurrentUserData: () => {
1763
+ return API$j.get("/concurrent-user-data");
1764
+ },
1765
+ getConcurrentUserList: (params) => {
1766
+ return API$j.get("/concurrent-user", { params });
1767
+ },
1768
+ putLogoutUsers: (body) => {
1769
+ return API$j.put("/concurrent-user", body);
1770
+ }
1771
+ };
1772
+ const LicenseServices$1 = {
1773
+ getFilterOptions: (path, params) => {
1774
+ return API$j.get(`/${path}`, { params });
1775
+ },
1776
+ ...TotalLicenseServices$1,
1777
+ ...LicenseConcurrentServices$1,
1778
+ ...LicenseAllocationServices,
1779
+ ...LicenseAssetAddonServices
1780
+ };
1781
+ const API$i = createAxiosInstance({
1782
+ prefix: "/license/v2"
1783
+ });
1784
+ const TotalLicenseServices = {
1785
+ getTotalLicense: () => {
1786
+ return API$i.get("/total-license");
1787
+ },
1788
+ getPurchasedData: (params) => {
1789
+ return API$i.get("/purchase", { params });
1790
+ }
1791
+ };
1792
+ const LicenseConcurrentServices = {
1793
+ getConcurrentUserData: () => {
1794
+ return API$i.get("/concurrent-user-data");
1795
+ },
1796
+ getConcurrentUserList: (params) => {
1797
+ return API$i.get("/concurrent-user", { params });
1798
+ },
1799
+ putLogoutUsers: (body) => {
1800
+ return API$i.put("/concurrent-user", body);
1801
+ }
1802
+ };
1803
+ const LicenseAssetServices = {
1804
+ getFixedAssetPerGroup: (groupId, params) => {
1805
+ return API$i.get(`/${groupId}/assets`, { params });
1806
+ },
1807
+ deleteAssetData: (body) => {
1808
+ return API$i.delete("/assets", { data: body });
1809
+ }
1810
+ };
1811
+ const LicenseServices = {
1812
+ getFilterOptions: (path, params) => {
1813
+ return API$i.get(`/${path}`, { params });
1814
+ },
1815
+ ...TotalLicenseServices,
1816
+ ...LicenseConcurrentServices,
1817
+ ...LicenseAssetServices
1818
+ };
1819
+ const API$h = createAxiosInstance({
880
1820
  prefix: "/repair/v2/damage"
881
- }), Kt = {
882
- putReportDamage: (t, e) => {
883
- const r = { "Content-Type": "multipart/form-data" };
884
- return st.put(`/report-damage/${t}`, e, { headers: r });
1821
+ });
1822
+ const DamageServices$1 = {
1823
+ getDamageReportList: (params) => {
1824
+ return API$h.get("/", { params });
1825
+ },
1826
+ getDamageReportListFilterOptions: (params) => {
1827
+ return API$h.get("/options", { params });
1828
+ },
1829
+ getDamageReportDetail: (reportId) => {
1830
+ return API$h.get(`/${reportId}`);
1831
+ },
1832
+ putReportDamage: (id, body) => {
1833
+ const headers = { "Content-Type": "multipart/form-data" };
1834
+ return API$h.put(`/report-damage/${id}`, body, { headers });
1835
+ },
1836
+ /**
1837
+ * To mark as repaired.
1838
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1839
+ */
1840
+ putMarkAsRepaired: (body) => {
1841
+ return API$h.put("/repair", body);
885
1842
  }
886
- }, J = s({
1843
+ };
1844
+ const API$g = createAxiosInstance({
887
1845
  prefix: "/damage-repair-ticketing/v2"
888
- }), Wt = {
889
- putReportDamage: (t, e) => {
890
- const r = { "Content-Type": "multipart/form-data" };
891
- return J.put(`/${t}/report-damage`, e, { headers: r });
1846
+ });
1847
+ const DamageServices = {
1848
+ getDamageReportList: (params) => {
1849
+ return API$g.get("/", { params });
1850
+ },
1851
+ getDamageReportListFilterOptions: (params) => {
1852
+ return API$g.get("/options", { params });
892
1853
  },
893
- putMarkAsRepaired: (t) => J.put("/repair", t)
894
- }, d = s({
1854
+ getDamageReportDetail: (reportId) => {
1855
+ return API$g.get(`/${reportId}`);
1856
+ },
1857
+ putReportDamage: (id, body) => {
1858
+ const headers = { "Content-Type": "multipart/form-data" };
1859
+ return API$g.put(`/${id}/report-damage`, body, { headers });
1860
+ },
1861
+ putMarkAsRepaired: (body) => {
1862
+ return API$g.put("/repair", body);
1863
+ }
1864
+ };
1865
+ const API$f = createAxiosInstance({
895
1866
  prefix: "/borrowing/v2"
896
- }), zt = {
897
- getTaskBorrowing: async (t) => d.get("/transaction/my-asset/task", { params: t }),
898
- getTaskBorrowingOptions: async (t) => d.get("/transaction/my-asset/task/options", { params: t }),
899
- getBorrowedAsset: async (t) => d.get("/transaction/my-asset/borrowed-asset", { params: t }),
900
- getBorrowedOptions: async (t) => d.get("/transaction/my-asset/borrowed-asset/options", { params: t }),
901
- getHistory: async (t) => d.get("/transaction/my-asset/history", { params: t }),
902
- getHistoryOptions: async (t) => d.get("/transaction/my-asset/history/options", { params: t }),
903
- putCancelBorrowing: async (t) => d.put("/transaction/cancel", { id: t.id }),
904
- putCancelExtensionRequest: async (t) => d.put(`/transaction/${t.id}/cancel-extension`),
905
- putCancelRequestReport: async (t) => d.put(`/transaction/request/${t.id}/cancel-report`),
906
- putDeclineExtensionRequest: async (t) => d.put("transaction/request/decline", t),
907
- putUpdateRequestExtension: async (t) => d.put("transaction/request/duration", t)
908
- }, K = s({
1867
+ });
1868
+ const BorrowServices = {
1869
+ getTaskBorrowing: async (params) => {
1870
+ return API$f.get("/transaction/my-asset/task", { params });
1871
+ },
1872
+ getTaskBorrowingOptions: async (params) => {
1873
+ return API$f.get("/transaction/my-asset/task/options", { params });
1874
+ },
1875
+ getBorrowedAsset: async (params) => {
1876
+ return API$f.get("/transaction/my-asset/borrowed-asset", { params });
1877
+ },
1878
+ getBorrowedOptions: async (params) => {
1879
+ return API$f.get("/transaction/my-asset/borrowed-asset/options", { params });
1880
+ },
1881
+ getHistory: async (params) => {
1882
+ return API$f.get("/transaction/my-asset/history", { params });
1883
+ },
1884
+ getHistoryOptions: async (params) => {
1885
+ return API$f.get("/transaction/my-asset/history/options", { params });
1886
+ },
1887
+ postAddPrelistData: (body) => {
1888
+ return API$f.post("/prelist", body);
1889
+ },
1890
+ putCancelBorrowing: async (body) => {
1891
+ return API$f.put("/transaction/cancel", { id: body.id });
1892
+ },
1893
+ putCancelExtensionRequest: async (body) => {
1894
+ return API$f.put(`/transaction/${body.id}/cancel-extension`);
1895
+ },
1896
+ putCancelRequestReport: async (body) => {
1897
+ return API$f.put(`/transaction/request/${body.id}/cancel-report`);
1898
+ },
1899
+ putDeclineExtensionRequest: async (body) => {
1900
+ return API$f.put("transaction/request/decline", body);
1901
+ },
1902
+ putUpdateRequestExtension: async (body) => {
1903
+ return API$f.put("transaction/request/duration", body);
1904
+ },
1905
+ // ------------------------------------------------------------------------------------------------------------ //
1906
+ getBorrowingPrelist: (params) => {
1907
+ return API$f.get("/prelist", { params });
1908
+ },
1909
+ getBorrowingPrelistOptions: (params) => {
1910
+ return API$f.get("/prelist/options", { params });
1911
+ },
1912
+ deleteBorrowingPrelist: (id) => {
1913
+ return API$f.delete("/prelist", { data: { id } });
1914
+ },
1915
+ getBorrowingRequest: (params) => {
1916
+ return API$f.get("/prelist/request", { params });
1917
+ },
1918
+ getBorrowingRequestOptions: (params) => {
1919
+ return API$f.get("/prelist/request/options", { params });
1920
+ },
1921
+ postBorrowingRequest: (data) => {
1922
+ return API$f.post("/prelist/request", data);
1923
+ },
1924
+ putBorrowingRequest: (data) => {
1925
+ return API$f.put("/prelist/request", data);
1926
+ },
1927
+ deleteBorrowingRequest: (id) => {
1928
+ return API$f.delete("/prelist/request", { data: { id } });
1929
+ },
1930
+ postBorrowingTransaction: (data) => {
1931
+ return API$f.post("/transaction", data, { params: { sourceWeb: true } });
1932
+ },
1933
+ getBorrowingTransaction: (params) => {
1934
+ return API$f.get("/transaction", { params });
1935
+ },
1936
+ getBorrowingTransactionOptions: (params) => {
1937
+ return API$f.get("/transaction/options", { params });
1938
+ },
1939
+ putCancelBorrowingTransaction: (id) => {
1940
+ return API$f.put("/transaction/cancel", { id });
1941
+ },
1942
+ putCancelBorrowingRequest: (id) => {
1943
+ return API$f.put("/transaction/request/cancel", { id });
1944
+ },
1945
+ putCancelExtendBorrowingRequest: (id) => {
1946
+ return API$f.put("/transaction/request/extend/cancel", { id });
1947
+ },
1948
+ getBorrowingTransactionDetail: (id) => {
1949
+ return API$f.get(`/transaction/${id}`);
1950
+ },
1951
+ getBorrowingTransactionRequestList: (params) => {
1952
+ return API$f.get("/transaction/request", { params });
1953
+ },
1954
+ getBorrowingTransactionRequest: (id, params) => {
1955
+ return API$f.get(`/transaction/${id}/request`, { params });
1956
+ },
1957
+ getBorrowingTransactionRequestOptions: (id, params) => {
1958
+ return API$f.get(`/transaction/${id}/request/options`, { params });
1959
+ },
1960
+ putBorrowingTransactionRequest: (id, data) => {
1961
+ return API$f.put(`/transaction/${id}/request`, data);
1962
+ },
1963
+ getApprovalList: (id) => {
1964
+ return API$f.get(`/approval/transaction/${id}/transaction`);
1965
+ },
1966
+ putUpdateEmailorBorrower: (id, data) => {
1967
+ return API$f.put(`/transaction/${id}/update-email-or-borrower`, data);
1968
+ },
1969
+ getTransactionRequestScan: (id, tag) => {
1970
+ return API$f.get(`/transaction/${id}/request/scan`, { params: { tag } });
1971
+ },
1972
+ putUpdateBorrower: (id, userId) => {
1973
+ return API$f.put(`/transaction/${id}/user`, { user: userId });
1974
+ },
1975
+ postSendConfirmationEmail: (id) => {
1976
+ return API$f.post(`/transaction/${id}/send-confirmation-email`);
1977
+ },
1978
+ putVerifyRequests: (id, data) => {
1979
+ return API$f.put(`/transaction/${id}/verify-requests`, data);
1980
+ },
1981
+ getBorrowingTransactionHistoryByTransaction: (params) => {
1982
+ return API$f.get("/transaction/history/by-transaction", { params });
1983
+ },
1984
+ getBorrowingTransactionHistoryByAsset: (params) => {
1985
+ return API$f.get("/transaction/history/by-asset", { params });
1986
+ },
1987
+ getBorrowingTransactionHistoryOptions: (params) => {
1988
+ return API$f.get("/transaction/history/options", { params });
1989
+ },
1990
+ putBorrowingVerifyToken: (token) => {
1991
+ return API$f.put("/transaction/verify-token", { token });
1992
+ },
1993
+ putBorrowingHandoverConfirmation: (data) => {
1994
+ return API$f.put("/transaction/handover-confirmation", data);
1995
+ },
1996
+ putBorrowingHandover: (id) => {
1997
+ return API$f.put(`/transaction/${id}/handover`);
1998
+ },
1999
+ putBorrowingExtendRequest: (data) => {
2000
+ return API$f.put("/transaction/request/extend", data);
2001
+ },
2002
+ putBorrowingExtendApproval: (data) => {
2003
+ return API$f.put("/approval/approve/request-extension", data, {
2004
+ params: { sourceWeb: true }
2005
+ });
2006
+ },
2007
+ putBorrowingDeclineExtendRequest: (id) => {
2008
+ return API$f.put("/transaction/request/decline", { id });
2009
+ },
2010
+ getBorrowingBorrowedAsset: (params) => {
2011
+ return API$f.get("/transaction/request/borrowed/by-asset", { params });
2012
+ },
2013
+ getBorrowingBorrowedAssetOptions: (params) => {
2014
+ return API$f.get("/transaction/request/borrowed/by-asset/options", {
2015
+ params
2016
+ });
2017
+ },
2018
+ getBorrowingBorrowedBorrower: (params) => {
2019
+ return API$f.get("/transaction/request/borrowed/by-user", { params });
2020
+ },
2021
+ putBorrowingReportDamaged: (id, data) => {
2022
+ return API$f.put(`/transaction/request/${id}/damaged`, data);
2023
+ },
2024
+ putBorrowingReportMissing: (id, data) => {
2025
+ return API$f.put(`/transaction/request/${id}/missing`, data);
2026
+ },
2027
+ putBorrowingReturn: (id) => {
2028
+ return API$f.put("/transaction/request/return", { id });
2029
+ },
2030
+ getBorrowingLog: (id) => {
2031
+ return API$f.get(`/transaction/request/${id}/transaction-log`);
2032
+ },
2033
+ putConfirmReportDone: (id, data) => {
2034
+ return API$f.put(`/transaction/request/${id}/confirm-report-done`, data);
2035
+ },
2036
+ putCancelReportBulk: (id) => {
2037
+ return API$f.put("/transaction/request/cancel-report", {
2038
+ id
2039
+ });
2040
+ },
2041
+ putBorrowingEditExtension: (data) => {
2042
+ return API$f.put("/transaction/request/duration", data);
2043
+ },
2044
+ getApproval: (params) => {
2045
+ return API$f.get("/approval", { params });
2046
+ },
2047
+ getApprovalOptions: (params) => {
2048
+ return API$f.get("/approval/options", { params });
2049
+ },
2050
+ getApprovalTransactionRequest: (id, params) => {
2051
+ return API$f.get(`/approval/transaction/${id}`, { params });
2052
+ },
2053
+ getApprovalTransactionRequestOptions: (id, params) => {
2054
+ return API$f.get(`/approval/transaction/${id}/options`, { params });
2055
+ },
2056
+ putApprovalApprove: (data) => {
2057
+ return API$f.put("/approval/approve", data, {
2058
+ params: { sourceWeb: true }
2059
+ });
2060
+ }
2061
+ };
2062
+ const API$e = createAxiosInstance({
909
2063
  prefix: "/assets/v2"
910
- }), Zt = {
911
- getHistory: async (t) => K.get("/my-asset", { params: t }),
912
- getHistoryOptions: async (t) => K.get("/my-asset/options", { params: t })
913
- }, B = s({
2064
+ });
2065
+ const MyAssetServices$1 = {
2066
+ getHistory: async (params) => {
2067
+ return API$e.get("/my-asset", { params });
2068
+ },
2069
+ getHistoryOptions: async (params) => {
2070
+ return API$e.get("/my-asset/options", { params });
2071
+ }
2072
+ };
2073
+ const API$d = createAxiosInstance({
2074
+ prefix: "/assets/v2/my-assets"
2075
+ });
2076
+ const MyAssetServices = {
2077
+ getAssigned: async (params) => {
2078
+ return API$d.get("/assigned", { params });
2079
+ },
2080
+ getAssignedOptions: async (params) => {
2081
+ return API$d.get("/assigned/options", { params });
2082
+ },
2083
+ getBorrowed: async (params) => {
2084
+ return API$d.get("/borrowed", { params });
2085
+ },
2086
+ getBorrowedOptions: async (params) => {
2087
+ return API$d.get("/borrowed/options", { params });
2088
+ },
2089
+ getHistory: async (params) => {
2090
+ return API$d.get("/history", { params });
2091
+ },
2092
+ getHistoryOptions: async (params) => {
2093
+ return API$d.get("/history/options", { params });
2094
+ }
2095
+ };
2096
+ const API$c = createAxiosInstance({
914
2097
  prefix: "/repair/v2"
915
- }), Xt = {
916
- getRepairList: (t) => B.get("/my-asset/repair", { params: t }),
917
- getFilterOptions: (t) => B.get("/my-asset/repair/options", { params: t }),
918
- putConfirmRepair: (t) => B.put(`/repair/${t}/confirm-repair`)
2098
+ });
2099
+ const RepairServices = {
2100
+ getRepairList: (params) => {
2101
+ return API$c.get("/my-asset/repair", { params });
2102
+ },
2103
+ getFilterOptions: (params) => {
2104
+ return API$c.get("/my-asset/repair/options", { params });
2105
+ },
2106
+ getAssetRepairTicketing: (assetId, params) => {
2107
+ return API$c.get(`/repair/${assetId}/asset-repair-detail`, { params });
2108
+ },
2109
+ putConfirmRepair: (repairId) => {
2110
+ return API$c.put(`/repair/${repairId}/confirm-repair`);
2111
+ }
2112
+ };
2113
+ const API$b = createAxiosInstance({
2114
+ prefix: "/settings-user-role/v2/auth"
2115
+ });
2116
+ const onRejected$1 = (error) => {
2117
+ var _a, _b, _c, _d;
2118
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
2119
+ window.onblur = void 0;
2120
+ window.onfocus = void 0;
2121
+ window.sessionExpired = true;
2122
+ return window.dispatchEvent(new CustomEvent("user:expired"));
2123
+ }
2124
+ return Promise.reject(error);
2125
+ };
2126
+ const AuthServices$1 = {
2127
+ reLogin: (body) => {
2128
+ API$b.interceptors.response.use((response) => {
2129
+ return response;
2130
+ }, onRejected$1);
2131
+ return API$b.post("/login", body);
2132
+ }
2133
+ };
2134
+ const API$a = createAxiosInstance({
2135
+ env: "APP_GLOBAL_SETTINGS_API",
2136
+ prefix: "/v1/global-settings/auth"
2137
+ });
2138
+ const onRejected = (error) => {
2139
+ var _a, _b, _c, _d;
2140
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
2141
+ window.onblur = void 0;
2142
+ window.onfocus = void 0;
2143
+ window.sessionExpired = true;
2144
+ return window.dispatchEvent(new CustomEvent("user:expired"));
2145
+ }
2146
+ return Promise.reject(error);
2147
+ };
2148
+ const AuthServices = {
2149
+ login: (form) => {
2150
+ const body = { ...form, isMobile: false };
2151
+ return API$a.post("/login", body);
2152
+ },
2153
+ reLogin: (body) => {
2154
+ API$a.interceptors.response.use((response) => {
2155
+ return response;
2156
+ }, onRejected);
2157
+ return API$a.post("/login", body);
2158
+ },
2159
+ requestOTP: (email) => {
2160
+ const body = { email };
2161
+ return API$a.post("/request-otp", body);
2162
+ },
2163
+ requestResetPassLink: (email) => {
2164
+ const body = { email };
2165
+ return API$a.post("/request-reset-link", body);
2166
+ },
2167
+ setPassword: (body) => {
2168
+ return API$a.post("/set-password", body);
2169
+ },
2170
+ verifyToken: (token) => {
2171
+ return API$a.get(`/verify-token/${token}`);
2172
+ },
2173
+ confirmEmailChange: (token) => {
2174
+ const body = { token };
2175
+ return API$a.put("/confirm-email-change/confirm", body);
2176
+ },
2177
+ postLogout: () => {
2178
+ return API$a.post("/logout");
2179
+ }
2180
+ };
2181
+ const PREFIX = "/transfer/v2";
2182
+ const PrelistAPI = createAxiosInstance({
2183
+ prefix: `${PREFIX}/prelist`
2184
+ });
2185
+ const TransactionAPI = createAxiosInstance({
2186
+ prefix: `${PREFIX}/transaction`
2187
+ });
2188
+ const ApprovalAPI$1 = createAxiosInstance({
2189
+ prefix: `${PREFIX}/approval`
2190
+ });
2191
+ const TransferServices = {
2192
+ // ------ TRANSACTION ------
2193
+ getTransactions: (params) => {
2194
+ return TransactionAPI.get("/", { params });
2195
+ },
2196
+ getTransactionDetail: (id) => {
2197
+ return TransactionAPI.get(`/${id}`);
2198
+ },
2199
+ getTransactionDetailAssets: (id, params) => {
2200
+ return TransactionAPI.get(`/${id}/request`, { params });
2201
+ },
2202
+ getRequestFilterOptions: (id, field) => {
2203
+ const params = {};
2204
+ if (field) {
2205
+ params[field] = true;
2206
+ } else {
2207
+ params.nameOptions = true;
2208
+ params.brandOptions = true;
2209
+ params.modelOptions = true;
2210
+ }
2211
+ return TransactionAPI.get(`/${id}/request/options`, { params });
2212
+ },
2213
+ getTransactionLog: (id) => {
2214
+ return TransactionAPI.get(`/request/${id}/transaction-log`);
2215
+ },
2216
+ getTransactionOptions: (field) => {
2217
+ const params = {};
2218
+ params[field] = true;
2219
+ return TransactionAPI.get("/options", { params });
2220
+ },
2221
+ postCreateTransaction: (body) => {
2222
+ return TransactionAPI.post("/", body);
2223
+ },
2224
+ putCancelTransactions: (ids) => {
2225
+ const body = { id: ids };
2226
+ return TransactionAPI.put("/cancel", body);
2227
+ },
2228
+ putUpdateTransaction: (id, body) => {
2229
+ return TransactionAPI.put(`/${id}`, body);
2230
+ },
2231
+ putCancelRequests: (ids) => {
2232
+ const body = { id: ids };
2233
+ return TransactionAPI.put("/request/cancel", body);
2234
+ },
2235
+ getHistoryByTransaction: (params) => {
2236
+ return TransactionAPI.get("/history", { params });
2237
+ },
2238
+ getHistoryByTransactionOptions: (field) => {
2239
+ const params = {};
2240
+ params[field] = true;
2241
+ return TransactionAPI.get("/history/options", { params });
2242
+ },
2243
+ getHistoryByAsset: (params) => {
2244
+ return TransactionAPI.get("/history/by-asset", { params });
2245
+ },
2246
+ getHistoryByAssetOptions: (field) => {
2247
+ const params = {};
2248
+ params[field] = true;
2249
+ return TransactionAPI.get("/history/by-asset/options", { params });
2250
+ },
2251
+ getApproverList: (tranasctionId) => {
2252
+ return TransactionAPI.get(`/${tranasctionId}/approval-history`);
2253
+ },
2254
+ putHandoverTransaction: (id, body) => {
2255
+ return TransactionAPI.put(`/${id}/handover`, body);
2256
+ },
2257
+ // ------ PRELIST ------
2258
+ getPrelist: (params) => {
2259
+ return PrelistAPI.get("/", { params });
2260
+ },
2261
+ postAddPrelistData: (body) => {
2262
+ return PrelistAPI.post("/", body);
2263
+ },
2264
+ deletePrelist: (ids) => {
2265
+ return PrelistAPI.delete("/", {
2266
+ params: {
2267
+ id: JSON.stringify(ids)
2268
+ }
2269
+ });
2270
+ },
2271
+ getPrelistAssets: (id) => {
2272
+ const params = { id };
2273
+ return PrelistAPI.get("/request", { params });
2274
+ },
2275
+ // APPROVAL
2276
+ getApprovals: (status, params) => {
2277
+ const formattedParams = { ...params, status: JSON.stringify([status]) };
2278
+ return ApprovalAPI$1.get("/", { params: formattedParams });
2279
+ },
2280
+ getApprovalOptions: (status, field) => {
2281
+ const params = {
2282
+ status: JSON.stringify([status])
2283
+ };
2284
+ params[field] = true;
2285
+ return ApprovalAPI$1.get("/options", { params });
2286
+ },
2287
+ getApprovalDetail: (id, approvalType) => {
2288
+ const params = {
2289
+ groupType: approvalType
2290
+ };
2291
+ return ApprovalAPI$1.get(`/transaction/${id}`, { params });
2292
+ },
2293
+ getApprovalDetailOptions: (id, field, approvalType) => {
2294
+ const params = {};
2295
+ params[field] = true;
2296
+ params.groupType = approvalType;
2297
+ return ApprovalAPI$1.get(`/transaction/${id}/options`, { params });
2298
+ },
2299
+ putUpdateApproval: (body) => {
2300
+ return ApprovalAPI$1.put("/approve", body);
2301
+ }
2302
+ };
2303
+ const ReportAPI = createAxiosInstance({
2304
+ prefix: "/disposal/v2/report"
2305
+ });
2306
+ const DisposalAPI = createAxiosInstance({
2307
+ prefix: "/disposal/v2/disposal"
2308
+ });
2309
+ const ApprovalAPI = createAxiosInstance({
2310
+ prefix: "/disposal/v2/approval"
2311
+ });
2312
+ const DisposalServices$1 = {
2313
+ getReportedDisposal: (params) => {
2314
+ return ReportAPI.get("", { params });
2315
+ },
2316
+ getReportedDisposalOptions: (params) => {
2317
+ return ReportAPI.get("/options", { params });
2318
+ },
2319
+ postReportDisposal: (body) => {
2320
+ return ReportAPI.post("", body);
2321
+ },
2322
+ deleteCancelReport: (params) => {
2323
+ params.isFromDisposal = "false";
2324
+ return ReportAPI.delete("/cancel-report", { params });
2325
+ },
2326
+ deleteDeclineReport: (params) => {
2327
+ params.isFromDisposal = "true";
2328
+ return ReportAPI.delete("/cancel-report", { params });
2329
+ },
2330
+ getPrelistDisposal: (params) => {
2331
+ return DisposalAPI.get("/prelist", { params });
2332
+ },
2333
+ getPrelistDisposalRequest: (params) => {
2334
+ return DisposalAPI.get("/prelist/request", { params });
2335
+ },
2336
+ postCreatePrelist: (body) => {
2337
+ return DisposalAPI.post("/prelist", body);
2338
+ },
2339
+ deletePrelistData: (params) => {
2340
+ return DisposalAPI.delete("/prelist", { params });
2341
+ },
2342
+ postCreateTransaction: (body) => {
2343
+ return DisposalAPI.post("/transaction", body);
2344
+ },
2345
+ putTransaction: (id, body) => {
2346
+ return DisposalAPI.put(`/disposal/${id}`, body);
2347
+ },
2348
+ getTransactionData: (params) => {
2349
+ return DisposalAPI.get("/transaction", { params });
2350
+ },
2351
+ getTransactionDetail: (transactionId) => {
2352
+ return DisposalAPI.get(`/transaction/${transactionId}`);
2353
+ },
2354
+ getDisposalTransactionLog: (id) => {
2355
+ return DisposalAPI.get(`/request/${id}/disposal-log`);
2356
+ },
2357
+ getTransactionApprovalHistory: (transactionId) => {
2358
+ return ApprovalAPI.get(`/transaction/${transactionId}/approval-history`);
2359
+ },
2360
+ getTransactionOptions: (params) => {
2361
+ return DisposalAPI.get("/transaction/options", { params });
2362
+ },
2363
+ putCancelTransaction: (params) => {
2364
+ return DisposalAPI.put("/cancel", void 0, { params });
2365
+ },
2366
+ putCancelRequest: (body) => {
2367
+ return DisposalAPI.put("/request/cancel", body);
2368
+ },
2369
+ putDisposalVerification: (body, transactionId) => {
2370
+ return DisposalAPI.put(`/${transactionId}/verification`, body);
2371
+ },
2372
+ putDisposalCompletion: (body, transactionId) => {
2373
+ const headers = { "Content-Type": "multipart/form-data" };
2374
+ return DisposalAPI.put(`/${transactionId}/completion`, body, { headers });
2375
+ },
2376
+ getDisposalRequest: (params) => {
2377
+ return DisposalAPI.get("/request", { params });
2378
+ },
2379
+ getDisposalRequestOptions: (params) => {
2380
+ return DisposalAPI.get("/request/options", { params });
2381
+ },
2382
+ getVerifyAsset: (params) => {
2383
+ return DisposalAPI.get("/request/scan", { params });
2384
+ },
2385
+ getDisposalHistory: (additionalPath, params) => {
2386
+ return DisposalAPI.get(`/history${additionalPath}`, { params });
2387
+ },
2388
+ getHistoryByTransactionOptions: (params) => {
2389
+ return DisposalAPI.get("/history/options", { params });
2390
+ },
2391
+ getHistoryByAssetOptions: (params) => {
2392
+ return DisposalAPI.get("/history/by-asset/options", { params });
2393
+ }
2394
+ };
2395
+ const API$9 = createAxiosInstance({
2396
+ prefix: "/transfer/v2"
2397
+ });
2398
+ const TransferServicesGo = {
2399
+ getTransactionData: (params) => {
2400
+ return API$9.get("/transaction", { params });
2401
+ },
2402
+ getTransactionOptions: (params) => {
2403
+ return API$9.get("/transaction/options", { params });
2404
+ },
2405
+ getTransactionLog: (id) => {
2406
+ return API$9.get(`/transaction/request/${id}/transaction-log`);
2407
+ },
2408
+ postCreateTransaction: (body) => {
2409
+ return API$9.post("/transaction", body);
2410
+ }
2411
+ };
2412
+ const API$8 = createAxiosInstance({
2413
+ prefix: "/audit/v2"
2414
+ });
2415
+ const AuditServices = {
2416
+ getAudit: (assetId, params) => {
2417
+ return API$8.get(`/audit/schedule/asset-detail/${assetId}`, { params });
2418
+ },
2419
+ getAuditOption: (assetId, params) => {
2420
+ return API$8.get(`/audit/schedule/asset-detail/${assetId}/options`, {
2421
+ params
2422
+ });
2423
+ },
2424
+ putSetActive: (body) => {
2425
+ return API$8.put("/audit/asset/activation", body);
2426
+ }
2427
+ };
2428
+ const API$7 = createAxiosInstance({
2429
+ prefix: "/routine/v2"
2430
+ });
2431
+ const RoutineServices = {
2432
+ getMaintenance: (assetId, params) => {
2433
+ return API$7.get(`/routine-task/${assetId}`, { params });
2434
+ },
2435
+ getMaintenanceOption: (assetId, params) => {
2436
+ return API$7.get(`/routine-task/${assetId}/options`, { params });
2437
+ },
2438
+ putSetActive: (body) => {
2439
+ return API$7.put("/maintenable-asset/set-active", body);
2440
+ }
2441
+ };
2442
+ const API$6 = createAxiosInstance({
2443
+ prefix: "/settings-attribute/v2/models"
2444
+ });
2445
+ const ModelTypeServices = {
2446
+ getDropdown: (params) => {
2447
+ return API$6.get("/dropdown", { params });
2448
+ }
2449
+ };
2450
+ const API$5 = createAxiosInstance({
2451
+ prefix: "/settings-attribute/v2/transaction-settings"
2452
+ });
2453
+ const TransactionSettingServices = {
2454
+ getData: () => {
2455
+ return API$5.get("/");
2456
+ },
2457
+ putData: (data) => {
2458
+ return API$5.put("/", data);
2459
+ }
2460
+ };
2461
+ const API$4 = createAxiosInstance({
2462
+ prefix: "/borrowing/v2"
2463
+ });
2464
+ const BorrowServicesGo = {
2465
+ getTransactions: async (params) => {
2466
+ return API$4.get("/transaction", { params });
2467
+ },
2468
+ getTransactionOptions: async (params) => {
2469
+ return API$4.get("/transaction/options", { params });
2470
+ },
2471
+ getTransactionLog: async (id) => {
2472
+ return API$4.get(`/transaction/request/${id}/transaction-log`);
2473
+ },
2474
+ postTransaction: async (body) => {
2475
+ return API$4.post("/transaction", body);
2476
+ },
2477
+ putTransaction: async (body) => {
2478
+ return API$4.put("/transaction", body);
2479
+ },
2480
+ putTransactionReturn: async (requestIds) => {
2481
+ const body = { id: requestIds };
2482
+ return API$4.put("/transaction/return", body);
2483
+ },
2484
+ putCancelReport: async (requestIds) => {
2485
+ const body = { id: requestIds };
2486
+ return API$4.put("/transaction/request/cancel-report", body);
2487
+ }
2488
+ };
2489
+ const API$3 = createAxiosInstance({
2490
+ prefix: "/disposal/v2/"
2491
+ });
2492
+ const DisposalServices = {
2493
+ getReportedDisposal: (params) => {
2494
+ return API$3.get("/report", { params });
2495
+ },
2496
+ getReportedDisposalOptions: (params) => {
2497
+ return API$3.get("/report/options", { params });
2498
+ },
2499
+ postReportDisposal: (body) => {
2500
+ return API$3.post("/report", body);
2501
+ },
2502
+ deleteCancelReport: (params) => {
2503
+ params.isFromDisposal = "false";
2504
+ return API$3.delete("/report/cancel-report", { params });
2505
+ },
2506
+ deleteDeclineReport: (params) => {
2507
+ params.isFromDisposal = "true";
2508
+ return API$3.delete("/report/cancel-report", { params });
2509
+ },
2510
+ getDisposalHistory: (params) => {
2511
+ return API$3.get("/transaction", { params });
2512
+ },
2513
+ getHistoryByAssetOptions: (params) => {
2514
+ return API$3.get("/transaction/options", { params });
2515
+ },
2516
+ getDisposalTransactionLog: (requestId) => {
2517
+ return API$3.get(`/transaction/request/${requestId}/transaction-log`);
2518
+ },
2519
+ postCreateTransaction: (body) => {
2520
+ return API$3.post("/transaction", body);
2521
+ }
2522
+ };
2523
+ const API$2 = createAxiosInstance({
2524
+ prefix: "/report/v2/reports"
2525
+ });
2526
+ const ReportServices$1 = {
2527
+ getReportList: (params) => {
2528
+ return API$2.get("/schedules", { params });
2529
+ },
2530
+ getReportSchedule: (scheduleId) => {
2531
+ return API$2.get("/schedules/" + scheduleId);
2532
+ },
2533
+ getUniqueScheduleName: (name) => {
2534
+ return API$2.get("/schedules/unique-name", { params: { name } });
2535
+ },
2536
+ getFilterOptions: (params) => {
2537
+ return API$2.get("/schedules/options", { params });
2538
+ },
2539
+ putSetActive: (body) => {
2540
+ return API$2.put("/schedules/activation", body);
2541
+ },
2542
+ putEditSchedule: (body) => {
2543
+ return API$2.put("/schedules/" + body._id, body);
2544
+ },
2545
+ deleteReports: (reportIds) => {
2546
+ return API$2.delete("/schedules", { params: { reportIds } });
2547
+ },
2548
+ postCreateSchedule: (data) => {
2549
+ return API$2.post("/schedules/create", data);
2550
+ },
2551
+ postDownloadReport: (data) => {
2552
+ return API$2.post("/download", data, { responseType: "arraybuffer" });
2553
+ },
2554
+ postGenerateReport: (data) => {
2555
+ return API$2.post("/generate", data);
2556
+ }
2557
+ };
2558
+ const API$1 = createAxiosInstance({
2559
+ prefix: "/report/v2/reports"
2560
+ });
2561
+ const ReportServices = {
2562
+ getReportList: (params) => {
2563
+ return API$1.get("/schedules", { params });
2564
+ },
2565
+ getReportSchedule: (scheduleId) => {
2566
+ return API$1.get("/schedules/" + scheduleId);
2567
+ },
2568
+ getUniqueScheduleName: (name) => {
2569
+ return API$1.get("/schedules/unique-name", { params: { name } });
2570
+ },
2571
+ getFilterOptions: (params) => {
2572
+ return API$1.get("/schedules/options", { params });
2573
+ },
2574
+ putSetActive: (body) => {
2575
+ return API$1.put("/schedules/set-active", body);
2576
+ },
2577
+ putEditSchedule: (id, body) => {
2578
+ return API$1.put(`/schedules/${id}`, body);
2579
+ },
2580
+ deleteReports: (id) => {
2581
+ return API$1.delete("/schedules", { params: { id } });
2582
+ },
2583
+ postCreateSchedule: (data) => {
2584
+ return API$1.post("/schedules", data);
2585
+ },
2586
+ postDownloadReport: (data) => {
2587
+ return API$1.post("/download", data, { responseType: "arraybuffer" });
2588
+ },
2589
+ postGenerateReport: (data) => {
2590
+ return API$1.post("/generate", data);
2591
+ }
2592
+ };
2593
+ const API = createAxiosInstance({
2594
+ prefix: "/settings-attribute/v2/asset-name-policy"
2595
+ });
2596
+ const AssetPolicyServices = {
2597
+ getList: (params) => {
2598
+ return API.get("/", { params });
2599
+ },
2600
+ getListFilterOptions: (params) => {
2601
+ return API.get("/options");
2602
+ },
2603
+ putUpdatePolicy: (body) => {
2604
+ return API.put("/", body);
2605
+ }
919
2606
  };
920
2607
  export {
921
- Ot as AliasCodeServices,
922
- bt as AliasCodeServicesGo,
923
- jt as AssetNameServices,
924
- $t as AssetServices,
925
- Qt as AssignmentServices,
926
- Yt as AssignmentServicesGo,
927
- zt as BorrowServices,
928
- wt as BrandServices,
929
- lt as ChangelogServices,
930
- ht as CountryStateServices,
931
- Gt as CustomFieldServices,
932
- _t as CustomFieldServicesGo,
933
- Kt as DamageServices,
934
- Wt as DamageServicesGo,
935
- Tt as DashboardServices,
936
- qt as FileManagerServices,
937
- Et as FileManagerServicesGo,
938
- Dt as GeneralSettingsServices,
939
- Rt as GeneralSettingsServicesGo,
940
- gt as GroupCategoryServices,
941
- pt as GroupCategoryServicesGo,
942
- Lt as I18nService,
943
- Vt as ImportServices,
944
- Ht as ImportServicesGo,
945
- Jt as LicenseServices,
946
- dt as LogServicesGo,
947
- At as MissingServices,
948
- Zt as MyAssetServices,
949
- ct as NotificationApprovalServices,
950
- yt as NotificationServices,
951
- vt as NotificationServicesGo,
952
- Nt as OpenAPIServices,
953
- Mt as OpenAPIServicesGo,
954
- kt as ReaderServices,
955
- Xt as RepairServices,
956
- Ft as RoleServices,
957
- Bt as RoleServicesGo,
958
- xt as ServiceCenterServices,
959
- mt as SessionLogServices,
960
- ft as SubUserServices,
961
- Ct as SubUserServicesGo,
962
- St as TAGServices,
963
- Pt as TrackingServices,
964
- It as UserServices,
965
- Ut as UserServicesGo,
966
- ut as getAssetsFile,
967
- D as getBaseURL,
968
- it as getImageURL,
969
- at as getImageURLGo,
970
- ot as queryParamsStringfy
2608
+ AliasCodeServices,
2609
+ AssetNameServices,
2610
+ AssetPolicyServices,
2611
+ AssetServices$1 as AssetServices,
2612
+ AssetServices as AssetServicesGo,
2613
+ AssignmentServices$1 as AssignmentServices,
2614
+ AssignmentServices as AssignmentServicesGo,
2615
+ AuditServices,
2616
+ AuthServices$1 as AuthServices,
2617
+ BorrowServices,
2618
+ BorrowServicesGo,
2619
+ BrandServices,
2620
+ ChangelogServices$1 as ChangelogServices,
2621
+ CountryStateServices,
2622
+ CustomFieldServices$1 as CustomFieldServices,
2623
+ CustomFieldServices as CustomFieldServicesGo,
2624
+ DamageServices$1 as DamageServices,
2625
+ DamageServices as DamageServicesGo,
2626
+ DashboardServices,
2627
+ DisposalServices$1 as DisposalServices,
2628
+ DisposalServices as DisposalServicesGo,
2629
+ FileManagerServices$1 as FileManagerServices,
2630
+ FileManagerServices as FileManagerServicesGo,
2631
+ GeneralSettingsServices,
2632
+ AuthServices as GlobalAuthServices,
2633
+ GroupCategoryServices,
2634
+ I18nService,
2635
+ ImportServices$1 as ImportServices,
2636
+ ImportServices as ImportServicesGo,
2637
+ LicenseServices$1 as LicenseServices,
2638
+ LicenseServices as LicenseServicesGo,
2639
+ ChangelogServices as LogServicesGo,
2640
+ MissingServices$2 as MissingServices,
2641
+ MissingServices$1 as MissingServicesGo,
2642
+ ModelTypeServices,
2643
+ MyAssetServices$1 as MyAssetServices,
2644
+ MyAssetServices as MyAssetServicesGo,
2645
+ NotificationApprovalServices,
2646
+ NotificationServices$1 as NotificationServices,
2647
+ NotificationServices as NotificationServicesGo,
2648
+ OpenAPIServices$1 as OpenAPIServices,
2649
+ OpenAPIServices as OpenAPIServicesGo,
2650
+ ReaderServices,
2651
+ RepairServices,
2652
+ ReportServices$1 as ReportServices,
2653
+ ReportServices as ReportServicesGo,
2654
+ RoleServices$1 as RoleServices,
2655
+ RoleServices as RoleServicesGo,
2656
+ RoutineServices,
2657
+ ServiceCenterServices,
2658
+ SessionLogServices,
2659
+ SubUserServices$1 as SubUserServices,
2660
+ SubUserServices as SubUserServicesGo,
2661
+ TAGServices,
2662
+ MissingServices as TrackingServices,
2663
+ TransactionSettingServices,
2664
+ TransferServices,
2665
+ TransferServicesGo,
2666
+ UserServices$1 as UserServices,
2667
+ UserServices as UserServicesGo,
2668
+ getAssetsFile,
2669
+ getBaseURL,
2670
+ getImageURL,
2671
+ getImageURL$1 as getImageURLGo,
2672
+ queryParamsStringfy
971
2673
  };