import * as z from "zod"; import type { ApiClientInterface } from "../../api/base-service"; import { type ErrorResponse } from "./schemas"; import type { CommonErrors, HandleResponseFn } from "./shared"; declare const RegistrationProfileDataSchema: z.ZodObject<{ first_name: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional>; _clear: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>; declare const NewsletterPreferencesSchema: z.ZodObject<{ _clear: z.ZodOptional>; }, z.core.$loose>; declare const RegistrationFlowResponseSchema: z.ZodObject<{ rid: z.ZodString; email: z.ZodNullable; newsletter_preferences: z.ZodNullable>>; registration_profile_data: z.ZodNullable>; social_provider: z.ZodNullable; status: z.ZodRecord; created_at: z.ZodString; updated_at: z.ZodString; expires_at: z.ZodString; has_passkey: z.ZodNullable; has_password: z.ZodNullable; expired: z.ZodBoolean; can_finalize: z.ZodBoolean; email_verified: z.ZodBoolean; auth: z.ZodOptional>; }, z.core.$strip>; declare const CreateRegistrationPayloadSchema: z.ZodObject<{ registration_url: z.ZodString; brand_id: z.ZodOptional; email: z.ZodOptional; password: z.ZodOptional; passwordless_flag: z.ZodOptional; registration_profile_data: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional>; _clear: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>>; newsletter_preferences: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$strip>; declare const UpdateRegistrationPayloadSchema: z.ZodObject<{ email: z.ZodOptional; password: z.ZodOptional; passwordless_flag: z.ZodOptional; registration_profile_data: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional>; _clear: z.ZodOptional; last_name: z.ZodOptional; date_of_birth: z.ZodOptional; phone: z.ZodOptional; locale: z.ZodOptional; salutation: z.ZodOptional; title: z.ZodOptional; gender: z.ZodOptional; custom_attributes: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>>; newsletter_preferences: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$strip>; declare const SendVerificationCodeResponseSchema: z.ZodObject<{ success: z.ZodBoolean; enable_resend_after: z.ZodNumber; }, z.core.$strip>; declare const VerifyEmailPayloadSchema: z.ZodObject<{ code: z.ZodString; }, z.core.$strip>; declare const SendResumeLinkPayloadSchema: z.ZodObject<{ email: z.ZodString; }, z.core.$strip>; declare const CannotFinalizeErrorSchema: z.ZodObject<{ error: z.ZodLiteral<"cannot_finalize">; missing_fields: z.ZodOptional>; email_missing: z.ZodOptional; auth_method_missing: z.ZodOptional; }, z.core.$strip>; declare const PasskeyCreationOptionsSchema: z.ZodObject<{ challenge: z.ZodString; timeout: z.ZodNumber; rp: z.ZodObject<{ id: z.ZodString; name: z.ZodString; }, z.core.$strip>; user: z.ZodObject<{ id: z.ZodString; name: z.ZodString; displayName: z.ZodString; }, z.core.$strip>; pubKeyCredParams: z.ZodArray>; authenticatorSelection: z.ZodOptional; residentKey: z.ZodOptional; requireResidentKey: z.ZodOptional; userVerification: z.ZodOptional; }, z.core.$strip>>; excludeCredentials: z.ZodOptional>; }, z.core.$strip>>>; attestation: z.ZodOptional; }, z.core.$strip>; declare const RegisterPasskeyPayloadSchema: z.ZodObject<{ publicKeyCredential: z.ZodRecord; passkey_name: z.ZodOptional; }, z.core.$strip>; export type RegistrationProfileData = z.infer; export type NewsletterPreferences = z.infer; export type RegistrationFlowResponse = z.infer; export type CreateRegistrationPayload = z.infer; export type UpdateRegistrationPayload = z.infer; export type SendVerificationCodeResponse = z.infer; export type VerifyEmailPayload = z.infer; export type SendResumeLinkPayload = z.infer; export type CannotFinalizeError = z.infer; export type PasskeyCreationOptions = z.infer; export type RegisterPasskeyPayload = z.infer; export type RegistrationOptions = { rid?: string; }; export type CreateRegistrationResult = CommonErrors | ["email_already_registered", ErrorResponse] | ["registration_flow_already_exists", ErrorResponse] | ["invalid_record", ErrorResponse] | ["password_validation_failed", ErrorResponse] | [null, RegistrationFlowResponse]; export type GetRegistrationResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, RegistrationFlowResponse]; export type UpdateRegistrationResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["invalid_record", ErrorResponse] | ["password_validation_failed", ErrorResponse] | [null, RegistrationFlowResponse]; export type CancelRegistrationResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, null]; export type FinalizeRegistrationResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["cannot_finalize", CannotFinalizeError] | ["email_already_registered", ErrorResponse] | [null, RegistrationFlowResponse]; export type SendVerificationCodeResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["verification_code_recently_sent", ErrorResponse] | [null, SendVerificationCodeResponse]; export type VerifyEmailResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["invalid_code", ErrorResponse] | ["code_expired", ErrorResponse] | [null, RegistrationFlowResponse]; export type SendResumeLinkResult = CommonErrors | ["email_required", ErrorResponse] | ["registration_flow_not_found", ErrorResponse] | [null, null]; export type GetPasskeyCreationOptionsResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, PasskeyCreationOptions]; export type RegisterPasskeyResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["invalid_record", ErrorResponse] | [null, RegistrationFlowResponse]; export type RemovePasskeyResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, RegistrationFlowResponse]; declare const InternalMatchingConfigSchema: z.ZodObject<{ enabled: z.ZodBoolean; matching_attribute: z.ZodOptional; }, z.core.$strip>>; additional_fields: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; declare const CheckInternalMatchPayloadSchema: z.ZodObject<{ matching_value: z.ZodString; matching_additional_attributes: z.ZodOptional>; }, z.core.$strip>; declare const InternalMatchResultSchema: z.ZodObject<{ matching_status: z.ZodLiteral<"found">; matching_user_id: z.ZodUnion; matched_user_preview: z.ZodOptional>; }, z.core.$strip>; declare const ConfirmInternalMatchPayloadSchema: z.ZodObject<{ matching_user_id: z.ZodUnion; }, z.core.$strip>; export type InternalMatchingConfig = z.infer; export type CheckInternalMatchPayload = z.infer; export type InternalMatchResult = z.infer; export type ConfirmInternalMatchPayload = z.infer; export type GetInternalMatchingConfigResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, InternalMatchingConfig]; export type CheckInternalMatchResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["internal_matching_match_not_found", ErrorResponse] | ["internal_matching_rate_limit_exceeded", ErrorResponse] | [null, InternalMatchResult]; export type ConfirmInternalMatchResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | ["matching_user_not_found", ErrorResponse] | ["matching_user_mismatch", ErrorResponse] | [null, RegistrationFlowResponse]; export type SkipInternalMatchResult = CommonErrors | ["registration_not_found", ErrorResponse] | ["registration_expired", ErrorResponse] | [null, RegistrationFlowResponse]; /** * Create a new registration flow. */ export declare function createRegistration(client: ApiClientInterface, payload: CreateRegistrationPayload, handleResponse: HandleResponseFn): Promise; /** * Get the current registration flow. * Uses rid from cookie by default, or pass rid in options. */ export declare function getRegistration(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Update the current registration flow. * Uses rid from cookie by default, or pass rid in options. */ export declare function updateRegistration(client: ApiClientInterface, payload: UpdateRegistrationPayload, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Cancel (delete) the current registration flow. * Uses rid from cookie by default, or pass rid in options. */ export declare function cancelRegistration(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Finalize the registration flow and create the user. * Uses rid from cookie by default, or pass rid in options. */ export declare function finalizeRegistration(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Send email verification code. * Uses rid from cookie by default, or pass rid in options. */ export declare function sendEmailVerificationCode(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Verify email with the code sent to the user. * Uses rid from cookie by default, or pass rid in options. */ export declare function verifyEmail(client: ApiClientInterface, payload: VerifyEmailPayload, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Send a resume link to the user's email to continue registration. * Note: This endpoint doesn't require rid since it looks up by email. */ export declare function sendResumeLink(client: ApiClientInterface, payload: SendResumeLinkPayload, handleResponse: HandleResponseFn): Promise; /** * Get passkey creation options (WebAuthn PublicKeyCredentialCreationOptions). * Uses rid from cookie by default, or pass rid in options. */ export declare function getPasskeyCreationOptions(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Register a passkey for the current registration flow. * Uses rid from cookie by default, or pass rid in options. */ export declare function registerPasskey(client: ApiClientInterface, payload: RegisterPasskeyPayload, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Remove a passkey from the current registration flow. * Uses rid from cookie by default, or pass rid in options. */ export declare function removePasskey(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Fetch the internal matching configuration for the current registration flow. */ export declare function getInternalMatchingConfig(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Check whether an existing user matches the provided values. * Returns the matched user on success. Raises `internal_matching_match_not_found` when no match exists. */ export declare function checkInternalMatch(client: ApiClientInterface, payload: CheckInternalMatchPayload, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Confirm linking of the current registration with the matched existing user. * Returns the updated registration flow response. */ export declare function confirmInternalMatch(client: ApiClientInterface, payload: ConfirmInternalMatchPayload, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; /** * Skip internal matching and continue without linking an existing account. * Returns the updated registration flow response. */ export declare function skipInternalMatch(client: ApiClientInterface, options: RegistrationOptions | undefined, handleResponse: HandleResponseFn): Promise; export {};