39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
/**
|
|
* Email verification orchestration: token issuance, delivery, and confirmation.
|
|
*/
|
|
/**
|
|
* Builds the web app URL users open to complete verification.
|
|
* @param rawToken - Single-use token from the email link query string
|
|
*/
|
|
export declare function buildVerifyUrl(rawToken: string): string;
|
|
/**
|
|
* Creates a verification token, emails the link, and returns optional dev URL.
|
|
* @param userId - Authenticated user UUID
|
|
* @throws When user not found, already verified, or email missing
|
|
*/
|
|
export declare function sendVerificationEmailForUser(userId: string): Promise<{
|
|
message: string;
|
|
devVerifyUrl?: string;
|
|
}>;
|
|
/**
|
|
* Confirms email ownership using a token from the verification link.
|
|
* @param rawToken - Token from query string or request body
|
|
* @throws When token is invalid, expired, or already used
|
|
*/
|
|
export declare function verifyEmailToken(rawToken: string): Promise<{
|
|
message: string;
|
|
userId: string;
|
|
}>;
|
|
/**
|
|
* Sends a new verification link by email. Always returns a generic message (no enumeration).
|
|
*/
|
|
export declare function requestVerificationResendByEmail(email: string): Promise<{
|
|
message: string;
|
|
devVerifyUrl?: string;
|
|
}>;
|
|
/**
|
|
* Fire-and-forget verification email after registration (errors logged only).
|
|
* @param userId - Newly registered user UUID
|
|
*/
|
|
export declare function sendVerificationAfterRegister(userId: string): Promise<void>;
|
|
//# sourceMappingURL=emailVerificationService.d.ts.map
|