0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-03 21:48:55 -05:00

chore(schemas): reorg the type definition comments

reorg the type definition comments
This commit is contained in:
simeng-li 2024-06-07 17:23:04 +08:00
parent 6bffd9a79c
commit d8b5118c5e
No known key found for this signature in database
GPG key ID: 14EA7BB1541E8075

View file

@ -55,9 +55,8 @@ export const passwordVerificationPayloadGuard = z.object({
/* Password verification end */
/* Verification code verification start */
/** Only email and phone are supported as verification code identifiers */
export type VerificationCodeIdentifier = {
/** Only email and phone are supported as verification code identifiers */
type: 'email' | 'phone';
value: string;
};
@ -82,12 +81,14 @@ export const verificationCodePayloadGuard = z.object({
}) satisfies ToZodObject<VerificationCodePayload>;
/* Verification code verification end */
/* API payload guard start */
export const signInPayloadGuard = z.object({
identifier: directIdentifierGuard,
verification: z.union([passwordVerificationPayloadGuard, verificationCodePayloadGuard]),
});
export type SignInPayload = z.infer<typeof signInPayloadGuard>;
/* API payload guard end */
// =================================================================================================================
// Experience API payload guard and types definitions end
@ -95,6 +96,7 @@ export type SignInPayload = z.infer<typeof signInPayloadGuard>;
/**
* Legacy interaction identifier payload guard
* @deprecated
*
* @remark Following are the types for legacy interaction APIs.
* Marked as deprecated, can removed after experience APIs (interaction API V2) are fully migrated.