export type RequestInvitationEmailChallenge = Readonly<{ invitationId: string; token: string; challengeId: string; confirm: true; }>; export type AcceptInvitationEmailChallenge = RequestInvitationEmailChallenge & Readonly<{ code: string; }>; export type RemoteInvitationEmailChallenge = { challengeId: string; message: string; expiresIn: 600; }; export type RemoteInvitationEmailAcceptance = { organizationId: string; membershipId: string; accepted: true; changed: true; signInRequired: true; }; export declare class InvitationEmailInputError extends Error { readonly code = "INVITATION_EMAIL_INPUT_INVALID"; constructor(); } declare const refusals: { readonly INVALID_REQUEST: readonly [400, "Invitation recovery parameters were refused."]; readonly ORIGIN_REQUIRED: readonly [403, "Invitation recovery requires the configured site origin."]; readonly INVITATION_PROOF_UNAVAILABLE: readonly [401, "Invitation proof is unavailable. Sign in or explicitly request another recovery code."]; readonly RATE_LIMITED: readonly [429, "Invitation verification is rate limited. Wait before another deliberate action."]; readonly INVITATION_BUSY: readonly [503, "Invitation is busy. Sign in to check membership before another deliberate action."]; readonly INVITATION_DELIVERY_UNAVAILABLE: readonly [503, "Invitation recovery is unavailable on this service."]; }; export type RemoteInvitationEmailErrorCode = keyof typeof refusals; export declare class RemoteInvitationEmailError extends Error { readonly code: RemoteInvitationEmailErrorCode; readonly status: number; constructor(code: RemoteInvitationEmailErrorCode); } export declare class RemoteInvitationEmailUnconfirmedError extends Error { readonly action: "challenge" | "accept"; readonly code = "INVITATION_EMAIL_UNCONFIRMED"; constructor(action: "challenge" | "accept"); } export declare function invitationEmailIds(invitationId: unknown, challengeId: unknown): { invitationId: string; challengeId: string; }; export declare function invitationEmailInput(action: A, input: A extends "accept" ? AcceptInvitationEmailChallenge : RequestInvitationEmailChallenge): { code?: string | undefined; token: string; confirm: true; invitationId: string; challengeId: string; }; /** Explicit anonymous protocol: no auth resolver, headers, session creation or persistence. */ export declare function requestInvitationEmail(origin: string, action: A, input: A extends "accept" ? AcceptInvitationEmailChallenge : RequestInvitationEmailChallenge): Promise; export declare function invitationEmailCustomerError(error: unknown): { code: string; error: string; }; export {};