import { ApiRequestOptions } from './client.js'; export interface JoinWaitlistResult { success: boolean; updated?: boolean; /** 1-based FIFO place at join time — always presented as an ESTIMATE (the * line moves). Absent/0 when the backend could not compute it. Supersedes * decision #2/#20's opacity (2026-09-03). */ position?: number; /** One of the server's failure enums — waitlist_not_enabled | * event_not_found | invalid_phone | already_purchased | * phone_already_registered — or this module's own join_failed / * network_error. Callers map it to friendly copy through the label * catalogue, so the message renders in the buyer's language. */ errorCode?: string; } /** * Join the waitlist for a sold-out event. */ export declare function joinWaitlist(eventId: string | number, email: string, phone?: string | null, smsOptIn?: boolean, req?: Pick): Promise; export interface ValidateWaitlistTokenResult { valid: boolean; eventId: number; /** * When `valid`, the ISO instant the token stops unlocking the buy flow — * the member's exclusive window before the seat is offered to the next * person in line. The event page counts down to it and re-locks at zero. */ expiresAt?: string; /** * Present only when `valid` is false. One of the server's failure enums: * invalid_token | token_expired | token_used | email_mismatch | * inventory_exhausted. Callers map it to friendly copy. */ errorCode?: string; } /** * Validate a tokenized waitlist unlock link (decisions #3/#22/#36). * * A waitlister receives an email link carrying an opaque token bound to their * email. Presenting a valid (token, email) pair unlocks the normal Buy Tickets * flow on an otherwise-gated sold-out event, routing freed inventory to the * notified buyer. Failures are surfaced (not thrown) so the page can show a * non-blocking notice while keeping the event in its gated waitlist state. */ export declare function validateWaitlistToken(token: string, email: string, req?: Pick): Promise; export interface RequeueWaitlistResult { success: boolean; /** One of: invalid_token | email_mismatch | token_used | entry_not_found | * internal_error. Callers map to friendly copy. */ errorCode?: string; } /** * Move a member whose purchase window expired UNUSED to the front of the * waitlist queue, so the next freed seat is offered to them first. The expired * token + email is the identity proof — the same binding the unlock link * carries — so the offer needs no login. */ export declare function requeueWaitlistToFront(token: string, email: string, req?: Pick): Promise; export interface WaitlistStatusResult { waitlistEnabled: boolean; soldOut: boolean; /** * When gated, the public event page should present "Sold Out — join the * waitlist" to non-members even if tickets are technically available, and only * a valid tokenized link unlocks checkout (reconciled decision #3). */ gated: boolean; } /** * Fetch an event's waitlist gating status. Returns a non-gated default if the * request fails so the page degrades to normal behavior. */ export declare function getWaitlistStatus(eventId: string | number, req?: Pick): Promise; /** Clock shape for the offer window: h:mm:ss from an hour up, m:ss below. */ export declare function formatWaitlistWindow(totalSec: number): string;