import { AxiosResponse } from "axios"; import { TwilioErrorCodes } from "../FlexError"; import type { AuthTokenResponse, ConsoleLoginParams } from "./OAuthLoginHandler.definitions"; import type { SSOTokenPayload } from "./TokenStorage"; export declare const generateCodeVerifier: () => Promise; export declare const generateChallenge: (verifier: string) => Promise; export declare const generateNonce: () => string; export declare const generateState: () => string; export declare const getRedirectUrl: (redirectUrlConfig?: string) => string; export declare const isTwilioHosted: (redirectUrlConfig?: string) => boolean; export declare const getRuntimeDomain: (serviceBaseUrl?: string, redirectUrlConfig?: string) => string; export declare function sanitizeOAuthUrl(origin: string, href: string): string; export declare function formatToken(tokenPayload: AuthTokenResponse): SSOTokenPayload; type OAuthAxiosError = { isAxiosError?: boolean; response?: AxiosResponse; }; type OAuthFlexError = { code: TwilioErrorCodes; status: number; }; export type OAuthError = OAuthAxiosError | OAuthFlexError | string; export declare function parseOAuthError(wrappedError: OAuthError): string; export declare function parseConsoleLoginParams(): ConsoleLoginParams | undefined; export declare const exportedForTesting: { urlEncodeB64: (input: string) => string; }; export {};