interface IBridgeRequestBody extends Record { } interface IBridgeResponseBody { } interface IBridgeBooleanResponseBody extends IBridgeResponseBody { result: boolean; } declare const SUBSCRIBE_EVENT_NAMES: readonly ["onReady"]; type UnsubscribeFunction = () => Promise; interface IBridgeEvent extends IBridgeResponseBody { } type SubscribeCallback = (event: T) => void; type TSubscribeEventName = (typeof SUBSCRIBE_EVENT_NAMES)[number]; declare const subscribe: (eventName: TSubscribeEventName, callback: SubscribeCallback) => Promise; interface IAppCloseRequestBody extends IBridgeRequestBody { } interface IAppCloseResponseBody extends IBridgeBooleanResponseBody { } declare const appClose: (body?: IAppCloseRequestBody) => Promise; interface IAppInitRequestBody extends IBridgeRequestBody { } interface IAppInitResponseBody extends IBridgeResponseBody { appId: string; version: string; platform: 'android' | 'web' | 'ios'; clientVersion: string; manifestVersion: number; theme: 'dark' | 'light' | 'system'; viewMode: 'fullscreen' | 'compact' | 'popup'; viewport: { width: number; height: number; safeAreaTop?: number; safeAreaBottom?: number; }; } declare const appInit: (body?: IAppInitRequestBody) => Promise; interface IAppReadyRequestBody extends IBridgeRequestBody { } interface IAppReadyResponseBody extends IBridgeBooleanResponseBody { } declare const appReady: (body?: IAppReadyRequestBody) => Promise; interface IProfileGetRequestBody extends IBridgeRequestBody { } interface IProfileGetResponseBody extends IBridgeResponseBody { user: { id: string; displayName: string; username: string; languageCode: string; avatarUrl: string; }; } declare const profileGet: (body?: IProfileGetRequestBody) => Promise; interface IStorageGetRequestBody extends IBridgeRequestBody { key: string; } interface IStorageGetResponseBody extends IBridgeResponseBody { key: string; value: string | null; } declare const storageGet: (body: IStorageGetRequestBody) => Promise; interface IStorageRemoveRequestBody extends IBridgeRequestBody { key: string; } interface IStorageRemoveResponseBody extends IBridgeBooleanResponseBody { } declare const storageRemove: (body: IStorageRemoveRequestBody) => Promise; interface IStorageSetRequestBody extends IBridgeRequestBody { key: string; value: string; } interface IStorageSetResponseBody extends IBridgeBooleanResponseBody { } declare const storageSet: (body?: IStorageSetRequestBody) => Promise; interface IBridge { app: { ready: typeof appReady; close: typeof appClose; init: typeof appInit; }; profile: { get: typeof profileGet; }; storage: { get: typeof storageGet; set: typeof storageSet; remove: typeof storageRemove; }; subscribe: typeof subscribe; } declare const bridge: IBridge; export { bridge };