@tagsamurai/gsts-api-services 1.0.2-alpha.1 → 1.0.2-alpha.3
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 +173 -118
- package/package.json +1 -1
- package/src/dto/auth.dto.d.ts +18 -0
- package/src/services/auth.service.d.ts +30 -3
- package/src/utils/getImageURL.util.d.ts +11 -1
package/api-services.es.js
CHANGED
|
@@ -1,33 +1,90 @@
|
|
|
1
|
-
import
|
|
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" },
|
|
1
|
+
import _ from "axios";
|
|
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 = (t = "APP_TAGSAMURAI_API") => E["VITE_" + t], a = (t = {}, e = !1) => {
|
|
3
3
|
const {
|
|
4
4
|
env: r = "APP_GLOBAL_SETTINGS_API",
|
|
5
|
-
prefix:
|
|
6
|
-
headers:
|
|
7
|
-
...
|
|
8
|
-
} = t,
|
|
9
|
-
...
|
|
10
|
-
baseURL:
|
|
11
|
-
headers: e ?
|
|
5
|
+
prefix: s = "",
|
|
6
|
+
headers: i = {},
|
|
7
|
+
...p
|
|
8
|
+
} = t, y = "".concat(T(r)).concat(s), A = _.create({
|
|
9
|
+
...p,
|
|
10
|
+
baseURL: y,
|
|
11
|
+
headers: e ? i : {
|
|
12
12
|
"Content-Type": "application/json",
|
|
13
|
-
...
|
|
13
|
+
...i
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
return
|
|
17
|
-
var $, S
|
|
18
|
-
const P = JSON.parse((
|
|
16
|
+
return A.interceptors.request.use((v) => {
|
|
17
|
+
var f, $, S;
|
|
18
|
+
const P = JSON.parse((f = localStorage.getItem("user")) != null ? f : "{}"), O = (S = ($ = P.jwt) != null ? $ : P.token) != null ? S : "";
|
|
19
19
|
return v.headers.Authorization = "Bearer ".concat(O), v;
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
}), A;
|
|
21
|
+
}, u = a({
|
|
22
|
+
prefix: "/v1/global-settings/auth"
|
|
23
|
+
}), b = (t) => {
|
|
24
|
+
var e, r, s, i;
|
|
25
|
+
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((i = (s = t.response) == null ? void 0 : s.data) == null ? void 0 : i.message) === "jwt malformed" ? (window.onblur = null, window.onfocus = null, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
|
|
26
|
+
}, x = {
|
|
27
|
+
login: (t) => {
|
|
28
|
+
const e = { ...t, isMobile: !1 };
|
|
29
|
+
return u.post("/login", e);
|
|
30
|
+
},
|
|
31
|
+
reLogin: (t) => (u.interceptors.response.use((e) => e, b), u.post("/login", t)),
|
|
32
|
+
requestOTP: (t) => {
|
|
33
|
+
const e = { email: t };
|
|
34
|
+
return u.post("/request-otp", e);
|
|
35
|
+
},
|
|
36
|
+
requestResetPassLink: (t) => {
|
|
37
|
+
const e = { email: t };
|
|
38
|
+
return u.post("/request-reset-link", e);
|
|
39
|
+
},
|
|
40
|
+
setPassword: (t) => u.post("/set-password", t),
|
|
41
|
+
verifyToken: (t) => u.get("/verify-token/".concat(t)),
|
|
42
|
+
confirmEmailChange: (t) => {
|
|
43
|
+
const e = { token: t };
|
|
44
|
+
return u.put("/confirm-email-change/confirm", e);
|
|
45
|
+
},
|
|
46
|
+
postLogout: () => u.post("/logout"),
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @deprecated use postLogout instead
|
|
50
|
+
*/
|
|
51
|
+
logout: () => u.post("/logout")
|
|
52
|
+
}, h = (t, e, r) => {
|
|
53
|
+
const s = new URL(T("APP_TAGSAMURAI_API") || "").origin;
|
|
54
|
+
let i = t.startsWith("http") ? t : "".concat(s, "/file-storage/api/file/").concat(t.replace(/^\/+/, ""));
|
|
25
55
|
if (e || r) {
|
|
26
|
-
const
|
|
27
|
-
|
|
56
|
+
const p = new URLSearchParams();
|
|
57
|
+
e && (p.set("width", e.toString()), p.set("height", (r == null ? void 0 : r.toString()) || e.toString())), i += "?".concat(p.toString());
|
|
58
|
+
}
|
|
59
|
+
return i;
|
|
60
|
+
}, L = () => {
|
|
61
|
+
var e, r, s;
|
|
62
|
+
const t = JSON.parse((e = localStorage.getItem("user")) != null ? e : "{}");
|
|
63
|
+
return (s = (r = t.jwt) != null ? r : t.token) != null ? s : "";
|
|
64
|
+
}, R = async (t, e) => {
|
|
65
|
+
const r = await fetch(t, {
|
|
66
|
+
headers: {
|
|
67
|
+
Authorization: "Bearer ".concat(e)
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
if (!r.ok)
|
|
71
|
+
throw new Error("Image fetch failed: ".concat(r.status, " ").concat(r.statusText));
|
|
72
|
+
const s = await r.arrayBuffer();
|
|
73
|
+
return new Blob([s], {
|
|
74
|
+
type: r.headers.get("Content-Type") || "image/webp"
|
|
75
|
+
});
|
|
76
|
+
}, w = async (t) => {
|
|
77
|
+
try {
|
|
78
|
+
const e = L(), r = await R(t, e);
|
|
79
|
+
return URL.createObjectURL(r);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
return;
|
|
28
82
|
}
|
|
29
|
-
|
|
30
|
-
|
|
83
|
+
}, C = async (t, e, r, s) => {
|
|
84
|
+
if (!t) return;
|
|
85
|
+
const i = h(t, e, r);
|
|
86
|
+
return s ? i : w(i);
|
|
87
|
+
}, N = (t) => {
|
|
31
88
|
if (!t || typeof t == "string")
|
|
32
89
|
return;
|
|
33
90
|
const e = {};
|
|
@@ -38,141 +95,139 @@ const E = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
38
95
|
[r]: t[r]
|
|
39
96
|
});
|
|
40
97
|
}), e;
|
|
41
|
-
},
|
|
42
|
-
prefix: "/v1/global-settings/auth"
|
|
43
|
-
}), y = () => G.post("/logout"), h = { logout: y }, f = o({
|
|
98
|
+
}, I = a({
|
|
44
99
|
prefix: "/v1/global-settings/change-log"
|
|
45
|
-
}),
|
|
46
|
-
getChangelogs: (t) =>
|
|
47
|
-
getChangelogOptions: (t) =>
|
|
48
|
-
},
|
|
100
|
+
}), k = {
|
|
101
|
+
getChangelogs: (t) => I.get("", { params: t }),
|
|
102
|
+
getChangelogOptions: (t) => I.get("/options", { params: t })
|
|
103
|
+
}, c = a({
|
|
49
104
|
prefix: "/v1/global-settings/division"
|
|
50
|
-
}),
|
|
51
|
-
getDivisions: (t) =>
|
|
52
|
-
getDivisionDetail: (t) =>
|
|
53
|
-
postCreateDivision: (t) =>
|
|
54
|
-
putEditDivision: (t, e) =>
|
|
105
|
+
}), B = {
|
|
106
|
+
getDivisions: (t) => c.get("", { params: t }),
|
|
107
|
+
getDivisionDetail: (t) => c.get("/".concat(t)),
|
|
108
|
+
postCreateDivision: (t) => c.post("/", t),
|
|
109
|
+
putEditDivision: (t, e) => c.put("/".concat(t), e),
|
|
55
110
|
deleteDivisions: (t) => {
|
|
56
111
|
const e = { id: JSON.stringify(t) };
|
|
57
|
-
return
|
|
112
|
+
return c.delete("", { params: e });
|
|
58
113
|
}
|
|
59
|
-
},
|
|
114
|
+
}, g = a({
|
|
60
115
|
prefix: "/v1/global-settings"
|
|
61
|
-
}),
|
|
62
|
-
getTAGAllPaired: (t, e) =>
|
|
63
|
-
getTAGAllPairedOptions: (t, e) =>
|
|
64
|
-
getTAGNotPaired: (t, e) =>
|
|
65
|
-
getTAGNotPairedOptions: (t, e) =>
|
|
66
|
-
getScanTAG: (t, e) =>
|
|
67
|
-
putDetailAuditTAG: (t, e) =>
|
|
68
|
-
putAuditTAG: (t, e) =>
|
|
69
|
-
putAllocateTAG: (t, e) =>
|
|
70
|
-
putCombineTAG: (t) =>
|
|
71
|
-
},
|
|
116
|
+
}), j = {
|
|
117
|
+
getTAGAllPaired: (t, e) => g.get("/".concat(t), { params: e }),
|
|
118
|
+
getTAGAllPairedOptions: (t, e) => g.get("/".concat(t, "/options"), { params: e }),
|
|
119
|
+
getTAGNotPaired: (t, e) => g.get("/".concat(t, "/not-paired"), { params: e }),
|
|
120
|
+
getTAGNotPairedOptions: (t, e) => g.get("/".concat(t, "/not-paired/options"), { params: e }),
|
|
121
|
+
getScanTAG: (t, e) => g.get("/".concat(t, "/scan"), { params: e }),
|
|
122
|
+
putDetailAuditTAG: (t, e) => g.put("/".concat(t, "/audit-detail"), e),
|
|
123
|
+
putAuditTAG: (t, e) => g.put("/".concat(t, "/audit"), e),
|
|
124
|
+
putAllocateTAG: (t, e) => g.put("/".concat(t, "/allocate"), e),
|
|
125
|
+
putCombineTAG: (t) => g.put("/combine", t)
|
|
126
|
+
}, n = a({
|
|
72
127
|
prefix: "/v1/global-settings"
|
|
73
|
-
}),
|
|
74
|
-
getHandheldReader: (t) =>
|
|
75
|
-
getHandheldReaderDetail: (t) =>
|
|
76
|
-
getHandheldReaderOptions: (t) =>
|
|
77
|
-
putMarkHandheldStatus: (t) =>
|
|
78
|
-
putPingReaders: (t) =>
|
|
79
|
-
putMarkIOTStatus: (t, e) =>
|
|
80
|
-
putEditReaderGroup: (t, e, r) =>
|
|
128
|
+
}), M = {
|
|
129
|
+
getHandheldReader: (t) => n.get("/reader", { params: t }),
|
|
130
|
+
getHandheldReaderDetail: (t) => n.get("/reader/".concat(t)),
|
|
131
|
+
getHandheldReaderOptions: (t) => n.get("/reader/options", { params: t }),
|
|
132
|
+
putMarkHandheldStatus: (t) => n.put("/reader/mark-status", t),
|
|
133
|
+
putPingReaders: (t) => n.put("/iot-reader/ping", t),
|
|
134
|
+
putMarkIOTStatus: (t, e) => n.put("/".concat(e, "/mark-status"), t),
|
|
135
|
+
putEditReaderGroup: (t, e, r) => n.put(
|
|
81
136
|
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-group"),
|
|
82
137
|
e
|
|
83
138
|
),
|
|
84
|
-
putEditAntennaGroup: (t, e) =>
|
|
85
|
-
putEditPortStatus: (t, e) =>
|
|
86
|
-
putEditAliasName: (t, e, r) =>
|
|
139
|
+
putEditAntennaGroup: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-group"), t),
|
|
140
|
+
putEditPortStatus: (t, e) => n.put("/iot-reader/".concat(e, "/set-port-status"), t),
|
|
141
|
+
putEditAliasName: (t, e, r) => n.put(
|
|
87
142
|
"/".concat(t === "iot" ? "iot-" : "", "reader/").concat(r, "/set-alias-name"),
|
|
88
143
|
e
|
|
89
144
|
),
|
|
90
|
-
putAntennaPower: (t, e) =>
|
|
91
|
-
getIOTReaderOrAntenna: (t, e) =>
|
|
92
|
-
getIOTReaderDetail: (t) =>
|
|
93
|
-
getIOTReaderOrAntennaOptions: (t, e) =>
|
|
94
|
-
getActivityLog: (t) =>
|
|
95
|
-
getActivityLogOptions: (t) =>
|
|
96
|
-
getDetailActivityLog: (t) =>
|
|
97
|
-
getDetailActivityLogOptions: (t) =>
|
|
98
|
-
getExistingAliasNames: () =>
|
|
99
|
-
getIotReaderPort: (t, e) =>
|
|
100
|
-
},
|
|
145
|
+
putAntennaPower: (t, e) => n.put("/iot-reader/".concat(e, "/set-antenna-power"), t),
|
|
146
|
+
getIOTReaderOrAntenna: (t, e) => n.get("/".concat(t), { params: e }),
|
|
147
|
+
getIOTReaderDetail: (t) => n.get("/iot-reader/".concat(t)),
|
|
148
|
+
getIOTReaderOrAntennaOptions: (t, e) => n.get("/".concat(t, "/options"), { params: e }),
|
|
149
|
+
getActivityLog: (t) => n.get("/activity-log", { params: t }),
|
|
150
|
+
getActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
|
|
151
|
+
getDetailActivityLog: (t) => n.get("/activity-log", { params: t }),
|
|
152
|
+
getDetailActivityLogOptions: (t) => n.get("/activity-log/options", { params: t }),
|
|
153
|
+
getExistingAliasNames: () => n.get("/reader/alias-names"),
|
|
154
|
+
getIotReaderPort: (t, e) => n.get("/iot-reader/".concat(t, "/ports"), { params: e })
|
|
155
|
+
}, G = a({
|
|
101
156
|
env: "APP_LOGS_NOTIFICATION_API",
|
|
102
157
|
prefix: "/v2"
|
|
103
|
-
}),
|
|
104
|
-
getSessionLogList: (t) =>
|
|
105
|
-
},
|
|
158
|
+
}), q = {
|
|
159
|
+
getSessionLogList: (t) => G.get("/session-log", { params: t })
|
|
160
|
+
}, m = a({
|
|
106
161
|
prefix: "/v1/global-settings/option"
|
|
107
|
-
}),
|
|
108
|
-
getPositions: () =>
|
|
109
|
-
getDivisions: () =>
|
|
110
|
-
},
|
|
162
|
+
}), J = {
|
|
163
|
+
getPositions: () => m.get("/position"),
|
|
164
|
+
getDivisions: () => m.get("/division")
|
|
165
|
+
}, l = a({
|
|
111
166
|
prefix: "/v1/global-settings/position"
|
|
112
|
-
}),
|
|
113
|
-
getPositions: (t) =>
|
|
114
|
-
getPositionDetail: (t) =>
|
|
115
|
-
postCreatePosition: (t) =>
|
|
116
|
-
putEditPosition: (t, e) =>
|
|
167
|
+
}), V = {
|
|
168
|
+
getPositions: (t) => l.get("", { params: t }),
|
|
169
|
+
getPositionDetail: (t) => l.get("/".concat(t)),
|
|
170
|
+
postCreatePosition: (t) => l.post("/", t),
|
|
171
|
+
putEditPosition: (t, e) => l.put("/".concat(t), e),
|
|
117
172
|
deletePositions: (t) => {
|
|
118
173
|
const e = { id: JSON.stringify(t) };
|
|
119
|
-
return
|
|
174
|
+
return l.delete("", { params: e });
|
|
120
175
|
}
|
|
121
|
-
},
|
|
176
|
+
}, U = a({
|
|
122
177
|
env: "APP_TAGSAMURAI_API",
|
|
123
178
|
prefix: "/tag/v2"
|
|
124
|
-
}), V = {
|
|
125
|
-
getTagInfo: (t) => R.get("/rfid-qr/scan", { params: t })
|
|
126
|
-
}, A = o({
|
|
127
|
-
prefix: "/v1/global-settings/change-log"
|
|
128
179
|
}), H = {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
180
|
+
getTagInfo: (t) => U.get("/rfid-qr/scan", { params: t })
|
|
181
|
+
}, d = a({
|
|
182
|
+
prefix: "/v1/global-settings/change-log"
|
|
183
|
+
}), F = {
|
|
184
|
+
getTAGEventlog: (t) => d.get("/tag-event-log", { params: t }),
|
|
185
|
+
getTAGEventlogOptions: (t) => d.get("/tag-event-log/options", { params: t }),
|
|
186
|
+
getDetailTAGEventlog: (t) => d.get("/tag-event-log/".concat(t))
|
|
187
|
+
}, o = a({
|
|
133
188
|
prefix: "/v1/global-settings/user"
|
|
134
|
-
}),
|
|
135
|
-
getUsers: (t) =>
|
|
136
|
-
getUserDetail: (t) =>
|
|
137
|
-
getUserSystemLogs: (t, e) =>
|
|
189
|
+
}), z = {
|
|
190
|
+
getUsers: (t) => o.get("", { params: t }),
|
|
191
|
+
getUserDetail: (t) => o.get("/".concat(t)),
|
|
192
|
+
getUserSystemLogs: (t, e) => o.get("/".concat(t, "/system-logs"), { params: e }),
|
|
138
193
|
getUserSystemLogOptions: (t, e) => {
|
|
139
194
|
const r = {};
|
|
140
|
-
return r[e] = !0,
|
|
195
|
+
return r[e] = !0, o.get("/".concat(t, "/system-logs/options"), { params: r });
|
|
141
196
|
},
|
|
142
197
|
postCreateUser: (t) => {
|
|
143
198
|
const e = { "Content-Type": "multipart/form-data" };
|
|
144
|
-
return
|
|
199
|
+
return o.post("", t, { headers: e });
|
|
145
200
|
},
|
|
146
201
|
putEditUser: (t, e) => {
|
|
147
202
|
const r = { "Content-Type": "multipart/form-data" };
|
|
148
|
-
return
|
|
203
|
+
return o.put("/".concat(t), e, { headers: r });
|
|
149
204
|
},
|
|
150
205
|
deleteUsers: (t) => {
|
|
151
206
|
const e = { id: JSON.stringify(t) };
|
|
152
|
-
return
|
|
207
|
+
return o.delete("", { params: e });
|
|
153
208
|
},
|
|
154
|
-
putToggleStatusUsers: (t) =>
|
|
209
|
+
putToggleStatusUsers: (t) => o.put("/active-status", t),
|
|
155
210
|
getUserOptions: (t) => {
|
|
156
211
|
const e = {};
|
|
157
|
-
return e[t] = !0,
|
|
212
|
+
return e[t] = !0, o.get("/options", { params: e });
|
|
158
213
|
},
|
|
159
|
-
deleteCancelEmailChange: (t) =>
|
|
160
|
-
postResendEmail: (t) =>
|
|
161
|
-
putChangePassword: (t, e) =>
|
|
214
|
+
deleteCancelEmailChange: (t) => o.delete("/cancel-email-change/".concat(t)),
|
|
215
|
+
postResendEmail: (t) => o.post("/resend-email", t),
|
|
216
|
+
putChangePassword: (t, e) => o.put("/change-password/".concat(t), e)
|
|
162
217
|
};
|
|
163
218
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
219
|
+
x as AuthServices,
|
|
220
|
+
k as ChangelogServices,
|
|
221
|
+
B as DivisionServices,
|
|
222
|
+
j as GlobalTagServices,
|
|
223
|
+
M as HardwareServices,
|
|
224
|
+
q as LogServices,
|
|
225
|
+
J as OptionServices,
|
|
226
|
+
V as PositionServices,
|
|
227
|
+
F as TagEventlogServices,
|
|
228
|
+
H as TagServices,
|
|
229
|
+
z as UserServices,
|
|
230
|
+
T as getBaseURL,
|
|
231
|
+
C as getImageURL,
|
|
232
|
+
N as queryParamsStringfy
|
|
178
233
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface Credentials {
|
|
2
|
+
email: string;
|
|
3
|
+
dontDeletePreviousSession: boolean;
|
|
4
|
+
}
|
|
5
|
+
interface PasswordLoginCredentials extends Credentials {
|
|
6
|
+
password: string;
|
|
7
|
+
}
|
|
8
|
+
interface OTPLoginCredentials extends Credentials {
|
|
9
|
+
otp: string;
|
|
10
|
+
}
|
|
11
|
+
export type LoginCredentials = PasswordLoginCredentials | OTPLoginCredentials;
|
|
12
|
+
export interface SetPasswordBody {
|
|
13
|
+
password: string;
|
|
14
|
+
token: string;
|
|
15
|
+
type: SetPasswordType;
|
|
16
|
+
}
|
|
17
|
+
export type SetPasswordType = 'reset' | 'confirm';
|
|
18
|
+
export {};
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { LoginCredentials, SetPasswordBody } from '../dto/auth.dto';
|
|
3
|
+
interface LoginResponse {
|
|
4
|
+
data: {
|
|
5
|
+
token: string;
|
|
6
|
+
tokenExpiresAt: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare const AuthServices: {
|
|
11
|
+
login: (form: LoginCredentials) => Promise<AxiosResponse<LoginResponse>>;
|
|
12
|
+
reLogin: (body: {
|
|
13
|
+
jwt: string;
|
|
14
|
+
}) => Promise<AxiosResponse<LoginResponse>>;
|
|
15
|
+
requestOTP: (email: string) => Promise<AxiosResponse<any, any>>;
|
|
16
|
+
requestResetPassLink: (email: string) => Promise<AxiosResponse<any, any>>;
|
|
17
|
+
setPassword: (body: SetPasswordBody) => Promise<AxiosResponse<any, any>>;
|
|
18
|
+
verifyToken: (token: string) => Promise<AxiosResponse<any, any>>;
|
|
19
|
+
confirmEmailChange: (token: string) => Promise<AxiosResponse<any, any>>;
|
|
20
|
+
postLogout: () => Promise<AxiosResponse<any, any>>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @deprecated use postLogout instead
|
|
24
|
+
*/
|
|
25
|
+
logout: () => Promise<AxiosResponse<any, any>>;
|
|
4
26
|
};
|
|
5
|
-
|
|
27
|
+
declare global {
|
|
28
|
+
interface Window {
|
|
29
|
+
sessionExpired: boolean;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export default AuthServices;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const buildFileURL: (name: string, width?: number, height?: number) => string;
|
|
2
|
+
export declare const fetchBlobFile: (url: string, token: string) => Promise<Blob>;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param fileUrl The full URL
|
|
6
|
+
* @param fileName Custom File name
|
|
7
|
+
* @param immediateRevoke Immediately revoke the object URL after download - default to true
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const downloadFile: (fileUrl: string, fileName: string, immediateRevoke?: boolean) => Promise<string>;
|
|
11
|
+
export declare const getImageURL: (name?: string | null, width?: number, height?: number, returnURLOnly?: boolean) => Promise<string | undefined>;
|