@tagsamurai/gsts-api-services 2.0.1-alpha.42 → 2.0.1-alpha.44

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,34 +1,34 @@
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) => {
1
+ import R 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" }, O = (t = "APP_TAGSAMURAI_API") => E["VITE_" + t], u = (t = {}, e = !1) => {
3
3
  const {
4
4
  env: r = "APP_GLOBAL_SETTINGS_API",
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 : {
5
+ prefix: i = "",
6
+ headers: p = {},
7
+ ...f
8
+ } = t, U = "".concat(O(r)).concat(i), P = R.create({
9
+ ...f,
10
+ baseURL: U,
11
+ headers: e ? p : {
12
12
  "Content-Type": "application/json",
13
- ...u
13
+ ...p
14
14
  }
15
15
  });
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({
16
+ return P.interceptors.request.use((y) => {
17
+ var T, $, D;
18
+ const S = JSON.parse((T = localStorage.getItem("user")) != null ? T : "{}"), L = (D = ($ = S.jwt) != null ? $ : S.token) != null ? D : "";
19
+ return y.headers.Authorization = "Bearer ".concat(L), y;
20
+ }), P;
21
+ }, l = u({
22
22
  prefix: "/v1/global-settings/auth"
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 = {
23
+ }), _ = (t) => {
24
+ var e, r, i, p;
25
+ return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((p = (i = t.response) == null ? void 0 : i.data) == null ? void 0 : p.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
29
  return l.post("/login", e);
30
30
  },
31
- reLogin: (t) => (l.interceptors.response.use((e) => e, R), l.post("/login", t)),
31
+ reLogin: (t) => (l.interceptors.response.use((e) => e, _), l.post("/login", t)),
32
32
  requestOTP: (t) => {
33
33
  const e = { email: t };
34
34
  return l.post("/request-otp", e);
@@ -49,19 +49,19 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
49
49
  * @deprecated use postLogout instead
50
50
  */
51
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(/^\/+/, ""));
52
+ }, C = (t, e, r) => {
53
+ const i = new URL(O("APP_TAGSAMURAI_API") || "").origin;
54
+ let p = t.startsWith("http") ? t : "".concat(i, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
55
55
  if (e || r) {
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());
56
+ const f = new URLSearchParams();
57
+ e && (f.set("width", e.toString()), f.set("height", (r == null ? void 0 : r.toString()) || e.toString())), p += "?".concat(f.toString());
58
58
  }
59
- return u;
60
- }, _ = () => {
61
- var e, r, n;
59
+ return p;
60
+ }, F = () => {
61
+ var e, r, i;
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
- }, C = async (t, e) => {
63
+ return (i = (r = t.jwt) != null ? r : t.token) != null ? i : "";
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 L = { 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 i = await r.arrayBuffer();
73
+ return new Blob([i], {
74
74
  type: r.headers.get("Content-Type") || "image/webp"
75
75
  });
76
- }, N = async (t) => {
76
+ }, G = async (t) => {
77
77
  try {
78
- const e = _(), r = await C(t, e);
78
+ const e = F(), r = await x(t, e);
79
79
  return URL.createObjectURL(r);
80
80
  } catch (e) {
81
81
  return;
82
82
  }
83
- }, H = async (t, e, r, n) => {
83
+ }, j = async (t, e, r, i) => {
84
84
  if (!t) return;
85
- const u = E(t, e, r);
86
- return n ? u : N(u);
87
- }, J = (t) => {
85
+ const p = C(t, e, r);
86
+ return i ? p : G(p);
87
+ }, B = (t) => {
88
88
  if (!t || typeof t == "string")
89
89
  return;
90
90
  const e = {};
@@ -95,7 +95,7 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
95
95
  [r]: t[r]
96
96
  });
97
97
  }), e;
98
- }, x = (t) => {
98
+ }, N = (t) => {
99
99
  if (typeof t != "string") return !1;
100
100
  const e = t.trim();
101
101
  if (!e) return !1;
@@ -104,71 +104,71 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
104
104
  } catch (r) {
105
105
  return !1;
106
106
  }
107
- }, i = (t) => {
107
+ }, n = (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 i = t[r];
113
+ e[r] = N(i) ? JSON.parse(i.trim()) : i;
114
114
  }), e;
