@tagsamurai/gsts-api-services 1.0.1-alpha.17 → 1.0.1-alpha.19
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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],
|
|
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
4
|
env: n = "APP_GLOBAL_SETTINGS_API",
|
|
5
5
|
prefix: v = "",
|
|
@@ -15,11 +15,11 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
15
15
|
...p
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
},
|
|
18
|
+
}, G = (t) => {
|
|
19
19
|
if (!t) return;
|
|
20
20
|
const e = d("APP_TAGSAMURAI_API");
|
|
21
21
|
return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
|
|
22
|
-
},
|
|
22
|
+
}, y = (t) => {
|
|
23
23
|
if (!t || typeof t == "string")
|
|
24
24
|
return;
|
|
25
25
|
const e = {};
|
|
@@ -30,14 +30,16 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
30
30
|
[n]: t[n]
|
|
31
31
|
});
|
|
32
32
|
}), e;
|
|
33
|
-
},
|
|
33
|
+
}, f = o({
|
|
34
|
+
prefix: "/v1/global-settings/auth"
|
|
35
|
+
}), O = () => f.post("/logout"), E = { logout: O }, c = o({
|
|
34
36
|
prefix: "/v1/global-settings/change-log"
|
|
35
|
-
}),
|
|
37
|
+
}), R = {
|
|
36
38
|
getChangelogs: (t) => c.get("", { params: t }),
|
|
37
39
|
getChangelogOptions: (t) => c.get("/options", { params: t })
|
|
38
|
-
}, a =
|
|
40
|
+
}, a = o({
|
|
39
41
|
prefix: "/v1/global-settings/division"
|
|
40
|
-
}),
|
|
42
|
+
}), D = {
|
|
41
43
|
getDivisions: (t) => a.get("", { params: t }),
|
|
42
44
|
getDivisionDetail: (t) => a.get(`/${t}`),
|
|
43
45
|
postCreateDivision: (t) => a.post("/", t),
|
|
@@ -46,20 +48,21 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
46
48
|
const e = { id: JSON.stringify(t) };
|
|
47
49
|
return a.delete("", { params: e });
|
|
48
50
|
}
|
|
49
|
-
},
|
|
51
|
+
}, i = o({
|
|
50
52
|
prefix: "/v1/global-settings"
|
|
51
|
-
}),
|
|
52
|
-
getTAGAllPaired: (t, e) =>
|
|
53
|
-
getTAGAllPairedOptions: (t, e) =>
|
|
54
|
-
getTAGNotPaired: (t, e) =>
|
|
55
|
-
getTAGNotPairedOptions: (t, e) =>
|
|
56
|
-
getScanTAG: (t, e) =>
|
|
57
|
-
putDetailAuditTAG: (t, e) =>
|
|
58
|
-
putAuditTAG: (t, e) =>
|
|
59
|
-
putAllocateTAG: (t, e) =>
|
|
60
|
-
|
|
53
|
+
}), L = {
|
|
54
|
+
getTAGAllPaired: (t, e) => i.get(`/${t}`, { params: e }),
|
|
55
|
+
getTAGAllPairedOptions: (t, e) => i.get(`/${t}/options`, { params: e }),
|
|
56
|
+
getTAGNotPaired: (t, e) => i.get(`/${t}/not-paired`, { params: e }),
|
|
57
|
+
getTAGNotPairedOptions: (t, e) => i.get(`/${t}/not-paired/options`, { params: e }),
|
|
58
|
+
getScanTAG: (t, e) => i.get(`/${t}/scan`, { params: e }),
|
|
59
|
+
putDetailAuditTAG: (t, e) => i.put(`/${t}/audit-detail`, e),
|
|
60
|
+
putAuditTAG: (t, e) => i.put(`/${t}/audit`, e),
|
|
61
|
+
putAllocateTAG: (t, e) => i.put(`/${t}/allocate`, e),
|
|
62
|
+
putCombineTAG: (t) => i.put("/combine", t)
|
|
63
|
+
}, r = o({
|
|
61
64
|
prefix: "/v1/global-settings"
|
|
62
|
-
}),
|
|
65
|
+
}), U = {
|
|
63
66
|
getHandheldReader: (t) => r.get("/reader", { params: t }),
|
|
64
67
|
getHandheldReaderDetail: (t) => r.get(`/reader/${t}`),
|
|
65
68
|
getHandheldReaderOptions: (t) => r.get("/reader/options", { params: t }),
|
|
@@ -86,19 +89,19 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
86
89
|
getDetailActivityLogOptions: (t) => r.get("/activity-log/options", { params: t }),
|
|
87
90
|
getExistingAliasNames: () => r.get("/reader/alias-names"),
|
|
88
91
|
getIotReaderPort: (t, e) => r.get(`/iot-reader/${t}/ports`, { params: e })
|
|
89
|
-
},
|
|
92
|
+
}, _ = o({
|
|
90
93
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
91
94
|
prefix: "/v2"
|
|
92
|
-
}),
|
|
93
|
-
getSessionLogList: (t) =>
|
|
94
|
-
}, A =
|
|
95
|
+
}), b = {
|
|
96
|
+
getSessionLogList: (t) => _.get("/session-log", { params: t })
|
|
97
|
+
}, A = o({
|
|
95
98
|
prefix: "/v1/global-settings/option"
|
|
96
|
-
}),
|
|
99
|
+
}), x = {
|
|
97
100
|
getPositions: () => A.get("/position"),
|
|
98
101
|
getDivisions: () => A.get("/division")
|
|
99
|
-
}, g =
|
|
102
|
+
}, g = o({
|
|
100
103
|
prefix: "/v1/global-settings/position"
|
|
101
|
-
}),
|
|
104
|
+
}), C = {
|
|
102
105
|
getPositions: (t) => g.get("", { params: t }),
|
|
103
106
|
getPositionDetail: (t) => g.get(`/${t}`),
|
|
104
107
|
postCreatePosition: (t) => g.post("/", t),
|
|
@@ -107,20 +110,20 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
107
110
|
const e = { id: JSON.stringify(t) };
|
|
108
111
|
return g.delete("", { params: e });
|
|
109
112
|
}
|
|
110
|
-
},
|
|
113
|
+
}, h = o({
|
|
111
114
|
env: "APP_TAGSAMURAI_API",
|
|
112
115
|
prefix: "/tag/v2"
|
|
113
|
-
}),
|
|
114
|
-
getTagInfo: (t) =>
|
|
115
|
-
}, u =
|
|
116
|
+
}), N = {
|
|
117
|
+
getTagInfo: (t) => h.get("/rfid-qr/scan", { params: t })
|
|
118
|
+
}, u = o({
|
|
116
119
|
prefix: "/v1/global-settings/change-log"
|
|
117
|
-
}),
|
|
120
|
+
}), w = {
|
|
118
121
|
getTAGEventlog: (t) => u.get("/tag-event-log", { params: t }),
|
|
119
122
|
getTAGEventlogOptions: (t) => u.get("/tag-event-log/options", { params: t }),
|
|
120
123
|
getDetailTAGEventlog: (t) => u.get(`/tag-event-log/${t}`)
|
|
121
|
-
}, s =
|
|
124
|
+
}, s = o({
|
|
122
125
|
prefix: "/v1/global-settings/user"
|
|
123
|
-
}),
|
|
126
|
+
}), M = {
|
|
124
127
|
getUsers: (t) => s.get("", { params: t }),
|
|
125
128
|
getUserDetail: (t) => s.get(`/${t}`),
|
|
126
129
|
getUserSystemLogs: (t, e) => s.get(`/${t}/system-logs`, { params: e }),
|
|
@@ -150,17 +153,18 @@ const T = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
150
153
|
putChangePassword: (t, e) => s.put(`/change-password/${t}`, e)
|
|
151
154
|
};
|
|
152
155
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
156
|
+
E as AuthServices,
|
|
157
|
+
R as ChangelogServices,
|
|
158
|
+
D as DivisionServices,
|
|
159
|
+
L as GlobalTagServices,
|
|
160
|
+
U as HardwareServices,
|
|
161
|
+
b as LogServices,
|
|
162
|
+
x as OptionServices,
|
|
163
|
+
C as PositionServices,
|
|
164
|
+
w as TagEventlogServices,
|
|
165
|
+
N as TagServices,
|
|
166
|
+
M as UserServices,
|
|
163
167
|
d as getBaseURL,
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
G as getImageURL,
|
|
169
|
+
y as queryParamsStringfy
|
|
166
170
|
};
|
package/api-services.system.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios"],function(s,
|
|
1
|
+
System.register(["axios"],function(s,h){"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")??"{}"),m=S.jwt??S.token??"";return p.create({...O,baseURL:_,headers:e?P:{"Content-Type":"application/json",Authorization:`Bearer ${m}`,...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}`}),G=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),putCombineTAG:t=>a.put("/combine",t)}),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
package/src/dto/tag.dto.d.ts
CHANGED
|
@@ -41,3 +41,12 @@ export interface PUTAllocateTAGBody {
|
|
|
41
41
|
group?: number;
|
|
42
42
|
module?: ApplicationModule;
|
|
43
43
|
}
|
|
44
|
+
export type CombineSeparateActions = 'Combine RFID & QR' | 'Combine RFID & NFC' | 'Combine RFID & NFC & QR' | 'Combine NFC & QR' | 'Separate RFID & QR' | 'Separate RFID & NFC' | 'Separate RFID & NFC & QR' | 'Separate NFC & QR';
|
|
45
|
+
export interface PUTCombineTAGBody {
|
|
46
|
+
ids: {
|
|
47
|
+
rfid?: string;
|
|
48
|
+
nfc?: string;
|
|
49
|
+
qr?: string;
|
|
50
|
+
}[];
|
|
51
|
+
action: CombineSeparateActions;
|
|
52
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { BooleanOptions } from '../dto/dataTable.dto';
|
|
3
3
|
import { HardwareFilterQuery } from '../dto/hardware.dto';
|
|
4
|
-
import { PUTAllocateTAGBody, PUTAuditTAGBody, TAGDetailAuditResponse, TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
|
|
4
|
+
import { PUTAllocateTAGBody, PUTAuditTAGBody, PUTCombineTAGBody, TAGDetailAuditResponse, TAGFetchOptionResponse, TAGFetchResponse } from '../dto/tag.dto';
|
|
5
5
|
import { FetchResponse } from '../types/fetchResponse.type';
|
|
6
6
|
import { TAGType } from '../types/tag.type';
|
|
7
7
|
declare const GlobalTagServices: {
|
|
@@ -21,5 +21,6 @@ declare const GlobalTagServices: {
|
|
|
21
21
|
}) => Promise<AxiosResponse<TAGDetailAuditResponse>>;
|
|
22
22
|
putAuditTAG: (tagType: TAGType, body: PUTAuditTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
23
23
|
putAllocateTAG: (tagType: TAGType, body: PUTAllocateTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
24
|
+
putCombineTAG: (body: PUTCombineTAGBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
24
25
|
};
|
|
25
26
|
export default GlobalTagServices;
|