@tagsamurai/gsts-api-services 1.1.0-alpha.21 → 1.1.0-alpha.22

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.
@@ -4,20 +4,20 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
4
4
  env: r = "APP_TAGSAMURAI_API",
5
5
  prefix: o = "",
6
6
  headers: i = {},
7
- ...f
8
- } = t, w = "".concat(T(r)).concat(o), b = L.create({
9
- ...f,
7
+ ...A
8
+ } = t, w = "".concat(T(r)).concat(o), v = L.create({
9
+ ...A,
10
10
  baseURL: w,
11
11
  headers: e ? i : {
12
12
  "Content-Type": "application/json",
13
13
  ...i
14
14
  }
15
15
  });
16
- return b.interceptors.request.use((v) => {
16
+ return v.interceptors.request.use((y) => {
17
17
  var S, P, h;
18
18
  const $ = JSON.parse((S = localStorage.getItem("user")) != null ? S : "{}"), R = (h = (P = $.jwt) != null ? P : $.token) != null ? h : "";
19
- return v.headers.Authorization = "Bearer ".concat(R), v;
20
- }), b;
19
+ return y.headers.Authorization = "Bearer ".concat(R), y;
20
+ }), v;
21
21
  }, l = a({
22
22
  prefix: "/global-settings/auth"
23
23
  }), E = (t) => {
@@ -53,8 +53,8 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
53
53
  const o = new URL(T("APP_TAGSAMURAI_API") || "").origin;
54
54
  let i = t.startsWith("http") ? t : "".concat(o, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
55
55
  if (e || r) {
56
- const f = new URLSearchParams();
57
- e && (f.set("width", e.toString()), f.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(f.toString());
56
+ const A = new URLSearchParams();
57
+ e && (A.set("width", e.toString()), A.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(A.toString());
58
58
  }
59
59
  return i;
60
60
  }, x = () => {
@@ -137,17 +137,18 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
137
137
  return p.post("/reader-user-tag-log/list", e);
138
138
  },
139
139
  getUserTagOptions: (t) => p.post("/reader-user-tag-log/options", t)
140
- }, m = a({
140
+ }, d = a({
141
141
  prefix: "/global-settings/division"
142
142
  }), H = {
143
- getDivisions: (t) => m.get("", { params: t }),
144
- getDivisionDetail: (t) => m.get("/".concat(t)),
145
- postCreateDivision: (t) => m.post("/", t),
146
- putEditDivision: (t, e) => m.put("/".concat(t), e),
143
+ getDivisions: (t) => d.get("", { params: t }),
144
+ getDivisionDetail: (t) => d.get("/".concat(t)),
145
+ postCreateDivision: (t) => d.post("/", t),
146
+ putEditDivision: (t, e) => d.put("/".concat(t), e),
147
147
  deleteDivisions: (t) => {
148
148
  const e = { id: JSON.stringify(t) };
149
- return m.delete("", { params: e });
150
- }
149
+ return d.delete("", { params: e });
150
+ },
151
+ checkDivisionAvailability: (t) => d.get("/available", { params: t })
151
152
  }, g = a({
152
153
  prefix: "/global-settings"
153
154
  }), q = {
@@ -230,33 +231,34 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
230
231
  }), z = {
231
232
  getPositions: () => I.get("/position"),
232
233
  getDivisions: () => I.get("/division")
233
- }, A = a({
234
+ }, f = a({
234
235
  prefix: "/global-settings/position"
235
236
  }), W = {
236
- getPositions: (t) => A.get("", { params: t }),
237
- getPositionDetail: (t) => A.get("/".concat(t)),
238
- postCreatePosition: (t) => A.post("/", t),
239
- putEditPosition: (t, e) => A.put("/".concat(t), e),
237
+ getPositions: (t) => f.get("", { params: t }),
238
+ getPositionDetail: (t) => f.get("/".concat(t)),
239
+ postCreatePosition: (t) => f.post("/", t),
240
+ putEditPosition: (t, e) => f.put("/".concat(t), e),
240
241
  deletePositions: (t) => {
241
242
  const e = { id: JSON.stringify(t) };
242
- return A.delete("", { params: e });
243
- }
243
+ return f.delete("", { params: e });
244
+ },
245
+ checkPositionAvailability: (t) => f.get("/available", { params: t })
244
246
  }, N = a({
245
247
  prefix: "/fam/tag/v2"
246
248
  }), K = {
247
249
  getTagInfo: (t) => N.get("/rfid-qr/scan", { params: t })
248
- }, y = a({
250
+ }, b = a({
249
251
  prefix: "/global-settings/change-log"
250
252
  }), Q = {
251
253
  getTAGEventlog: (t) => {
252
254
  const e = n(t);
253
- return y.post("/tag-event-log/list", e);
255
+ return b.post("/tag-event-log/list", e);
254
256
  },
255
257
  getTAGEventlogOptions: (t) => {
256
258
  const e = n(t);
257
- return y.post("/tag-event-log/options", e);
259
+ return b.post("/tag-event-log/options", e);
258
260
  },
259
- getDetailTAGEventlog: (t) => y.get("/tag-event-log/".concat(t))
261
+ getDetailTAGEventlog: (t) => b.get("/tag-event-log/".concat(t))
260
262
  }, u = a({
261
263
  prefix: "/global-settings/user"
262
264
  }), X = {
@@ -292,21 +294,21 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
292
294
  }), Z = {
293
295
  get: () => O.get("/"),
294
296
  update: (t) => O.put("/", t)
295
- }, d = a({
297
+ }, m = a({
296
298
  prefix: "/fam/utility/v2/file-manager"
297
299
  }), tt = {
298
- getStorageInformation: () => d.get("/files/storage"),
300
+ getStorageInformation: () => m.get("/files/storage"),
299
301
  postFileManager: (t, e) => {
300
302
  const r = n(e);
301
- return d.post("/".concat(t, "/list"), r);
303
+ return m.post("/".concat(t, "/list"), r);
302
304
  },
303
305
  postFileManagerOption: (t, e) => {
304
306
  const r = n(e);
305
- return d.post("/".concat(t, "/options"), r);
307
+ return m.post("/".concat(t, "/options"), r);
306
308
  },
307
- recoverFiles: (t, e) => d.put("/".concat(t, "/recover"), e),
308
- deleteFiles: (t, e) => d.delete("/".concat(t), { params: e }),
309
- deletePermanently: (t, e) => d.delete("/".concat(t, "/delete-permanent"), { params: e })
309
+ recoverFiles: (t, e) => m.put("/".concat(t, "/recover"), e),
310
+ deleteFiles: (t, e) => m.delete("/".concat(t), { params: e }),
311
+ deletePermanently: (t, e) => m.delete("/".concat(t, "/delete-permanent"), { params: e })
310
312
  }, c = a({
311
313
  prefix: "/global-settings"
312
314
  }), et = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "1.1.0-alpha.21",
3
+ "version": "1.1.0-alpha.22",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -9,5 +9,8 @@ declare const DivisionServices: {
9
9
  postCreateDivision: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
10
10
  putEditDivision: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
11
11
  deleteDivisions: (ids: string[]) => Promise<AxiosResponse>;
12
+ checkDivisionAvailability: (params: {
13
+ name: string;
14
+ }) => Promise<AxiosResponse>;
12
15
  };
13
16
  export default DivisionServices;
@@ -9,5 +9,8 @@ declare const PositionServices: {
9
9
  postCreatePosition: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
10
10
  putEditPosition: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
11
11
  deletePositions: (ids: string[]) => Promise<AxiosResponse>;
12
+ checkPositionAvailability: (params: {
13
+ name: string;
14
+ }) => Promise<AxiosResponse>;
12
15
  };
13
16
  export default PositionServices;