squarecommonblhelper 9.1.0 → 9.2.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
|
@@ -121,5 +121,12 @@ declare class AuthenticationCommonBL {
|
|
|
121
121
|
} | null;
|
|
122
122
|
log?: any;
|
|
123
123
|
}>;
|
|
124
|
+
getUserRecoveryMethodsV0(username: string): Promise<{
|
|
125
|
+
message: string | null;
|
|
126
|
+
data: {
|
|
127
|
+
main: Record<string, boolean>;
|
|
128
|
+
};
|
|
129
|
+
log?: any;
|
|
130
|
+
}>;
|
|
124
131
|
}
|
|
125
132
|
export { AuthenticationCommonBL };
|
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchFileData, fetchJSONData } from "squarecommons";
|
|
2
|
-
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, sendResetPasswordEmailV0ResponseZ, sendVerificationEmailV0ResponseZ, updateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, updateUserRecoveryMethodsV0ResponseZ, validateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
2
|
+
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, sendResetPasswordEmailV0ResponseZ, sendVerificationEmailV0ResponseZ, updateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, updateUserRecoveryMethodsV0ResponseZ, validateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -313,5 +313,26 @@ class AuthenticationCommonBL {
|
|
|
313
313
|
throw error;
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
+
async getUserRecoveryMethodsV0(username) {
|
|
317
|
+
try {
|
|
318
|
+
const data = await fetchJSONData(
|
|
319
|
+
// base url
|
|
320
|
+
this.commonBLBaseURL,
|
|
321
|
+
// endpoint
|
|
322
|
+
"get_user_recovery_methods/v0",
|
|
323
|
+
// method
|
|
324
|
+
"GET",
|
|
325
|
+
// headers
|
|
326
|
+
undefined,
|
|
327
|
+
// body
|
|
328
|
+
undefined,
|
|
329
|
+
// query params
|
|
330
|
+
{ username: username });
|
|
331
|
+
return GetUserRecoveryMethodsV0ResponseZ.parse(data);
|
|
332
|
+
}
|
|
333
|
+
catch (error) {
|
|
334
|
+
throw error;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
316
337
|
}
|
|
317
338
|
export { AuthenticationCommonBL };
|
|
@@ -575,4 +575,30 @@ declare const validateEmailVerificationCodeV0ResponseZ: z.ZodObject<z.objectUtil
|
|
|
575
575
|
log?: any;
|
|
576
576
|
}>;
|
|
577
577
|
type validateEmailVerificationCodeV0Response = z.infer<typeof validateEmailVerificationCodeV0ResponseZ>;
|
|
578
|
-
|
|
578
|
+
declare const GetUserRecoveryMethodsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
579
|
+
data: z.ZodAny;
|
|
580
|
+
message: z.ZodNullable<z.ZodString>;
|
|
581
|
+
log: z.ZodAny;
|
|
582
|
+
}, {
|
|
583
|
+
data: z.ZodObject<{
|
|
584
|
+
main: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
585
|
+
}, "strict", z.ZodTypeAny, {
|
|
586
|
+
main: Record<string, boolean>;
|
|
587
|
+
}, {
|
|
588
|
+
main: Record<string, boolean>;
|
|
589
|
+
}>;
|
|
590
|
+
}>, "strict", z.ZodTypeAny, {
|
|
591
|
+
message: string | null;
|
|
592
|
+
data: {
|
|
593
|
+
main: Record<string, boolean>;
|
|
594
|
+
};
|
|
595
|
+
log?: any;
|
|
596
|
+
}, {
|
|
597
|
+
message: string | null;
|
|
598
|
+
data: {
|
|
599
|
+
main: Record<string, boolean>;
|
|
600
|
+
};
|
|
601
|
+
log?: any;
|
|
602
|
+
}>;
|
|
603
|
+
type GetUserRecoveryMethodsV0Response = z.infer<typeof GetUserRecoveryMethodsV0ResponseZ>;
|
|
604
|
+
export { UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, DeleteUserV0Response, DeleteUserV0ResponseZ, LogoutAllV0Response, LogoutAllV0ResponseZ, LogoutAppsV0Response, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0Response, GenerateAccountBackupCodeV0ResponseZ, updateProfileDetailsV0ResponseZ, updateProfileDetailsV0Response, sendResetPasswordEmailV0ResponseZ, sendResetPasswordEmailV0Response, RecoveryMethodEnumZ, RecoveryMethodEnum, updateUserRecoveryMethodsV0ResponseZ, updateUserRecoveryMethodsV0Response, sendVerificationEmailV0ResponseZ, sendVerificationEmailV0Response, validateEmailVerificationCodeV0ResponseZ, validateEmailVerificationCodeV0Response, GetUserRecoveryMethodsV0ResponseZ, GetUserRecoveryMethodsV0Response, };
|
|
@@ -93,4 +93,9 @@ const validateEmailVerificationCodeV0ResponseZ = APIOutputZ.extend({
|
|
|
93
93
|
user_profile_email_verified: z.string(),
|
|
94
94
|
})),
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
const GetUserRecoveryMethodsV0ResponseZ = APIOutputZ.extend({
|
|
97
|
+
data: z.strictObject({
|
|
98
|
+
main: z.record(z.string(), z.boolean()),
|
|
99
|
+
}),
|
|
100
|
+
});
|
|
101
|
+
export { UpdateUsernameV0ResponseZ, GetUserDetailsV0ResponseZ, DeleteUserV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, updateProfileDetailsV0ResponseZ, sendResetPasswordEmailV0ResponseZ, RecoveryMethodEnumZ, updateUserRecoveryMethodsV0ResponseZ, sendVerificationEmailV0ResponseZ, validateEmailVerificationCodeV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, };
|