import { OnEventOptions } from '@nestjs/event-emitter/dist/interfaces'; import { Socket } from 'socket.io'; import { BotStats } from '@/analytics/schemas/bot-stats.schema'; import { Attachment } from '@/attachment/schemas/attachment.schema'; import { Block, BlockFull } from '@/chat/schemas/block.schema'; import { Category } from '@/chat/schemas/category.schema'; import { ContextVar } from '@/chat/schemas/context-var.schema'; import { Conversation } from '@/chat/schemas/conversation.schema'; import { Label } from '@/chat/schemas/label.schema'; import { Message } from '@/chat/schemas/message.schema'; import { Subscriber } from '@/chat/schemas/subscriber.schema'; import { ContentType } from '@/cms/schemas/content-type.schema'; import { Content } from '@/cms/schemas/content.schema'; import { Menu } from '@/cms/schemas/menu.schema'; import { Language } from '@/i18n/schemas/language.schema'; import { Translation } from '@/i18n/schemas/translation.schema'; import { NlpEntity } from '@/nlp/schemas/nlp-entity.schema'; import { NlpSampleEntity } from '@/nlp/schemas/nlp-sample-entity.schema'; import { NlpSample } from '@/nlp/schemas/nlp-sample.schema'; import { NlpValue } from '@/nlp/schemas/nlp-value.schema'; import { Setting } from '@/setting/schemas/setting.schema'; import { Invitation } from '@/user/schemas/invitation.schema'; import { Model } from '@/user/schemas/model.schema'; import { Permission } from '@/user/schemas/permission.schema'; import { Role } from '@/user/schemas/role.schema'; import { User } from '@/user/schemas/user.schema'; import { EHook } from '@/utils/generics/base-repository'; import { SubscriberUpdateDto } from './chat/dto/subscriber.dto'; import '@nestjs/event-emitter'; /** * @description Module declaration that extends the NestJS EventEmitter with custom event types and methods. */ declare module '@nestjs/event-emitter' { interface TDefinition { schema: S; operations: O; } interface IHookOperationMap { analytics: TDefinition< object, { block: BlockFull; passation: Subscriber; 'fallback-local': BlockFull; 'fallback-global': any; } >; chatbot: TDefinition< object, { sent: unknown; received: unknown; message: unknown; delivery: unknown; read: unknown; typing: unknown; follow: unknown; echo: unknown; } >; nlp: TDefinition; websocket: TDefinition< object, { connection: Socket; } >; } interface IHookEntityOperationMap extends IHookOperationMap { stats: TDefinition; attachment: TDefinition; block: TDefinition; category: TDefinition; contextVar: TDefinition; conversation: TDefinition; label: TDefinition< Label, { create: THydratedDocument