@tagsamurai/gsts-api-services 2.0.1-alpha.2 → 2.0.1-alpha.21
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 +325 -158
- package/main.d.ts +3 -0
- package/package.json +1 -1
- package/src/dto/dataTable.dto.d.ts +3 -21
- package/src/dto/hardware.dto.d.ts +124 -56
- package/src/dto/iam.dto.d.ts +72 -0
- package/src/dto/import.dto.d.ts +17 -0
- package/src/dto/tablet.dto.d.ts +33 -0
- package/src/dto/tag.dto.d.ts +0 -1
- package/src/dto/tagEventlog.dto.d.ts +37 -9
- package/src/services/globalTag.service.d.ts +17 -18
- package/src/services/hardware.service.d.ts +31 -20
- package/src/services/iam.service.d.ts +44 -0
- package/src/services/import.service.d.ts +25 -0
- package/src/services/tablet.service.d.ts +10 -0
- package/src/services/tagEventlog.service.d.ts +2 -3
- package/src/types/dataTable.type.d.ts +5 -3
- package/src/types/fetchResponse.type.d.ts +1 -0
- package/src/types/hardware.type.d.ts +105 -60
- package/src/types/iam.type.d.ts +152 -0
- package/src/types/import.type.d.ts +28 -0
- package/src/types/tablet.type.d.ts +16 -0
package/api-services.es.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import R from "axios";
|
|
2
|
+
const U = { 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") => U["VITE_" + t], p = (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: a = {},
|
|
7
|
+
...c
|
|
8
|
+
} = t, w = "".concat(I(r)).concat(n), A = R.create({
|
|
9
|
+
...c,
|
|
10
|
+
baseURL: w,
|
|
11
|
+
headers: e ? a : {
|
|
12
12
|
"Content-Type": "application/json",
|
|
13
|
-
...
|
|
13
|
+
...a
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
return A.interceptors.request.use((
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
return
|
|
16
|
+
return A.interceptors.request.use((h) => {
|
|
17
|
+
var S, y, $;
|
|
18
|
+
const P = JSON.parse((S = localStorage.getItem("user")) != null ? S : "{}"), O = ($ = (y = P.jwt) != null ? y : P.token) != null ? $ : "";
|
|
19
|
+
return h.headers.Authorization = "Bearer ".concat(O), h;
|
|
20
20
|
}), A;
|
|
21
|
-
},
|
|
21
|
+
}, l = p({
|
|
22
22
|
prefix: "/v1/global-settings/auth"
|
|
23
23
|
}), E = (t) => {
|
|
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
|
-
},
|
|
24
|
+
var e, r, n, a;
|
|
25
|
+
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((a = (n = t.response) == null ? void 0 : n.data) == null ? void 0 : a.message) === "jwt malformed" ? (window.onblur = null, window.onfocus = null, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
|
|
26
|
+
}, k = {
|
|
27
27
|
login: (t) => {
|
|
28
28
|
const e = { ...t, isMobile: !1 };
|
|
29
|
-
return
|
|
29
|
+
return l.post("/login", e);
|
|
30
30
|
},
|
|
31
|
-
reLogin: (t) => (
|
|
31
|
+
reLogin: (t) => (l.interceptors.response.use((e) => e, E), l.post("/login", t)),
|
|
32
32
|
requestOTP: (t) => {
|
|
33
33
|
const e = { email: t };
|
|
34
|
-
return
|
|
34
|
+
return l.post("/request-otp", e);
|
|
35
35
|
},
|
|
36
36
|
requestResetPassLink: (t) => {
|
|
37
37
|
const e = { email: t };
|
|
38
|
-
return
|
|
38
|
+
return l.post("/request-reset-link", e);
|
|
39
39
|
},
|
|
40
|
-
setPassword: (t) =>
|
|
41
|
-
verifyToken: (t) =>
|
|
40
|
+
setPassword: (t) => l.post("/set-password", t),
|
|
41
|
+
verifyToken: (t) => l.get("/verify-token/".concat(t)),
|
|
42
42
|
confirmEmailChange: (t) => {
|
|
43
43
|
const e = { token: t };
|
|
44
|
-
return
|
|
44
|
+
return l.put("/confirm-email-change/confirm", e);
|
|
45
45
|
},
|
|
46
|
-
postLogout: () =>
|
|
46
|
+
postLogout: () => l.post("/logout"),
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @deprecated use postLogout instead
|
|
50
50
|
*/
|
|
51
|
-
logout: () =>
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
let
|
|
51
|
+
logout: () => l.post("/logout")
|
|
52
|
+
}, L = (t, e, r) => {
|
|
53
|
+
const n = new URL(I("APP_TAGSAMURAI_API") || "").origin;
|
|
54
|
+
let a = 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())), a += "?".concat(c.toString());
|
|
58
58
|
}
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
var e, r,
|
|
59
|
+
return a;
|
|
60
|
+
}, _ = () => {
|
|
61
|
+
var e, r, n;
|
|
62
62
|
const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
|
|
63
|
-
return (
|
|
64
|
-
},
|
|
63
|
+
return (n = (r = t.jwt) != null ? r : t.token) != null ? n : "";
|
|
64
|
+
}, x = async (t, e) => {
|
|
65
65
|
const r = await fetch(t, {
|
|
66
66
|
headers: {
|
|
67
67
|
Authorization: "Bearer ".concat(e)
|
|
@@ -69,22 +69,22 @@ const b = { 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
|
+
}, C = async (t) => {
|
|
77
77
|
try {
|
|
78
|
-
const e =
|
|
78
|
+
const e = _(), r = await x(t, e);
|
|
79
79
|
return URL.createObjectURL(r);
|
|
80
80
|
} catch (e) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, H = async (t, e, r, n) => {
|
|
84
84
|
if (!t) return;
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
},
|
|
85
|
+
const a = L(t, e, r);
|
|
86
|
+
return n ? a : C(a);
|
|
87
|
+
}, J = (t) => {
|
|
88
88
|
if (!t || typeof t == "string")
|
|
89
89
|
return;
|
|
90
90
|
const e = {};
|
|
@@ -95,7 +95,7 @@ const b = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
95
95
|
[r]: t[r]
|
|
96
96
|
});
|
|
97
97
|
}), e;
|
|
98
|
-
},
|
|
98
|
+
}, G = (t) => {
|
|
99
99
|
if (typeof t != "string") return !1;
|
|
100
100
|
const e = t.trim();
|
|
101
101
|
if (!e) return !1;
|
|
@@ -104,160 +104,327 @@ const b = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
104
104
|
} catch (r) {
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, u = (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] =
|
|
112
|
+
const n = t[r];
|
|
113
|
+
e[r] = G(n) ? JSON.parse(n.trim()) : n;
|
|
114
114
|
}), e;
|
|
115
|
-
},
|
|
115
|
+
}, D = p({
|
|
116
116
|
prefix: "/v1/global-settings/change-log"
|
|
117
117
|
}), j = {
|
|
118
|
-
getChangelogs: (t) =>
|
|
119
|
-
getChangelogOptions: (t) =>
|
|
120
|
-
},
|
|
118
|
+
getChangelogs: (t) => D.get("", { params: t }),
|
|
119
|
+
getChangelogOptions: (t) => D.get("/options", { params: t })
|
|
120
|
+
}, m = p({
|
|
121
121
|
prefix: "/v1/global-settings/division"
|
|
122
|
-
}),
|
|
123
|
-
getDivisions: (t) =>
|
|
124
|
-
getDivisionDetail: (t) =>
|
|
125
|
-
postCreateDivision: (t) =>
|
|
126
|
-
putEditDivision: (t, e) =>
|
|
122
|
+
}), B = {
|
|
123
|
+
getDivisions: (t) => m.get("", { params: t }),
|
|
124
|
+
getDivisionDetail: (t) => m.get("/".concat(t)),
|
|
125
|
+
postCreateDivision: (t) => m.post("/", t),
|
|
126
|
+
putEditDivision: (t, e) => m.put("/".concat(t), e),
|
|
127
127
|
deleteDivisions: (t) => {
|
|
128
128
|
const e = { id: JSON.stringify(t) };
|
|
129
|
-
return
|
|
129
|
+
return m.delete("", { params: e });
|
|
130
130
|
}
|
|
131
|
-
},
|
|
132
|
-
prefix: "/v1/global-settings"
|
|
133
|
-
}), M = {
|
|
134
|
-
getTAGAllPaired: (t, e) => g.get("/".concat(t), { params: e }),
|
|
135
|
-
getTAGAllPairedOptions: (t, e) => g.get("/".concat(t, "/options"), { params: e }),
|
|
136
|
-
getTAGNotPaired: (t, e) => g.get("/".concat(t, "/not-paired"), { params: e }),
|
|
137
|
-
getTAGNotPairedOptions: (t, e) => g.get("/".concat(t, "/not-paired/options"), { params: e }),
|
|
138
|
-
getScanTAG: (t, e) => g.get("/".concat(t, "/scan"), { params: e }),
|
|
139
|
-
putDetailAuditTAG: (t, e) => g.put("/".concat(t, "/audit-detail"), e),
|
|
140
|
-
putAuditTAG: (t, e) => g.put("/".concat(t, "/audit"), e),
|
|
141
|
-
putAllocateTAG: (t, e) => g.put("/".concat(t, "/allocate"), e),
|
|
142
|
-
putCombineTAG: (t) => g.put("/combine", t)
|
|
143
|
-
}, n = a({
|
|
131
|
+
}, d = p({
|
|
144
132
|
prefix: "/v2/hardware-tagging"
|
|
145
|
-
}),
|
|
133
|
+
}), q = {
|
|
134
|
+
getAllTAG: (t) => {
|
|
135
|
+
const e = u(t);
|
|
136
|
+
return d.post("/all-tag/list", e);
|
|
137
|
+
},
|
|
138
|
+
getAllTAGOptions: (t) => {
|
|
139
|
+
const e = u(t);
|
|
140
|
+
return d.post("all-tag/options", e);
|
|
141
|
+
},
|
|
142
|
+
getNotPairedYetCounts: () => d.get("/not-paired-yet/tag-count"),
|
|
143
|
+
getNotPairedYetList: (t) => {
|
|
144
|
+
const e = u(t);
|
|
145
|
+
return d.post("/not-paired-yet/list", e);
|
|
146
|
+
},
|
|
147
|
+
getNotPairedYetOptions: (t) => {
|
|
148
|
+
const e = u(t);
|
|
149
|
+
return d.post("/not-paired-yet/options", e);
|
|
150
|
+
},
|
|
151
|
+
getAuditTAGDetail: (t) => d.post("/audit/detail", t),
|
|
152
|
+
submitAuditTAG: (t) => d.post("/audit/submit", t),
|
|
153
|
+
submitCombineTAG: (t) => d.post("/combine-tag/combine", t),
|
|
154
|
+
submitSeparateTAG: (t) => d.post("/combine-tag/separate", t),
|
|
155
|
+
getPairedList: (t) => {
|
|
156
|
+
const e = u(t);
|
|
157
|
+
return d.post("/paired/list", e);
|
|
158
|
+
},
|
|
159
|
+
getPairedOptions: (t) => {
|
|
160
|
+
const e = u(t);
|
|
161
|
+
return d.post("/paired/options", e);
|
|
162
|
+
}
|
|
163
|
+
}, o = p({
|
|
164
|
+
prefix: "/v2/hardware-tagging"
|
|
165
|
+
}), V = {
|
|
146
166
|
getHandheldReader: (t) => {
|
|
147
|
-
const e =
|
|
148
|
-
return
|
|
149
|
-
},
|
|
150
|
-
getHandheldReaderDetail: (t) =>
|
|
151
|
-
getHandheldReaderOptions: (t) =>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
),
|
|
162
|
-
putEditAntennaGroup: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
163
|
-
putEditPortStatus: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
164
|
-
putEditAliasName: (t, e, r) => n.patch(
|
|
165
|
-
"/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/alias-name"),
|
|
166
|
-
e
|
|
167
|
-
),
|
|
168
|
-
postActivateHardware: (t, e) => n.post(
|
|
169
|
-
"/".concat(t === "iot" ? "iot-" : "handheld-", "reader/activate"),
|
|
170
|
-
e
|
|
171
|
-
),
|
|
172
|
-
deleteHardware: (t, e) => n.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
|
|
167
|
+
const e = u(t);
|
|
168
|
+
return o.post("/handheld-reader/list", e);
|
|
169
|
+
},
|
|
170
|
+
getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
|
|
171
|
+
getHandheldReaderOptions: (t) => o.post("/handheld-reader/options", t),
|
|
172
|
+
putMarkHandheldStatus: (t, e, r) => o.patch("/".concat(t, "/status"), r, { params: e }),
|
|
173
|
+
postPingReaders: (t) => o.post("/iot-reader/ping", t),
|
|
174
|
+
putMarkIOTStatus: (t, e) => o.put("/".concat(e, "/mark-status"), t),
|
|
175
|
+
putEditReaderGroup: (t, e, r) => o.patch("/".concat(t, "-reader/").concat(r, "/group"), e),
|
|
176
|
+
putEditAntennaGroup: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
177
|
+
putEditPortStatus: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
178
|
+
putEditAliasName: (t, e, r) => o.patch("/".concat(t, "-reader/").concat(r, "/alias-name"), e),
|
|
179
|
+
postActivateHardware: (t, e) => o.post("/".concat(t, "-reader/activate"), e),
|
|
180
|
+
deleteHardware: (t, e) => o.delete("/".concat(t, "-reader"), {
|
|
173
181
|
params: e
|
|
174
182
|
}),
|
|
175
|
-
putAntennaPower: (t, e) =>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
putAntennaPower: (t, e) => o.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
184
|
+
getIotReader: (t) => {
|
|
185
|
+
const e = u({ ...t });
|
|
186
|
+
return o.post("/iot-reader", e);
|
|
187
|
+
},
|
|
188
|
+
getIotReaderDetail: (t) => o.get("/iot-reader/".concat(t)),
|
|
189
|
+
getIotReaderOptions: (t) => o.post("/iot-reader/options", t),
|
|
190
|
+
getIotReaderPort: (t, e) => o.post("/iot-reader/".concat(t, "/port/list"), { params: e }),
|
|
191
|
+
getIotReaderTablet: (t, e) => o.post("/iot-reader/".concat(t, "/tablet/list"), { params: e }),
|
|
192
|
+
getIotReaderTabletOptions: (t, e) => o.post("/iot-reader/".concat(t, "/tablet/options"), e),
|
|
193
|
+
putEditIotReader: (t, e) => o.patch("/iot-reader/".concat(t), e),
|
|
194
|
+
disconnectIotTablet: (t, e) => o.delete("/iot-reader/".concat(t, "/tablet"), {
|
|
195
|
+
data: e
|
|
196
|
+
}),
|
|
197
|
+
// TODO: Activity API spec not finished yet
|
|
198
|
+
getActivityLog: (t) => o.get("/activity-log", { params: t }),
|
|
199
|
+
getActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
|
|
200
|
+
getDetailActivityLog: (t) => o.get("/activity-log", { params: t }),
|
|
201
|
+
getDetailActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
|
|
202
|
+
getExistingAliasNames: () => o.get("/reader/alias-names")
|
|
203
|
+
}, N = p({
|
|
186
204
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
187
205
|
prefix: "/v2"
|
|
188
|
-
}),
|
|
189
|
-
getSessionLogList: (t) =>
|
|
190
|
-
},
|
|
206
|
+
}), Y = {
|
|
207
|
+
getSessionLogList: (t) => N.get("/session-log", { params: t })
|
|
208
|
+
}, T = p({
|
|
191
209
|
prefix: "/v1/global-settings/option"
|
|
192
|
-
}),
|
|
193
|
-
getPositions: () =>
|
|
194
|
-
getDivisions: () =>
|
|
195
|
-
},
|
|
210
|
+
}), z = {
|
|
211
|
+
getPositions: () => T.get("/position"),
|
|
212
|
+
getDivisions: () => T.get("/division")
|
|
213
|
+
}, f = p({
|
|
196
214
|
prefix: "/v1/global-settings/position"
|
|
197
|
-
}),
|
|
198
|
-
getPositions: (t) =>
|
|
199
|
-
getPositionDetail: (t) =>
|
|
200
|
-
postCreatePosition: (t) =>
|
|
201
|
-
putEditPosition: (t, e) =>
|
|
215
|
+
}), X = {
|
|
216
|
+
getPositions: (t) => f.get("", { params: t }),
|
|
217
|
+
getPositionDetail: (t) => f.get("/".concat(t)),
|
|
218
|
+
postCreatePosition: (t) => f.post("/", t),
|
|
219
|
+
putEditPosition: (t, e) => f.put("/".concat(t), e),
|
|
202
220
|
deletePositions: (t) => {
|
|
203
221
|
const e = { id: JSON.stringify(t) };
|
|
204
|
-
return
|
|
222
|
+
return f.delete("", { params: e });
|
|
205
223
|
}
|
|
206
|
-
},
|
|
224
|
+
}, F = p({
|
|
207
225
|
env: "APP_TAGSAMURAI_API",
|
|
208
226
|
prefix: "/tag/v2"
|
|
209
|
-
}), z = {
|
|
210
|
-
getTagInfo: (t) => x.get("/rfid-qr/scan", { params: t })
|
|
211
|
-
}, d = a({
|
|
212
|
-
prefix: "/v1/global-settings/change-log"
|
|
213
227
|
}), W = {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}, o = a({
|
|
218
|
-
prefix: "/v1/global-settings/user"
|
|
228
|
+
getTagInfo: (t) => F.get("/rfid-qr/scan", { params: t })
|
|
229
|
+
}, b = p({
|
|
230
|
+
prefix: "/v2/hardware-tagging"
|
|
219
231
|
}), K = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
232
|
+
getTAGEventlog: (t) => {
|
|
233
|
+
const e = u(t);
|
|
234
|
+
return b.post("/tag-event-log/list", e);
|
|
235
|
+
},
|
|
236
|
+
getTAGEventlogOptions: (t) => {
|
|
237
|
+
const e = u(t);
|
|
238
|
+
return b.post("/tag-event-log/options", e);
|
|
239
|
+
},
|
|
240
|
+
getDetailTAGEventlog: (t) => b.get("/tag-event-log/".concat(t))
|
|
241
|
+
}, g = p({
|
|
242
|
+
prefix: "/v1/global-settings/user"
|
|
243
|
+
}), Q = {
|
|
244
|
+
getUsers: (t) => g.get("", { params: t }),
|
|
245
|
+
getUserDetail: (t) => g.get("/".concat(t)),
|
|
246
|
+
getUserSystemLogs: (t, e) => g.get("/".concat(t, "/system-logs"), { params: e }),
|
|
223
247
|
getUserSystemLogOptions: (t, e) => {
|
|
224
248
|
const r = {};
|
|
225
|
-
return r[e] = !0,
|
|
249
|
+
return r[e] = !0, g.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
226
250
|
},
|
|
227
251
|
postCreateUser: (t) => {
|
|
228
252
|
const e = { "Content-Type": "multipart/form-data" };
|
|
229
|
-
return
|
|
253
|
+
return g.post("", t, { headers: e });
|
|
230
254
|
},
|
|
231
255
|
putEditUser: (t, e) => {
|
|
232
256
|
const r = { "Content-Type": "multipart/form-data" };
|
|
233
|
-
return
|
|
257
|
+
return g.put("/".concat(t), e, { headers: r });
|
|
234
258
|
},
|
|
235
259
|
deleteUsers: (t) => {
|
|
236
260
|
const e = { id: JSON.stringify(t) };
|
|
237
|
-
return
|
|
261
|
+
return g.delete("", { params: e });
|
|
238
262
|
},
|
|
239
|
-
putToggleStatusUsers: (t) =>
|
|
263
|
+
putToggleStatusUsers: (t) => g.put("/active-status", t),
|
|
240
264
|
getUserOptions: (t) => {
|
|
241
265
|
const e = {};
|
|
242
|
-
return e[t] = !0,
|
|
266
|
+
return e[t] = !0, g.get("/options", { params: e });
|
|
267
|
+
},
|
|
268
|
+
deleteCancelEmailChange: (t) => g.delete("/cancel-email-change/".concat(t)),
|
|
269
|
+
postResendEmail: (t) => g.post("/resend-email", t),
|
|
270
|
+
putChangePassword: (t, e) => g.put("/change-password/".concat(t), e)
|
|
271
|
+
}, v = p({
|
|
272
|
+
prefix: "/v2/hardware-tagging"
|
|
273
|
+
}), Z = {
|
|
274
|
+
getTabletList: (t) => v.post("/tablet/list", t),
|
|
275
|
+
getTabletOption: (t) => v.post("/tablet/options", t),
|
|
276
|
+
updateTabletStatus: (t, e) => v.patch("/tablet/status", e, { params: { ids: t } }),
|
|
277
|
+
disconnectTablet: (t) => v.patch("/tablet/disconnect-reader", { params: { ids: t } }),
|
|
278
|
+
deleteTablet: (t) => v.delete("/tablet", { params: { ids: t } })
|
|
279
|
+
}, s = p({
|
|
280
|
+
prefix: "/v2/iam"
|
|
281
|
+
}), tt = {
|
|
282
|
+
login: (t) => s.post("/auth/login", t),
|
|
283
|
+
logout: () => s.post("/auth/logout"),
|
|
284
|
+
verifyToken: (t) => s.get("/auth/verify-token/".concat(t)),
|
|
285
|
+
requestOtp: (t) => s.post("/auth/request-otp", { email: t }),
|
|
286
|
+
requestResetLink: (t) => s.post("/auth/request-reset-link", { email: t }),
|
|
287
|
+
setPassword: (t) => s.post("/auth/set-password", t),
|
|
288
|
+
confirmEmailChange: (t) => s.post("/auth/confirm-email-change", { token: t }),
|
|
289
|
+
cancelEmailChange: (t) => s.delete("/auth/cancel-email-change/".concat(t)),
|
|
290
|
+
getPositionList: (t) => {
|
|
291
|
+
const e = u(t);
|
|
292
|
+
return s.post("/position/list", e);
|
|
243
293
|
},
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
294
|
+
getPositionDetail: (t) => s.get("/position/".concat(t)),
|
|
295
|
+
createPosition: (t) => s.post("/position", t),
|
|
296
|
+
editPosition: (t, e) => s.patch("/position/".concat(t), e),
|
|
297
|
+
deletePosition: (t) => {
|
|
298
|
+
const e = { ids: JSON.stringify(t) };
|
|
299
|
+
return s.delete("/position", { params: e });
|
|
300
|
+
},
|
|
301
|
+
getDivisionList: (t) => {
|
|
302
|
+
const e = u(t);
|
|
303
|
+
return s.post("/division/list", e);
|
|
304
|
+
},
|
|
305
|
+
getDivisionDetail: (t) => s.get("/division/".concat(t)),
|
|
306
|
+
createDivision: (t) => s.post("/division", t),
|
|
307
|
+
editDivision: (t, e) => s.patch("/division/".concat(t), e),
|
|
308
|
+
deleteDivision: (t) => {
|
|
309
|
+
const e = { ids: JSON.stringify(t) };
|
|
310
|
+
return s.delete("/division", { params: e });
|
|
311
|
+
},
|
|
312
|
+
createUsers: (t) => {
|
|
313
|
+
const e = new FormData();
|
|
314
|
+
return Object.entries(t).forEach(([r, n]) => {
|
|
315
|
+
n != null && e.append(r, n);
|
|
316
|
+
}), s.post("/users", e, {
|
|
317
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
318
|
+
});
|
|
319
|
+
},
|
|
320
|
+
getGlobalUserList: (t) => {
|
|
321
|
+
const e = u(t);
|
|
322
|
+
return s.post("/users/list", e);
|
|
323
|
+
},
|
|
324
|
+
getGlobalUserOptions: (t) => {
|
|
325
|
+
const e = u(t);
|
|
326
|
+
return s.post("/users/options", e);
|
|
327
|
+
},
|
|
328
|
+
getGlobalUserDetail: (t) => s.get("/users/".concat(t)),
|
|
329
|
+
setActiveGlobalUser: (t, e) => {
|
|
330
|
+
const r = { ids: JSON.stringify(t) };
|
|
331
|
+
return s.patch("/users/set-active", e, { params: r });
|
|
332
|
+
},
|
|
333
|
+
editUsers: (t, e) => {
|
|
334
|
+
const r = new FormData();
|
|
335
|
+
return Object.entries(e).forEach(([n, a]) => {
|
|
336
|
+
a != null && r.append(n, a);
|
|
337
|
+
}), s.patch("/users/".concat(t), r, {
|
|
338
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
editUsersFcmToken: (t) => s.patch("/users/fcm-token", t),
|
|
342
|
+
resendActivationEmail: (t) => s.post("/users/resend-activation-email", t),
|
|
343
|
+
changePassword: (t, e) => s.patch("/users/".concat(t, "/change-password"), e),
|
|
344
|
+
deleteUsers: (t) => {
|
|
345
|
+
const e = { ids: JSON.stringify(t) };
|
|
346
|
+
return s.delete("/users", { params: e });
|
|
347
|
+
},
|
|
348
|
+
logoutModule: (t) => s.post("/auth/logout/module", t),
|
|
349
|
+
loginModule: (t) => s.post("/auth/login/module", t),
|
|
350
|
+
getConcurrentUsers: (t, e) => {
|
|
351
|
+
const r = e ? { "X-Module-ID": e } : {};
|
|
352
|
+
return s.post("/concurrent-users", t, { headers: r });
|
|
353
|
+
},
|
|
354
|
+
logoutSession: (t, e) => {
|
|
355
|
+
const r = e ? { "X-Module-ID": e } : {};
|
|
356
|
+
return s.post("/auth/logout/session", t, { headers: r });
|
|
357
|
+
},
|
|
358
|
+
getPositionDropdown: () => s.get("/position/dropdown"),
|
|
359
|
+
getDivisionDropdown: () => s.get("/division/dropdown"),
|
|
360
|
+
exportPositionTable: () => s.post("/position/list/export", {}, { responseType: "blob" }),
|
|
361
|
+
exportDivisionTable: () => s.post("/division/list/export", {}, { responseType: "blob" }),
|
|
362
|
+
exportUserTable: () => s.post("/users/list/export", {}, { responseType: "blob" })
|
|
363
|
+
}, i = p({
|
|
364
|
+
prefix: "/v2/import"
|
|
365
|
+
}), et = {
|
|
366
|
+
// --- Division ---
|
|
367
|
+
submitDivisionFile: (t) => {
|
|
368
|
+
const e = new FormData();
|
|
369
|
+
return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), i.post("/division/file", e, {
|
|
370
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
getDivisionList: (t) => i.post("/division/list", t),
|
|
374
|
+
editDivisionData: (t) => i.put("/division", t),
|
|
375
|
+
duplicateDivisionData: (t) => i.post("/division/".concat(t, "/duplicate")),
|
|
376
|
+
submitDivisionData: (t) => i.post("/division", t),
|
|
377
|
+
deleteDivisionData: (t) => {
|
|
378
|
+
const e = { ids: JSON.stringify(t.ids) };
|
|
379
|
+
return i.delete("/division", { params: e });
|
|
380
|
+
},
|
|
381
|
+
// --- Position ---
|
|
382
|
+
submitPositionFile: (t) => {
|
|
383
|
+
const e = new FormData();
|
|
384
|
+
return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), i.post("/position/file", e, {
|
|
385
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
386
|
+
});
|
|
387
|
+
},
|
|
388
|
+
getPositionList: (t) => i.post("/position/list", t),
|
|
389
|
+
editPositionData: (t) => i.put("/position", t),
|
|
390
|
+
duplicatePositionData: (t) => i.post("/position/".concat(t, "/duplicate")),
|
|
391
|
+
submitPositionData: (t) => i.post("/position", t),
|
|
392
|
+
deletePositionData: (t) => {
|
|
393
|
+
const e = { ids: JSON.stringify(t.ids) };
|
|
394
|
+
return i.delete("/position", { params: e });
|
|
395
|
+
},
|
|
396
|
+
// --- User ---
|
|
397
|
+
submitUserFile: (t) => {
|
|
398
|
+
const e = new FormData();
|
|
399
|
+
return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), i.post("/user/file", e, {
|
|
400
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
401
|
+
});
|
|
402
|
+
},
|
|
403
|
+
getUserList: (t) => i.post("/user/list", t),
|
|
404
|
+
editUserData: (t) => i.put("/user", t),
|
|
405
|
+
duplicateUserData: (t) => i.post("/user/".concat(t, "/duplicate")),
|
|
406
|
+
submitUserData: (t) => i.post("/user", t),
|
|
407
|
+
deleteUserData: (t) => {
|
|
408
|
+
const e = { ids: JSON.stringify(t.ids) };
|
|
409
|
+
return i.delete("/user", { params: e });
|
|
410
|
+
}
|
|
247
411
|
};
|
|
248
412
|
export {
|
|
249
|
-
|
|
413
|
+
k as AuthServices,
|
|
250
414
|
j as ChangelogServices,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
415
|
+
B as DivisionServices,
|
|
416
|
+
q as GlobalTagServices,
|
|
417
|
+
V as HardwareServices,
|
|
418
|
+
tt as IamServices,
|
|
419
|
+
et as ImportServices,
|
|
420
|
+
Y as LogServices,
|
|
421
|
+
z as OptionServices,
|
|
422
|
+
X as PositionServices,
|
|
423
|
+
Z as TabletServices,
|
|
424
|
+
K as TagEventlogServices,
|
|
425
|
+
W as TagServices,
|
|
426
|
+
Q as UserServices,
|
|
427
|
+
I as getBaseURL,
|
|
428
|
+
H as getImageURL,
|
|
429
|
+
J as queryParamsStringfy
|
|
263
430
|
};
|
package/main.d.ts
CHANGED
|
@@ -9,4 +9,7 @@ export { default as PositionServices } from './src/services/position.service';
|
|
|
9
9
|
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
|
+
export { default as TabletServices } from './src/services/tablet.service';
|
|
13
|
+
export { default as IamServices } from './src/services/iam.service';
|
|
14
|
+
export { default as ImportServices } from './src/services/import.service';
|
|
12
15
|
export { getBaseURL, getImageURL, queryParamsStringfy } from './src/utils';
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MultiSelectOption } from '../types/options.type';
|
|
2
|
-
import { ApplicationModule } from '../types/tag.type';
|
|
3
2
|
export type FilterOptions = {
|
|
4
3
|
skuOptions?: MultiSelectOption[];
|
|
5
4
|
statusOptions?: MultiSelectOption[];
|
|
@@ -17,26 +16,9 @@ export type FilterOptions = {
|
|
|
17
16
|
activityOptions?: MultiSelectOption[];
|
|
18
17
|
pairedInOptions?: MultiSelectOption[];
|
|
19
18
|
availabilityOptions?: MultiSelectOption[];
|
|
19
|
+
tagTypeOptions?: MultiSelectOption[];
|
|
20
|
+
rfidSkuOptions?: MultiSelectOption[];
|
|
21
|
+
nfcSkuOptions?: MultiSelectOption[];
|
|
20
22
|
actionOptions?: MultiSelectOption[];
|
|
21
23
|
objectNameOptions?: MultiSelectOption[];
|
|
22
24
|
};
|
|
23
|
-
export type BooleanOptions = {
|
|
24
|
-
deviceNameOptions?: boolean;
|
|
25
|
-
nameOptions?: boolean;
|
|
26
|
-
userFullNameOptions?: boolean;
|
|
27
|
-
networkStatusOptions?: boolean;
|
|
28
|
-
brandOptions?: boolean;
|
|
29
|
-
modelOptions?: boolean;
|
|
30
|
-
moduleOptions?: boolean;
|
|
31
|
-
reportedByOptions?: boolean;
|
|
32
|
-
modifiedByOptions?: boolean;
|
|
33
|
-
fieldOptions?: boolean;
|
|
34
|
-
activityOptions?: boolean;
|
|
35
|
-
pairedInOptions?: boolean;
|
|
36
|
-
availabilityOptions?: boolean;
|
|
37
|
-
module?: ApplicationModule;
|
|
38
|
-
status?: string;
|
|
39
|
-
skuOptions?: boolean;
|
|
40
|
-
statusOptions?: boolean;
|
|
41
|
-
typeOptions?: boolean;
|
|
42
|
-
};
|