import { TextChannel } from 'discord.js'; export interface Endpoint { type: 'messenger' | 'discord'; id: string; name?: string; channel?: TextChannel; readonly?: boolean; } export interface ChannelEndpoint extends Endpoint { channel: TextChannel; } export default class Connection { name: string; endpoints: Endpoint[]; constructor(name: string, endpoints?: Endpoint[]); static isThread(endpoint: Endpoint): boolean; static isChannel(endpoint: Endpoint): boolean; addThread({ id, name }: { id: string; name: string; }): this; addChannel({ id, name }: { id: string; name: 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(): ChannelEndpoint[]; getWritableChannels(): ChannelEndpoint[]; getOtherWritableChannels(id: string): ChannelEndpoint[]; checkChannelRenames(name: string): Promise; hasEndpoint(id: string): boolean; markEndpointAsReadonly(id: string, readonly: boolean): this; removeEndpoint(id: string): Promise; getPrintable(): string; rename(newName: string): Promise; delete(): Promise; save(): Promise; toYAMLObject(): { [x: string]: { type: "messenger" | "discord"; id: string; name: string | undefined; readonly: boolean | undefined; }[]; }; toObject(): { name: string; endpoints: { type: "messenger" | "discord"; id: string; name: string | undefined; readonly: boolean | undefined; }[]; }; readonly cleanEndpoints: { type: "messenger" | "discord"; id: string; name: string | undefined; readonly: boolean | undefined; }[]; }