@tagsamurai/gsts-api-services 1.0.1-alpha.10 → 1.0.1-alpha.12

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.
@@ -1,25 +1,27 @@
1
- import v from "axios";
2
- const _ = { 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" }, l = (t = "APP_TAGSAMURAI_API") => _["VITE_" + t], o = (t = {}, e = !1) => {
1
+ import I from "axios";
2
+ const f = { 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" }, c = (t = "APP_TAGSAMURAI_API") => f["VITE_" + t], o = (t = {}, e = !1) => {
3
3
  const {
4
4
  env: r = "APP_GLOBAL_SETTINGS_API",
5
5
  prefix: u = "",
6
- headers: c = {},
7
- ...I
8
- } = t, S = `${l(r)}${u}`, A = JSON.parse(localStorage.getItem("user") ?? "{}"), $ = A.jwt ?? A.token ?? "";
9
- return v.create({
10
- ...I,
11
- baseURL: S,
12
- headers: e ? c : {
6
+ headers: A = {},
7
+ ...S
8
+ } = t, $ = `${c(r)}${u}`, p = JSON.parse(localStorage.getItem("user") ?? "{}"), d = p.jwt ?? p.token ?? "";
9
+ console.log("🚀 ~ jwt:", d), console.log("🚀 ~ user:", p);
10
+ const { href: _ } = window.location, T = _.split("?t=")[1];
11
+ return console.log("🚀 ~ window.location:", window.location), console.log("🚀 ~ tokenQuery:", T), I.create({
12
+ ...S,
13
+ baseURL: $,
14
+ headers: e ? A : {
13
15
  "Content-Type": "application/json",
14
- Authorization: `Bearer ${$}`,
15
- ...c
16
+ Authorization: `Bearer ${d}`,
17
+ ...A
16
18
  }
17
19
  });
18
- }, h = (t) => {
20
+ }, y = (t) => {
19
21
  if (!t) return;
20
- const e = l("APP_TAGSAMURAI_API");
22
+ const e = c("APP_TAGSAMURAI_API");
21
23
  return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
22
- }, m = (t) => {
24
+ }, E = (t) => {
23
25
  if (!t || typeof t == "string")
24
26
  return;
25
27
  const e = {};
@@ -30,14 +32,14 @@ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
30
32
  [r]: t[r]
31
33
  });
32
34
  }), e;
