@tagsamurai/gsts-api-services 2.0.1-alpha.5 → 2.0.1-alpha.7
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 +225 -140
- package/main.d.ts +1 -0
- package/package.json +1 -1
- package/src/dto/iam.dto.d.ts +2 -2
package/api-services.es.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import E from "axios";
|
|
2
|
+
const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_IMAGE_BASE_URL: "https://dev-api.tagsamurai.com/fam/utility/v2/files", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, I = (t = "APP_TAGSAMURAI_API") => D["VITE_" + t], a = (t = {}, e = !1) => {
|
|
3
3
|
const {
|
|
4
4
|
env: r = "APP_GLOBAL_SETTINGS_API",
|
|
5
|
-
prefix:
|
|
6
|
-
headers:
|
|
7
|
-
...
|
|
8
|
-
} = t,
|
|
9
|
-
...
|
|
10
|
-
baseURL:
|
|
11
|
-
headers: e ?
|
|
5
|
+
prefix: n = "",
|
|
6
|
+
headers: i = {},
|
|
7
|
+
...c
|
|
8
|
+
} = t, O = "".concat(I(r)).concat(n), h = E.create({
|
|
9
|
+
...c,
|
|
10
|
+
baseURL: O,
|
|
11
|
+
headers: e ? i : {
|
|
12
12
|
"Content-Type": "application/json",
|
|
13
|
-
...
|
|
13
|
+
...i
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
return
|
|
17
|
-
var
|
|
18
|
-
const P = JSON.parse((
|
|
19
|
-
return
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
16
|
+
return h.interceptors.request.use((m) => {
|
|
17
|
+
var b, $, T;
|
|
18
|
+
const P = JSON.parse((b = localStorage.getItem("user")) != null ? b : "{}"), w = (T = ($ = P.jwt) != null ? $ : P.token) != null ? T : "";
|
|
19
|
+
return m.headers.Authorization = "Bearer ".concat(w), m;
|
|
20
|
+
}), h;
|
|
21
|
+
}, p = a({
|
|
22
22
|
prefix: "/v1/global-settings/auth"
|
|
23
|
-
}),
|
|
24
|
-
var e, r,
|
|
25
|
-
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((
|
|
26
|
-
},
|
|
23
|
+
}), U = (t) => {
|
|
24
|
+
var e, r, n, i;
|
|
25
|
+
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((i = (n = t.response) == null ? void 0 : n.data) == null ? void 0 : i.message) === "jwt malformed" ? (window.onblur = null, window.onfocus = null, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
|
|
26
|
+
}, j = {
|
|
27
27
|
login: (t) => {
|
|
28
28
|
const e = { ...t, isMobile: !1 };
|
|
29
|
-
return
|
|
29
|
+
return p.post("/login", e);
|
|
30
30
|
},
|
|
31
|
-
reLogin: (t) => (
|
|
31
|
+
reLogin: (t) => (p.interceptors.response.use((e) => e, U), p.post("/login", t)),
|
|
32
32
|
requestOTP: (t) => {
|
|
33
33
|
const e = { email: t };
|
|
34
|
-
return
|
|
34
|
+
return p.post("/request-otp", e);
|
|
35
35
|
},
|
|
36
36
|
requestResetPassLink: (t) => {
|
|
37
37
|
const e = { email: t };
|
|
38
|
-
return
|
|
38
|
+
return p.post("/request-reset-link", e);
|
|
39
39
|
},
|
|
40
|
-
setPassword: (t) =>
|
|
41
|
-
verifyToken: (t) =>
|
|
40
|
+
setPassword: (t) => p.post("/set-password", t),
|
|
41
|
+
verifyToken: (t) => p.get("/verify-token/".concat(t)),
|
|
42
42
|
confirmEmailChange: (t) => {
|
|
43
43
|
const e = { token: t };
|
|
44
|
-
return
|
|
44
|
+
return p.put("/confirm-email-change/confirm", e);
|
|
45
45
|
},
|
|
46
|
-
postLogout: () =>
|
|
46
|
+
postLogout: () => p.post("/logout"),
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @deprecated use postLogout instead
|
|
50
50
|
*/
|
|
51
|
-
logout: () =>
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
let
|
|
51
|
+
logout: () => p.post("/logout")
|
|
52
|
+
}, _ = (t, e, r) => {
|
|
53
|
+
const n = new URL(I("APP_TAGSAMURAI_API") || "").origin;
|
|
54
|
+
let i = t.startsWith("http") ? t : "".concat(n, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
|
|
55
55
|
if (e || r) {
|
|
56
|
-
const
|
|
57
|
-
e && (
|
|
56
|
+
const c = new URLSearchParams();
|
|
57
|
+
e && (c.set("width", e.toString()), c.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(c.toString());
|
|
58
58
|
}
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
var e, r,
|
|
59
|
+
return i;
|
|
60
|
+
}, L = () => {
|
|
61
|
+
var e, r, n;
|
|
62
62
|
const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
|
|
63
|
-
return (
|
|
63
|
+
return (n = (r = t.jwt) != null ? r : t.token) != null ? n : "";
|
|
64
64
|
}, G = async (t, e) => {
|
|
65
65
|
const r = await fetch(t, {
|
|
66
66
|
headers: {
|
|
@@ -69,22 +69,22 @@ const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
69
69
|
});
|
|
70
70
|
if (!r.ok)
|
|
71
71
|
throw new Error("Image fetch failed: ".concat(r.status, " ").concat(r.statusText));
|
|
72
|
-
const
|
|
73
|
-
return new Blob([
|
|
72
|
+
const n = await r.arrayBuffer();
|
|
73
|
+
return new Blob([n], {
|
|
74
74
|
type: r.headers.get("Content-Type") || "image/webp"
|
|
75
75
|
});
|
|
76
|
-
},
|
|
76
|
+
}, R = async (t) => {
|
|
77
77
|
try {
|
|
78
|
-
const e =
|
|
78
|
+
const e = L(), r = await G(t, e);
|
|
79
79
|
return URL.createObjectURL(r);
|
|
80
80
|
} catch (e) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, B = async (t, e, r, n) => {
|
|
84
84
|
if (!t) return;
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
},
|
|
85
|
+
const i = _(t, e, r);
|
|
86
|
+
return n ? i : R(i);
|
|
87
|
+
}, J = (t) => {
|
|
88
88
|
if (!t || typeof t == "string")
|
|
89
89
|
return;
|
|
90
90
|
const e = {};
|
|
@@ -104,33 +104,33 @@ const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
104
104
|
} catch (r) {
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, l = (t) => {
|
|
108
108
|
if (!t)
|
|
109
109
|
return {};
|
|
110
110
|
const e = {};
|
|
111
111
|
return Object.keys(t).forEach((r) => {
|
|
112
|
-
const
|
|
113
|
-
e[r] = x(
|
|
112
|
+
const n = t[r];
|
|
113
|
+
e[r] = x(n) ? JSON.parse(n.trim()) : n;
|
|
114
114
|
}), e;
|
|
115
|
-
},
|
|
115
|
+
}, S = a({
|
|
116
116
|
prefix: "/v1/global-settings/change-log"
|
|
117
|
-
}), J = {
|
|
118
|
-
getChangelogs: (t) => m.get("", { params: t }),
|
|
119
|
-
getChangelogOptions: (t) => m.get("/options", { params: t })
|
|
120
|
-
}, l = i({
|
|
121
|
-
prefix: "/v1/global-settings/division"
|
|
122
117
|
}), M = {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
getChangelogs: (t) => S.get("", { params: t }),
|
|
119
|
+
getChangelogOptions: (t) => S.get("/options", { params: t })
|
|
120
|
+
}, d = a({
|
|
121
|
+
prefix: "/v1/global-settings/division"
|
|
122
|
+
}), q = {
|
|
123
|
+
getDivisions: (t) => d.get("", { params: t }),
|
|
124
|
+
getDivisionDetail: (t) => d.get("/".concat(t)),
|
|
125
|
+
postCreateDivision: (t) => d.post("/", t),
|
|
126
|
+
putEditDivision: (t, e) => d.put("/".concat(t), e),
|
|
127
127
|
deleteDivisions: (t) => {
|
|
128
128
|
const e = { id: JSON.stringify(t) };
|
|
129
|
-
return
|
|
129
|
+
return d.delete("", { params: e });
|
|
130
130
|
}
|
|
131
|
-
}, g =
|
|
131
|
+
}, g = a({
|
|
132
132
|
prefix: "/v1/global-settings"
|
|
133
|
-
}),
|
|
133
|
+
}), F = {
|
|
134
134
|
getTAGAllPaired: (t, e) => g.get("/".concat(t), { params: e }),
|
|
135
135
|
getTAGAllPairedOptions: (t, e) => g.get("/".concat(t, "/options"), { params: e }),
|
|
136
136
|
getTAGNotPaired: (t, e) => g.get("/".concat(t, "/not-paired"), { params: e }),
|
|
@@ -140,133 +140,218 @@ const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
140
140
|
putAuditTAG: (t, e) => g.put("/".concat(t, "/audit"), e),
|
|
141
141
|
putAllocateTAG: (t, e) => g.put("/".concat(t, "/allocate"), e),
|
|
142
142
|
putCombineTAG: (t) => g.put("/combine", t)
|
|
143
|
-
},
|
|
143
|
+
}, o = a({
|
|
144
144
|
prefix: "/v2/hardware-tagging"
|
|
145
|
-
}),
|
|
145
|
+
}), H = {
|
|
146
146
|
getHandheldReader: (t) => {
|
|
147
|
-
const e =
|
|
148
|
-
return
|
|
147
|
+
const e = l(t);
|
|
148
|
+
return o.post("/handheld-reader/list", e);
|
|
149
149
|
},
|
|
150
|
-
getHandheldReaderDetail: (t) =>
|
|
150
|
+
getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
|
|
151
151
|
getHandheldReaderOptions: (t) => {
|
|
152
|
-
const e =
|
|
153
|
-
return
|
|
152
|
+
const e = l(t);
|
|
153
|
+
return o.post("/handheld-reader/options", e);
|
|
154
154
|
},
|
|
155
|
-
putMarkHandheldStatus: (t) =>
|
|
156
|
-
putPingReaders: (t) =>
|
|
157
|
-
putMarkIOTStatus: (t, e) =>
|
|
158
|
-
putEditReaderGroup: (t, e, r) =>
|
|
155
|
+
putMarkHandheldStatus: (t) => o.patch("/handheld-reader/status", t),
|
|
156
|
+
putPingReaders: (t) => o.put("/iot-reader/ping", t),
|
|
157
|
+
putMarkIOTStatus: (t, e) => o.put("/".concat(e, "/mark-status"), t),
|
|
158
|
+
putEditReaderGroup: (t, e, r) => o.patch(
|
|
159
159
|
"/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/group"),
|
|
160
160
|
e
|
|
161
161
|
),
|
|
162
|
-
putEditAntennaGroup: (t, e) =>
|
|
163
|
-
putEditPortStatus: (t, e) =>
|
|
164
|
-
putEditAliasName: (t, e, r) =>
|
|
162
|
+
putEditAntennaGroup: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
163
|
+
putEditPortStatus: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
164
|
+
putEditAliasName: (t, e, r) => o.patch(
|
|
165
165
|
"/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/alias-name"),
|
|
166
166
|
e
|
|
167
167
|
),
|
|
168
|
-
postActivateHardware: (t, e) =>
|
|
168
|
+
postActivateHardware: (t, e) => o.post(
|
|
169
169
|
"/".concat(t === "iot" ? "iot-" : "handheld-", "reader/activate"),
|
|
170
170
|
e
|
|
171
171
|
),
|
|
172
|
-
deleteHardware: (t, e) =>
|
|
172
|
+
deleteHardware: (t, e) => o.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
|
|
173
173
|
params: e
|
|
174
174
|
}),
|
|
175
|
-
putAntennaPower: (t, e) =>
|
|
176
|
-
getIOTReaderOrAntenna: (t, e) =>
|
|
177
|
-
getIOTReaderDetail: (t) =>
|
|
178
|
-
getIOTReaderOrAntennaOptions: (t, e) =>
|
|
179
|
-
getActivityLog: (t) =>
|
|
180
|
-
getActivityLogOptions: (t) =>
|
|
181
|
-
getDetailActivityLog: (t) =>
|
|
182
|
-
getDetailActivityLogOptions: (t) =>
|
|
183
|
-
getExistingAliasNames: () =>
|
|
184
|
-
getIotReaderPort: (t, e) =>
|
|
185
|
-
},
|
|
175
|
+
putAntennaPower: (t, e) => o.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
176
|
+
getIOTReaderOrAntenna: (t, e) => o.get("/".concat(t), { params: e }),
|
|
177
|
+
getIOTReaderDetail: (t) => o.get("/iot-reader/".concat(t)),
|
|
178
|
+
getIOTReaderOrAntennaOptions: (t, e) => o.get("/".concat(t, "/options"), { params: e }),
|
|
179
|
+
getActivityLog: (t) => o.get("/activity-log", { params: t }),
|
|
180
|
+
getActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
|
|
181
|
+
getDetailActivityLog: (t) => o.get("/activity-log", { params: t }),
|
|
182
|
+
getDetailActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
|
|
183
|
+
getExistingAliasNames: () => o.get("/reader/alias-names"),
|
|
184
|
+
getIotReaderPort: (t, e) => o.get("/iot-reader/".concat(t, "/ports"), { params: e })
|
|
185
|
+
}, C = a({
|
|
186
186
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
187
187
|
prefix: "/v2"
|
|
188
|
-
}),
|
|
189
|
-
getSessionLogList: (t) =>
|
|
190
|
-
},
|
|
188
|
+
}), V = {
|
|
189
|
+
getSessionLogList: (t) => C.get("/session-log", { params: t })
|
|
190
|
+
}, y = a({
|
|
191
191
|
prefix: "/v1/global-settings/option"
|
|
192
|
-
}), F = {
|
|
193
|
-
getPositions: () => I.get("/position"),
|
|
194
|
-
getDivisions: () => I.get("/division")
|
|
195
|
-
}, c = i({
|
|
196
|
-
prefix: "/v1/global-settings/position"
|
|
197
192
|
}), z = {
|
|
198
|
-
getPositions: (
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
193
|
+
getPositions: () => y.get("/position"),
|
|
194
|
+
getDivisions: () => y.get("/division")
|
|
195
|
+
}, v = a({
|
|
196
|
+
prefix: "/v1/global-settings/position"
|
|
197
|
+
}), X = {
|
|
198
|
+
getPositions: (t) => v.get("", { params: t }),
|
|
199
|
+
getPositionDetail: (t) => v.get("/".concat(t)),
|
|
200
|
+
postCreatePosition: (t) => v.post("/", t),
|
|
201
|
+
putEditPosition: (t, e) => v.put("/".concat(t), e),
|
|
202
202
|
deletePositions: (t) => {
|
|
203
203
|
const e = { id: JSON.stringify(t) };
|
|
204
|
-
return
|
|
204
|
+
return v.delete("", { params: e });
|
|
205
205
|
}
|
|
206
|
-
},
|
|
206
|
+
}, N = a({
|
|
207
207
|
env: "APP_TAGSAMURAI_API",
|
|
208
208
|
prefix: "/tag/v2"
|
|
209
209
|
}), W = {
|
|
210
|
-
getTagInfo: (t) =>
|
|
211
|
-
},
|
|
210
|
+
getTagInfo: (t) => N.get("/rfid-qr/scan", { params: t })
|
|
211
|
+
}, f = a({
|
|
212
212
|
prefix: "/v1/global-settings/change-log"
|
|
213
213
|
}), K = {
|
|
214
|
-
getTAGEventlog: (t) =>
|
|
215
|
-
getTAGEventlogOptions: (t) =>
|
|
216
|
-
getDetailTAGEventlog: (t) =>
|
|
217
|
-
},
|
|
214
|
+
getTAGEventlog: (t) => f.get("/tag-event-log", { params: t }),
|
|
215
|
+
getTAGEventlogOptions: (t) => f.get("/tag-event-log/options", { params: t }),
|
|
216
|
+
getDetailTAGEventlog: (t) => f.get("/tag-event-log/".concat(t))
|
|
217
|
+
}, u = a({
|
|
218
218
|
prefix: "/v1/global-settings/user"
|
|
219
219
|
}), Q = {
|
|
220
|
-
getUsers: (t) =>
|
|
221
|
-
getUserDetail: (t) =>
|
|
222
|
-
getUserSystemLogs: (t, e) =>
|
|
220
|
+
getUsers: (t) => u.get("", { params: t }),
|
|
221
|
+
getUserDetail: (t) => u.get("/".concat(t)),
|
|
222
|
+
getUserSystemLogs: (t, e) => u.get("/".concat(t, "/system-logs"), { params: e }),
|
|
223
223
|
getUserSystemLogOptions: (t, e) => {
|
|
224
224
|
const r = {};
|
|
225
|
-
return r[e] = !0,
|
|
225
|
+
return r[e] = !0, u.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
226
226
|
},
|
|
227
227
|
postCreateUser: (t) => {
|
|
228
228
|
const e = { "Content-Type": "multipart/form-data" };
|
|
229
|
-
return
|
|
229
|
+
return u.post("", t, { headers: e });
|
|
230
230
|
},
|
|
231
231
|
putEditUser: (t, e) => {
|
|
232
232
|
const r = { "Content-Type": "multipart/form-data" };
|
|
233
|
-
return
|
|
233
|
+
return u.put("/".concat(t), e, { headers: r });
|
|
234
234
|
},
|
|
235
235
|
deleteUsers: (t) => {
|
|
236
236
|
const e = { id: JSON.stringify(t) };
|
|
237
|
-
return
|
|
237
|
+
return u.delete("", { params: e });
|
|
238
238
|
},
|
|
239
|
-
putToggleStatusUsers: (t) =>
|
|
239
|
+
putToggleStatusUsers: (t) => u.put("/active-status", t),
|
|
240
240
|
getUserOptions: (t) => {
|
|
241
241
|
const e = {};
|
|
242
|
-
return e[t] = !0,
|
|
242
|
+
return e[t] = !0, u.get("/options", { params: e });
|
|
243
243
|
},
|
|
244
|
-
deleteCancelEmailChange: (t) =>
|
|
245
|
-
postResendEmail: (t) =>
|
|
246
|
-
putChangePassword: (t, e) =>
|
|
247
|
-
},
|
|
244
|
+
deleteCancelEmailChange: (t) => u.delete("/cancel-email-change/".concat(t)),
|
|
245
|
+
postResendEmail: (t) => u.post("/resend-email", t),
|
|
246
|
+
putChangePassword: (t, e) => u.put("/change-password/".concat(t), e)
|
|
247
|
+
}, A = a({
|
|
248
248
|
prefix: "/v2/hardware-tagging"
|
|
249
|
-
}),
|
|
250
|
-
getTabletList: (t) =>
|
|
251
|
-
getTabletOption: (t) =>
|
|
252
|
-
updateTabletStatus: (t, e) =>
|
|
253
|
-
disconnectTablet: (t) =>
|
|
254
|
-
deleteTablet: (t) =>
|
|
249
|
+
}), Y = {
|
|
250
|
+
getTabletList: (t) => A.post("/tablet/list", t),
|
|
251
|
+
getTabletOption: (t) => A.post("/tablet/options", t),
|
|
252
|
+
updateTabletStatus: (t, e) => A.patch("/tablet/status", e, { params: { ids: t } }),
|
|
253
|
+
disconnectTablet: (t) => A.patch("/tablet/disconnect-reader", { params: { ids: t } }),
|
|
254
|
+
deleteTablet: (t) => A.delete("/tablet", { params: { ids: t } })
|
|
255
|
+
}, s = a({
|
|
256
|
+
prefix: "/v2/iam"
|
|
257
|
+
}), Z = {
|
|
258
|
+
login: (t) => s.post("/auth/login", t),
|
|
259
|
+
logout: () => s.post("/auth/logout"),
|
|
260
|
+
verifyToken: (t) => s.get("/auth/verify-token/".concat(t)),
|
|
261
|
+
requestOtp: (t) => s.post("/auth/request-otp", { email: t }),
|
|
262
|
+
requestResetLink: (t) => s.post("/auth/request-reset-link", { email: t }),
|
|
263
|
+
setPassword: (t) => s.post("/auth/set-password", t),
|
|
264
|
+
confirmEmailChange: (t) => s.post("/auth/confirm-email-change", { token: t }),
|
|
265
|
+
cancelEmailChange: (t) => s.delete("/auth/cancel-email-change/".concat(t)),
|
|
266
|
+
getPositionList: (t) => {
|
|
267
|
+
const e = l(t);
|
|
268
|
+
return s.post("/position/list", e);
|
|
269
|
+
},
|
|
270
|
+
getPositionDetail: (t) => s.get("/position/".concat(t)),
|
|
271
|
+
createPosition: (t) => s.post("/position", t),
|
|
272
|
+
editPosition: (t, e) => s.patch("/position/".concat(t), e),
|
|
273
|
+
deletePosition: (t) => {
|
|
274
|
+
const e = { ids: JSON.stringify(t) };
|
|
275
|
+
return s.delete("/position", { params: e });
|
|
276
|
+
},
|
|
277
|
+
getDivisionList: (t) => {
|
|
278
|
+
const e = l(t);
|
|
279
|
+
return s.post("/division/list", e);
|
|
280
|
+
},
|
|
281
|
+
getDivisionDetail: (t) => s.get("/division/".concat(t)),
|
|
282
|
+
createDivision: (t) => s.post("/division", t),
|
|
283
|
+
editDivision: (t, e) => s.patch("/division/".concat(t), e),
|
|
284
|
+
deleteDivision: (t) => {
|
|
285
|
+
const e = { ids: JSON.stringify(t) };
|
|
286
|
+
return s.delete("/division", { params: e });
|
|
287
|
+
},
|
|
288
|
+
createUsers: (t) => {
|
|
289
|
+
const e = new FormData();
|
|
290
|
+
return Object.entries(t).forEach(([r, n]) => {
|
|
291
|
+
n != null && e.append(r, n);
|
|
292
|
+
}), s.post("/users", e, {
|
|
293
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
294
|
+
});
|
|
295
|
+
},
|
|
296
|
+
getGlobalUserList: (t) => {
|
|
297
|
+
const e = l(t);
|
|
298
|
+
return s.post("/users/list", e);
|
|
299
|
+
},
|
|
300
|
+
getGlobalUserOptions: (t) => {
|
|
301
|
+
const e = l(t);
|
|
302
|
+
return s.post("/users/options", e);
|
|
303
|
+
},
|
|
304
|
+
getGlobalUserDetail: (t) => s.get("/users/".concat(t)),
|
|
305
|
+
setActiveGlobalUser: (t, e) => {
|
|
306
|
+
const r = { ids: JSON.stringify(t) };
|
|
307
|
+
return s.patch("/users/set-active", e, { params: r });
|
|
308
|
+
},
|
|
309
|
+
editUsers: (t, e) => {
|
|
310
|
+
const r = new FormData();
|
|
311
|
+
return Object.entries(e).forEach(([n, i]) => {
|
|
312
|
+
i != null && r.append(n, i);
|
|
313
|
+
}), s.patch("/users/".concat(t), r, {
|
|
314
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
editUsersFcmToken: (t) => s.patch("/users/fcm-token", t),
|
|
318
|
+
resendActivationEmail: (t) => s.post("/users/resend-activation-email", t),
|
|
319
|
+
changePassword: (t, e) => s.patch("/users/".concat(t, "/change-password"), e),
|
|
320
|
+
deleteUsers: (t) => {
|
|
321
|
+
const e = { ids: JSON.stringify(t) };
|
|
322
|
+
return s.delete("/users", { params: e });
|
|
323
|
+
},
|
|
324
|
+
logoutModule: (t) => s.post("/auth/logout/module", t),
|
|
325
|
+
loginModule: (t) => s.post("/auth/login/module", t),
|
|
326
|
+
getConcurrentUsers: (t, e) => {
|
|
327
|
+
const r = e ? { "X-Module-ID": e } : {};
|
|
328
|
+
return s.post("/concurrent-users", t, { headers: r });
|
|
329
|
+
},
|
|
330
|
+
logoutSession: (t, e) => {
|
|
331
|
+
const r = e ? { "X-Module-ID": e } : {};
|
|
332
|
+
return s.post("/auth/logout/session", t, { headers: r });
|
|
333
|
+
},
|
|
334
|
+
getPositionDropdown: () => s.get("/position/dropdown"),
|
|
335
|
+
getDivisionDropdown: () => s.get("/division/dropdown"),
|
|
336
|
+
exportPositionTable: () => s.post("/position/list/export", {}, { responseType: "blob" }),
|
|
337
|
+
exportDivisionTable: () => s.post("/division/list/export", {}, { responseType: "blob" }),
|
|
338
|
+
exportUserTable: () => s.post("/users/list/export", {}, { responseType: "blob" })
|
|
255
339
|
};
|
|
256
340
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
z as
|
|
265
|
-
X as
|
|
341
|
+
j as AuthServices,
|
|
342
|
+
M as ChangelogServices,
|
|
343
|
+
q as DivisionServices,
|
|
344
|
+
F as GlobalTagServices,
|
|
345
|
+
H as HardwareServices,
|
|
346
|
+
Z as IamServices,
|
|
347
|
+
V as LogServices,
|
|
348
|
+
z as OptionServices,
|
|
349
|
+
X as PositionServices,
|
|
350
|
+
Y as TabletServices,
|
|
266
351
|
K as TagEventlogServices,
|
|
267
352
|
W as TagServices,
|
|
268
353
|
Q as UserServices,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
354
|
+
I as getBaseURL,
|
|
355
|
+
B as getImageURL,
|
|
356
|
+
J as queryParamsStringfy
|
|
272
357
|
};
|
package/main.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export { default as TagServices } from './src/services/tag.service';
|
|
|
10
10
|
export { default as TagEventlogServices } from './src/services/tagEventlog.service';
|
|
11
11
|
export { default as UserServices } from './src/services/user.service';
|
|
12
12
|
export { default as TabletServices } from './src/services/tablet.service';
|
|
13
|
+
export { default as IamServices } from './src/services/iam.service';
|
|
13
14
|
export { getBaseURL, getImageURL, queryParamsStringfy } from './src/utils';
|
package/package.json
CHANGED
package/src/dto/iam.dto.d.ts
CHANGED
|
@@ -51,12 +51,12 @@ export interface GetGlobalUserListParams extends BaseParams {
|
|
|
51
51
|
modifiedBy?: string[];
|
|
52
52
|
updatedAt?: string[];
|
|
53
53
|
}
|
|
54
|
-
export
|
|
54
|
+
export interface GetGlobalUserOptionsParams extends QueryParams {
|
|
55
55
|
isActiveOptions?: boolean;
|
|
56
56
|
positionOptions?: boolean;
|
|
57
57
|
divisionOptions?: boolean;
|
|
58
58
|
modifiedByOptions?: boolean;
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
60
|
export interface SetActiveGlobalUserPayload {
|
|
61
61
|
isActive: boolean;
|
|
62
62
|
}
|