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

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,16 +137,20 @@ 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 });
149
+ return d.delete("", { params: e });
150
+ },
151
+ getAvailableDivision: (t) => {
152
+ const e = { name: t };
153
+ return d.get("/available", { params: e });
150
154
  }
151
155
  }, g = a({
152
156
  prefix: "/global-settings"
@@ -230,33 +234,37 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
230
234
  }), z = {
231
235
  getPositions: () => I.get("/position"),
232
236
  getDivisions: () => I.get("/division")
233
- }, A = a({
237
+ }, f = a({
234
238
  prefix: "/global-settings/position"
235
239
  }), 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),
240
+ getPositions: (t) => f.get("", { params: t }),
241
+ getPositionDetail: (t) => f.get("/".concat(t)),
242
+ postCreatePosition: (t) => f.post("/", t),
243
+ putEditPosition: (t, e) => f.put("/".concat(t), e),
240
244
  deletePositions: (t) => {
241
245
  const e = { id: JSON.stringify(t) };
242
- return A.delete("", { params: e });
246
+ return f.delete("", { params: e });
247
+ },
248
+ getAvailablePosition: (t) => {
249
+ const e = { name: t };
250
+ return f.get("/available", { params: e });
243
251
  }
244
252
  }, N = a({
245
253
  prefix: "/fam/tag/v2"
246
254
  }), K = {
247
255
  getTagInfo: (t) => N.get("/rfid-qr/scan", { params: t })
248
- }, y = a({
256
+ }, b = a({
249
257
  prefix: "/global-settings/change-log"
250
258
  }), Q = {
251
259
  getTAGEventlog: (t) => {
252
260
  const e = n(t);
253
- return y.post("/tag-event-log/list", e);
261
+ return b.post("/tag-event-log/list", e);
254
262
  },
255
263
  getTAGEventlogOptions: (t) => {
256
264
  const e = n(t);
257
- return y.post("/tag-event-log/options", e);
265
+ return b.post("/tag-event-log/options", e);
258
266
  },
259
- getDetailTAGEventlog: (t) => y.get("/tag-event-log/".concat(t))
267
+ getDetailTAGEventlog: (t) => b.get("/tag-event-log/".concat(t))
260
268
  }, u = a({
261
269
  prefix: "/global-settings/user"
262
270
  }), X = {
@@ -292,21 +300,21 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
292
300
  }), Z = {
293
301
  get: () => O.get("/"),
294
302
  update: (t) => O.put("/", t)
295
- }, d = a({
303
+ }, m = a({
296
304
  prefix: "/fam/utility/v2/file-manager"
297
305
  }), tt = {
298
- getStorageInformation: () => d.get("/files/storage"),
306
+ getStorageInformation: () => m.get("/files/storage"),
299
307
  postFileManager: (t, e) => {
300
308
  const r = n(e);
301
- return d.post("/".concat(t, "/list"), r);
309
+ return m.post("/".concat(t, "/list"), r);
302
310
  },
303
311
  postFileManagerOption: (t, e) => {
304
312
  const r = n(e);
305
- return d.post("/".concat(t, "/options"), r);
313
+ return m.post("/".concat(t, "/options"), r);
306
314
  },
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 })
315
+ recoverFiles: (t, e) => m.put("/".concat(t, "/recover"), e),
316
+ deleteFiles: (t, e) => m.delete("/".concat(t), { params: e }),
317
+ deletePermanently: (t, e) => m.delete("/".concat(t, "/delete-permanent"), { params: e })
310
318
  }, c = a({
311
319
  prefix: "/global-settings"
312
320
  }), 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.23",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -9,5 +9,6 @@ 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
+ getAvailableDivision: (name: string) => Promise<AxiosResponse>;
12
13
  };
13
14
  export default DivisionServices;
@@ -9,5 +9,6 @@ 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
+ getAvailablePosition: (name: string) => Promise<AxiosResponse>;
12
13
  };
13
14
  export default PositionServices;