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

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,27 +1,25 @@
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) => {
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) => {
3
3
  const {
4
4
  env: r = "APP_GLOBAL_SETTINGS_API",
5
5
  prefix: u = "",
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,
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,
13
11
  baseURL: $,
14
- headers: e ? A : {
12
+ headers: e ? c : {
15
13
  "Content-Type": "application/json",
16
- Authorization: `Bearer ${d}`,
17
- ...A
14
+ Authorization: `Bearer ${S}`,
15
+ ...c
18
16
  }
19
17
  });
20
- }, y = (t) => {
18
+ }, h = (t) => {
21
19
  if (!t) return;
22
- const e = c("APP_TAGSAMURAI_API");
20
+ const e = l("APP_TAGSAMURAI_API");
23
21
  return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
24
- }, E = (t) => {
22
+ }, m = (t) => {
25
23
  if (!t || typeof t == "string")
26
24
  return;
27
25
  const e = {};
@@ -32,33 +30,37 @@ const f = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
32
30
  [r]: t[r]
33
31
  });
34
32
  }), e;
35
- }, P = o({
33
+ }, d = o({
36
34
  prefix: "/v1/global-settings/change-log"
37
35
  }), G = {
38
- getChangelogs: (t) => P.get("", { params: t }),
39
- getChangelogOptions: (t) => P.get("/options", { params: t })
40
- }, i = o({
36
+ getChangelogs: (t) => d.get("", { params: t }),
37
+ getChangelogOptions: (t) => d.get("/options", { params: t })
38
+ }, a = o({
41
39
  prefix: "/v1/global-settings/division"
42
- }), L = {
43
- getDivisions: (t) => i.get("", { params: t }),
44
- getDivisionDetail: (t) => i.get(`/${t}`),
45
- postCreateDivision: (t) => i.post("/", t),
46
- putEditDivision: (t, e) => i.put(`/${t}`, e),
40
+ }), E = {
41
+ getDivisions: (t) => a.get("", { params: t }),
42
+ getDivisionDetail: (t) => a.get(`/${t}`),
43
+ postCreateDivision: (t) => a.post("/", t),
44
+ putEditDivision: (t, e) => a.put(`/${t}`, e),
47
45
  deleteDivisions: (t) => {
48
46
  const e = { id: JSON.stringify(t) };
49
- return i.delete("", { params: e });
47
+ return a.delete("", { params: e });
50
48
  }
51
- }, g = o({
49
+ }, i = o({
52
50
  env: "APP_TAGSAMURAI_API",
53
51
  prefix: "/v1/global-settings"
54
- }), R = {
55
- getTAGAllPaired: (t, e) => g.get(`/${t}`, { params: e }),
56
- getTAGAllPairedOptions: (t, e) => g.get(`/${t}/options`, { params: e }),
57
- getTAGNotPaired: (t, e) => g.get(`/${t}/not-paired`, { params: e }),
58
- getTAGNotPairedOptions: (t, e) => g.get(`/${t}/not-paired/options`, { params: e })
52
+ }), y = {
53
+ getTAGAllPaired: (t, e) => i.get(`/${t}`, { params: e }),
54
+ getTAGAllPairedOptions: (t, e) => i.get(`/${t}/options`, { params: e }),
55
+ getTAGNotPaired: (t, e) => i.get(`/${t}/not-paired`, { params: e }),
56
+ getTAGNotPairedOptions: (t, e) => i.get(`/${t}/not-paired/options`, { params: e }),
57
+ getScanTAG: (t, e) => i.get(`/${t}/scan`, { params: e }),
58
+ putDetailAuditTAG: (t, e) => i.put(`/${t}/audit-detail`, e),
59
+ putAuditTAG: (t, e) => i.put(`/${t}/audit`, e),
60
+ putAllocateTAG: (t, e) => i.put(`/${t}/allocate`, e)
59
61
  }, n = ({ headers: t = {}, params: e = {} } = {}) => {
60
- const r = c("APP_GLOBAL_SETTINGS_API"), u = JSON.parse(localStorage.getItem("user") ?? "{}");
61
- return I.create({
62
+ const r = l("APP_GLOBAL_SETTINGS_API"), u = JSON.parse(localStorage.getItem("user") ?? "{}");
63
+ return v.create({
62
64
  baseURL: `${r}/v1/global-settings`,
63
65
  headers: {
64
66
  "Content-type": "application/json",
@@ -67,7 +69,7 @@ const f = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
67
69
  },
68
70
  params: e
69
71
  });
70
- }, U = {
72
+ }, L = {
71
73
  getHandheldReader: (t) => n({ params: t }).get("/reader"),
72
74
  getHandheldReaderDetail: (t) => n().get(`/reader/${t}`),
73
75
  getHandheldReaderOptions: (t) => n({ params: t }).get("/reader/options"),
@@ -94,41 +96,41 @@ const f = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
94
96
  getDetailActivityLogOptions: (t) => n({ params: t }).get("/activity-log/options"),
95
97
  getExistingAliasNames: () => n().get("/reader/alias-names"),
96
98
  getIotReaderPort: (t, e) => n({ params: e }).get(`/iot-reader/${t}/ports`)
97
- }, O = o({
99
+ }, _ = o({
98
100
  env: "APP_LOGS_NOTIFICATION_API",
99
101
  prefix: "/v2"
100
- }), D = {
101
- getSessionLogList: (t) => O.get("/session-log", { params: t })
102
- }, v = o({
102
+ }), R = {
103
+ getSessionLogList: (t) => _.get("/session-log", { params: t })
104
+ }, P = o({
103
105
  prefix: "/v1/global-settings/option"
104
- }), N = {
105
- getPositions: () => v.get("/position"),
106
- getDivisions: () => v.get("/division")
107
- }, a = o({
106
+ }), U = {
107
+ getPositions: () => P.get("/position"),
108
+ getDivisions: () => P.get("/division")
109
+ }, g = o({
108
110
  prefix: "/v1/global-settings/position"
109
- }), b = {
110
- getPositions: (t) => a.get("", { params: t }),
111
- getPositionDetail: (t) => a.get(`/${t}`),
112
- postCreatePosition: (t) => a.post("/", t),
113
- putEditPosition: (t, e) => a.put(`/${t}`, e),
111
+ }), D = {
112
+ getPositions: (t) => g.get("", { params: t }),
113
+ getPositionDetail: (t) => g.get(`/${t}`),
114
+ postCreatePosition: (t) => g.post("/", t),
115
+ putEditPosition: (t, e) => g.put(`/${t}`, e),
114
116
  deletePositions: (t) => {
115
117
  const e = { id: JSON.stringify(t) };
116
- return a.delete("", { params: e });
118
+ return g.delete("", { params: e });
117
119
  }
118
- }, h = o({
120
+ }, O = o({
119
121
  env: "APP_TAGSAMURAI_API",
120
122
  prefix: "/tag/v2"
121
- }), C = {
122
- getTagInfo: (t) => h.get("/rfid-qr/scan", { params: t })
123
- }, l = o({
123
+ }), N = {
124
+ getTagInfo: (t) => O.get("/rfid-qr/scan", { params: t })
125
+ }, p = o({
124
126
  prefix: "/v1/global-settings/change-log"
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}`)
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}`)
129
131
  }, s = o({
130
132
  prefix: "/v1/global-settings/user"
131
- }), x = {
133
+ }), C = {
132
134
  getUsers: (t) => s.get("", { params: t }),
133
135
  getUserDetail: (t) => s.get(`/${t}`),
134
136
  getUserSystemLogs: (t, e) => s.get(`/${t}/system-logs`, { params: e }),
@@ -159,16 +161,16 @@ const f = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
159
161
  };
160
162
  export {
161
163
  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
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,
171
+ N as TagServices,
172
+ C as UserServices,
173
+ l as getBaseURL,
174
+ h as getImageURL,
175
+ m as queryParamsStringfy
174
176
  };
@@ -1 +1 @@
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)})}}});
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)})}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "1.0.1-alpha.12",
3
+ "version": "1.0.1-alpha.14",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -1,5 +1,6 @@
1
1
  import { MultiSelectOption } from '../types/options.type';
