import type * as client from '@botpress/client'; import type { AsyncCollection } from '../../utils/api-paging-utils'; import type * as utils from '../../utils/type-utils'; import type { BasePlugin } from '../common'; export type EventSchedule = NonNullable; export type EventSender = { emit: (event: TPayload) => Promise; schedule: (event: TPayload, schedule: EventSchedule) => Promise; withConversationId: (conversationId: string) => EventSender; withUserId: (userId: string) => EventSender; withMessageId: (messageId: string) => EventSender; list: (props?: Omit) => AsyncCollection; getById: (props: { id: string; }) => Promise; }; export type EventProxy = utils.Normalize<{ [TEventName in keyof TPlugin['events']]: EventSender; }>;