import { OAuth } from "@uuip/unified-ui-platform"; import Metrics from "@webex/internal-plugin-metrics/dist/types/new-metrics"; export interface WebExCredentials { refreshCallback: (webex: WebexInstance, token: OAuth.Token) => Promise; client_id: string; clientType: string; client_secret: string; redirect_uri: string; scope: string; } export interface WebexConfig { config: { credentials: WebExCredentials; meetings: { reconnection: { enabled: boolean; }; enableRtx: boolean; }; presence: { initializeWorker: boolean; }; mercury: { beforeLogoutOptionsCloseReason: string; }; logger?: { level: string; }; services: { discovery?: { u2c: string; hydra: string; }; }; }; credentials?: Record; } export interface WebexInitiateLoginOptions { emailHash: string; state?: Record; separateWindow?: { width: number; height: number; }; } export interface WebexAuthorisation { initiateLogin?: (options: WebexInitiateLoginOptions) => Promise; ready: Promise; } export declare enum WebexServiceCatalogType { PREAUTH = "preauth", POSTAUTH = "postauth" } export type WebexServiceCatalog = Partial>; export type ServiceGroup = "discovery" | "override" | "preauth" | "postauth" | "signin"; export interface WebexInstance { request: any; refresh: () => Promise; authorization?: WebexAuthorisation; credentials: { canAuthorize: () => boolean; supertoken: { access_token?: string; refresh_token?: string; }; }; config: { credentials: { client_id: string; client_secret: string; }; }; ready: () => boolean; once?: (event: string, callback: () => void) => void; internal: { newMetrics?: Metrics; device?: { registered?: boolean; register?: () => Promise; }; services: { waitForCatalog(serviceGroup: ServiceGroup, timeout: number): Promise; get(serviceName: string): string | undefined; }; }; } export interface WebexTokenStorage { Credentials?: { "@"?: { supertoken?: OAuth.Token; userTokens?: any; }; }; } export interface WebexCoreType { extend: (config: Record) => WebexConstructor; } export interface WebexConstructor { new (attrs: WebexConfig): WebexInstance; init?: (attrs: WebexConfig) => WebexInstance; } export interface StorageAdapterConstructor { new (key: string): unknown; } /** * Token refresh response from the OAuth2 endpoint */ export interface TokenRefreshResponse { access_token: string; expires_in: number; refresh_token: string; refresh_token_expires_in: number; statusCode?: number; } export interface IdentityUrls { identityUrl: string; idbrokerUrl: string; } declare global { interface Window { webexService?: WebexInstance; } } //# sourceMappingURL=types.d.ts.map