@prismshadow/penguin-library-messaging · library/messaging/src/messaging.ts:40

MessagingConversations

interface

MessagingConversations: the mechanism MessagingConversationsRepo implements — per-(bot, chat) delivery state a connector owns as an opaque document (WeChat's context token and held replies), kept for as long as a binding references the bot.

API

@Interface()
export abstract class MessagingConversations {
  abstract get(channel: string, accountId: string, chatId: string): Record<string, unknown> | null;
  abstract list(
      channel: string,
      accountId: string,
    ): { chatId: string; state: Record<string, unknown> }[];
  abstract put(
      channel: string,
      accountId: string,
      chatId: string,
      state: Record<string, unknown>,
    ): void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use
@Provideprovided by
@Useconsumed by (1)

Members (3)

get

get(channel: string, accountId: string, chatId: string): Record<string, unknown> | null
@paramchannelstring
@paramaccountIdstring
@paramchatIdstring
@returnsRecord<string, unknown> | null

list

list(channel: string, accountId: string): { chatId: string; state: Record<string, unknown> }[]
@paramchannelstring
@paramaccountIdstring
@returns{ chatId: string; state: Record<string, unknown> }[]

put

put(channel: string, accountId: string, chatId: string, state: Record<string, unknown>): void
@paramchannelstring
@paramaccountIdstring
@paramchatIdstring
@paramstateRecord<string, unknown>
@returnsvoid