@tagsamurai/gsts-api-services 1.0.1-alpha.16 → 1.0.1-alpha.18

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