@tagsamurai/gsts-api-services 1.0.2-alpha.0 → 1.0.2-alpha.1

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.
Files changed (2) hide show
  1. package/api-services.es.js +66 -66
  2. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  import m from "axios";
2
- const y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, O = (t = "APP_TAGSAMURAI_API") => y["VITE_" + t], o = (t = {}, e = !1) => {
2
+ const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_IMAGE_BASE_URL: "https://dev-api.tagsamurai.com/fam/utility/v2/files", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-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(O(r)).concat(c), d = m.create({
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 ? $ : "{}"), _ = (I = (S = P.jwt) != null ? S : P.token) != null ? I : "";
19
- return v.headers.Authorization = "Bearer ".concat(_), v;
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 = O("APP_UTILITY_API"), a = t.startsWith("http") ? t : "".concat(c, "/files/").concat(t.replace(/^\/+/, ""));
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
- }, E = o({
41
+ }, G = o({
42
42
  prefix: "/v1/global-settings/auth"
43
- }), G = () => E.post("/logout"), x = { logout: G }, T = o({
43
+ }), y = () => G.post("/logout"), h = { logout: y }, f = o({
44
44
  prefix: "/v1/global-settings/change-log"
45
- }), C = {
46
- getChangelogs: (t) => T.get("", { params: t }),
47
- getChangelogOptions: (t) => T.get("/options", { params: 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
- }), h = {
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
- }, n = o({
71
+ }, s = o({
72
72
  prefix: "/v1/global-settings"
73
- }), j = {
74
- getHandheldReader: (t) => n.get("/reader", { params: t }),
75
- getHandheldReaderDetail: (t) => n.get("/reader/".concat(t)),
76
- getHandheldReaderOptions: (t) => n.get("/reader/options", { params: t }),
77
- putMarkHandheldStatus: (t) => n.put("/reader/mark-status", t),
78
- putPingReaders: (t) => n.put("/iot-reader/ping", t),
79
- putMarkIOTStatus: (t, e) => n.put("/".concat(e, "/mark-status"), t),
80
- putEditReaderGroup: (t, e, r) => n.put(
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) => n.put("/iot-reader/".concat(e, "/set-port-group"), t),
85
- putEditPortStatus: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-status"), t),
86
- putEditAliasName: (t, e, r) => n.put(
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) => n.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
91
- getIOTReaderOrAntenna: (t, e) => n.get("/".concat(t), { params: e }),
92
- getIOTReaderDetail: (t) => n.get("/iot-reader/".concat(t)),
93
- getIOTReaderOrAntennaOptions: (t, e) => n.get("/".concat(t, "/options"), { params: e }),
94
- getActivityLog: (t) => n.get("/activity-log", { params: t }),
95
- getActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
96
- getDetailActivityLog: (t) => n.get("/activity-log", { params: t }),
97
- getDetailActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
98
- getExistingAliasNames: () => n.get("/reader/alias-names"),
99
- getIotReaderPort: (t, e) => n.get("/iot-reader/".concat(t, "/ports"), { params: 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
- }), k = {
103
+ }), M = {
104
104
  getSessionLogList: (t) => L.get("/session-log", { params: t })
105
- }, f = o({
105
+ }, T = o({
106
106
  prefix: "/v1/global-settings/option"
107
- }), B = {
108
- getPositions: () => f.get("/position"),
109
- getDivisions: () => f.get("/division")
107
+ }), j = {
108
+ getPositions: () => T.get("/position"),
109
+ getDivisions: () => T.get("/division")
110
110
  }, p = o({
111
111
  prefix: "/v1/global-settings/position"
112
- }), M = {
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
- }), H = {
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
- }), J = {
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
- }, s = o({
132
+ }, n = o({
133
133
  prefix: "/v1/global-settings/user"
134
- }), V = {
135
- getUsers: (t) => s.get("", { params: t }),
136
- getUserDetail: (t) => s.get("/".concat(t)),
137
- getUserSystemLogs: (t, e) => s.get("/".concat(t, "/system-logs"), { params: 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, s.get("/".concat(t, "/system-logs/options"), { params: r });
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 s.post("", t, { headers: e });
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 s.put("/".concat(t), e, { headers: r });
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 s.delete("", { params: e });
152
+ return n.delete("", { params: e });
153
153
  },
154
- putToggleStatusUsers: (t) => s.put("/active-status", t),
154
+ putToggleStatusUsers: (t) => n.put("/active-status", t),
155
155
  getUserOptions: (t) => {
156
156
  const e = {};
157
- return e[t] = !0, s.get("/options", { params: e });
157
+ return e[t] = !0, n.get("/options", { params: e });
158
158
  },
159
- deleteCancelEmailChange: (t) => s.delete("/cancel-email-change/".concat(t)),
160
- postResendEmail: (t) => s.post("/resend-email", t),
161
- putChangePassword: (t, e) => s.put("/change-password/".concat(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
- x as AuthServices,
165
- C as ChangelogServices,
166
- h as DivisionServices,
164
+ h as AuthServices,
165
+ x as ChangelogServices,
166
+ C as DivisionServices,
167
167
  N as GlobalTagServices,
168
- j as HardwareServices,
169
- k as LogServices,
170
- B as OptionServices,
171
- M as PositionServices,
172
- J as TagEventlogServices,
173
- H as TagServices,
174
- V as UserServices,
175
- O as getBaseURL,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "1.0.2-alpha.0",
3
+ "version": "1.0.2-alpha.1",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",