@tagsamurai/gsts-api-services 2.0.1-alpha.10 → 2.0.1-alpha.11

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.
@@ -2,66 +2,66 @@ import E from "axios";
2
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: n = "",
5
+ prefix: o = "",
6
6
  headers: i = {},
7
- ...c
8
- } = t, O = "".concat(I(r)).concat(n), h = E.create({
9
- ...c,
7
+ ...l
8
+ } = t, O = "".concat(I(r)).concat(o), A = E.create({
9
+ ...l,
10
10
  baseURL: O,
11
11
  headers: e ? i : {
12
12
  "Content-Type": "application/json",
13
13
  ...i
14
14
  }
15
15
  });
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 : "";
16
+ return A.interceptors.request.use((m) => {
17
+ var P, y, S;
18
+ const b = JSON.parse((P = localStorage.getItem("user")) != null ? P : "{}"), w = (S = (y = b.jwt) != null ? y : b.token) != null ? S : "";
19
19
  return m.headers.Authorization = "Bearer ".concat(w), m;
20
- }), h;
21
- }, p = a({
20
+ }), A;
21
+ }, g = a({
22
22
  prefix: "/v1/global-settings/auth"
23
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);
24
+ var e, r, o, i;
25
+ return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((i = (o = t.response) == null ? void 0 : o.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
26
  }, j = {
27
27
  login: (t) => {
28
28
  const e = { ...t, isMobile: !1 };
29
- return p.post("/login", e);
29
+ return g.post("/login", e);
30
30
  },
31
- reLogin: (t) => (p.interceptors.response.use((e) => e, U), p.post("/login", t)),
31
+ reLogin: (t) => (g.interceptors.response.use((e) => e, U), g.post("/login", t)),
32
32
  requestOTP: (t) => {
33
33
  const e = { email: t };
34
- return p.post("/request-otp", e);
34
+ return g.post("/request-otp", e);
35
35
  },
36
36
  requestResetPassLink: (t) => {
37
37
  const e = { email: t };
38
- return p.post("/request-reset-link", e);
38
+ return g.post("/request-reset-link", e);
39
39
  },
40
- setPassword: (t) => p.post("/set-password", t),
41
- verifyToken: (t) => p.get("/verify-token/".concat(t)),
40
+ setPassword: (t) => g.post("/set-password", t),
41
+ verifyToken: (t) => g.get("/verify-token/".concat(t)),
42
42
  confirmEmailChange: (t) => {
43
43
  const e = { token: t };
44
- return p.put("/confirm-email-change/confirm", e);
44
+ return g.put("/confirm-email-change/confirm", e);
45
45
  },
46
- postLogout: () => p.post("/logout"),
46
+ postLogout: () => g.post("/logout"),
47
47
  /**
48
48
  *
49
49
  * @deprecated use postLogout instead
50
50
  */
51
- logout: () => p.post("/logout")
51
+ logout: () => g.post("/logout")
52
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(/^\/+/, ""));
53
+ const o = new URL(I("APP_TAGSAMURAI_API") || "").origin;
54
+ let i = t.startsWith("http") ? t : "".concat(o, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
55
55
  if (e || r) {
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());
56
+ const l = new URLSearchParams();
57
+ e && (l.set("width", e.toString()), l.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(l.toString());
58
58
  }
59
59
  return i;
60
60
  }, L = () => {
61
- var e, r, n;
61
+ var e, r, o;
62
62
  const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
63
- return (n = (r = t.jwt) != null ? r : t.token) != null ? n : "";
64
- }, G = async (t, e) => {
63
+ return (o = (r = t.jwt) != null ? r : t.token) != null ? o : "";
64
+ }, R = async (t, e) => {
65
65
  const r = await fetch(t, {
66
66
  headers: {
67
67
  Authorization: "Bearer ".concat(e)
@@ -69,21 +69,21 @@ const D = { 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 n = await r.arrayBuffer();
73
- return new Blob([n], {
72
+ const o = await r.arrayBuffer();
73
+ return new Blob([o], {
74
74
  type: r.headers.get("Content-Type") || "image/webp"
75
75
  });
76
- }, R = async (t) => {
76
+ }, G = async (t) => {
77
77
  try {
78
- const e = L(), r = await G(t, e);
78
+ const e = L(), r = await R(t, e);
79
79
  return URL.createObjectURL(r);
80
80
  } catch (e) {
81
81
  return;
82
82
  }
83
- }, B = async (t, e, r, n) => {
83
+ }, B = async (t, e, r, o) => {
84
84
  if (!t) return;
85
85
  const i = _(t, e, r);
86
- return n ? i : R(i);
86
+ return o ? i : G(i);
87
87
  }, J = (t) => {
88
88
  if (!t || typeof t == "string")
89
89
  return;
@@ -104,19 +104,19 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
104
104
  } catch (r) {
105
105
  return !1;
106
106
  }
107
- }, l = (t) => {
107
+ }, p = (t) => {
108
108
  if (!t)
109
109
  return {};
110
110
  const e = {};
111
111
  return Object.keys(t).forEach((r) => {
112
- const n = t[r];
113
- e[r] = x(n) ? JSON.parse(n.trim()) : n;
112
+ const o = t[r];
113
+ e[r] = x(o) ? JSON.parse(o.trim()) : o;
114
114
  }), e;
115
- }, S = a({
115
+ }, T = a({
116
116
  prefix: "/v1/global-settings/change-log"
117
117
  }), M = {
118
- getChangelogs: (t) => S.get("", { params: t }),
119
- getChangelogOptions: (t) => S.get("/options", { params: t })
118
+ getChangelogs: (t) => T.get("", { params: t }),
119
+ getChangelogOptions: (t) => T.get("/options", { params: t })
120
120
  }, d = a({
121
121
  prefix: "/v1/global-settings/division"
122
122
  }), q = {
@@ -128,73 +128,85 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
128
128
  const e = { id: JSON.stringify(t) };
129
129
  return d.delete("", { params: e });
130
130
  }
131
- }, g = a({
132
- prefix: "/v1/global-settings"
131
+ }, c = a({
132
+ prefix: "/v2/hardware-tagging"
133
133
  }), F = {
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
- }, o = a({
134
+ getAllTAG: (t, e) => {
135
+ const r = p(e);
136
+ return c.post("/".concat(t), r);
137
+ },
138
+ getAllTAGOptions: (t, e) => {
139
+ const r = p(e);
140
+ return c.post("/".concat(t, "/options"), r);
141
+ },
142
+ getNotPairedYetCounts: () => c.get("/not-paired-yet/tag-count"),
143
+ getNotPairedYetList: (t) => {
144
+ const e = p(t);
145
+ return c.post("/not-paired-yet/list", e);
146
+ },
147
+ getNotPairedYetOptions: (t) => {
148
+ const e = p(t);
149
+ return c.post("/not-paired-yet/options", e);
150
+ },
151
+ getAuditTAGDetail: (t) => c.post("/audit/detail", t),
152
+ submitAuditTAG: (t) => c.post("/audit/submit", t),
153
+ submitCombineTAG: (t) => c.post("/combine-tag/combine", t),
154
+ submitSeparateTAG: (t) => c.post("/combine-tag/separate", t)
155
+ }, n = a({
144
156
  prefix: "/v2/hardware-tagging"
145
157
  }), H = {
146
158
  getHandheldReader: (t) => {
147
- const e = l(t);
148
- return o.post("/handheld-reader/list", e);
159
+ const e = p(t);
160
+ return n.post("/handheld-reader/list", e);
149
161
  },
150
- getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
162
+ getHandheldReaderDetail: (t) => n.get("/handheld-reader/".concat(t)),
151
163
  getHandheldReaderOptions: (t) => {
152
- const e = l(t);
153
- return o.post("/handheld-reader/options", e);
164
+ const e = p(t);
165
+ return n.post("/handheld-reader/options", e);
154
166
  },
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(
167
+ putMarkHandheldStatus: (t) => n.patch("/handheld-reader/status", t),
168
+ putPingReaders: (t) => n.put("/iot-reader/ping", t),
169
+ putMarkIOTStatus: (t, e) => n.put("/".concat(e, "/mark-status"), t),
170
+ putEditReaderGroup: (t, e, r) => n.patch(
159
171
  "/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/group"),
160
172
  e
161
173
  ),
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(
174
+ putEditAntennaGroup: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-group"), t),
175
+ putEditPortStatus: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-status"), t),
176
+ putEditAliasName: (t, e, r) => n.patch(
165
177
  "/".concat(t === "iot" ? "iot-" : "handheld-", "reader/").concat(r, "/alias-name"),
166
178
  e
167
179
  ),
168
- postActivateHardware: (t, e) => o.post(
180
+ postActivateHardware: (t, e) => n.post(
169
181
  "/".concat(t === "iot" ? "iot-" : "handheld-", "reader/activate"),
170
182
  e
171
183
  ),
172
- deleteHardware: (t, e) => o.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
184
+ deleteHardware: (t, e) => n.delete("/".concat(t === "iot" ? "iot-" : "handheld-", "-reader"), {
173
185
  params: e
174
186
  }),
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 })
187
+ putAntennaPower: (t, e) => n.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
188
+ getIOTReaderOrAntenna: (t, e) => n.get("/".concat(t), { params: e }),
189
+ getIOTReaderDetail: (t) => n.get("/iot-reader/".concat(t)),
190
+ getIOTReaderOrAntennaOptions: (t, e) => n.get("/".concat(t, "/options"), { params: e }),
191
+ getActivityLog: (t) => n.get("/activity-log", { params: t }),
192
+ getActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
193
+ getDetailActivityLog: (t) => n.get("/activity-log", { params: t }),
194
+ getDetailActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
195
+ getExistingAliasNames: () => n.get("/reader/alias-names"),
196
+ getIotReaderPort: (t, e) => n.get("/iot-reader/".concat(t, "/ports"), { params: e })
185
197
  }, C = a({
186
198
  env: "APP_LOGS_NOTIFICATION_API",
187
199
  prefix: "/v2"
188
200
  }), V = {
189
201
  getSessionLogList: (t) => C.get("/session-log", { params: t })
190
- }, y = a({
202
+ }, $ = a({
191
203
  prefix: "/v1/global-settings/option"
192
- }), z = {
193
- getPositions: () => y.get("/position"),
194
- getDivisions: () => y.get("/division")
204
+ }), Y = {
205
+ getPositions: () => $.get("/position"),
206
+ getDivisions: () => $.get("/division")
195
207
  }, v = a({
196
208
  prefix: "/v1/global-settings/position"
197
- }), X = {
209
+ }), z = {
198
210
  getPositions: (t) => v.get("", { params: t }),
199
211
  getPositionDetail: (t) => v.get("/".concat(t)),
200
212
  postCreatePosition: (t) => v.post("/", t),
@@ -206,17 +218,23 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
206
218
  }, N = a({
207
219
  env: "APP_TAGSAMURAI_API",
208
220
  prefix: "/tag/v2"
209
- }), W = {
221
+ }), X = {
210
222
  getTagInfo: (t) => N.get("/rfid-qr/scan", { params: t })
211
223
  }, f = a({
212
- prefix: "/v1/global-settings/change-log"
213
- }), K = {
214
- getTAGEventlog: (t) => f.get("/tag-event-log", { params: t }),
215
- getTAGEventlogOptions: (t) => f.get("/tag-event-log/options", { params: t }),
224
+ prefix: "/v2/hardware-tagging"
225
+ }), W = {
226
+ getTAGEventlog: (t) => {
227
+ const e = p(t);
228
+ return f.post("/tag-event-log/list", e);
229
+ },
230
+ getTAGEventlogOptions: (t) => {
231
+ const e = p(t);
232
+ return f.post("/tag-event-log/options", e);
233
+ },
216
234
  getDetailTAGEventlog: (t) => f.get("/tag-event-log/".concat(t))
217
235
  }, u = a({
218
236
  prefix: "/v1/global-settings/user"
219
- }), Q = {
237
+ }), K = {
220
238
  getUsers: (t) => u.get("", { params: t }),
221
239
  getUserDetail: (t) => u.get("/".concat(t)),
222
240
  getUserSystemLogs: (t, e) => u.get("/".concat(t, "/system-logs"), { params: e }),
@@ -244,14 +262,14 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
244
262
  deleteCancelEmailChange: (t) => u.delete("/cancel-email-change/".concat(t)),
245
263
  postResendEmail: (t) => u.post("/resend-email", t),
246
264
  putChangePassword: (t, e) => u.put("/change-password/".concat(t), e)
247
- }, A = a({
265
+ }, h = a({
248
266
  prefix: "/v2/hardware-tagging"
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 } })
267
+ }), Q = {
268
+ getTabletList: (t) => h.post("/tablet/list", t),
269
+ getTabletOption: (t) => h.post("/tablet/options", t),
270
+ updateTabletStatus: (t, e) => h.patch("/tablet/status", e, { params: { ids: t } }),
271
+ disconnectTablet: (t) => h.patch("/tablet/disconnect-reader", { params: { ids: t } }),
272
+ deleteTablet: (t) => h.delete("/tablet", { params: { ids: t } })
255
273
  }, s = a({
256
274
  prefix: "/v2/iam"
257
275
  }), Z = {
@@ -264,7 +282,7 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
264
282
  confirmEmailChange: (t) => s.post("/auth/confirm-email-change", { token: t }),
265
283
  cancelEmailChange: (t) => s.delete("/auth/cancel-email-change/".concat(t)),
266
284
  getPositionList: (t) => {
267
- const e = l(t);
285
+ const e = p(t);
268
286
  return s.post("/position/list", e);
269
287
  },
270
288
  getPositionDetail: (t) => s.get("/position/".concat(t)),
@@ -275,7 +293,7 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
275
293
  return s.delete("/position", { params: e });
276
294
  },
277
295
  getDivisionList: (t) => {
278
- const e = l(t);
296
+ const e = p(t);
279
297
  return s.post("/division/list", e);
280
298
  },
281
299
  getDivisionDetail: (t) => s.get("/division/".concat(t)),
@@ -287,18 +305,18 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
287
305
  },
288
306
  createUsers: (t) => {
289
307
  const e = new FormData();
290
- return Object.entries(t).forEach(([r, n]) => {
291
- n != null && e.append(r, n);
308
+ return Object.entries(t).forEach(([r, o]) => {
309
+ o != null && e.append(r, o);
292
310
  }), s.post("/users", e, {
293
311
  headers: { "Content-Type": "multipart/form-data" }
294
312
  });
295
313
  },
296
314
  getGlobalUserList: (t) => {
297
- const e = l(t);
315
+ const e = p(t);
298
316
  return s.post("/users/list", e);
299
317
  },
300
318
  getGlobalUserOptions: (t) => {
301
- const e = l(t);
319
+ const e = p(t);
302
320
  return s.post("/users/options", e);
303
321
  },
304
322
  getGlobalUserDetail: (t) => s.get("/users/".concat(t)),
@@ -308,8 +326,8 @@ const D = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
308
326
  },
309
327
  editUsers: (t, e) => {
310
328
  const r = new FormData();
311
- return Object.entries(e).forEach(([n, i]) => {
312
- i != null && r.append(n, i);
329
+ return Object.entries(e).forEach(([o, i]) => {
330
+ i != null && r.append(o, i);
313
331
  }), s.patch("/users/".concat(t), r, {
314
332
  headers: { "Content-Type": "multipart/form-data" }
315
333
  });
@@ -345,12 +363,12 @@ export {
345
363
  H as HardwareServices,
346
364
  Z as IamServices,
347
365
  V as LogServices,
348
- z as OptionServices,
349
- X as PositionServices,
350
- Y as TabletServices,
351
- K as TagEventlogServices,
352
- W as TagServices,
353
- Q as UserServices,
366
+ Y as OptionServices,
367
+ z as PositionServices,
368
+ Q as TabletServices,
369
+ W as TagEventlogServices,
370
+ X as TagServices,
371
+ K as UserServices,
354
372
  I as getBaseURL,
355
373
  B as getImageURL,
356
374
  J as queryParamsStringfy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "2.0.1-alpha.10",
3
+ "version": "2.0.1-alpha.11",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -1,5 +1,6 @@
1
1
  import { AntennaPortDetail, HardwareDataType, HardwareDetailDataType } from '../types/hardware.type';
2
2
  import { MultiSelectOption } from '../types/options.type';
3
+ type TAG = 'RFID' | 'NFC';
3
4
  export interface HardwareFetchResponse<T = HardwareDataType> {
4
5
  message: string;
5
6
  status: number;
@@ -105,3 +106,55 @@ export interface PutHardwareStatusBody {
105
106
  ids?: string[];
106
107
  }
107
108
  export type HardwareFormType = PutEditAliasName | PutEditAntennaGroup | PutEditAntennaPower | PutHardwareStatusBody | PutEditReaderGroup;
109
+ export type GetAllTAGParams = {
110
+ page?: number;
111
+ limit?: number;
112
+ search?: string;
113
+ sortBy?: string;
114
+ sortOrder?: number;
115
+ column?: string[];
116
+ tagType?: string[];
117
+ rfidSku?: string[];
118
+ nfcSku?: string[];
119
+ type?: string[];
120
+ status?: string[];
121
+ lastScanned?: string[];
122
+ };
123
+ export type GetAllTAGOptionsQuery = {
124
+ tagTypeOptions?: boolean;
125
+ rfidSkuOptions?: boolean;
126
+ nfcSkuOptions?: boolean;
127
+ typeOptions?: boolean;
128
+ statusOptions?: boolean;
129
+ lastScannedOptions?: boolean;
130
+ };
131
+ export type GetNotPairedYetListParams = GetAllTAGParams & {
132
+ tag?: TAG;
133
+ };
134
+ export type GetNotPairedYetOptions = {
135
+ tag?: TAG;
136
+ tagTypeOptions?: boolean;
137
+ rfidSkuOptions?: boolean;
138
+ nfcSkuOptions?: boolean;
139
+ typeOptions?: boolean;
140
+ statusOptions?: boolean;
141
+ lastScannedOptions?: boolean;
142
+ };
143
+ type TAGIds = {
144
+ data: [
145
+ {
146
+ rfidId: string;
147
+ nfcId: string;
148
+ qrId: string;
149
+ }
150
+ ];
151
+ };
152
+ export type GetAuditTAGDetailParams = TAGIds;
153
+ export type SubmitAuditTAGBody = TAGIds & {
154
+ markNotFoundAsDamagedMissing: boolean;
155
+ };
156
+ export type SubmitCombineTAGBody = TAGIds & {
157
+ tagType: 'RFID & QR';
158
+ };
159
+ export type SubmitSeparateTAGBody = TAGIds;
160
+ export {};
@@ -1,11 +1,18 @@
1
1
  import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
2
2
  import { MultiSelectOption } from '../types/options.type';
3
- import { ApplicationModule, TAGType } from '../types/tag.type';
4
- import { TAGDetailCount, TAGEventlogData } from '../types/tagEventlog.type';
3
+ import { TAGEventlogData } from '../types/tagEventlog.type';
5
4
  export interface TAGEventlogFilterQuery {
6
- status?: string[];
7
- modifiedBy?: number[];
8
- type?: TAGType;
5
+ page?: number;
6
+ limit?: number;
7
+ search?: string;
8
+ sortBy?: string;
9
+ sortOrder?: number;
10
+ column?: string[];
11
+ type?: string;
12
+ createdAt?: string[];
13
+ action?: string[];
14
+ module?: string[];
15
+ modifiedBy?: string[];
9
16
  }
10
17
  export type TAGEventlogFetchResponse = FetchListResponse<TAGEventlogData>;
11
18
  export type TAGEventlogFetchOptionResponse = FetchOptionResponse<{
@@ -15,8 +22,33 @@ export type TAGEventlogDetailResponse = {
15
22
  status: number;
16
23
  message: string;
17
24
  data: {
18
- type: 'Audit' | 'Allocation';
19
- module?: ApplicationModule;
20
- detail: TAGDetailCount[];
25
+ auditDate: string;
26
+ found: {
27
+ total: number;
28
+ qr: number;
29
+ rfid: number;
30
+ nfc: number;
31
+ rfidNfc: number;
32
+ rfidQr: number;
33
+ nfcQr: number;
34
+ rfidNfcQr: number;
35
+ };
36
+ notFound: {
37
+ total: number;
38
+ qr: number;
39
+ rfid: number;
40
+ nfc: number;
41
+ rfidNfc: number;
42
+ rfidQr: number;
43
+ nfcQr: number;
44
+ rfidNfcQr: number;
45
+ };
46
+ markNotFoundAsDamagedMissing: boolean;
21
47
  };
22
48
  };
49
+ export type GetTAGEventLogOptionsBody = {
50
+ type: 'Audit TAG' | 'Combine & Separate TAG';
51
+ modifiedByOptions: boolean;
52
+ actionOptions: boolean;
53
+ moduleOptions: boolean;
54
+ };
@@ -1,26 +1,22 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { BooleanOptions } from '../dto/dataTable.dto';
3
- import { HardwareFilterQuery } from '../dto/hardware.dto';
4
- import { PUTAllocateTAGBody, PUTAuditTAGBody, PUTCombineTAGBody, TAGDetailAuditResponse, TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
5
- import { FetchResponse } from '../types/fetchResponse.type';
2
+ import { GetAllTAGOptionsQuery, GetAllTAGParams, GetAuditTAGDetailParams, GetNotPairedYetListParams, GetNotPairedYetOptions, SubmitAuditTAGBody, SubmitCombineTAGBody, SubmitSeparateTAGBody } from '../dto/hardware.dto';
3
+ import { TAGFetchOptionResponse } from '../dto/tag.dto';
4
+ import { FetchDetailResponse } from '../types/fetchResponse.type';
6
5
  import { TAGType } from '../types/tag.type';
6
+ import { AuditTAGDetailResponse, NotPairedYetCounts, TAGResponseType } from '../types/hardware.type';
7
7
  declare const GlobalTagServices: {
8
- getTAGAllPaired: (tagType: TAGType, params?: HardwareFilterQuery) => Promise<AxiosResponse<TAGFetchResponse>>;
9
- getTAGAllPairedOptions: (tagType: TAGType, params?: BooleanOptions) => Promise<AxiosResponse<{
8
+ getAllTAG: (tagType: TAGType, params?: GetAllTAGParams) => Promise<AxiosResponse<FetchDetailResponse<TAGResponseType>>>;
9
+ getAllTAGOptions: (tagType: TAGType, params?: GetAllTAGOptionsQuery) => Promise<AxiosResponse<{
10
10
  data: TAGFetchOptionResponse;
11
11
  }>>;
12
- getTAGNotPaired: (tagType: TAGType, params?: HardwareFilterQuery) => Promise<AxiosResponse<TAGFetchResponse>>;
13
- getTAGNotPairedOptions: (tagType: TAGType, params?: BooleanOptions) => Promise<AxiosResponse<{
12
+ getNotPairedYetCounts: () => Promise<AxiosResponse<NotPairedYetCounts>>;
13
+ getNotPairedYetList: (params?: GetNotPairedYetListParams) => Promise<AxiosResponse<FetchDetailResponse<TAGResponseType>>>;
14
+ getNotPairedYetOptions: (params?: GetNotPairedYetOptions) => Promise<AxiosResponse<{
14
15
  data: TAGFetchOptionResponse;
15
16
  }>>;
16
- getScanTAG: (tagType: TAGType, params?: {
17
- tag: string;
18
- }) => Promise<AxiosResponse>;
19
- putDetailAuditTAG: (tagType: TAGType, body: {
20
- ids: string[];
21
- }) => Promise<AxiosResponse<TAGDetailAuditResponse>>;
22
- putAuditTAG: (tagType: TAGType, body: PUTAuditTAGBody) => Promise<AxiosResponse<FetchResponse>>;
23
- putAllocateTAG: (tagType: TAGType, body: PUTAllocateTAGBody) => Promise<AxiosResponse<FetchResponse>>;
24
- putCombineTAG: (body: PUTCombineTAGBody) => Promise<AxiosResponse<FetchResponse>>;
17
+ getAuditTAGDetail: (params?: GetAuditTAGDetailParams) => Promise<AxiosResponse<AuditTAGDetailResponse>>;
18
+ submitAuditTAG: (body: SubmitAuditTAGBody) => Promise<AxiosResponse>;
19
+ submitCombineTAG: (body: SubmitCombineTAGBody) => Promise<AxiosResponse>;
20
+ submitSeparateTAG: (body: SubmitSeparateTAGBody) => Promise<AxiosResponse>;
25
21
  };
26
22
  export default GlobalTagServices;
@@ -1,9 +1,8 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { BooleanOptions } from '../dto/dataTable.dto';
3
- import { TAGEventlogDetailResponse, TAGEventlogFetchOptionResponse, TAGEventlogFetchResponse, TAGEventlogFilterQuery } from '../dto/tagEventlog.dto';
2
+ import { GetTAGEventLogOptionsBody, TAGEventlogDetailResponse, TAGEventlogFetchOptionResponse, TAGEventlogFetchResponse, TAGEventlogFilterQuery } from '../dto/tagEventlog.dto';
4
3
  declare const TagEventlogServices: {
5
4
  getTAGEventlog: (params?: TAGEventlogFilterQuery) => Promise<AxiosResponse<TAGEventlogFetchResponse>>;
6
- getTAGEventlogOptions: (params?: BooleanOptions) => Promise<AxiosResponse<TAGEventlogFetchOptionResponse>>;
5
+ getTAGEventlogOptions: (params?: GetTAGEventLogOptionsBody) => Promise<AxiosResponse<TAGEventlogFetchOptionResponse>>;
7
6
  getDetailTAGEventlog: (eventlogId?: string) => Promise<AxiosResponse<TAGEventlogDetailResponse>>;
8
7
  };
9
8
  export default TagEventlogServices;
@@ -1,3 +1,4 @@
1
+ import { FetchResponse } from './fetchResponse.type';
1
2
  export type HardwareTabType = 'activity-log' | 'handheld-damaged-missing' | 'handheld' | 'iot-reader' | 'iot-antenna' | 'iot-damaged-missing-reader' | 'iot-damaged-missing-antenna';
2
3
  export type HardwareDetailTabType = 'All' | 'Tagging' | 'User' | 'Antenna' | 'Changelog';
3
4
  export type ModuleGroup = {
@@ -86,3 +87,50 @@ export interface HardwareDetailUserActivity {
86
87
  newValue?: string;
87
88
  modifiedBy?: string;
88
89
  }
90
+ export type TAGResponseType = {
91
+ _id: string;
92
+ rfidCode: string | null;
93
+ nfcCode: string | null;
94
+ qrCode: string | null;
95
+ tagType: string;
96
+ rfidSku: string | null;
97
+ nfcSku: string | null;
98
+ type: string;
99
+ status: string;
100
+ lastScanned: string;
101
+ };
102
+ export type NotPairedYetCounts = {
103
+ rfid: {
104
+ available: number;
105
+ damagedMissing: number;
106
+ };
107
+ nfc: {
108
+ available: number;
109
+ damagedMissing: number;
110
+ };
111
+ };
112
+ export type AuditTAGDetailResponse = FetchResponse & {
113
+ data: AuditTAGDetail;
114
+ };
115
+ export type AuditTAGDetail = {
116
+ found: {
117
+ total: number;
118
+ qr: number;
119
+ rfid: number;
120
+ nfc: number;
121
+ rfidNfc: number;
122
+ rfidQr: number;
123
+ nfcQr: number;
124
+ rfidNfcQr: number;
125
+ };
126
+ notFound: {
127
+ total: number;
128
+ qr: number;
129
+ rfid: number;
130
+ nfc: number;
131
+ rfidNfc: number;
132
+ rfidQr: number;
133
+ nfcQr: number;
134
+ rfidNfcQr: number;
135
+ };
136
+ };