115
- }, c = p({
115
+ }, c = u({
116
116
  prefix: "/v2/analytics-reporting"
117
- }), j = {
117
+ }), q = {
118
118
  getChangelogs: (t) => {
119
- const e = i(t);
119
+ const e = n(t);
120
120
  return c.post("/change-log/list", e);
121
121
  },
122
122
  getChangelogOptions: (t) => c.post("/change-log/options", t),
123
123
  getSessionList: (t) => {
124
- const e = i(t);
124
+ const e = n(t);
125
125
  return c.post("/session-log/list", e);
126
126
  },
127
127
  getSessionOptions: (t) => c.post("/session-log/options", t),
128
128
  getHardwareChangelogs: (t) => {
129
- const e = i(t);
129
+ const e = n(t);
130
130
  return c.post("/hardware-change-log/list", e);
131
131
  },
132
132
  getHardwareOptions: (t) => c.post("/hardware-change-log/options", t),
133
133
  getTaggingList: (t) => {
134
- const e = i(t);
134
+ const e = n(t);
135
135
  return c.post("/reader-tagging-log/list", e);
136
136
  },
137
137
  getTaggingOptions: (t) => c.post("/reader-tagging-log/options", t),
138
138
  getUserTagList: (t) => {
139
- const e = i(t);
139
+ const e = n(t);
140
140
  return c.post("/reader-user-tag-log/list", e);
141
141
  },
142
142
  getUserTagOptions: (t) => c.post("/reader-user-tag-log/options", t)
143
- }, f = p({
143
+ }, v = u({
144
144
  prefix: "/v1/global-settings/division"
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),
145
+ }), V = {
146
+ getDivisions: (t) => v.get("", { params: t }),
147
+ getDivisionDetail: (t) => v.get("/".concat(t)),
148
+ postCreateDivision: (t) => v.post("/", t),
149
+ putEditDivision: (t, e) => v.put("/".concat(t), e),
150
150
  deleteDivisions: (t) => {
151
151
  const e = { id: JSON.stringify(t) };
152
- return f.delete("", { params: e });
152
+ return v.delete("", { params: e });
153
153
  }
154
- }, g = p({
154
+ }, g = u({
155
155
  prefix: "/v2/hardware-tagging"
156
- }), q = {
156
+ }), Y = {
157
157
  getAllTAG: (t) => {
158
- const e = i(t);
158
+ const e = n(t);
159
159
  return g.post("/all-tag/list", e);
160
160
  },
161
161
  getAllTAGOptions: (t) => {
162
- const e = i(t);
162
+ const e = n(t);
163
163
  return g.post("all-tag/options", e);
164
164
  },
165
165
  getNotPairedYetCounts: () => g.get("/not-paired-yet/tag-count"),
166
166
  getNotPairedYetList: (t) => {
167
- const e = i(t);
167
+ const e = n(t);
168
168
  return g.post("/not-paired-yet/list", e);
169
169
  },
170
170
  getNotPairedYetOptions: (t) => {
171
- const e = i(t);
171
+ const e = n(t);
172
172
  return g.post("/not-paired-yet/options", e);
173
173
  },
174
174
  getAuditTAGDetail: (t) => g.post("/audit/detail", t),
@@ -176,19 +176,19 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
176
176
  submitCombineTAG: (t) => g.post("/combine-tag/combine", t),
177
177
  submitSeparateTAG: (t) => g.post("/combine-tag/separate", t),
178
178
  getPairedList: (t) => {
179
- const e = i(t);
179
+ const e = n(t);
180
180
  return g.post("/paired/list", e);
181
181
  },
182
182
  getPairedOptions: (t) => {
183
- const e = i(t);
183
+ const e = n(t);
184
184
  return g.post("/paired/options", e);
185
185
  },
186
186
  getScanTag: (t) => g.get("/scan-tag", { params: { tag: t } })
187
- }, o = p({
187
+ }, o = u({
188
188
  prefix: "/v2/hardware-tagging"
189
- }), V = {
189
+ }), z = {
190
190
  getHandheldReader: (t) => {
191
- const e = i(t);
191
+ const e = n(t);
192
192
  return o.post("/handheld-reader/list", e);
193
193
  },
194
194
  getHandheldReaderDetail: (t) => o.get("/handheld-reader/".concat(t)),
@@ -206,7 +206,7 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
206
206
  }),
207
207
  putAntennaPower: (t, e) => o.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
208
208
  getIotReader: (t) => {
209
- const e = i({ ...t });
209
+ const e = n({ ...t });
210
210
  return o.post("/iot-reader", e);
211
211
  },
212
212
  getIotReaderDetail: (t) => o.get("/iot-reader/".concat(t)),
@@ -224,47 +224,47 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
224
224
  getDetailActivityLog: (t) => o.get("/activity-log", { params: t }),
225
225
  getDetailActivityLogOptions: (t) => o.get("/activity-log/options", { params: t }),
