import type { Channel, Topic, AssetSource, Asset, Tag, Article, Group, Card, Profile, Call, FocusDetail, Config, NodeConfig, NodeAccount, Participant, PushParams } from './types'; export interface Session { getSettings(): Settings; getIdentity(): Identity; getContact(): Contact; getAlias(): Alias; getAttribute(): Attribute; getContent(): Content; getRing(): Ring; setFocus(cardId: string | null, channelId: string): Promise; clearFocus(): void; addStatusListener(ev: (status: string) => void): void; removeStatusListener(ev: (status: string) => void): void; } export interface Link { setStatusListener(ev: (status: string) => Promise): void; clearStatusListener(): void; setMessageListener(ev: (message: any) => Promise): void; clearMessageListener(): void; getIce(): { urls: string; username: string; credential: string }[]; sendMessage(message: any): Promise; close(): Promise; } export interface Ring { addRingingListener(ev: (calls: Call[]) => void): void; removeRingingListener(ev: (calls: Call[]) => void): void; accept(cardId: string, callId: string, contactNode: string): Promise; decline(cardId: string, callId: string, contactNode: string): Promise; ignore(cardId: string, callId: string): Promise; } export interface Settings { getUsernameStatus(username: string): Promise; setLogin(username: string, password: string): Promise; enableNotifications(params?: PushParams): Promise; disableNotifications(): Promise; enableRegistry(): Promise; disableRegistry(): Promise; enableMFA(): Promise<{ secretImage: string; secretText: string }>; disableMFA(): Promise; confirmMFA(code: string): Promise; setSeal(password: string): Promise; clearSeal(): Promise; unlockSeal(password: string): Promise; updateSeal(password: string): Promise; forgetSeal(): Promise; getBlockedCards(): Promise<{cardId: string, timestamp: number}[]>; getBlockedChannels(): Promise<{cardId: string | null, channelId: string, timestamp: number}[]>; getBlockedTopicis(): Promise<{cardId: string | null, channelId: string, topicId: string, timestamp: number}[]>; addConfigListener(ev: (config: Config) => void): void; removeConfigListener(ev: (config: Config) => void): void; } export interface Identity { setProfileData(name: string, location: string, description: string): Promise; setProfileImage(image: string): Promise; getProfileImageUrl(): string; addProfileListener(ev: (profile: Profile) => void): void; removeProfileListener(ev: (profile: Profile) => void): void; } export interface Contact { addCard(server: string | null, guid: string): Promise; removeCard(cardId: string): Promise; confirmCard(cardId: string): Promise; connectCard(cardId: string): Promise; disconnectCard(cardId: string): Promise; denyCard(cardId: string): Promise; ignoreCard(cardId: string): Promise; resyncCard(cardId: string): Promise; flagCard(cardId: string): Promise; setBlockedCard(cardId: string, blocked: boolean): Promise; getRegistry(handle: string | null, server: string | null): Promise; callCard(cardId: string, ringInterval: number): Promise; addCardListener(ev: (cards: Card[]) => void): void; removeCardListener(ev: (cards: Card[]) => void): void; } export interface Content { addChannel(sealed: boolean, type: string, subject: any, cardIds: string[]): Promise; removeChannel(channelId: string): Promise; setChannelSubject(channelId: string, type: string, subject: any): Promise; setChannelCard(channelId: string, cardId: string): Promise; clearChannelCard(channelId: string, cardId: string): Promise; leaveChannel(cardId: string, channelId: string): Promise; getChannelNotifications(cardId: string | null, channelId: string): Promise; setChannelNotifications(cardId: string | null, channelId: string, enabled: boolean): Promise; setUnreadChannel(cardId: string | null, channelId: string, unread: boolean): Promise; flagChannel(cardId: string | null, channelId: string): Promise; setBlockedChannel(cardId: string | null, channelId: string, blocked: boolean): Promise; clearBlockedChannelTopic(cardId: string | null, channelId: string, topicId: string): Promise; addChannelListener(ev: (arg: { channels: Channel[]; cardId: string | null }) => void): void; removeChannelListener(ev: (arg: { channels: Channel[]; cardId: string | null }) => void): void; } export interface Alias { addGroup(sealed: boolean, type: string, subject: string, cardIds: string[]): Promise; removeGroup(groupId: string): Promise; setGroupSubject(groupId: string, subject: string): Promise; setGroupCard(groupId: string, cardId: string): Promise; clearGroupCard(groupId: string, cardId: string): Promise; compare(groupIds: string[], cardIds: string[]): Promise>; addGroupListener(ev: (groups: Group[]) => void): void; removeGroupListener(ev: (groups: Group[]) => void): void; } export interface Attribute { addArticle(sealed: boolean, type: string, subject: string, cardIds: string[], groupIds: string[]): Promise; removeArticle(articleId: string): Promise; setArticleSubject(articleId: string, subject: string): Promise; setArticleCard(articleId: string, cardId: string): Promise; clearArticleCard(articleId: string, cardId: string): Promise; setArticleGroup(articleId: string, groupId: string): Promise; clearArticleGroup(articleId: string, groupId: string): Promise; addArticleListener(ev: (articles: Article[]) => void): void; removeArticleListener(ev: (articles: Article[]) => void): void; } export interface Focus { getFocused(): {cardId: null|string, channelId: string}; addTopic(sealed: boolean, type: string, subject: (assets: {assetId: string, appId: string}[])=>any, assets: AssetSource[], progress: (percent: number)=>boolean): Promise; setTopicSubject(topicId: string, type: string, subject: (assets: {assetId: string, appId: string}[])=>any, files: AssetSource[], progress: (percent: number)=>boolean): Promise; removeTopic(topicId: string): Promise; viewMoreTopics(): Promise; getTopicAssetUrl(topicId: string, assetId: string, progress?: (percent: number) => boolean|void): Promise; flagTopic(topicId: string): Promise; setBlockTopic(topicId: string): Promise; clearBlockTopic(topicId: string): Promise; addTopicListener(ev: (topics: null | Topic[]) => void): void; removeTopicListener(ev: (topics: null | Topic[]) => void): void; addDetailListener(ev: (focused: { cardId: string | null, channelId: string, detail: FocusDetail | null }) => void): void; removeDetailListener(ev: (focused: { cardId: string | null, channelId: string, detail: FocusDetail | null }) => void): void; } export interface Node { getAccounts(): Promise; createAccountAccess(): Promise; resetAccountAccess(): Promise; blockAccount(flag: boolean): Promise; removeAccount(accountId: number): Promise; getConfig(): Promise; setConfig(config: NodeConfig): Promise; } export interface Contributor { addTopic(type: string, message: string, assets: Asset[]): Promise; removeTopic(topicId: string): Promise; addTag(topicId: string, type: string, value: string): Promise; removeTag(topicId: string, tagId: string): Promise; }