@tagsamurai/gsts-api-services 1.0.2-alpha.0 → 1.0.2-beta.0
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 +66 -66
- package/package.json +1 -1
package/api-services.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import m from "axios";
|
|
2
|
-
const
|
|
2
|
+
const E = { BASE_URL: "/", DEV: !1, MODE: "staging", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://staging-api.global-settings.tagsamurai.com", VITE_APP_IMAGE_BASE_URL: "https://staging-api.tagsamurai.com/fam/utility/v2/files", VITE_APP_LOGS_NOTIFICATION_API: "https://staging-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://staging-api.tagsamurai.com" }, _ = (t = "APP_TAGSAMURAI_API") => E["VITE_" + t], o = (t = {}, e = !1) => {
|
|
3
3
|
const {
|
|
4
4
|
env: r = "APP_GLOBAL_SETTINGS_API",
|
|
5
5
|
prefix: c = "",
|
|
6
6
|
headers: a = {},
|
|
7
7
|
...l
|
|
8
|
-
} = t, g = "".concat(
|
|
8
|
+
} = t, g = "".concat(_(r)).concat(c), d = m.create({
|
|
9
9
|
...l,
|
|
10
10
|
baseURL: g,
|
|
11
11
|
headers: e ? a : {
|
|
@@ -15,13 +15,13 @@ const y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
15
15
|
});
|
|
16
16
|
return d.interceptors.request.use((v) => {
|
|
17
17
|
var $, S, I;
|
|
18
|
-
const P = JSON.parse(($ = localStorage.getItem("user")) != null ? $ : "{}"),
|
|
19
|
-
return v.headers.Authorization = "Bearer ".concat(
|
|
18
|
+
const P = JSON.parse(($ = localStorage.getItem("user")) != null ? $ : "{}"), O = (I = (S = P.jwt) != null ? S : P.token) != null ? I : "";
|
|
19
|
+
return v.headers.Authorization = "Bearer ".concat(O), v;
|
|
20
20
|
}), d;
|
|
21
21
|
}, D = (t, e, r) => {
|
|
22
22
|
var l;
|
|
23
23
|
if (!t) return;
|
|
24
|
-
const c =
|
|
24
|
+
const c = _("APP_IMAGE_BASE_URL"), a = t.startsWith("http") ? t : "".concat(c, "/").concat(t.replace(/^\/+/, ""));
|
|
25
25
|
if (e || r) {
|
|
26
26
|
const g = new URLSearchParams();
|
|
27
27
|
return e && g.set("width", e.toString()), r && g.set("height", (l = r == null ? void 0 : r.toString()) != null ? l : e == null ? void 0 : e.toString()), "".concat(a, "?").concat(g.toString());
|
|
@@ -38,16 +38,16 @@ const y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
38
38
|
[r]: t[r]
|
|
39
39
|
});
|
|
40
40
|
}), e;
|
|
41
|
-
},
|
|
41
|
+
}, G = o({
|
|
42
42
|
prefix: "/v1/global-settings/auth"
|
|
43
|
-
}),
|
|
43
|
+
}), y = () => G.post("/logout"), h = { logout: y }, f = o({
|
|
44
44
|
prefix: "/v1/global-settings/change-log"
|
|
45
|
-
}),
|
|
46
|
-
getChangelogs: (t) =>
|
|
47
|
-
getChangelogOptions: (t) =>
|
|
45
|
+
}), x = {
|
|
46
|
+
getChangelogs: (t) => f.get("", { params: t }),
|
|
47
|
+
getChangelogOptions: (t) => f.get("/options", { params: t })
|
|
48
48
|
}, u = o({
|
|
49
49
|
prefix: "/v1/global-settings/division"
|
|
50
|
-
}),
|
|
50
|
+
}), C = {
|
|
51
51
|
getDivisions: (t) => u.get("", { params: t }),
|
|
52
52
|
getDivisionDetail: (t) => u.get("/".concat(t)),
|
|
53
53
|
postCreateDivision: (t) => u.post("/", t),
|
|
@@ -68,48 +68,48 @@ const y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
68
68
|
putAuditTAG: (t, e) => i.put("/".concat(t, "/audit"), e),
|
|
69
69
|
putAllocateTAG: (t, e) => i.put("/".concat(t, "/allocate"), e),
|
|
70
70
|
putCombineTAG: (t) => i.put("/combine", t)
|
|
71
|
-
},
|
|
71
|
+
}, s = o({
|
|
72
72
|
prefix: "/v1/global-settings"
|
|
73
|
-
}),
|
|
74
|
-
getHandheldReader: (t) =>
|
|
75
|
-
getHandheldReaderDetail: (t) =>
|
|
76
|
-
getHandheldReaderOptions: (t) =>
|
|
77
|
-
putMarkHandheldStatus: (t) =>
|
|
78
|
-
putPingReaders: (t) =>
|
|
79
|
-
putMarkIOTStatus: (t, e) =>
|
|
80
|
-
putEditReaderGroup: (t, e, r) =>
|
|
73
|
+
}), B = {
|
|
74
|
+
getHandheldReader: (t) => s.get("/reader", { params: t }),
|
|
75
|
+
getHandheldReaderDetail: (t) => s.get("/reader/".concat(t)),
|
|
76
|
+
getHandheldReaderOptions: (t) => s.get("/reader/options", { params: t }),
|
|
77
|
+
putMarkHandheldStatus: (t) => s.put("/reader/mark-status", t),
|
|
78
|
+
putPingReaders: (t) => s.put("/iot-reader/ping", t),
|
|
79
|
+
putMarkIOTStatus: (t, e) => s.put("/".concat(e, "/mark-status"), t),
|
|
80
|
+
putEditReaderGroup: (t, e, r) => s.put(
|
|
81
81
|
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-group"),
|
|
82
82
|
e
|
|
83
83
|
),
|
|
84
|
-
putEditAntennaGroup: (t, e) =>
|
|
85
|
-
putEditPortStatus: (t, e) =>
|
|
86
|
-
putEditAliasName: (t, e, r) =>
|
|
84
|
+
putEditAntennaGroup: (t, e) => s.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
85
|
+
putEditPortStatus: (t, e) => s.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
86
|
+
putEditAliasName: (t, e, r) => s.put(
|
|
87
87
|
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-alias-name"),
|
|
88
88
|
e
|
|
89
89
|
),
|
|
90
|
-
putAntennaPower: (t, e) =>
|
|
91
|
-
getIOTReaderOrAntenna: (t, e) =>
|
|
92
|
-
getIOTReaderDetail: (t) =>
|
|
93
|
-
getIOTReaderOrAntennaOptions: (t, e) =>
|
|
94
|
-
getActivityLog: (t) =>
|
|
95
|
-
getActivityLogOptions: (t) =>
|
|
96
|
-
getDetailActivityLog: (t) =>
|
|
97
|
-
getDetailActivityLogOptions: (t) =>
|
|
98
|
-
getExistingAliasNames: () =>
|
|
99
|
-
getIotReaderPort: (t, e) =>
|
|
90
|
+
putAntennaPower: (t, e) => s.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
91
|
+
getIOTReaderOrAntenna: (t, e) => s.get("/".concat(t), { params: e }),
|
|
92
|
+
getIOTReaderDetail: (t) => s.get("/iot-reader/".concat(t)),
|
|
93
|
+
getIOTReaderOrAntennaOptions: (t, e) => s.get("/".concat(t, "/options"), { params: e }),
|
|
94
|
+
getActivityLog: (t) => s.get("/activity-log", { params: t }),
|
|
95
|
+
getActivityLogOptions: (t) => s.get("/activity-log/options", { params: t }),
|
|
96
|
+
getDetailActivityLog: (t) => s.get("/activity-log", { params: t }),
|
|
97
|
+
getDetailActivityLogOptions: (t) => s.get("/activity-log/options", { params: t }),
|
|
98
|
+
getExistingAliasNames: () => s.get("/reader/alias-names"),
|
|
99
|
+
getIotReaderPort: (t, e) => s.get("/iot-reader/".concat(t, "/ports"), { params: e })
|
|
100
100
|
}, L = o({
|
|
101
101
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
102
102
|
prefix: "/v2"
|
|
103
|
-
}),
|
|
103
|
+
}), M = {
|
|
104
104
|
getSessionLogList: (t) => L.get("/session-log", { params: t })
|
|
105
|
-
},
|
|
105
|
+
}, T = o({
|
|
106
106
|
prefix: "/v1/global-settings/option"
|
|
107
|
-
}),
|
|
108
|
-
getPositions: () =>
|
|
109
|
-
getDivisions: () =>
|
|
107
|
+
}), j = {
|
|
108
|
+
getPositions: () => T.get("/position"),
|
|
109
|
+
getDivisions: () => T.get("/division")
|
|
110
110
|
}, p = o({
|
|
111
111
|
prefix: "/v1/global-settings/position"
|
|
112
|
-
}),
|
|
112
|
+
}), k = {
|
|
113
113
|
getPositions: (t) => p.get("", { params: t }),
|
|
114
114
|
getPositionDetail: (t) => p.get("/".concat(t)),
|
|
115
115
|
postCreatePosition: (t) => p.post("/", t),
|
|
@@ -121,58 +121,58 @@ const y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
121
121
|
}, R = o({
|
|
122
122
|
env: "APP_TAGSAMURAI_API",
|
|
123
123
|
prefix: "/tag/v2"
|
|
124
|
-
}),
|
|
124
|
+
}), V = {
|
|
125
125
|
getTagInfo: (t) => R.get("/rfid-qr/scan", { params: t })
|
|
126
126
|
}, A = o({
|
|
127
127
|
prefix: "/v1/global-settings/change-log"
|
|
128
|
-
}),
|
|
128
|
+
}), H = {
|
|
129
129
|
getTAGEventlog: (t) => A.get("/tag-event-log", { params: t }),
|
|
130
130
|
getTAGEventlogOptions: (t) => A.get("/tag-event-log/options", { params: t }),
|
|
131
131
|
getDetailTAGEventlog: (t) => A.get("/tag-event-log/".concat(t))
|
|
132
|
-
},
|
|
132
|
+
}, n = o({
|
|
133
133
|
prefix: "/v1/global-settings/user"
|
|
134
|
-
}),
|
|
135
|
-
getUsers: (t) =>
|
|
136
|
-
getUserDetail: (t) =>
|
|
137
|
-
getUserSystemLogs: (t, e) =>
|
|
134
|
+
}), J = {
|
|
135
|
+
getUsers: (t) => n.get("", { params: t }),
|
|
136
|
+
getUserDetail: (t) => n.get("/".concat(t)),
|
|
137
|
+
getUserSystemLogs: (t, e) => n.get("/".concat(t, "/system-logs"), { params: e }),
|
|
138
138
|
getUserSystemLogOptions: (t, e) => {
|
|
139
139
|
const r = {};
|
|
140
|
-
return r[e] = !0,
|
|
140
|
+
return r[e] = !0, n.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
141
141
|
},
|
|
142
142
|
postCreateUser: (t) => {
|
|
143
143
|
const e = { "Content-Type": "multipart/form-data" };
|
|
144
|
-
return
|
|
144
|
+
return n.post("", t, { headers: e });
|
|
145
145
|
},
|
|
146
146
|
putEditUser: (t, e) => {
|
|
147
147
|
const r = { "Content-Type": "multipart/form-data" };
|
|
148
|
-
return
|
|
148
|
+
return n.put("/".concat(t), e, { headers: r });
|
|
149
149
|
},
|
|
150
150
|
deleteUsers: (t) => {
|
|
151
151
|
const e = { id: JSON.stringify(t) };
|
|
152
|
-
return
|
|
152
|
+
return n.delete("", { params: e });
|
|
153
153
|
},
|
|
154
|
-
putToggleStatusUsers: (t) =>
|
|
154
|
+
putToggleStatusUsers: (t) => n.put("/active-status", t),
|
|
155
155
|
getUserOptions: (t) => {
|
|
156
156
|
const e = {};
|
|
157
|
-
return e[t] = !0,
|
|
157
|
+
return e[t] = !0, n.get("/options", { params: e });
|
|
158
158
|
},
|
|
159
|
-
deleteCancelEmailChange: (t) =>
|
|
160
|
-
postResendEmail: (t) =>
|
|
161
|
-
putChangePassword: (t, e) =>
|
|
159
|
+
deleteCancelEmailChange: (t) => n.delete("/cancel-email-change/".concat(t)),
|
|
160
|
+
postResendEmail: (t) => n.post("/resend-email", t),
|
|
161
|
+
putChangePassword: (t, e) => n.put("/change-password/".concat(t), e)
|
|
162
162
|
};
|
|
163
163
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
h as AuthServices,
|
|
165
|
+
x as ChangelogServices,
|
|
166
|
+
C as DivisionServices,
|
|
167
167
|
N as GlobalTagServices,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
B as HardwareServices,
|
|
169
|
+
M as LogServices,
|
|
170
|
+
j as OptionServices,
|
|
171
|
+
k as PositionServices,
|
|
172
|
+
H as TagEventlogServices,
|
|
173
|
+
V as TagServices,
|
|
174
|
+
J as UserServices,
|
|
175
|
+
_ as getBaseURL,
|
|
176
176
|
D as getImageURL,
|
|
177
177
|
b as queryParamsStringfy
|
|
178
178
|
};
|
package/package.json
CHANGED