@tagsamurai/gsts-api-services 1.1.0-alpha.27 → 1.1.0-alpha.29
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 +12 -11
- package/package.json +1 -1
package/api-services.es.js
CHANGED
|
@@ -4,9 +4,9 @@ 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
|
-
...
|
|
7
|
+
...b
|
|
8
8
|
} = t, w = "".concat(T(r)).concat(o), v = L.create({
|
|
9
|
-
...
|
|
9
|
+
...b,
|
|
10
10
|
baseURL: w,
|
|
11
11
|
headers: e ? i : {
|
|
12
12
|
"Content-Type": "application/json",
|
|
@@ -23,7 +23,7 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
23
23
|
}), E = (t) => {
|
|
24
24
|
var e, r, o, i;
|
|
25
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
|
+
}, k = {
|
|
27
27
|
login: (t) => {
|
|
28
28
|
const e = { ...t, isMobile: !1 };
|
|
29
29
|
return l.post("/login", e);
|
|
@@ -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 b = new URLSearchParams();
|
|
57
|
+
e && (b.set("width", e.toString()), b.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(b.toString());
|
|
58
58
|
}
|
|
59
59
|
return i;
|
|
60
60
|
}, x = () => {
|
|
@@ -100,7 +100,8 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
100
100
|
const e = t.trim();
|
|
101
101
|
if (!e) return !1;
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
const r = JSON.parse(e);
|
|
104
|
+
return typeof r == "object" && r !== null;
|
|
104
105
|
} catch (r) {
|
|
105
106
|
return !1;
|
|
106
107
|
}
|
|
@@ -253,18 +254,18 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
253
254
|
prefix: "/fam/tag/v2"
|
|
254
255
|
}), K = {
|
|
255
256
|
getTagInfo: (t) => N.get("/rfid-qr/scan", { params: t })
|
|
256
|
-
},
|
|
257
|
+
}, A = a({
|
|
257
258
|
prefix: "/global-settings/change-log"
|
|
258
259
|
}), Q = {
|
|
259
260
|
getTAGEventlog: (t) => {
|
|
260
261
|
const e = n(t);
|
|
261
|
-
return
|
|
262
|
+
return A.post("/tag-event-log/list", e);
|
|
262
263
|
},
|
|
263
264
|
getTAGEventlogOptions: (t) => {
|
|
264
265
|
const e = n(t);
|
|
265
|
-
return
|
|
266
|
+
return A.post("/tag-event-log/options", e);
|
|
266
267
|
},
|
|
267
|
-
getDetailTAGEventlog: (t) =>
|
|
268
|
+
getDetailTAGEventlog: (t) => A.get("/tag-event-log/".concat(t))
|
|
268
269
|
}, u = a({
|
|
269
270
|
prefix: "/global-settings/user"
|
|
270
271
|
}), X = {
|
|
@@ -340,7 +341,7 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
340
341
|
}
|
|
341
342
|
};
|
|
342
343
|
export {
|
|
343
|
-
|
|
344
|
+
k as AuthServices,
|
|
344
345
|
M as ChangelogServices,
|
|
345
346
|
et as CustomFieldServices,
|
|
346
347
|
H as DivisionServices,
|
package/package.json
CHANGED