squarecommonblhelper 4.0.0 → 4.1.0
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/README.md
CHANGED
package/dist/authentication.d.ts
CHANGED
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchJSONData } from "squarecommons";
|
|
2
|
-
import { DeleteUserV0Z, GetUserDetailsV0ResponseZ, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ } from "./types/AuthenticationResponses.js";
|
|
2
|
+
import { DeleteUserV0Z, GetUserDetailsV0ResponseZ, LogoutAllV0Z, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -89,5 +89,26 @@ class AuthenticationCommonBL {
|
|
|
89
89
|
throw error;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
+
async logoutAllV0(accessToken) {
|
|
93
|
+
try {
|
|
94
|
+
const data = await fetchJSONData(
|
|
95
|
+
// base url
|
|
96
|
+
this.commonBLBaseURL,
|
|
97
|
+
// endpoint
|
|
98
|
+
"logout/all/v0",
|
|
99
|
+
// method
|
|
100
|
+
"DELETE",
|
|
101
|
+
// headers
|
|
102
|
+
{ access_token: accessToken },
|
|
103
|
+
// body
|
|
104
|
+
undefined,
|
|
105
|
+
// query params
|
|
106
|
+
undefined);
|
|
107
|
+
return LogoutAllV0Z.parse(data);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
92
113
|
}
|
|
93
114
|
export { AuthenticationCommonBL };
|
|
@@ -184,4 +184,20 @@ declare const DeleteUserV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
184
184
|
log?: any;
|
|
185
185
|
}>;
|
|
186
186
|
type DeleteUserV0 = z.infer<typeof DeleteUserV0Z>;
|
|
187
|
-
|
|
187
|
+
declare const LogoutAllV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
188
|
+
data: z.ZodAny;
|
|
189
|
+
message: z.ZodNullable<z.ZodString>;
|
|
190
|
+
log: z.ZodAny;
|
|
191
|
+
}, {
|
|
192
|
+
data: z.ZodNull;
|
|
193
|
+
}>, "strip", z.ZodTypeAny, {
|
|
194
|
+
message: string | null;
|
|
195
|
+
data: null;
|
|
196
|
+
log?: any;
|
|
197
|
+
}, {
|
|
198
|
+
message: string | null;
|
|
199
|
+
data: null;
|
|
200
|
+
log?: any;
|
|
201
|
+
}>;
|
|
202
|
+
type LogoutAllV0 = z.infer<typeof LogoutAllV0Z>;
|
|
203
|
+
export { UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, UpdatePasswordV0ResponseZ, UpdatePasswordV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, DeleteUserV0, DeleteUserV0Z, LogoutAllV0, LogoutAllV0Z, };
|
|
@@ -29,4 +29,7 @@ const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
|
|
|
29
29
|
const DeleteUserV0Z = APIOutputZ.extend({
|
|
30
30
|
data: z.null(),
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
const LogoutAllV0Z = APIOutputZ.extend({
|
|
33
|
+
data: z.null(),
|
|
34
|
+
});
|
|
35
|
+
export { UpdateUsernameV0ResponseZ, UpdatePasswordV0ResponseZ, GetUserDetailsV0ResponseZ, DeleteUserV0Z, LogoutAllV0Z, };
|
package/example.js
CHANGED