@tagsamurai/gsts-api-services 2.0.1-alpha.6 → 2.0.1-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,66 +1,66 @@
1
- import _ from "axios";
2
- const E = { 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" }, b = (t = "APP_TAGSAMURAI_API") => E["VITE_" + t], i = (t = {}, e = !1) => {
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: s = "",
6
- headers: a = {},
7
- ...p
8
- } = t, y = "".concat(b(r)).concat(s), f = _.create({
9
- ...p,
10
- baseURL: y,
11
- headers: e ? a : {
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
- ...a
13
+ ...i
14
14
  }
15
15
  });
16
- return f.interceptors.request.use((v) => {
17
- var h, S, $;
18
- const P = JSON.parse((h = localStorage.getItem("user")) != null ? h : "{}"), O = ($ = (S = P.jwt) != null ? S : P.token) != null ? $ : "";
19
- return v.headers.Authorization = "Bearer ".concat(O), v;
20
- }), f;
21
- }, u = i({
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
- }), w = (t) => {
24
- var e, r, s, a;
25
- return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((a = (s = t.response) == null ? void 0 : s.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
- }, B = {
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 u.post("/login", e);
29
+ return p.post("/login", e);
30
30
  },
31
- reLogin: (t) => (u.interceptors.response.use((e) => e, w), u.post("/login", 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 u.post("/request-otp", e);
34
+ return p.post("/request-otp", e);
35
35
  },
36
36
  requestResetPassLink: (t) => {
37
37
  const e = { email: t };
38
- return u.post("/request-reset-link", e);
38
+ return p.post("/request-reset-link", e);
39
39
  },
40
- setPassword: (t) => u.post("/set-password", t),
41
- verifyToken: (t) => u.get("/verify-token/".concat(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 u.put("/confirm-email-change/confirm", e);
44
+ return p.put("/confirm-email-change/confirm", e);
45
45
  },
46
- postLogout: () => u.post("/logout"),
46
+ postLogout: () => p.post("/logout"),
47
47
  /**
48
48
  *
49
49
  * @deprecated use postLogout instead
50
50
  */
51
- logout: () => u.post("/logout")
52
- }, L = (t, e, r) => {
53
- const s = new URL(b("APP_TAGSAMURAI_API") || "").origin;
54
- let a = t.startsWith("http") ? t : "".concat(s, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
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 p = new URLSearchParams();
57
- e && (p.set("width", e.toString()), p.set("height", (r == null ? void 0 : r.toString()) || e.toString())), a += "?".concat(p.toString());
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 a;
60
- }, R = () => {
61
- var e, r, s;
59
+ return i;
60
+ }, L = () => {
61
+ var e, r, n;
62
62
  const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
63
- return (s = (r = t.jwt) != null ? r : t.token) != null ? s : "";
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 s = await r.arrayBuffer();
73
- return new Blob([s], {
72
+ const n = await r.arrayBuffer();
73
+ return new Blob([n], {
74
74
  type: r.headers.get("Content-Type") || "image/webp"
75
75
  });
76
- }, U = async (t) => {
76
+ }, R = async (t) => {
77
77
  try {
78
- const e = R(), r = await G(t, 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
- }, k = async (t, e, r, s) => {
83
+ }, B = async (t, e, r, n) => {
84
84
  if (!t) return;
85
- const a = L(t, e, r);
86
- return s ? a : U(a);
87
- }, j = (t) => {
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
- }, T = (t) => {
107
+ }, l = (t) => {
108
108
  if (!t)
109
109
  return {};
110
110
  const e = {};
111
111
  return Object.keys(t).forEach((r) => {
112
- const s = t[r];
113
- e[r] = x(s) ? JSON.parse(s.trim()) : s;
112
+ const n = t[r];
113
+ e[r] = x(n) ? JSON.parse(n.trim()) : n;
114
114
  }), e;
115
- }, m = i({
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
- getDivisions: (t) => l.get("", { params: t }),
124
- getDivisionDetail: (t) => l.get("/".concat(t)),
125
- postCreateDivision: (t) => l.post("/", t),
126
- putEditDivision: (t, e) => l.put("/".concat(t), e),
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 l.delete("", { params: e });
129
+ return d.delete("", { params: e });
130
130
  }
131
- }, g = i({
131
+ }, g = a({
132
132
  prefix: "/v1/global-settings"
133
- }), H = {
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
- }, n = i({
143
+ }, o = a({
144
144
  prefix: "/v2/hardware-tagging"
145
- }), V = {
145
+ }), H = {
146
146
  getHandheldReader: (t) => {
147
- const e = T(t);
148
- return n.post("/handheld-reader/list", e);
147
+ const e = l(t);
148
+ return o.post("/handheld-reader/list", e);
149
149
  },
150
- getHandheldReaderDetail: (t) => n.get("/handheld-reader/".concat(t)),
150
+ getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
151
151
  getHandheldReaderOptions: (t) => {
152
- const e = T(t);
153
- return n.post("/handheld-reader/options", e);
152
+ const e = l(t);
153
+ return o.post("/handheld-reader/options", e);
154
154
  },
155
- putMarkHandheldStatus: (t) => n.patch("/handheld-reader/status", t),
156
- putPingReaders: (t) => n.put("/iot-reader/ping", t),
157
- putMarkIOTStatus: (t, e) => n.put("/".concat(e, "/mark-status"), t),
158
- putEditReaderGroup: (t, e, r) => n.patch(
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) => 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(
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) => n.post(
168
+ postActivateHardware: (t, e) => o.post(
169
169
  "/".concat(t === "iot" ? "iot-" : "handheld-", "reader/activate"),
170
170
  e
171
171
  ),
172
- deleteHardware: (t, e) => n.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
172
+ deleteHardware: (t, e) => o.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
173
173
  params: e
174
174
  }),
175
- putAntennaPower: (t, e) => n.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
176
- getIOTReaderOrAntenna: (t, e) => n.get("/".concat(t), { params: e }),
177
- getIOTReaderDetail: (t) => n.get("/iot-reader/".concat(t)),
178
- getIOTReaderOrAntennaOptions: (t, e) => n.get("/".concat(t, "/options"), { params: e }),
179
- getActivityLog: (t) => n.get("/activity-log", { params: t }),
180
- getActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
181
- getDetailActivityLog: (t) => n.get("/activity-log", { params: t }),
182
- getDetailActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
183
- getExistingAliasNames: () => n.get("/reader/alias-names"),
184
- getIotReaderPort: (t, e) => n.get("/iot-reader/".concat(t, "/ports"), { params: e })
185
- }, D = i({
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
- }), q = {
189
- getSessionLogList: (t) => D.get("/session-log", { params: t })
190
- }, I = i({
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: (t) => c.get("", { params: t }),
199
- getPositionDetail: (t) => c.get("/".concat(t)),
200
- postCreatePosition: (t) => c.post("/", t),
201
- putEditPosition: (t, e) => c.put("/".concat(t), e),
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 c.delete("", { params: e });
204
+ return v.delete("", { params: e });
205
205
  }
206
- }, C = i({
206
+ }, N = a({
207
207
  env: "APP_TAGSAMURAI_API",
208
208
  prefix: "/tag/v2"
209
209
  }), W = {
210
- getTagInfo: (t) => C.get("/rfid-qr/scan", { params: t })
211
- }, A = i({
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) => A.get("/tag-event-log", { params: t }),
215
- getTAGEventlogOptions: (t) => A.get("/tag-event-log/options", { params: t }),
216
- getDetailTAGEventlog: (t) => A.get("/tag-event-log/".concat(t))
217
- }, o = i({
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) => o.get("", { params: t }),
221
- getUserDetail: (t) => o.get("/".concat(t)),
222
- getUserSystemLogs: (t, e) => o.get("/".concat(t, "/system-logs"), { params: 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, o.get("/".concat(t, "/system-logs/options"), { params: r });
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 o.post("", t, { headers: e });
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 o.put("/".concat(t), e, { headers: r });
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 o.delete("", { params: e });
237
+ return u.delete("", { params: e });
238
238
  },
239
- putToggleStatusUsers: (t) => o.put("/active-status", t),
239
+ putToggleStatusUsers: (t) => u.put("/active-status", t),
240
240
  getUserOptions: (t) => {
241
241
  const e = {};
242
- return e[t] = !0, o.get("/options", { params: e });
242
+ return e[t] = !0, u.get("/options", { params: e });
243
243
  },
244
- deleteCancelEmailChange: (t) => o.delete("/cancel-email-change/".concat(t)),
245
- postResendEmail: (t) => o.post("/resend-email", t),
246
- putChangePassword: (t, e) => o.put("/change-password/".concat(t), e)
247
- }, d = i({
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
- }), X = {
250
- getTabletList: (t) => d.post("/tablet/list", t),
251
- getTabletOption: (t) => d.post("/tablet/options", t),
252
- updateTabletStatus: (t, e) => d.patch("/tablet/status", e, { params: { ids: t } }),
253
- disconnectTablet: (t) => d.patch("/tablet/disconnect-reader", { params: { ids: t } }),
254
- deleteTablet: (t) => d.delete("/tablet", { params: { ids: 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
- B as AuthServices,
258
- J as ChangelogServices,
259
- M as DivisionServices,
260
- H as GlobalTagServices,
261
- V as HardwareServices,
262
- q as LogServices,
263
- F as OptionServices,
264
- z as PositionServices,
265
- X as TabletServices,
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
- b as getBaseURL,
270
- k as getImageURL,
271
- j as queryParamsStringfy
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "2.0.1-alpha.6",
3
+ "version": "2.0.1-alpha.8",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -11,7 +11,7 @@ declare const IamServices: {
11
11
  requestResetLink: (email: string) => Promise<AxiosResponse<RequestResetLinkResponse>>;
12
12
  setPassword: (payload: SetPasswordPayload) => Promise<AxiosResponse>;
13
13
  confirmEmailChange: (token: string) => Promise<AxiosResponse>;
14
- cancelEmailChange: (token: string) => Promise<AxiosResponse>;
14
+ cancelEmailChange: (id: string) => Promise<AxiosResponse>;
15
15
  getPositionList: (params: GetPositionListParams) => Promise<AxiosResponse<FetchListResponse<PositionList>>>;
16
16
  getPositionDetail: (id: string) => Promise<AxiosResponse<FetchDetailResponse<PositionDetail>>>;
17
17
  createPosition: (payload: CreateEditPositionPayload) => Promise<AxiosResponse>;