2
- import { TAGCountType, TAGDataType } from '../types/tag.type';
2
+ import { ApplicationModule, TAGCountType, TAGDataType } from '../types/tag.type';
3
+ import { TAGDetailCount } from '../types/tagEventlog.type';
3
4
  export interface TAGFetchResponse<T = TAGDataType> {
4
5
  message: string;
5
6
  status: number;
@@ -9,6 +10,13 @@ export interface TAGFetchResponse<T = TAGDataType> {
9
10
  } & TAGCountType;
10
11
  }
11
12
  export type TAGFetchOptionResponse<Opt = Record<string, boolean>> = Record<keyof Opt, MultiSelectOption[]>;
13
+ export type TAGDetailAuditResponse = {
14
+ status: number;
15
+ message: string;
16
+ data: {
17
+ detail: TAGDetailCount[];
18
+ };
19
+ };
12
20
  export interface TAGFilterRaw {
13
21
  rfidCode?: ('Yes' | 'No')[];
14
22
  qrCode?: ('Yes' | 'No')[];
@@ -22,3 +30,14 @@ export interface TAGFilterRaw {
22
30
  tag?: string[];
23
31
  }
24
32
  export type TAGFilterQuery = Partial<Record<keyof TAGFilterRaw, string>>;
33
+ export interface PUTAuditTAGBody {
34
+ ids: string[];
35
+ markNotFoundAsDamagedMissing: boolean;
36
+ moveFoundFixedAssetToPortal: boolean;
37
+ moveFoundSupplyAssetToPortal: boolean;
38
+ }
39
+ export interface PUTAllocateTAGBody {
40
+ ids: string[];
41
+ group: number;
42
+ module: ApplicationModule;
43
+ }
@@ -1,7 +1,7 @@
1
1
  import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
2
2
  import { MultiSelectOption } from '../types/options.type';
3
3
  import { ApplicationModule, TAGType } from '../types/tag.type';
4
- import { TAGEventlogData, TAGEventlogDetail } from '../types/tagEventlog.type';
4
+ import { TAGDetailCount, TAGEventlogData } from '../types/tagEventlog.type';
5
5
  export interface TAGEventlogFilterQuery {
6
6
  status?: string[];
7
7
  modifiedBy?: number[];
@@ -17,6 +17,6 @@ export type TAGEventlogDetailResponse = {
17
17
  data: {
18
18
  type: 'Audit' | 'Allocation';
19
19
  module?: ApplicationModule;
20
- detail: TAGEventlogDetail[];
20
+ detail: TAGDetailCount[];
21
21
  };
22
22
  };
@@ -1,7 +1,8 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  import { BooleanOptions } from '../dto/dataTable.dto';
3
3
  import { HardwareFilterQuery } from '../dto/hardware.dto';
4
- import { TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
4
+ import { PUTAllocateTAGBody, PUTAuditTAGBody, TAGDetailAuditResponse, TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
5
+ import { FetchResponse } from '../types/fetchResponse.type';
5
6
  import { TAGType } from '../types/tag.type';
6
7
  declare const GlobalTagServices: {
7
8
  getTAGAllPaired: (tagType: TAGType, params?: HardwareFilterQuery) => Promise<AxiosResponse<TAGFetchResponse>>;
@@ -12,5 +13,13 @@ declare const GlobalTagServices: {
12
13
  getTAGNotPairedOptions: (tagType: TAGType, params?: BooleanOptions) => Promise<AxiosResponse<{
13
14
  data: TAGFetchOptionResponse;
14
15
  }>>;
16
+ getScanTAG: (tagType: TAGType, params?: {
17
+ tag: string;
18
+ }) => Promise<AxiosResponse>;
19
+ putDetailAuditTAG: (tagType: TAGType, body: {
20
+ ids: string[];
21
+ }) => Promise<AxiosResponse<TAGDetailAuditResponse>>;
22
+ putAuditTAG: (tagType: TAGType, body: PUTAuditTAGBody) => Promise<AxiosResponse<FetchResponse>>;
23
+ putAllocateTAG: (tagType: TAGType, body: PUTAllocateTAGBody) => Promise<AxiosResponse<FetchResponse>>;
15
24
  };
16
25
  export default GlobalTagServices;
@@ -6,7 +6,7 @@ export interface TAGEventlogData {
6
6
  modifiedBy?: string;
7
7
  createdAt: string;
8
8
  }
9
- export interface TAGEventlogDetail {
9
+ export interface TAGDetailCount {
10
10
  type: 'availableFound' | 'damagedMissingFound' | 'availableMarkDamagedMissing' | 'fixedAssetMoveToPortal' | 'supplyAssetMoveToPortal' | 'allocated';
11
11
  isChecked?: boolean;
12
12
  groupName?: string;