import { SupportedEnvironments } from './config/environments.js'; import { NaluriVideoLoginOptions, AccountUser } from './types/account.js'; interface NaluriVideoOptions { apiKey: string; timeoutMs?: number; environment?: SupportedEnvironments; onRefreshTokenError?: () => Promise; } declare class NaluriVideo { /** * Api key of naluri video */ readonly apiKey: string; /** * Environment, default to SIT */ readonly environment: SupportedEnvironments; /** * Function to be called when refresh token fails */ readonly onRefreshTokenError?: () => Promise; /** * @private * Initialized Video instance */ private static videoInstance?; private accountInstance; private videoApiInstance?; private constructor(); /** * [IMPORTANT]: Initialise this first before using any other methods * Initialize a new Naluri Video instance * @returns {NaluriVideo} */ static initialize({ apiKey, timeoutMs, environment, onRefreshTokenError, }: NaluriVideoOptions): void; /** * Gets a new Naluri Video instance * @returns {NaluriVideo} */ static getInstance(): NaluriVideo; /** * @throws {NaluriVideoError} * @returns {string} access token for video room */ connectRoom(roomId: string): Promise; /** * Login user to video * @param {NaluriVideoLoginOptions} options * @returns {PromiseLike} */ login({ authorizationCode, }: NaluriVideoLoginOptions): Promise; get isInitialized(): boolean; logout(): Promise<{ success: boolean; }>; destroy(): void; } export { NaluriVideo, type NaluriVideoOptions };