@refinio/one.models
    Preparing search index...

    Type Alias ChatApiType

    type ChatApiType = {
        getAllGroupTopics: () => Promise<Topic[]>;
        getAllOneToOneTopics: () => Promise<Topic[]>;
        getAllPossibleGroupTopicIds: () => Promise<string[]>;
        getAllPossibleOneToOneTopicIds: () => Promise<string[]>;
        getAllPossibleTopicIds: () => Promise<string[]>;
        getAllTopics: () => Promise<Topic[]>;
        getAndListenForMessages: (
            topicId: string,
            onMessagesUpdate: (messages: CachedChatMessage[]) => Promise<void>,
            onNewMessages: () => Promise<void>,
            onAttachmentUpdate: () => Promise<void>,
            options: { batchSize?: number; ownerId?: SHA256IdHash<Person> },
        ) => Promise<{ loadNextBatch: () => void; shutdown: () => void }>;
        getMessagesChannelIterator: (
            topicId: string,
            ownerId?: SHA256IdHash<Person>,
        ) => Promise<AsyncIterableIterator<RawChannelEntry> | undefined>;
        getTopic: (topicId: string) => Promise<Topic>;
        sendMessage: (
            topicId: string,
            message: string,
            options: ChatApiSendMessageOptions,
        ) => Promise<void>;
    }

    Implemented by

    Index

    Properties

    getAllGroupTopics: () => Promise<Topic[]>
    getAllOneToOneTopics: () => Promise<Topic[]>
    getAllPossibleGroupTopicIds: () => Promise<string[]>
    getAllPossibleOneToOneTopicIds: () => Promise<string[]>
    getAllPossibleTopicIds: () => Promise<string[]>
    getAllTopics: () => Promise<Topic[]>
    getAndListenForMessages: (
        topicId: string,
        onMessagesUpdate: (messages: CachedChatMessage[]) => Promise<void>,
        onNewMessages: () => Promise<void>,
        onAttachmentUpdate: () => Promise<void>,
        options: { batchSize?: number; ownerId?: SHA256IdHash<Person> },
    ) => Promise<{ loadNextBatch: () => void; shutdown: () => void }>
    getMessagesChannelIterator: (
        topicId: string,
        ownerId?: SHA256IdHash<Person>,
    ) => Promise<AsyncIterableIterator<RawChannelEntry> | undefined>
    getTopic: (topicId: string) => Promise<Topic>
    sendMessage: (
        topicId: string,
        message: string,
        options: ChatApiSendMessageOptions,
    ) => Promise<void>