import { OAuthError } from '../errors/OAuthError'; /** Options for initiating OAuth redirect */ export interface OAuthRedirectOptions { /** The Dexie Cloud database URL */ databaseUrl: string; /** The OAuth provider name */ provider: string; /** Optional redirect URI override. * Defaults to window.location.href for web apps. * For Capacitor/native apps, use a custom URL scheme like 'myapp://' */ redirectUri?: string; } /** * Initiates OAuth login via full page redirect. * * The page will navigate to the OAuth provider. After authentication, * the user is redirected back to the app with a `dxc-auth` query parameter * containing base64url-encoded JSON with the authorization code. * * The dexie-cloud-addon automatically detects and processes this parameter * when db.cloud.configure() is called on page load. * * @param options - OAuth redirect options * * @example * ```typescript * // Initiate OAuth login * startOAuthRedirect({ * databaseUrl: 'https://mydb.dexie.cloud', * provider: 'google' * }); * // Page navigates away, user authenticates, then returns with auth code * ``` */ export declare function startOAuthRedirect(options: OAuthRedirectOptions): void; /** Map OAuth error strings to error codes */ export declare function mapOAuthError(error: string): OAuthError['code'];