@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.
package/api-services.es.js
CHANGED
|
@@ -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
|
-
...
|
|
8
|
-
} = t, w = "".concat(T(r)).concat(o),
|
|
9
|
-
...
|
|
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
|
|
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
|
|
20
|
-
}),
|
|
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
|
|
57
|
-
e && (
|
|
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
|
-
},
|
|
140
|
+
}, d = a({
|
|
141
141
|
prefix: "/global-settings/division"
|
|
142
142
|
}), H = {
|
|
143
|
-
getDivisions: (t) =>
|
|
144
|
-
getDivisionDetail: (t) =>
|
|
145
|
-
postCreateDivision: (t) =>
|
|
146
|
-
putEditDivision: (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
|
|
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
|
-
},
|
|
237
|
+
}, f = a({
|
|
234
238
|
prefix: "/global-settings/position"
|
|
235
239
|
}), W = {
|
|
236
|
-
getPositions: (t) =>
|
|
237
|
-
getPositionDetail: (t) =>
|
|
238
|
-
postCreatePosition: (t) =>
|
|
239
|
-
putEditPosition: (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
|
|
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
|
-
},
|
|
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
|
|
261
|
+
return b.post("/tag-event-log/list", e);
|
|
254
262
|
},
|
|
255
263
|
getTAGEventlogOptions: (t) => {
|
|
256
264
|
const e = n(t);
|
|
257
|
-
return
|
|
265
|
+
return b.post("/tag-event-log/options", e);
|
|
258
266
|
},
|
|
259
|
-
getDetailTAGEventlog: (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
|
-
},
|
|
303
|
+
}, m = a({
|
|
296
304
|
prefix: "/fam/utility/v2/file-manager"
|
|
297
305
|
}), tt = {
|
|
298
|
-
getStorageInformation: () =>
|
|
306
|
+
getStorageInformation: () => m.get("/files/storage"),
|
|
299
307
|
postFileManager: (t, e) => {
|
|
300
308
|
const r = n(e);
|
|
301
|
-
return
|
|
309
|
+
return m.post("/".concat(t, "/list"), r);
|
|
302
310
|
},
|
|
303
311
|
postFileManagerOption: (t, e) => {
|
|
304
312
|
const r = n(e);
|
|
305
|
-
return
|
|
313
|
+
return m.post("/".concat(t, "/options"), r);
|
|
306
314
|
},
|
|
307
|
-
recoverFiles: (t, e) =>
|
|
308
|
-
deleteFiles: (t, e) =>
|
|
309
|
-
deletePermanently: (t, 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
|
@@ -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;
|