import { EventEmitter } from 'eventemitter3'; import type { Contact } from '../src/api'; import type { Card, Topic, Asset, Tag, Profile, Repeater} from '../src/types'; export class MockContactModule implements Contact { public revision: number; private emitter: EventEmitter; constructor() { this.revision = 0; this.emitter = new EventEmitter(); } public addCardListener(ev: (cards: Card[]) => void): void { this.emitter.on('card', ev); } public removeCardListener(ev: (cards: Card[]) => void): void { this.emitter.off('card', ev); } public close(): void { } public async setRevision(rev: number): Promise { this.revision = rev; } public async addCard(server: string, guid: string): Promise { return ''; } public async removeCard(cardId: string): Promise { } public async confirmCard(cardId: string): Promise { } public async connectCard(cardId: string): Promise { } public async disconnectCard(cardId: string): Promise { } public async rejectCard(cardId: string): Promise { } public async ignoreCard(cardId: string): Promise { } public async resyncCard(cardId: string): Promise { } public async flagCard(cardId: string): Promise { } public async flagArticle(cardId: string, articleId: string): Promise { } public async flagChannel(cardId: string, channelId: string): Promise { } public async flagTopic(cardId: string, channelId: string, topicId: string): Promise { } public async flagTag(cardId: string, channelId: string, topicId: string, tagId: string): Promise { } public async setBlockCard(cardId: string): Promise { } public async setBlockArticle(cardId: string, articleId: string): Promise { } public async setBlockChannel(cardId: string, channelId: string): Promise { } public async setBlockTopic(cardId: string, channelId: string, topicId: string): Promise { } public async setBlockTag(cardId: string, channelId: string, topicId: string, tagId: string): Promise { } public async clearBlockCard(cardId: string): Promise { } public async clearBlockArticle(cardId: string, articleId: string): Promise { } public async clearBlockChannel(cardId: string, channelId: string): Promise { } public async clearBlockTopic(cardId: string, channelId: string, topicId: string): Promise { } public async clearBlockTag(cardId: string, channelId: string, topicId: string, tagId: string): Promise { } public async getBlockedCards(): Promise<{ cardId: string }[]> { return []; } public async getBlockedChannels(): Promise<{ cardId: string, channelId: string }[]> { return []; } public async getBlockedTopics(): Promise<{ cardId: string, channelId: string, topicId: string }[]> { return []; } public async getBlockedTags(): Promise<{ cardId: string, channelId: string, topicId: string, tagId: string }[]> { return []; } public async getBlockedArticles(): Promise<{ cardId: string, articleId: string }[]> { return []; } public async removeArticle(cardId: string, articleId: string): Promise { } public async removeChannel(cardId: string, channelId: string): Promise { } public async addTopic(cardId: string, channelId: string, type: string, message: string, assets: Asset[]): Promise { return ''; } public async removeTopic(cardId: string, channelId: string, topicId: string): Promise { } public async setTopicSubject(cardId: string, channelId: string, topicId: string, subject: string): Promise { } public async addTag(cardId: string, channelId: string, topicId: string, type: string, value: string): Promise { return ''; } public async removeTag(cardId: string, topicId: string, tagId: string): Promise { } public async setTagSubject(cardId: string, topicId: string, tagId: string, subject: string): Promise { } public async getTopics(cardId: string, channelId: string): Promise { return []; } public async getMoreTopics(cardId: string, channelId: string): Promise { return []; } public async getTags(cardId: string, channelId: string, topicId: string): Promise { return []; } public async getMoreTags(cardId: string, channelId: string, topicId: string): Promise { return []; } public async setUnreadChannel(cardId: string, channelId: string): Promise { } public async clearUnreadChannel(cardId: string, channelId: string): Promise { } public async getRegistry(server: string): Promise { return []; } public getRegistryImageUrl(server: string, guid: string): string { return ''; } public getTopicAssetUrl(cardId: string, channelId: string, topicId: string, assetId: string): string { return ''; } public getCardImageUrl(cardId: string): string { return ''; } public async addRepeaterAccess(cardId: string, channelId: string, name: string): Promise { return { id: '', guid: '', name: '', server: '', token: '' }; } public async removeRepeaterAccess(cardId: string, channelId: string, repeaterId: string): Promise { } }