import type { UserOfAuthenticator, ContextOfAuthenticator } from '@sociably/auth'; import type { EventValue, WebviewEvent, AnyClientAuthenticator } from '../types.js'; import type WebviewClient from './Client.js'; export type ClientEventContext = { event: WebviewEvent>; authenticator: Authenticator; auth: ContextOfAuthenticator; }; export type EventContextOfClient> = Client extends WebviewClient ? ClientEventContext : never; export type ClientOptions = { /** URL string to connect WebSocket backend. Default to `"/websocket"` */ webSocketUrl?: string; /** Secify the platform to login. Default to the value of `platform` querystring */ platform?: string; /** URL of the auth backend API. Default to `"/auth"` */ authApiUrl?: string; /** Authenticators of the platforms. */ authPlatforms: Authenticator[]; /** * When set to true, the underlying network operations would not be executed. * It's useful for server rendering at server side. */ mockupMode?: boolean; };