import { Auth, User } from 'firebase/auth'; declare const PAYMENT_LINK_PRICE_MIN = 1; declare const PAYMENT_LINK_PRICE_MAX = 2000; declare const PAYMENT_LINK_PRICE_CONFIRM_THRESHOLD = 200; declare const PAYMENT_LINK_DEFAULT_EXPIRY_DAYS = 30; declare function generatePaymentLinkToken(): string; declare function defaultExpiry(): Date; declare function isExpired(expiresAt: Date | string): boolean; /** Dependencies for the anonymous-auth helper factory. */ interface AnonymousAuthHelperDeps { /** Firebase client Auth instance. Must be the same instance used by the consumer's app for sign-in state to stay consistent across calls. */ auth: Auth; /** URL where the helper POSTs `{ idToken }` to exchange the Firebase ID token for a server-side session cookie. The endpoint must respond 2xx on success. Default: "/api/auth/session". */ sessionEndpoint?: string; } /** * Creates an `ensureAnonymousSession(existingUser)` function that signs in * anonymously (if not already signed in) and establishes a server-side * session cookie. Idempotent: if a user is already signed in, refreshes * the cookie with the current user. * * Usage: * * const ensureAnonymousSession = createAnonymousAuthHelper({ * auth: clientAuth, * sessionEndpoint: "/api/auth/session", * }); * const user = await ensureAnonymousSession(currentUser); */ declare function createAnonymousAuthHelper(deps: AnonymousAuthHelperDeps): (existingUser: User | null) => Promise; export { type AnonymousAuthHelperDeps, PAYMENT_LINK_DEFAULT_EXPIRY_DAYS, PAYMENT_LINK_PRICE_CONFIRM_THRESHOLD, PAYMENT_LINK_PRICE_MAX, PAYMENT_LINK_PRICE_MIN, createAnonymousAuthHelper, defaultExpiry, generatePaymentLinkToken, isExpired };