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