import type { Event, SkyWayError } from '@skyway-sdk/common'; import type model from '@skyway-sdk/model'; import type { Channel, Member, MemberType, Publication } from '@skyway-sdk/model'; export interface RtcApi { readonly onClose: Event; readonly onReconnectStart: Event; readonly onReconnectSuccess: Event; readonly onFatalError: Event; /**@throws {@link SkyWayError} */ createChannel(appId: string, channelInit: ChannelInit): Promise; getChannel(appId: string, channelQuery: ChannelQuery): Promise; findOrCreateChannel(appId: string, channelQuery: ChannelInit): Promise; deleteChannel(appId: string, id: Channel['id']): Promise; updateChannelMetadata(appId: string, id: Channel['id'], metadata: string): Promise; join(appId: string, channelId: Channel['id'], memberInit: MemberInit): Promise; leave(appId: string, channelId: Channel['id'], memberId: Member['id']): Promise; updateMemberTtl(appId: string, channelId: Channel['id'], memberId: Member['id'], ttlSec: number): Promise; updateMemberMetadata(appId: string, channelId: Channel['id'], memberId: Member['id'], metadata: string): Promise; /**@throws {@link SkyWayError} */ publish(appId: string, init: PublicationInit): Promise; unpublish(appId: string, channelId: Channel['id'], publicationId: Publication['id']): Promise; updatePublicationMetadata(appId: string, channelId: Channel['id'], publicationId: Publication['id'], metadata: string): Promise; disablePublication(appId: string, channelId: Channel['id'], publicationId: Publication['id']): Promise; enablePublication(appId: string, channelId: Channel['id'], publicationId: Publication['id']): Promise; /**@throws {@link SkyWayError} */ subscribe(appId: string, init: SubscriptionInit): Promise; unsubscribe(appId: string, channelId: string, subscriptionId: string): Promise; getServerUnixtime(appId: string): Promise; updateAuthToken(token: string): Promise; close(): void; } export declare type ChannelInit = { name?: Channel['name']; metadata?: string; }; export declare type ChannelQuery = { name?: Channel['name']; id?: Channel['id']; }; export declare type MemberInit = { name?: Member['name']; type: MemberType; subtype: string; metadata?: string; ttlSec?: number; }; export declare type PublicationInit = { channel: Channel['id']; publisher: Member['id']; origin?: Publication['id']; metadata?: string; contentType: model.ContentType; codecCapabilities?: model.Codec[]; encodings?: model.Encoding[]; isEnabled?: boolean; type?: model.PublicationType; }; export declare type SubscriptionInit = { channel: { id: Channel['id']; }; subscriber: { id: Member['id']; }; publication: { id: Publication['id']; publisherId: Publication['publisherId']; contentType: Publication['contentType']; }; }; //# sourceMappingURL=api.d.ts.map