33
- }, d = o({
35
+ }, P = o({
34
36
  prefix: "/v1/global-settings/change-log"
35
- }), E = {
36
- getChangelogs: (t) => d.get("", { params: t }),
37
- getChangelogOptions: (t) => d.get("/options", { params: t })
37
+ }), G = {
38
+ getChangelogs: (t) => P.get("", { params: t }),
39
+ getChangelogOptions: (t) => P.get("/options", { params: t })
38
40
  }, i = o({
39
41
  prefix: "/v1/global-settings/division"
40
- }), y = {
42
+ }), L = {
41
43
  getDivisions: (t) => i.get("", { params: t }),
42
44
  getDivisionDetail: (t) => i.get(`/${t}`),
43
45
  postCreateDivision: (t) => i.post("/", t),
@@ -49,14 +51,14 @@ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
49
51
  }, g = o({
50
52
  env: "APP_TAGSAMURAI_API",
51
53
  prefix: "/v1/global-settings"
52
- }), G = {
54
+ }), R = {
53
55
  getTAGAllPaired: (t, e) => g.get(`/${t}`, { params: e }),
54
56
  getTAGAllPairedOptions: (t, e) => g.get(`/${t}/options`, { params: e }),
55
57
  getTAGNotPaired: (t, e) => g.get(`/${t}/not-paired`, { params: e }),
56
58
  getTAGNotPairedOptions: (t, e) => g.get(`/${t}/not-paired/options`, { params: e })
57
- }, s = ({ headers: t = {}, params: e = {} } = {}) => {
58
- const r = l("APP_GLOBAL_SETTINGS_API"), u = JSON.parse(localStorage.getItem("user") ?? "{}");
59
- return v.create({
59
+ }, n = ({ headers: t = {}, params: e = {} } = {}) => {
60
+ const r = c("APP_GLOBAL_SETTINGS_API"), u = JSON.parse(localStorage.getItem("user") ?? "{}");
61
+ return I.create({
60
62
  baseURL: `${r}/v1/global-settings`,
61
63
  headers: {
62
64
  "Content-type": "application/json",
@@ -65,46 +67,46 @@ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
65
67
  },
66
68
  params: e
67
69
  });
68
- }, L = {
69
- getHandheldReader: (t) => s({ params: t }).get("/reader"),
70
- getHandheldReaderDetail: (t) => s().get(`/reader/${t}`),
71
- getHandheldReaderOptions: (t) => s({ params: t }).get("/reader/options"),
72
- putMarkHandheldStatus: (t) => s().put("/reader/mark-status", t),
73
- putPingReaders: (t) => s().put("/iot-reader/ping", t),
74
- putMarkIOTStatus: (t, e) => s().put(`/${e}/mark-status`, t),
75
- putEditReaderGroup: (t, e, r) => s().put(
70
+ }, U = {
71
+ getHandheldReader: (t) => n({ params: t }).get("/reader"),
72
+ getHandheldReaderDetail: (t) => n().get(`/reader/${t}`),
73
+ getHandheldReaderOptions: (t) => n({ params: t }).get("/reader/options"),
74
+ putMarkHandheldStatus: (t) => n().put("/reader/mark-status", t),
75
+ putPingReaders: (t) => n().put("/iot-reader/ping", t),
76
+ putMarkIOTStatus: (t, e) => n().put(`/${e}/mark-status`, t),
77
+ putEditReaderGroup: (t, e, r) => n().put(
76
78
  `/${t === "iot" ? "iot-" : ""}reader/${r}/set-group`,
77
79
  e
78
80
  ),
79
- putEditAntennaGroup: (t, e) => s().put(`/iot-reader/${e}/set-port-group`, t),
80
- putEditPortStatus: (t, e) => s().put(`/iot-reader/${e}/set-port-status`, t),
81
- putEditAliasName: (t, e, r) => s().put(
81
+ putEditAntennaGroup: (t, e) => n().put(`/iot-reader/${e}/set-port-group`, t),
82
+ putEditPortStatus: (t, e) => n().put(`/iot-reader/${e}/set-port-status`, t),
83
+ putEditAliasName: (t, e, r) => n().put(
82
84
  `/${t === "iot" ? "iot-" : ""}reader/${r}/set-alias-name`,
83
85
  e
84
86
  ),
85
- putAntennaPower: (t, e) => s().put(`/iot-reader/${e}/set-antenna-power`, t),
86
- getIOTReaderOrAntenna: (t, e) => s({ params: e }).get(`/${t}`),
87
- getIOTReaderDetail: (t) => s().get(`/iot-reader/${t}`),
88
- getIOTReaderOrAntennaOptions: (t, e) => s({ params: e }).get(`/${t}/options`),
89
- getActivityLog: (t) => s({ params: t }).get("/activity-log"),
90
- getActivityLogOptions: (t) => s({ params: t }).get("/activity-log/options"),
91
- getDetailActivityLog: (t) => s({ params: t }).get("/activity-log"),
92
- getDetailActivityLogOptions: (t) => s({ params: t }).get("/activity-log/options"),
93
- getExistingAliasNames: () => s().get("/reader/alias-names"),
94
- getIotReaderPort: (t, e) => s({ params: e }).get(`/iot-reader/${t}/ports`)
95
- }, T = o({
87
+ putAntennaPower: (t, e) => n().put(`/iot-reader/${e}/set-antenna-power`, t),
88
+ getIOTReaderOrAntenna: (t, e) => n({ params: e }).get(`/${t}`),
89
+ getIOTReaderDetail: (t) => n().get(`/iot-reader/${t}`),
90
+ getIOTReaderOrAntennaOptions: (t, e) => n({ params: e }).get(`/${t}/options`),
91
+ getActivityLog: (t) => n({ params: t }).get("/activity-log"),
92
+ getActivityLogOptions: (t) => n({ params: t }).get("/activity-log/options"),
93
+ getDetailActivityLog: (t) => n({ params: t }).get("/activity-log"),
94
+ getDetailActivityLogOptions: (t) => n({ params: t }).get("/activity-log/options"),
95
+ getExistingAliasNames: () => n().get("/reader/alias-names"),
96
+ getIotReaderPort: (t, e) => n({ params: e }).get(`/iot-reader/${t}/ports`)
97
+ }, O = o({
96
98
  env: "APP_LOGS_NOTIFICATION_API",
97
99
  prefix: "/v2"
98
- }), R = {
99
- getSessionLogList: (t) => T.get("/session-log", { params: t })
100
- }, P = o({
100
+ }), D = {
101
+ getSessionLogList: (t) => O.get("/session-log", { params: t })
102
+ }, v = o({
101
103
  prefix: "/v1/global-settings/option"
102
- }), U = {
103
- getPositions: () => P.get("/position"),
104
- getDivisions: () => P.get("/division")
104
+ }), N = {
105
+ getPositions: () => v.get("/position"),
106
+ getDivisions: () => v.get("/division")
105
107
  }, a = o({
106
108
  prefix: "/v1/global-settings/position"
107
- }), D = {
109
+ }), b = {
108
110
  getPositions: (t) => a.get("", { params: t }),
109
111
  getPositionDetail: (t) => a.get(`/${t}`),
110
112
  postCreatePosition: (t) => a.post("/", t),
@@ -113,60 +115,60 @@ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
113
115
  const e = { id: JSON.stringify(t) };
114
116
  return a.delete("", { params: e });
115
117
  }
116
- }, O = o({
118
+ }, h = o({
117
119
  env: "APP_TAGSAMURAI_API",
118
120
  prefix: "/tag/v2"
119
- }), N = {
120
- getTagInfo: (t) => O.get("/rfid-qr/scan", { params: t })
121
- }, p = o({
121
+ }), C = {
122
+ getTagInfo: (t) => h.get("/rfid-qr/scan", { params: t })
123
+ }, l = o({
122
124
  prefix: "/v1/global-settings/change-log"
123
- }), b = {
124
- getTAGEventlog: (t) => p.get("/tag-event-log", { params: t }),
125
- getTAGEventlogOptions: (t) => p.get("/tag-event-log/options", { params: t }),
126
- getDetailTAGEventlog: (t) => p.get(`/tag-event-log/${t}`)
127
- }, n = o({
125
+ }), w = {
126
+ getTAGEventlog: (t) => l.get("/tag-event-log", { params: t }),
127
+ getTAGEventlogOptions: (t) => l.get("/tag-event-log/options", { params: t }),
128
+ getDetailTAGEventlog: (t) => l.get(`/tag-event-log/${t}`)
129
+ }, s = o({
128
130
  prefix: "/v1/global-settings/user"
129
- }), C = {
130
- getUsers: (t) => n.get("", { params: t }),
131
- getUserDetail: (t) => n.get(`/${t}`),
132
- getUserSystemLogs: (t, e) => n.get(`/${t}/system-logs`, { params: e }),
131
+ }), x = {
132
+ getUsers: (t) => s.get("", { params: t }),
133
+ getUserDetail: (t) => s.get(`/${t}`),
134
+ getUserSystemLogs: (t, e) => s.get(`/${t}/system-logs`, { params: e }),
133
135
  getUserSystemLogOptions: (t, e) => {
134
136
  const r = {};
135
- return r[e] = !0, n.get(`/${t}/system-logs/options`, { params: r });
137
+ return r[e] = !0, s.get(`/${t}/system-logs/options`, { params: r });
136
138
  },
137
139
  postCreateUser: (t) => {
138
140
  const e = { "Content-Type": "multipart/form-data" };
139
- return n.post("", t, { headers: e });
141
+ return s.post("", t, { headers: e });
140
142
  },
141
143
  putEditUser: (t, e) => {
142
144
  const r = { "Content-Type": "multipart/form-data" };
143
- return n.put(`/${t}`, e, { headers: r });
145
+ return s.put(`/${t}`, e, { headers: r });
144
146
  },
145
147
  deleteUsers: (t) => {
146
148
  const e = { id: JSON.stringify(t) };
147
- return n.delete("", { params: e });
149
+ return s.delete("", { params: e });
148
150
  },
149
- putToggleStatusUsers: (t) => n.put("/active-status", t),
151
+ putToggleStatusUsers: (t) => s.put("/active-status", t),
150
152
  getUserOptions: (t) => {
151
153
  const e = {};
152
- return e[t] = !0, n.get("/options", { params: e });
154
+ return e[t] = !0, s.get("/options", { params: e });
153
155
  },
154
- deleteCancelEmailChange: (t) => n.delete(`/cancel-email-change/${t}`),
155
- postResendEmail: (t) => n.post("/resend-email", t),
156
- putChangePassword: (t, e) => n.put(`/change-password/${t}`, e)
156
+ deleteCancelEmailChange: (t) => s.delete(`/cancel-email-change/${t}`),
157
+ postResendEmail: (t) => s.post("/resend-email", t),
158
+ putChangePassword: (t, e) => s.put(`/change-password/${t}`, e)
157
159
  };
158
160
  export {
159
- E as ChangelogServices,
160
- y as DivisionServices,
161
- G as GlobalTagServices,
162
- L as HardwareServices,
163
- R as LogServices,
164
- U as OptionServices,
165
- D as PositionServices,
166
- b as TagEventlogServices,
167
- N as TagServices,
168
- C as UserServices,
169
- l as getBaseURL,
170
- h as getImageURL,
171
- m as queryParamsStringfy
161
+ G as ChangelogServices,
162
+ L as DivisionServices,
163
+ R as GlobalTagServices,
164
+ U as HardwareServices,
165
+ D as LogServices,
166
+ N as OptionServices,
167
+ b as PositionServices,
168
+ w as TagEventlogServices,
169
+ C as TagServices,
170
+ x as UserServices,
171
+ c as getBaseURL,
172
+ y as getImageURL,
173
+ E as queryParamsStringfy
172
174
  };
@@ -1 +1 @@
1
- System.register(["axios"],function(s,m){"use strict";var l;return{setters:[c=>{l=c.default}],execute:function(){const c={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"},p=s("getBaseURL",(t="APP_TAGSAMURAI_API")=>c["VITE_"+t]),o=(t={},e=!1)=>{const{env:r="APP_GLOBAL_SETTINGS_API",prefix:d="",headers:S={},...f}=t,_=`${p(r)}${d}`,I=JSON.parse(localStorage.getItem("user")??"{}"),O=I.jwt??I.token??"";return l.create({...f,baseURL:_,headers:e?S:{"Content-Type":"application/json",Authorization:`Bearer ${O}`,...S}})},h=s("getImageURL",t=>{if(!t)return;const e=p("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),y=s("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),v=o({prefix:"/v1/global-settings/change-log"}),E=s("ChangelogServices",{getChangelogs:t=>v.get("",{params:t}),getChangelogOptions:t=>v.get("/options",{params:t})}),a=o({prefix:"/v1/global-settings/division"}),L=s("DivisionServices",{getDivisions:t=>a.get("",{params:t}),getDivisionDetail:t=>a.get(`/${t}`),postCreateDivision:t=>a.post("/",t),putEditDivision:(t,e)=>a.put(`/${t}`,e),deleteDivisions:t=>{const e={id:JSON.stringify(t)};return a.delete("",{params:e})}}),u=o({env:"APP_TAGSAMURAI_API",prefix:"/v1/global-settings"}),R=s("GlobalTagServices",{getTAGAllPaired:(t,e)=>u.get(`/${t}`,{params:e}),getTAGAllPairedOptions:(t,e)=>u.get(`/${t}/options`,{params:e}),getTAGNotPaired:(t,e)=>u.get(`/${t}/not-paired`,{params:e}),getTAGNotPairedOptions:(t,e)=>u.get(`/${t}/not-paired/options`,{params:e})}),n=({headers:t={},params:e={}}={})=>{const r=p("APP_GLOBAL_SETTINGS_API"),d=JSON.parse(localStorage.getItem("user")??"{}");return l.create({baseURL:`${r}/v1/global-settings`,headers:{"Content-type":"application/json",Authorization:`Bearer ${d.token}`,...t},params:e})},G=s("HardwareServices",{getHandheldReader:t=>n({params:t}).get("/reader"),getHandheldReaderDetail:t=>n().get(`/reader/${t}`),getHandheldReaderOptions:t=>n({params:t}).get("/reader/options"),putMarkHandheldStatus:t=>n().put("/reader/mark-status",t),putPingReaders:t=>n().put("/iot-reader/ping",t),putMarkIOTStatus:(t,e)=>n().put(`/${e}/mark-status`,t),putEditReaderGroup:(t,e,r)=>n().put(`/${t==="iot"?"iot-":""}reader/${r}/set-group`,e),putEditAntennaGroup:(t,e)=>n().put(`/iot-reader/${e}/set-port-group`,t),putEditPortStatus:(t,e)=>n().put(`/iot-reader/${e}/set-port-status`,t),putEditAliasName:(t,e,r)=>n().put(`/${t==="iot"?"iot-":""}reader/${r}/set-alias-name`,e),putAntennaPower:(t,e)=>n().put(`/iot-reader/${e}/set-antenna-power`,t),getIOTReaderOrAntenna:(t,e)=>n({params:e}).get(`/${t}`),getIOTReaderDetail:t=>n().get(`/iot-reader/${t}`),getIOTReaderOrAntennaOptions:(t,e)=>n({params:e}).get(`/${t}/options`),getActivityLog:t=>n({params:t}).get("/activity-log"),getActivityLogOptions:t=>n({params:t}).get("/activity-log/options"),getDetailActivityLog:t=>n({params:t}).get("/activity-log"),getDetailActivityLogOptions:t=>n({params:t}).get("/activity-log/options"),getExistingAliasNames:()=>n().get("/reader/alias-names"),getIotReaderPort:(t,e)=>n({params:e}).get(`/iot-reader/${t}/ports`)}),$=o({env:"APP_LOGS_NOTIFICATION_API",prefix:"/v2"}),U=s("LogServices",{getSessionLogList:t=>$.get("/session-log",{params:t})}),P=o({prefix:"/v1/global-settings/option"}),D=s("OptionServices",{getPositions:()=>P.get("/position"),getDivisions:()=>P.get("/division")}),g=o({prefix:"/v1/global-settings/position"}),b=s("PositionServices",{getPositions:t=>g.get("",{params:t}),getPositionDetail:t=>g.get(`/${t}`),postCreatePosition:t=>g.post("/",t),putEditPosition:(t,e)=>g.put(`/${t}`,e),deletePositions:t=>{const e={id:JSON.stringify(t)};return g.delete("",{params:e})}}),T=o({env:"APP_TAGSAMURAI_API",prefix:"/tag/v2"}),C=s("TagServices",{getTagInfo:t=>T.get("/rfid-qr/scan",{params:t})}),A=o({prefix:"/v1/global-settings/change-log"}),N=s("TagEventlogServices",{getTAGEventlog:t=>A.get("/tag-event-log",{params:t}),getTAGEventlogOptions:t=>A.get("/tag-event-log/options",{params:t}),getDetailTAGEventlog:t=>A.get(`/tag-event-log/${t}`)}),i=o({prefix:"/v1/global-settings/user"}),B=s("UserServices",{getUsers:t=>i.get("",{params:t}),getUserDetail:t=>i.get(`/${t}`),getUserSystemLogs:(t,e)=>i.get(`/${t}/system-logs`,{params:e}),getUserSystemLogOptions:(t,e)=>{const r={};return r[e]=!0,i.get(`/${t}/system-logs/options`,{params:r})},postCreateUser:t=>{const e={"Content-Type":"multipart/form-data"};return i.post("",t,{headers:e})},putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return i.put(`/${t}`,e,{headers:r})},deleteUsers:t=>{const e={id:JSON.stringify(t)};return i.delete("",{params:e})},putToggleStatusUsers:t=>i.put("/active-status",t),getUserOptions:t=>{const e={};return e[t]=!0,i.get("/options",{params:e})},deleteCancelEmailChange:t=>i.delete(`/cancel-email-change/${t}`),postResendEmail:t=>i.post("/resend-email",t),putChangePassword:(t,e)=>i.put(`/change-password/${t}`,e)})}}});
1
+ System.register(["axios"],function(s,y){"use strict";var l;return{setters:[c=>{l=c.default}],execute:function(){const c={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"},p=s("getBaseURL",(t="APP_TAGSAMURAI_API")=>c["VITE_"+t]),i=(t={},e=!1)=>{const{env:r="APP_GLOBAL_SETTINGS_API",prefix:d="",headers:I={},..._}=t,O=`${p(r)}${d}`,v=JSON.parse(localStorage.getItem("user")??"{}"),$=v.jwt??v.token??"";console.log("🚀 ~ jwt:",$),console.log("🚀 ~ user:",v);const{href:h}=window.location,m=h.split("?t=")[1];return console.log("🚀 ~ window.location:",window.location),console.log("🚀 ~ tokenQuery:",m),l.create({..._,baseURL:O,headers:e?I:{"Content-Type":"application/json",Authorization:`Bearer ${$}`,...I}})},E=s("getImageURL",t=>{if(!t)return;const e=p("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),L=s("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),P=i({prefix:"/v1/global-settings/change-log"}),R=s("ChangelogServices",{getChangelogs:t=>P.get("",{params:t}),getChangelogOptions:t=>P.get("/options",{params:t})}),a=i({prefix:"/v1/global-settings/division"}),G=s("DivisionServices",{getDivisions:t=>a.get("",{params:t}),getDivisionDetail:t=>a.get(`/${t}`),postCreateDivision:t=>a.post("/",t),putEditDivision:(t,e)=>a.put(`/${t}`,e),deleteDivisions:t=>{const e={id:JSON.stringify(t)};return a.delete("",{params:e})}}),u=i({env:"APP_TAGSAMURAI_API",prefix:"/v1/global-settings"}),U=s("GlobalTagServices",{getTAGAllPaired:(t,e)=>u.get(`/${t}`,{params:e}),getTAGAllPairedOptions:(t,e)=>u.get(`/${t}/options`,{params:e}),getTAGNotPaired:(t,e)=>u.get(`/${t}/not-paired`,{params:e}),getTAGNotPairedOptions:(t,e)=>u.get(`/${t}/not-paired/options`,{params:e})}),n=({headers:t={},params:e={}}={})=>{const r=p("APP_GLOBAL_SETTINGS_API"),d=JSON.parse(localStorage.getItem("user")??"{}");return l.create({baseURL:`${r}/v1/global-settings`,headers:{"Content-type":"application/json",Authorization:`Bearer ${d.token}`,...t},params:e})},D=s("HardwareServices",{getHandheldReader:t=>n({params:t}).get("/reader"),getHandheldReaderDetail:t=>n().get(`/reader/${t}`),getHandheldReaderOptions:t=>n({params:t}).get("/reader/options"),putMarkHandheldStatus:t=>n().put("/reader/mark-status",t),putPingReaders:t=>n().put("/iot-reader/ping",t),putMarkIOTStatus:(t,e)=>n().put(`/${e}/mark-status`,t),putEditReaderGroup:(t,e,r)=>n().put(`/${t==="iot"?"iot-":""}reader/${r}/set-group`,e),putEditAntennaGroup:(t,e)=>n().put(`/iot-reader/${e}/set-port-group`,t),putEditPortStatus:(t,e)=>n().put(`/iot-reader/${e}/set-port-status`,t),putEditAliasName:(t,e,r)=>n().put(`/${t==="iot"?"iot-":""}reader/${r}/set-alias-name`,e),putAntennaPower:(t,e)=>n().put(`/iot-reader/${e}/set-antenna-power`,t),getIOTReaderOrAntenna:(t,e)=>n({params:e}).get(`/${t}`),getIOTReaderDetail:t=>n().get(`/iot-reader/${t}`),getIOTReaderOrAntennaOptions:(t,e)=>n({params:e}).get(`/${t}/options`),getActivityLog:t=>n({params:t}).get("/activity-log"),getActivityLogOptions:t=>n({params:t}).get("/activity-log/options"),getDetailActivityLog:t=>n({params:t}).get("/activity-log"),getDetailActivityLogOptions:t=>n({params:t}).get("/activity-log/options"),getExistingAliasNames:()=>n().get("/reader/alias-names"),getIotReaderPort:(t,e)=>n({params:e}).get(`/iot-reader/${t}/ports`)}),T=i({env:"APP_LOGS_NOTIFICATION_API",prefix:"/v2"}),b=s("LogServices",{getSessionLogList:t=>T.get("/session-log",{params:t})}),S=i({prefix:"/v1/global-settings/option"}),C=s("OptionServices",{getPositions:()=>S.get("/position"),getDivisions:()=>S.get("/division")}),g=i({prefix:"/v1/global-settings/position"}),N=s("PositionServices",{getPositions:t=>g.get("",{params:t}),getPositionDetail:t=>g.get(`/${t}`),postCreatePosition:t=>g.post("/",t),putEditPosition:(t,e)=>g.put(`/${t}`,e),deletePositions:t=>{const e={id:JSON.stringify(t)};return g.delete("",{params:e})}}),f=i({env:"APP_TAGSAMURAI_API",prefix:"/tag/v2"}),w=s("TagServices",{getTagInfo:t=>f.get("/rfid-qr/scan",{params:t})}),A=i({prefix:"/v1/global-settings/change-log"}),B=s("TagEventlogServices",{getTAGEventlog:t=>A.get("/tag-event-log",{params:t}),getTAGEventlogOptions:t=>A.get("/tag-event-log/options",{params:t}),getDetailTAGEventlog:t=>A.get(`/tag-event-log/${t}`)}),o=i({prefix:"/v1/global-settings/user"}),k=s("UserServices",{getUsers:t=>o.get("",{params:t}),getUserDetail:t=>o.get(`/${t}`),getUserSystemLogs:(t,e)=>o.get(`/${t}/system-logs`,{params:e}),getUserSystemLogOptions:(t,e)=>{const r={};return r[e]=!0,o.get(`/${t}/system-logs/options`,{params:r})},postCreateUser:t=>{const e={"Content-Type":"multipart/form-data"};return o.post("",t,{headers:e})},putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return o.put(`/${t}`,e,{headers:r})},deleteUsers:t=>{const e={id:JSON.stringify(t)};return o.delete("",{params:e})},putToggleStatusUsers:t=>o.put("/active-status",t),getUserOptions:t=>{const e={};return e[t]=!0,o.get("/options",{params:e})},deleteCancelEmailChange:t=>o.delete(`/cancel-email-change/${t}`),postResendEmail:t=>o.post("/resend-email",t),putChangePassword:(t,e)=>o.put(`/change-password/${t}`,e)})}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "1.0.1-alpha.10",
3
+ "version": "1.0.1-alpha.12",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -1,6 +1,6 @@
1
1
  import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
2
2
  import { MultiSelectOption } from '../types/options.type';
3
- import { TAGType } from '../types/tag.type';
3
+ import { ApplicationModule, TAGType } from '../types/tag.type';
4
4
  import { TAGEventlogData, TAGEventlogDetail } from '../types/tagEventlog.type';
5
5
  export interface TAGEventlogFilterQuery {
6
6
  status?: string[];
@@ -16,6 +16,7 @@ export type TAGEventlogDetailResponse = {
16
16
  message: string;
17
17
  data: {
18
18
  type: 'Audit' | 'Allocation';
19
+ module?: ApplicationModule;
19
20
  detail: TAGEventlogDetail[];
20
21
  };
21
22
  };