import type { TokenFinalResponse } from 'dexie-cloud-common'; /** Options for exchanging an OAuth code */ export interface ExchangeOAuthCodeOptions { /** The Dexie Cloud database URL */ databaseUrl: string; /** The Dexie Cloud authorization code from OAuth callback */ code: string; /** The client's public key in PEM format */ publicKey: string; /** Requested scopes (defaults to ['ACCESS_DB']) */ scopes?: string[]; /** Optional login intent — see LoginHints.intent for semantics. */ intent?: 'login' | 'register'; } /** * Exchanges a Dexie Cloud authorization code for access and refresh tokens. * * This is called after the OAuth callback delivers the authorization code * via postMessage (popup flow) or redirect. * * @param options - Exchange options * @returns Promise resolving to TokenFinalResponse * @throws OAuthError or TokenErrorResponseError on failure */ export declare function exchangeOAuthCode(options: ExchangeOAuthCodeOptions): Promise;