squarecommonblhelper 1.4.0 → 1.5.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
|
@@ -32,7 +32,7 @@ declare class AuthenticationCommonBL {
|
|
|
32
32
|
}>;
|
|
33
33
|
updatePasswordV0(accessToken: string, oldPassword: string, newPassword: string): Promise<{
|
|
34
34
|
message: string | null;
|
|
35
|
-
data
|
|
35
|
+
data: null;
|
|
36
36
|
log?: any;
|
|
37
37
|
}>;
|
|
38
38
|
getUserDetailsV0(accessToken: string): Promise<{
|
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchJSONData } from "squarecommons";
|
|
2
|
-
import { GenerateAccessTokenV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
2
|
+
import { GenerateAccessTokenV0ResponseZ, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -104,7 +104,7 @@ class AuthenticationCommonBL {
|
|
|
104
104
|
{ old_password: oldPassword, new_password: newPassword },
|
|
105
105
|
// query params
|
|
106
106
|
undefined);
|
|
107
|
-
return data;
|
|
107
|
+
return UpdatePasswordV0ResponseZ.parse(data);
|
|
108
108
|
}
|
|
109
109
|
catch (error) {
|
|
110
110
|
throw error;
|
|
@@ -86,4 +86,20 @@ declare const UpdateUsernameV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
86
86
|
log?: any;
|
|
87
87
|
}>;
|
|
88
88
|
type UpdateUsernameV0Response = z.infer<typeof UpdateUsernameV0ResponseZ>;
|
|
89
|
-
|
|
89
|
+
declare const UpdatePasswordV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
90
|
+
data: z.ZodAny;
|
|
91
|
+
message: z.ZodNullable<z.ZodString>;
|
|
92
|
+
log: z.ZodAny;
|
|
93
|
+
}, {
|
|
94
|
+
data: z.ZodNull;
|
|
95
|
+
}>, "strip", z.ZodTypeAny, {
|
|
96
|
+
message: string | null;
|
|
97
|
+
data: null;
|
|
98
|
+
log?: any;
|
|
99
|
+
}, {
|
|
100
|
+
message: string | null;
|
|
101
|
+
data: null;
|
|
102
|
+
log?: any;
|
|
103
|
+
}>;
|
|
104
|
+
type UpdatePasswordV0Response = z.infer<typeof UpdatePasswordV0ResponseZ>;
|
|
105
|
+
export { GenerateAccessTokenV0ResponseZ, GenerateAccessTokenV0Response, UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, UpdatePasswordV0ResponseZ, UpdatePasswordV0Response, };
|
|
@@ -15,4 +15,7 @@ const UpdateUsernameV0ResponseZ = APIOutputZ.extend({
|
|
|
15
15
|
}),
|
|
16
16
|
}),
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
const UpdatePasswordV0ResponseZ = APIOutputZ.extend({
|
|
19
|
+
data: z.null(),
|
|
20
|
+
});
|
|
21
|
+
export { GenerateAccessTokenV0ResponseZ, UpdateUsernameV0ResponseZ, UpdatePasswordV0ResponseZ, };
|
package/example.js
CHANGED