import type { UnidyClient } from "../api"; import type { InternalMatchingConfig, InternalMatchResult } from "../auth/api/register"; export declare class RegistrationHelpers { private client; constructor(client: UnidyClient); /** * Build the payload for creating or updating a registration. * Collects email, password, profile data, custom attributes, and newsletter preferences from the store. */ private buildPayload; /** * Create a new registration flow (first step). */ createRegistration(registrationUrl: string, brandId?: number): Promise; /** * Update the current registration flow (subsequent steps). */ updateRegistration(): Promise; /** * Finalize the registration and create the user. */ finalizeRegistration(): Promise; /** * Send email verification code. */ sendEmailVerificationCode(): Promise; /** * Verify email with the code. */ verifyEmail(code: string): Promise; /** * Send resume link to continue registration. */ sendResumeLink(): Promise; /** * Get the current registration flow (for resume). */ getRegistration(rid?: string): Promise; /** * Cancel the current registration flow. */ cancelRegistration(): Promise; /** * Handle OAuth redirect for social registration. */ handleSocialAuthRedirect(): void; /** * Register a passkey for the current registration flow. * Gets creation options from server, triggers WebAuthn browser prompt, sends credential back. */ registerPasskey(passkeyName?: string): Promise; /** * Remove the passkey from the current registration flow. */ removePasskey(): Promise; /** * Parse password validation errors from API response and set them as field errors. * Server sends { meta: { password_errors: ["min_length", "number", ...] } } */ private handlePasswordValidationError; /** * Fetch the internal matching configuration for the current registration flow. * Returns null if the registration session (rid) is unavailable or on a network/API * error — a disabled feature returns `{ enabled: false }`. */ getInternalMatchingConfig(): Promise; /** * Outcome type for the internal match check. */ checkInternalMatch(matchingValue: string, additionalAttributes?: Record): Promise<{ status: "found"; data: InternalMatchResult; } | { status: "not_found"; } | { status: "rate_limited"; } | { status: "error"; }>; /** * Confirm linking of the current registration with the matched existing user. */ confirmInternalMatch(matchingUserId: string | number): Promise<{ status: "ok"; } | { status: "not_found"; } | { status: "mismatch"; } | { status: "error"; }>; /** * Skip internal matching and continue without linking an existing account. */ skipInternalMatch(): Promise<{ status: "ok"; } | { status: "expired"; } | { status: "error"; }>; /** * Parse validation errors from API response and set them in the store. */ private handleValidationErrors; }