226
226
  getExistingAliasNames: () => o.get("/reader/alias-names")
227
- }, F = p({
227
+ }, M = u({
228
228
  env: "APP_LOGS_NOTIFICATION_API",
229
229
  prefix: "/v2"
230
- }), Y = {
231
- getSessionLogList: (t) => F.get("/session-log", { params: t })
232
- }, D = p({
230
+ }), X = {
231
+ getSessionLogList: (t) => M.get("/session-log", { params: t })
232
+ }, I = u({
233
233
  prefix: "/v1/global-settings/option"
234
- }), z = {
235
- getPositions: () => D.get("/position"),
236
- getDivisions: () => D.get("/division")
237
- }, v = p({
234
+ }), W = {
235
+ getPositions: () => I.get("/position"),
236
+ getDivisions: () => I.get("/division")
237
+ }, b = u({
238
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),
239
+ }), K = {
240
+ getPositions: (t) => b.get("", { params: t }),
241
+ getPositionDetail: (t) => b.get("/".concat(t)),
242
+ postCreatePosition: (t) => b.post("/", t),
243
+ putEditPosition: (t, e) => b.put("/".concat(t), e),
244
244
  deletePositions: (t) => {
245
245
  const e = { id: JSON.stringify(t) };
246
- return v.delete("", { params: e });
246
+ return b.delete("", { params: e });
247
247
  }
248
- }, G = p({
248
+ }, k = u({
249
249
  env: "APP_TAGSAMURAI_API",
250
250
  prefix: "/tag/v2"
251
- }), W = {
252
- getTagInfo: (t) => G.get("/rfid-qr/scan", { params: t })
253
- }, h = p({
251
+ }), Q = {
252
+ getTagInfo: (t) => k.get("/rfid-qr/scan", { params: t })
253
+ }, A = u({
254
254
  prefix: "/v2/hardware-tagging"
255
- }), K = {
255
+ }), Z = {
256
256
  getTAGEventlog: (t) => {
257
- const e = i(t);
258
- return h.post("/tag-event-log/list", e);
257
+ const e = n(t);
258
+ return A.post("/tag-event-log/list", e);
259
259
  },
260
260
  getTAGEventlogOptions: (t) => {
261
- const e = i(t);
262
- return h.post("/tag-event-log/options", e);
261
+ const e = n(t);
262
+ return A.post("/tag-event-log/options", e);
263
263
  },
264
- getDetailTAGEventlog: (t) => h.get("/tag-event-log/".concat(t))
265
- }, d = p({
264
+ getDetailTAGEventlog: (t) => A.get("/tag-event-log/".concat(t))
265
+ }, d = u({
266
266
  prefix: "/v1/global-settings/user"
267
- }), Q = {
267
+ }), tt = {
268
268
  getUsers: (t) => d.get("", { params: t }),
269
269
  getUserDetail: (t) => d.get("/".concat(t)),
270
270
  getUserSystemLogs: (t, e) => d.get("/".concat(t, "/system-logs"), { params: e }),
@@ -292,17 +292,17 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
292
292
  deleteCancelEmailChange: (t) => d.delete("/cancel-email-change/".concat(t)),
293
293
  postResendEmail: (t) => d.post("/resend-email", t),
294
294
  putChangePassword: (t, e) => d.put("/change-password/".concat(t), e)
295
- }, b = p({
295
+ }, h = u({
296
296
  prefix: "/v2/hardware-tagging"
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({
297
+ }), et = {
298
+ getTabletList: (t) => h.post("/tablet/list", t),
299
+ getTabletOption: (t) => h.post("/tablet/options", t),
300
+ updateTabletStatus: (t, e) => h.patch("/tablet/status", e, { params: { ids: t } }),
301
+ disconnectTablet: (t) => h.patch("/tablet/disconnect-reader", { params: { ids: t } }),
302
+ deleteTablet: (t) => h.delete("/tablet", { params: { ids: t } })
303
+ }, s = u({
304
304
  prefix: "/v2/iam"
305
- }), tt = {
305
+ }), rt = {
306
306
  login: (t) => s.post("/auth/login", t),
307
307
  logout: () => s.post("/auth/logout"),
308
308
  verifyToken: (t) => s.get("/auth/verify-token/".concat(t)),
@@ -312,7 +312,7 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
312
312
  confirmEmailChange: (t) => s.post("/auth/confirm-email-change", { token: t }),
313
313
  cancelEmailChange: (t) => s.delete("/auth/cancel-email-change/".concat(t)),
314
314
  getPositionList: (t) => {
315
- const e = i(t);
315
+ const e = n(t);
316
316
  return s.post("/position/list", e);
317
317
  },
318
318
  getPositionDetail: (t) => s.get("/position/".concat(t)),
@@ -323,7 +323,7 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
323
323
  return s.delete("/position", { params: e });
324
324
  },
325
325
  getDivisionList: (t) => {
326
- const e = i(t);
326
+ const e = n(t);
327
327
  return s.post("/division/list", e);
328
328
  },
329
329
  getDivisionDetail: (t) => s.get("/division/".concat(t)),
@@ -335,18 +335,18 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
335
335
  },
336
336
  createUsers: (t) => {
337
337
  const e = new FormData();
338
- return Object.entries(t).forEach(([r, n]) => {
339
- n != null && e.append(r, n);
338
+ return Object.entries(t).forEach(([r, i]) => {
339
+ i != null && e.append(r, i);
340
340
  }), s.post("/users", e, {
341
341
  headers: { "Content-Type": "multipart/form-data" }
342
342
  });
343
343
  },
344
344
  getGlobalUserList: (t) => {
345
- const e = i(t);
345
+ const e = n(t);
346
346
  return s.post("/users/list", e);
347
347
  },
348
348
  getGlobalUserOptions: (t) => {
349
- const e = i(t);
349
+ const e = n(t);
350
350
  return s.post("/users/options", e);
351
351
  },
352
352
  getGlobalUserDetail: (t) => s.get("/users/".concat(t)),
@@ -356,8 +356,8 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
356
356
  },
357
357
  editUsers: (t, e) => {
358
358
  const r = new FormData();
359
- return Object.entries(e).forEach(([n, u]) => {
360
- u != null && r.append(n, u);
359
+ return Object.entries(e).forEach(([i, p]) => {
360
+ p != null && r.append(i, p);
361
361
  }), s.patch("/users/".concat(t), r, {
362
362
  headers: { "Content-Type": "multipart/form-data" }
363
363
  });
@@ -385,7 +385,7 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
385
385
  exportDivisionTable: () => s.post("/division/list/export", {}, { responseType: "blob" }),
386
386
  exportUserTable: () => s.post("/users/list/export", {}, { responseType: "blob" }),
387
387
  getCustomFieldList: (t) => {
388
- const e = i(t);
388
+ const e = n(t);
389
389
  return s.post("/custom-field/list", e);
390
390
  },
391
391
  getCustomFieldOptions: (t) => s.post("/custom-field/options", t),
@@ -399,9 +399,9 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
399
399
  const e = { ids: JSON.stringify(t) };
400
400
  return s.delete("/custom-field", { params: e });
401
401
  }
402
- }, a = p({
402
+ }, a = u({
403
403
  prefix: "/v2/import"
404
- }), et = {
404
+ }), st = {
405
405
  // --- Division ---
406
406
  submitDivisionFile: (t) => {
407
407
  const e = new FormData();
@@ -447,23 +447,55 @@ const L = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
447
447
  const e = { ids: JSON.stringify(t.ids) };
448
448
  return a.delete("/user", { params: e });
449
449
  }
450
+ }, w = u({
451
+ prefix: "/v2/general-settings"
452
+ }), ot = {
453
+ get: () => w.get("/"),
454
+ update: (t) => w.put("/", t)
455
+ }, m = u({
456
+ prefix: "/v2/general-settings"
457
+ }), nt = {
458
+ getStorageInformation: () => m.get("/files/storage"),
459
+ getFileManager: (t) => {
460
+ const e = n(t);
461
+ return m.get("/user", e);
462
+ },
463
+ postFileManager: (t) => {
464
+ const e = n(t);
465
+ return m.post("/user/list", e);
466
+ },
467
+ postFileManagerOption: (t) => {
468
+ const e = n(t);
469
+ return m.post("/user/options", e);
470
+ },
471
+ recoverFiles: (t) => m.put("/user/recover", t),
472
+ deleteFiles: (t) => {
473
+ const e = n(t);
474
+ return m.delete("/user", e);
475
+ },
476
+ deletePermanently: (t) => {
477
+ const e = n(t);
478
+ return m.delete("/user/delete-permanent", e);
479
+ }
450
480
  };
451
481
  export {
452
- k as AuthServices,
453
- j as ChangelogServices,
454
- B as DivisionServices,
455
- q as GlobalTagServices,
456
- V as HardwareServices,
457
- tt as IamServices,
458
- et as ImportServices,
459
- Y as LogServices,
460
- z as OptionServices,
461
- X as PositionServices,
462
- Z as TabletServices,
463
- K as TagEventlogServices,
464
- W as TagServices,
465
- Q as UserServices,
466
- w as getBaseURL,
467
- H as getImageURL,
468
- J as queryParamsStringfy
482
+ J as AuthServices,
483
+ q as ChangelogServices,
484
+ V as DivisionServices,
485
+ nt as FileManagerServices,
486
+ ot as GeneralSettingServices,
487
+ Y as GlobalTagServices,
488
+ z as HardwareServices,
489
+ rt as IamServices,
490
+ st as ImportServices,
491
+ X as LogServices,
492
+ W as OptionServices,
493
+ K as PositionServices,
494
+ et as TabletServices,
495
+ Z as TagEventlogServices,
496
+ Q as TagServices,
497
+ tt as UserServices,
498
+ O as getBaseURL,
499
+ j as getImageURL,
500
+ B as queryParamsStringfy
469
501
  };
package/main.d.ts CHANGED
@@ -12,4 +12,6 @@ export { default as UserServices } from './src/services/user.service';
12
12
  export { default as TabletServices } from './src/services/tablet.service';
13
13
  export { default as IamServices } from './src/services/iam.service';
14
14
  export { default as ImportServices } from './src/services/import.service';
15
+ export { default as GeneralSettingServices } from './src/services/generalSetting.service';
16
+ export { default as FileManagerServices } from './src/services/fileManager.service';
15
17
  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.42",
3
+ "version": "2.0.1-alpha.44",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -0,0 +1,3 @@
1
+ export type DeleteFileManagerDto = {
2
+ id?: string;
3
+ };
@@ -0,0 +1,14 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { FileManagerFilterParams, FileManagerOptionBoolean } from '../types/fileManager.type';
3
+ import { FetchOptionResponse } from '../types/fetchResponse.type';
4
+ import { DeleteFileManagerDto } from '../dto/fileManager.dto';
5
+ declare const FileManagerServices: {
6
+ getStorageInformation: () => Promise<AxiosResponse>;
7
+ getFileManager: (params?: FileManagerFilterParams) => Promise<AxiosResponse>;
8
+ postFileManager: (params?: FileManagerFilterParams) => Promise<AxiosResponse>;
9
+ postFileManagerOption: (params?: FileManagerOptionBoolean) => Promise<AxiosResponse<FetchOptionResponse<FileManagerOptionBoolean>>>;
10
+ recoverFiles: (body: object) => Promise<AxiosResponse>;
11
+ deleteFiles: (params: DeleteFileManagerDto) => Promise<AxiosResponse>;
12
+ deletePermanently: (params: DeleteFileManagerDto) => Promise<AxiosResponse>;
13
+ };
14
+ export default FileManagerServices;
@@ -0,0 +1,6 @@
1
+ import { AxiosResponse } from 'axios';
2
+ declare const GeneralSettingServices: {
3
+ get: () => Promise<AxiosResponse>;
4
+ update: (data: object) => Promise<AxiosResponse>;
5
+ };
6
+ export default GeneralSettingServices;
@@ -0,0 +1,40 @@
1
+ import { Option } from '../../node_modules/@fewangsit/wangsvue-gsts/dropdown';
2
+ export type FileType = 'attachment' | 'custom-field' | 'damage' | 'disposal' | 'maintenance-routine' | 'repair-ticketing' | 'recycle-bin';
3
+ export type FileManagerType = {
4
+ _id: string;
5
+ transactionId?: string;
6
+ assetName?: string;
7
+ fileName: string;
8
+ fileFormat: string;
9
+ fileSize: string;
10
+ filePath?: string;
11
+ fileType?: FileType;
12
+ group?: string;
13
+ user?: string;
14
+ countdown?: number;
15
+ modifiedBy?: string;
16
+ createdAt: Date;
17
+ hasSystemRole: {
18
+ documentDeletion: {
19
+ delete: boolean;
20
+ view: boolean;
21
+ };
22
+ };
23
+ };
24
+ export type FileManagerParams = {
25
+ isDeleted?: boolean;
26
+ createdAt?: number[];
27
+ modifiedBy?: number[];
28
+ fileFormat?: string[];
29
+ assetName?: string[];
30
+ };
31
+ export type FileManagerFilterParams = Partial<Record<keyof FileManagerParams, string | boolean>>;
32
+ export type FileManagerOptionFilter = {
33
+ modifiedByOptions?: Option[];
34
+ fileFormatOptions?: Option[];
35
+ };
36
+ export type FileManagerOptionBoolean = {
37
+ modifiedByOptions?: boolean;
38
+ fileFormatOptions?: boolean;
39
+ isDeleted?: boolean;
40
+ };