export interface Endpoint { type: 'messenger' | 'discord'; id: string; readonly?: boolean; } export default class Connection { name: string; endpoints: Endpoint[]; disabled: boolean; constructor(name: string, endpoints?: Endpoint[]); static isThread(endpoint: Endpoint): boolean; static isChannel(endpoint: Endpoint): boolean; addThread(id: string): this; addChannel(id: string): this; addEndpoint({ id, type, readonly }: { id: string; type: 'discord' | 'messenger'; readonly?: boolean; }): Promise; has(id: string): boolean; getWritableEndpoints(): Endpoint[]; getThreads(): Endpoint[]; getWritableThreads(): Endpoint[]; getOtherWritableThreads(id: string): Endpoint[]; getChannels(): Endpoint[]; getWritableChannels(): Endpoint[]; getOtherWritableChannels(id: string): Endpoint[]; checkChannelRenames(name: string): Promise; hasEndpoint(id: string): boolean; markEndpointAsReadonly(id: string, readonly: boolean): this; removeEndpoint(id: string): this; getPrintable(): string; rename(newName: string): this; delete(): Promise; disable(): this; enable(): this; save(): Promise; toYAMLObject(): { [x: string]: Endpoint[]; }; toObject(): { name: string; endpoints: Endpoint[]; disabled: boolean; }; readonly cleanEndpoints: Endpoint[]; }