@tagsamurai/gsts-api-services 2.0.1-alpha.4 → 2.0.1-alpha.41

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,67 +1,67 @@
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 U from "axios";
2
+ const L = { 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" }, w = (t = "APP_TAGSAMURAI_API") => L["VITE_" + t], p = (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: u = {},
7
+ ...m
8
+ } = t, O = "".concat(w(r)).concat(n), A = U.create({
9
+ ...m,
10
+ baseURL: O,
11
+ headers: e ? u : {
12
12
  "Content-Type": "application/json",
13
- ...a
13
+ ...u
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 A.interceptors.request.use((P) => {
17
+ var S, T, $;
18
+ const y = JSON.parse((S = localStorage.getItem("user")) != null ? S : "{}"), I = ($ = (T = y.jwt) != null ? T : y.token) != null ? $ : "";
19
+ return P.headers.Authorization = "Bearer ".concat(I), P;
20
+ }), A;
21
+ }, l = p({
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
+ }), R = (t) => {
24
+ var e, r, n, u;
25
+ return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((u = (n = t.response) == null ? void 0 : n.data) == null ? void 0 : u.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 u.post("/login", e);
29
+ return l.post("/login", e);
30
30
  },
31
- reLogin: (t) => (u.interceptors.response.use((e) => e, w), u.post("/login", t)),
31
+ reLogin: (t) => (l.interceptors.response.use((e) => e, R), l.post("/login", t)),
32
32
  requestOTP: (t) => {
33
33
  const e = { email: t };
34
- return u.post("/request-otp", e);
34
+ return l.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 l.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) => 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 u.put("/confirm-email-change/confirm", e);
44
+ return l.put("/confirm-email-change/confirm", e);
45
45
  },
46
- postLogout: () => u.post("/logout"),
46
+ postLogout: () => l.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: () => l.post("/logout")
52
+ }, E = (t, e, r) => {
53
+ const n = new URL(w("APP_TAGSAMURAI_API") || "").origin;
54
+ let u = 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 m = new URLSearchParams();
57
+ e && (m.set("width", e.toString()), m.set("height", (r == null ? void 0 : r.toString()) || e.toString())), u += "?".concat(m.toString());
58
58
  }
59
- return a;
60
- }, R = () => {
61
- var e, r, s;
59
+ return u;
60
+ }, _ = () => {
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 : "";
64
- }, G = async (t, e) => {
63
+ return (n = (r = t.jwt) != null ? r : t.token) != null ? n : "";
64
+ }, C = async (t, e) => {
65
65
  const r = await fetch(t, {
66
66
  headers: {
67
67
  Authorization: "Bearer ".concat(e)
@@ -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
+ }, N = async (t) => {
77
77
  try {
78
- const e = R(), r = await G(t, e);
78
+ const e = _(), r = await C(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
+ }, H = 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 u = E(t, e, r);
86
+ return n ? u : N(u);
87
+ }, J = (t) => {
88
88
  if (!t || typeof t == "string")
89
89
  return;
90
90
  const e = {};
@@ -104,169 +104,366 @@ 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
+ }, i = (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({
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({
115
+ }, c = p({
116
+ prefix: "/v2/analytics-reporting"
117
+ }), j = {
118
+ getChangelogs: (t) => {
119
+ const e = i(t);
120
+ return c.post("/change-log/list", e);
121
+ },
122
+ getChangelogOptions: (t) => c.post("/change-log/options", t),
123
+ getSessionList: (t) => {
124
+ const e = i(t);
125
+ return c.post("/session-log/list", e);
126
+ },
127
+ getSessionOptions: (t) => c.post("/session-log/options", t),
128
+ getHardwareChangelogs: (t) => {
129
+ const e = i(t);
130
+ return c.post("/hardware-change-log/list", e);
131
+ },
132
+ getHardwareOptions: (t) => c.post("/hardware-change-log/options", t),
133
+ getTaggingList: (t) => {
134
+ const e = i(t);
135
+ return c.post("/reader-tagging-log/list", e);
136
+ },
137
+ getTaggingOptions: (t) => c.post("/reader-tagging-log/options", t),
138
+ getUserTagList: (t) => {
139
+ const e = i(t);
140
+ return c.post("/reader-user-tag-log/list", e);
141
+ },
142
+ getUserTagOptions: (t) => c.post("/reader-user-tag-log/options", t)
143
+ }, f = p({
121
144
  prefix: "/v1/global-settings/division"
122
- }), 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),
145
+ }), B = {
146
+ getDivisions: (t) => f.get("", { params: t }),
147
+ getDivisionDetail: (t) => f.get("/".concat(t)),
148
+ postCreateDivision: (t) => f.post("/", t),
149
+ putEditDivision: (t, e) => f.put("/".concat(t), e),
127
150
  deleteDivisions: (t) => {
128
151
  const e = { id: JSON.stringify(t) };
129
- return l.delete("", { params: e });
152
+ return f.delete("", { params: e });
130
153
  }
131
- }, g = i({
132
- prefix: "/v1/global-settings"
133
- }), H = {
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 = i({
154
+ }, g = p({
155
+ prefix: "/v2/hardware-tagging"
156
+ }), q = {
157
+ getAllTAG: (t) => {
158
+ const e = i(t);
159
+ return g.post("/all-tag/list", e);
160
+ },
161
+ getAllTAGOptions: (t) => {
162
+ const e = i(t);
163
+ return g.post("all-tag/options", e);
164
+ },
165
+ getNotPairedYetCounts: () => g.get("/not-paired-yet/tag-count"),
166
+ getNotPairedYetList: (t) => {
167
+ const e = i(t);
168
+ return g.post("/not-paired-yet/list", e);
169
+ },
170
+ getNotPairedYetOptions: (t) => {
171
+ const e = i(t);
172
+ return g.post("/not-paired-yet/options", e);
173
+ },
174
+ getAuditTAGDetail: (t) => g.post("/audit/detail", t),
175
+ submitAuditTAG: (t) => g.post("/audit/submit", t),
176
+ submitCombineTAG: (t) => g.post("/combine-tag/combine", t),
177
+ submitSeparateTAG: (t) => g.post("/combine-tag/separate", t),
178
+ getPairedList: (t) => {
179
+ const e = i(t);
180
+ return g.post("/paired/list", e);
181
+ },
182
+ getPairedOptions: (t) => {
183
+ const e = i(t);
184
+ return g.post("/paired/options", e);
185
+ },
186
+ getScanTag: (t) => g.get("/scan-tag", { params: { tag: t } })
187
+ }, o = p({
144
188
  prefix: "/v2/hardware-tagging"
145
189
  }), V = {
146
190
  getHandheldReader: (t) => {
147
- const e = T(t);
148
- return n.post("/handheld-reader/list", e);
149
- },
150
- getHandheldReaderDetail: (t) => n.get("/handheld-reader/".concat(t)),
151
- getHandheldReaderOptions: (t) => {
152
- const e = T(t);
153
- return n.post("/handheld-reader/options", e);
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(
159
- "/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/group"),
160
- e
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"), {
191
+ const e = i(t);
192
+ return o.post("/handheld-reader/list", e);
193
+ },
194
+ getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
195
+ getHandheldReaderOptions: (t) => o.post("/handheld-reader/options", t),
196
+ putMarkHandheldStatus: (t, e, r) => o.patch("/".concat(t, "/status"), r, { params: e }),
197
+ postPingReaders: (t) => o.post("/iot-reader/ping", t),
198
+ putMarkIOTStatus: (t, e) => o.put("/".concat(e, "/mark-status"), t),
199
+ putEditReaderGroup: (t, e, r) => o.patch("/".concat(t, "-reader/").concat(r, "/group"), e),
200
+ putEditAntennaGroup: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-group"), t),
201
+ putEditPortStatus: (t, e) => o.put("/iot-reader/".concat(e, "/set-port-status"), t),
202
+ putEditAliasName: (t, e, r) => o.patch("/".concat(t, "-reader/").concat(r, "/alias-name"), e),
203
+ postActivateHardware: (t, e) => o.post("/".concat(t, "-reader/activate"), e),
204
+ deleteHardware: (t, e) => o.delete("/".concat(t, "-reader"), {
173
205
  params: e
174
206
  }),
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({
207
+ putAntennaPower: (t, e) => o.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
208
+ getIotReader: (t) => {
209
+ const e = i({ ...t });
210
+ return o.post("/iot-reader", e);
211
+ },
212
+ getIotReaderDetail: (t) => o.get("/iot-reader/".concat(t)),
213
+ getIotReaderOptions: (t) => o.post("/iot-reader/options", t),
214
+ getIotReaderPort: (t, e) => o.post("/iot-reader/".concat(t, "/port/list"), { params: e }),
215
+ getIotReaderTablet: (t, e) => o.post("/iot-reader/".concat(t, "/tablet/list"), { params: e }),
216
+ getIotReaderTabletOptions: (t, e) => o.post("/iot-reader/".concat(t, "/tablet/options"), e),
217
+ putEditIotReader: (t, e) => o.patch("/iot-reader/".concat(t), e),
218
+ disconnectIotTablet: (t, e) => o.delete("/iot-reader/".concat(t, "/tablet"), {
219
+ data: e
220
+ }),
221
+ // TODO: Activity API spec not finished yet
222
+ getActivityLog: (t) => o.get("/activity-log", { params: t }),
223
+ getActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
224
+ getDetailActivityLog: (t) => o.get("/activity-log", { params: t }),
225
+ getDetailActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
226
+ getExistingAliasNames: () => o.get("/reader/alias-names")
227
+ }, F = p({
186
228
  env: "APP_LOGS_NOTIFICATION_API",
187
229
  prefix: "/v2"
188
- }), q = {
189
- getSessionLogList: (t) => D.get("/session-log", { params: t })
190
- }, I = i({
230
+ }), Y = {
231
+ getSessionLogList: (t) => F.get("/session-log", { params: t })
232
+ }, D = p({
191
233
  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
234
  }), 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),
235
+ getPositions: () => D.get("/position"),
236
+ getDivisions: () => D.get("/division")
237
+ }, v = p({
238
+ prefix: "/v1/global-settings/position"
239
+ }), X = {
240
+ getPositions: (t) => v.get("", { params: t }),
241
+ getPositionDetail: (t) => v.get("/".concat(t)),
242
+ postCreatePosition: (t) => v.post("/", t),
243
+ putEditPosition: (t, e) => v.put("/".concat(t), e),
202
244
  deletePositions: (t) => {
203
245
  const e = { id: JSON.stringify(t) };
204
- return c.delete("", { params: e });
246
+ return v.delete("", { params: e });
205
247
  }
206
- }, C = i({
248
+ }, G = p({
207
249
  env: "APP_TAGSAMURAI_API",
208
250
  prefix: "/tag/v2"
209
251
  }), W = {
210
- getTagInfo: (t) => C.get("/rfid-qr/scan", { params: t })
211
- }, A = i({
212
- prefix: "/v1/global-settings/change-log"
252
+ getTagInfo: (t) => G.get("/rfid-qr/scan", { params: t })
253
+ }, h = p({
254
+ prefix: "/v2/hardware-tagging"
213
255
  }), 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({
256
+ getTAGEventlog: (t) => {
257
+ const e = i(t);
258
+ return h.post("/tag-event-log/list", e);
259
+ },
260
+ getTAGEventlogOptions: (t) => {
261
+ const e = i(t);
262
+ return h.post("/tag-event-log/options", e);
263
+ },
264
+ getDetailTAGEventlog: (t) => h.get("/tag-event-log/".concat(t))
265
+ }, d = p({
218
266
  prefix: "/v1/global-settings/user"
219
267
  }), 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 }),
268
+ getUsers: (t) => d.get("", { params: t }),
269
+ getUserDetail: (t) => d.get("/".concat(t)),
270
+ getUserSystemLogs: (t, e) => d.get("/".concat(t, "/system-logs"), { params: e }),
223
271
  getUserSystemLogOptions: (t, e) => {
224
272
  const r = {};
225
- return r[e] = !0, o.get("/".concat(t, "/system-logs/options"), { params: r });
273
+ return r[e] = !0, d.get("/".concat(t, "/system-logs/options"), { params: r });
226
274
  },
227
275
  postCreateUser: (t) => {
228
276
  const e = { "Content-Type": "multipart/form-data" };
229
- return o.post("", t, { headers: e });
277
+ return d.post("", t, { headers: e });
230
278
  },
231
279
  putEditUser: (t, e) => {
232
280
  const r = { "Content-Type": "multipart/form-data" };
233
- return o.put("/".concat(t), e, { headers: r });
281
+ return d.put("/".concat(t), e, { headers: r });
234
282
  },
235
283
  deleteUsers: (t) => {
236
284
  const e = { id: JSON.stringify(t) };
237
- return o.delete("", { params: e });
285
+ return d.delete("", { params: e });
238
286
  },
239
- putToggleStatusUsers: (t) => o.put("/active-status", t),
287
+ putToggleStatusUsers: (t) => d.put("/active-status", t),
240
288
  getUserOptions: (t) => {
241
289
  const e = {};
242
- return e[t] = !0, o.get("/options", { params: e });
290
+ return e[t] = !0, d.get("/options", { params: e });
243
291
  },
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({
292
+ deleteCancelEmailChange: (t) => d.delete("/cancel-email-change/".concat(t)),
293
+ postResendEmail: (t) => d.post("/resend-email", t),
294
+ putChangePassword: (t, e) => d.put("/change-password/".concat(t), e)
295
+ }, b = p({
248
296
  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 } })
297
+ }), Z = {
298
+ getTabletList: (t) => b.post("/tablet/list", t),
299
+ getTabletOption: (t) => b.post("/tablet/options", t),
300
+ updateTabletStatus: (t, e) => b.patch("/tablet/status", e, { params: { ids: t } }),
301
+ disconnectTablet: (t) => b.patch("/tablet/disconnect-reader", { params: { ids: t } }),
302
+ deleteTablet: (t) => b.delete("/tablet", { params: { ids: t } })
303
+ }, s = p({
304
+ prefix: "/v2/iam"
305
+ }), tt = {
306
+ login: (t) => s.post("/auth/login", t),
307
+ logout: () => s.post("/auth/logout"),
308
+ verifyToken: (t) => s.get("/auth/verify-token/".concat(t)),
309
+ requestOtp: (t) => s.post("/auth/request-otp", { email: t }),
310
+ requestResetLink: (t) => s.post("/auth/request-reset-link", { email: t }),
311
+ setPassword: (t) => s.post("/auth/set-password", t),
312
+ confirmEmailChange: (t) => s.post("/auth/confirm-email-change", { token: t }),
313
+ cancelEmailChange: (t) => s.delete("/auth/cancel-email-change/".concat(t)),
314
+ getPositionList: (t) => {
315
+ const e = i(t);
316
+ return s.post("/position/list", e);
317
+ },
318
+ getPositionDetail: (t) => s.get("/position/".concat(t)),
319
+ createPosition: (t) => s.post("/position", t),
320
+ editPosition: (t, e) => s.patch("/position/".concat(t), e),
321
+ deletePosition: (t) => {
322
+ const e = { ids: JSON.stringify(t) };
323
+ return s.delete("/position", { params: e });
324
+ },
325
+ getDivisionList: (t) => {
326
+ const e = i(t);
327
+ return s.post("/division/list", e);
328
+ },
329
+ getDivisionDetail: (t) => s.get("/division/".concat(t)),
330
+ createDivision: (t) => s.post("/division", t),
331
+ editDivision: (t, e) => s.patch("/division/".concat(t), e),
332
+ deleteDivision: (t) => {
333
+ const e = { ids: JSON.stringify(t) };
334
+ return s.delete("/division", { params: e });
335
+ },
336
+ createUsers: (t) => {
337
+ const e = new FormData();
338
+ return Object.entries(t).forEach(([r, n]) => {
339
+ n != null && e.append(r, n);
340
+ }), s.post("/users", e, {
341
+ headers: { "Content-Type": "multipart/form-data" }
342
+ });
343
+ },
344
+ getGlobalUserList: (t) => {
345
+ const e = i(t);
346
+ return s.post("/users/list", e);
347
+ },
348
+ getGlobalUserOptions: (t) => {
349
+ const e = i(t);
350
+ return s.post("/users/options", e);
351
+ },
352
+ getGlobalUserDetail: (t) => s.get("/users/".concat(t)),
353
+ setActiveGlobalUser: (t, e) => {
354
+ const r = { ids: JSON.stringify(t) };
355
+ return s.patch("/users/set-active", e, { params: r });
356
+ },
357
+ editUsers: (t, e) => {
358
+ const r = new FormData();
359
+ return Object.entries(e).forEach(([n, u]) => {
360
+ u != null && r.append(n, u);
361
+ }), s.patch("/users/".concat(t), r, {
362
+ headers: { "Content-Type": "multipart/form-data" }
363
+ });
364
+ },
365
+ editUsersFcmToken: (t) => s.patch("/users/fcm-token", t),
366
+ resendActivationEmail: (t) => s.post("/users/resend-activation-email", t),
367
+ changePassword: (t, e) => s.patch("/users/".concat(t, "/change-password"), e),
368
+ deleteUsers: (t) => {
369
+ const e = { ids: JSON.stringify(t) };
370
+ return s.delete("/users", { params: e });
371
+ },
372
+ logoutModule: (t) => s.post("/auth/logout/module", t),
373
+ loginModule: (t) => s.post("/auth/login/module", t),
374
+ getConcurrentUsers: (t, e) => {
375
+ const r = e ? { "X-Module-ID": e } : {};
376
+ return s.post("/concurrent-users", t, { headers: r });
377
+ },
378
+ logoutSession: (t, e) => {
379
+ const r = e ? { "X-Module-ID": e } : {};
380
+ return s.post("/auth/logout/session", t, { headers: r });
381
+ },
382
+ getPositionDropdown: () => s.get("/position/dropdown"),
383
+ getDivisionDropdown: () => s.get("/division/dropdown"),
384
+ exportPositionTable: () => s.post("/position/list/export", {}, { responseType: "blob" }),
385
+ exportDivisionTable: () => s.post("/division/list/export", {}, { responseType: "blob" }),
386
+ exportUserTable: () => s.post("/users/list/export", {}, { responseType: "blob" }),
387
+ getCustomFieldList: (t) => {
388
+ const e = i(t);
389
+ return s.post("/custom-field/list", e);
390
+ },
391
+ getCustomFieldOptions: (t) => s.post("/custom-field/options", t),
392
+ createCustomField: (t) => s.post("/custom-field", t),
393
+ editCustomField: (t, e) => s.patch("/custom-field/".concat(t), e),
394
+ setActiveCustomField: (t, e) => {
395
+ const r = { ids: JSON.stringify(t) };
396
+ return s.patch("/custom-field/set-active", e, { params: r });
397
+ },
398
+ deleteCustomField: (t) => {
399
+ const e = { ids: JSON.stringify(t) };
400
+ return s.delete("/custom-field", { params: e });
401
+ }
402
+ }, a = p({
403
+ prefix: "/v2/import"
404
+ }), et = {
405
+ // --- Division ---
406
+ submitDivisionFile: (t) => {
407
+ const e = new FormData();
408
+ return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), a.post("/division/file", e, {
409
+ headers: { "Content-Type": "multipart/form-data" }
410
+ });
411
+ },
412
+ getDivisionList: (t) => a.post("/division/list", t),
413
+ editDivisionData: (t) => a.put("/division", t),
414
+ duplicateDivisionData: (t) => a.post("/division/".concat(t, "/duplicate")),
415
+ submitDivisionData: (t) => a.post("/division", t),
416
+ deleteDivisionData: (t) => {
417
+ const e = { ids: JSON.stringify(t.ids) };
418
+ return a.delete("/division", { params: e });
419
+ },
420
+ // --- Position ---
421
+ submitPositionFile: (t) => {
422
+ const e = new FormData();
423
+ return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), a.post("/position/file", e, {
424
+ headers: { "Content-Type": "multipart/form-data" }
425
+ });
426
+ },
427
+ getPositionList: (t) => a.post("/position/list", t),
428
+ editPositionData: (t) => a.put("/position", t),
429
+ duplicatePositionData: (t) => a.post("/position/".concat(t, "/duplicate")),
430
+ submitPositionData: (t) => a.post("/position", t),
431
+ deletePositionData: (t) => {
432
+ const e = { ids: JSON.stringify(t.ids) };
433
+ return a.delete("/position", { params: e });
434
+ },
435
+ // --- User ---
436
+ submitUserFile: (t) => {
437
+ const e = new FormData();
438
+ return e.append("data", t.data), t.isFirstRowHeading !== void 0 && e.append("isFirstRowHeading", String(t.isFirstRowHeading)), t.columnMapping && e.append("columnMapping", t.columnMapping), a.post("/user/file", e, {
439
+ headers: { "Content-Type": "multipart/form-data" }
440
+ });
441
+ },
442
+ getUserList: (t) => a.post("/user/list", t),
443
+ editUserData: (t) => a.put("/user", t),
444
+ duplicateUserData: (t) => a.post("/user/".concat(t, "/duplicate")),
445
+ submitUserData: (t) => a.post("/user", t),
446
+ deleteUserData: (t) => {
447
+ const e = { ids: JSON.stringify(t.ids) };
448
+ return a.delete("/user", { params: e });
449
+ }
255
450
  };
256
451
  export {
257
- B as AuthServices,
258
- J as ChangelogServices,
259
- M as DivisionServices,
260
- H as GlobalTagServices,
452
+ k as AuthServices,
453
+ j as ChangelogServices,
454
+ B as DivisionServices,
455
+ q as GlobalTagServices,
261
456
  V as HardwareServices,
262
- q as LogServices,
263
- F as OptionServices,
264
- z as PositionServices,
265
- X as TabletServices,
457
+ tt as IamServices,
458
+ et as ImportServices,
459
+ Y as LogServices,
460
+ z as OptionServices,
461
+ X as PositionServices,
462
+ Z as TabletServices,
266
463
  K as TagEventlogServices,
267
464
  W as TagServices,
268
465
  Q as UserServices,
269
- b as getBaseURL,
270
- k as getImageURL,
271
- j as queryParamsStringfy
466
+ w as getBaseURL,
467
+ H as getImageURL,
468
+ J as queryParamsStringfy
272
469
  };
package/main.d.ts CHANGED
@@ -10,4 +10,6 @@ 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';
14
+ export { default as ImportServices } from './src/services/import.service';
13
15
  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.4",
3
+ "version": "2.0.1-alpha.41",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",