@tagsamurai/fats-api-services 1.0.0-alpha.217 → 1.0.0-alpha.219

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