import { Nullable } from '../kotlin/clientsdk-clientcore_js'; import vonage from '../utils/vonage'; import { LoggingLevel, VonageLogger, VonageLoggerJS } from './logging'; /** * The datacenter region for the Client. * * It can be set either via {@link ClientInitConfigObject} or {@link ClientConfigObject}. */ export type ConfigRegion = vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name; export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS; /** * An convenience union for {@link ConfigObjectJS} allowing to pass strings for enum properties. */ /** * Represents the configuration object for the client. * * The `ClientConfig` class provides a convenient way to configure the client by specifying various properties. * These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings. * * @property region The Vonage datacenter to use * @property apiUrl The API URL of your chosen datacenter, if set overrides default from region * @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region * @property websocketPath The Path component appended to the Websocket URL * @property rtcStatsTelemetry Allow users to enable RTCStats * @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes * @property emergencyPrimaryRegion The primary region URL for emergency services * @property emergencySecondaryRegion The secondary region URL for emergency services * * @example * [[include:snippet_SetClientConfig.txt]] */ export type ClientConfigObject = ConfigObjectJS | ({ region?: ConfigRegion; } & Omit); /** * Represents the configuration object used to initialize the client. * * The `ClientInitConfig` class provides a convenient way to configure the client by specifying various properties. * These properties include all the ones in {@link ClientConfigObject} plus {@link loggingLevel}, {@link customLoggers} and {@link disableInternalLogger}. * * @property loggingLevel The Logging Level to use * @property customLoggers A List of custom loggers * @property disableInternalLogger Whether to enable the SDK internal logger * @property region The Vonage datacenter to use * @property apiUrl The API URL of your chosen datacenter, if set overrides default from region * @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region * @property websocketPath The Path component appended to the Websocket URL * @property rtcStatsTelemetry Allow users to enable RTCStats * @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes * @property emergencyPrimaryRegion The primary region URL for emergency services * @property emergencySecondaryRegion The secondary region URL for emergency services * * @example * [[include:snippet_Logging.txt]] */ export type ClientInitConfigObject = InitConfigObjectJS | ({ region?: ConfigRegion; loggingLevel?: LoggingLevel; customLoggers?: VonageLogger[]; } & Omit); export interface ConfigObjectJS { region?: Nullable; apiUrl?: Nullable; websocketUrl?: Nullable; websocketPath?: Nullable; rtcStatsTelemetry?: Nullable; autoReconnectMedia?: Nullable; emergencyPrimaryRegion?: Nullable; emergencySecondaryRegion?: Nullable; } export interface InitConfigObjectJS extends ConfigObjectJS { loggingLevel?: Nullable; customLoggers?: Nullable; disableInternalLogger?: Nullable; } export declare class ClientConfig extends vonage.CoreClientConfigJS { /** * Constructs a new instance of the class. * * @param region The region where the API and WebSocket URLs should be configured. * Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific). * The URLs will be automatically set based on the selected region. * Defaults to "US" if no region is specified. */ constructor(region?: ConfigRegion); } export declare class ClientInitConfig implements InitConfigObjectJS { loggingLevel: vonage.LoggingLevelJS; region: vonage.CoreClientConfigRegionJS; customLoggers: VonageLoggerJS[]; disableInternalLogger: boolean; apiUrl?: Nullable; websocketUrl?: Nullable; websocketPath?: Nullable; rtcStatsTelemetry?: Nullable; autoReconnectMedia?: Nullable; emergencyPrimaryRegion?: Nullable; emergencySecondaryRegion?: Nullable; /** * Constructs a new instance of the class. */ constructor(loggingLevel?: LoggingLevel, region?: ConfigRegion, customLoggers?: Array); } export declare const convertInitConfig: (config: ClientInitConfigObject) => InitConfigObjectJS;