@wabot-dev/framework 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { Env } from '../../../core/env/Env.js';
3
3
  import { singleton } from '../../../core/injection/index.js';
4
4
  import { Logger } from '../../../core/logger/Logger.js';
5
5
  import '../../../feature/chat-bot/ChatBot.js';
6
+ import '../../../feature/chat-bot/ChatOperator.js';
6
7
  import 'uuid';
7
8
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
8
9
  import { safeJsonParse } from '../../../feature/chat-bot/safeJsonParse.js';
@@ -1,5 +1,6 @@
1
1
  import { Logger } from '../../../core/logger/Logger.js';
2
2
  import '../../../feature/chat-bot/ChatBot.js';
3
+ import '../../../feature/chat-bot/ChatOperator.js';
3
4
  import '../../../core/injection/index.js';
4
5
  import 'uuid';
5
6
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -4,6 +4,7 @@ import { singleton } from '../../../core/injection/index.js';
4
4
  import { Logger } from '../../../core/logger/Logger.js';
5
5
  import { Random } from '../../../core/random/Random.js';
6
6
  import '../../../feature/chat-bot/ChatBot.js';
7
+ import '../../../feature/chat-bot/ChatOperator.js';
7
8
  import 'uuid';
8
9
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
9
10
  import { safeJsonParse } from '../../../feature/chat-bot/safeJsonParse.js';
@@ -1,5 +1,6 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import '../../../feature/chat-bot/ChatBot.js';
3
+ import '../../../feature/chat-bot/ChatOperator.js';
3
4
  import { singleton } from '../../../core/injection/index.js';
4
5
  import 'uuid';
5
6
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -3,6 +3,7 @@ import { Env } from '../../../core/env/Env.js';
3
3
  import { singleton } from '../../../core/injection/index.js';
4
4
  import { Logger } from '../../../core/logger/Logger.js';
5
5
  import '../../../feature/chat-bot/ChatBot.js';
6
+ import '../../../feature/chat-bot/ChatOperator.js';
6
7
  import 'uuid';
7
8
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
8
9
  import '../../../core/error/setupErrorHandlers.js';
@@ -6,6 +6,7 @@ import '../../../feature/pg/withPgClient.js';
6
6
  import '../../../feature/pg/pgStorage.js';
7
7
  import '../../../feature/chat-bot/ChatBot.js';
8
8
  import { ChatItem } from '../../../feature/chat-bot/ChatItem.js';
9
+ import '../../../feature/chat-bot/ChatOperator.js';
9
10
  import '../../../core/injection/index.js';
10
11
  import 'uuid';
11
12
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -8,17 +8,58 @@ import '../../../feature/socket-controller/metadata/SocketControllerMetadataStor
8
8
  import { runSocketControllers } from '../../../feature/socket-controller/runSocketControllers.js';
9
9
  import { Socket } from 'socket.io';
10
10
  import { SocketChannelConfig } from './SocketChannelConfig.js';
11
- import '../../../core/validation/metadata/ValidationMetadataStore.js';
11
+ import { isModel } from '../../../core/validation/metadata/@isModel.js';
12
12
  import { isOptional } from '../../../core/validation/metadata/@isOptional.js';
13
+ import { isArray } from '../../../core/validation/metadata/@isArray.js';
14
+ import '../../../core/validation/metadata/ValidationMetadataStore.js';
13
15
  import { isNotEmpty } from '../../../core/validation/validators/is-not-empty/@isNotEmpty.js';
14
16
  import { isString } from '../../../core/validation/validators/is-string/@isString.js';
17
+ import { isRecord } from '../../../core/validation/validators/is-record/@isRecord.js';
15
18
  import { Auth } from '../../../core/auth/Auth.js';
16
19
 
17
20
  var SocketChannel_1;
21
+ class SocketChannelMessageFile {
22
+ id;
23
+ mimeType;
24
+ name;
25
+ publicUrl;
26
+ base64Url;
27
+ }
28
+ __decorate([
29
+ isString(),
30
+ isNotEmpty(),
31
+ __metadata("design:type", String)
32
+ ], SocketChannelMessageFile.prototype, "id", void 0);
33
+ __decorate([
34
+ isString(),
35
+ isNotEmpty(),
36
+ __metadata("design:type", String)
37
+ ], SocketChannelMessageFile.prototype, "mimeType", void 0);
38
+ __decorate([
39
+ isString(),
40
+ isNotEmpty(),
41
+ isOptional(),
42
+ __metadata("design:type", String)
43
+ ], SocketChannelMessageFile.prototype, "name", void 0);
44
+ __decorate([
45
+ isString(),
46
+ isNotEmpty(),
47
+ isOptional(),
48
+ __metadata("design:type", String)
49
+ ], SocketChannelMessageFile.prototype, "publicUrl", void 0);
50
+ __decorate([
51
+ isString(),
52
+ isNotEmpty(),
53
+ isOptional(),
54
+ __metadata("design:type", String)
55
+ ], SocketChannelMessageFile.prototype, "base64Url", void 0);
18
56
  class SocketChannelReceivedMessage {
19
57
  chatId;
20
58
  senderName;
21
59
  text;
60
+ metadata;
61
+ images;
62
+ documents;
22
63
  }
23
64
  __decorate([
24
65
  isString(),
@@ -36,6 +77,42 @@ __decorate([
36
77
  isOptional(),
37
78
  __metadata("design:type", String)
38
79
  ], SocketChannelReceivedMessage.prototype, "text", void 0);
80
+ __decorate([
81
+ isRecord('string', 'string'),
82
+ isOptional(),
83
+ __metadata("design:type", Object)
84
+ ], SocketChannelReceivedMessage.prototype, "metadata", void 0);
85
+ __decorate([
86
+ isArray(),
87
+ isModel(SocketChannelMessageFile),
88
+ isOptional(),
89
+ __metadata("design:type", Array)
90
+ ], SocketChannelReceivedMessage.prototype, "images", void 0);
91
+ __decorate([
92
+ isArray(),
93
+ isModel(SocketChannelMessageFile),
94
+ isOptional(),
95
+ __metadata("design:type", Array)
96
+ ], SocketChannelReceivedMessage.prototype, "documents", void 0);
97
+ function toChatFile(file) {
98
+ if (file.publicUrl) {
99
+ return {
100
+ id: file.id,
101
+ mimeType: file.mimeType,
102
+ name: file.name,
103
+ publicUrl: file.publicUrl,
104
+ };
105
+ }
106
+ if (file.base64Url) {
107
+ return {
108
+ id: file.id,
109
+ mimeType: file.mimeType,
110
+ name: file.name,
111
+ base64Url: file.base64Url,
112
+ };
113
+ }
114
+ return null;
115
+ }
39
116
  let SocketChannel = class SocketChannel {
40
117
  static { SocketChannel_1 = this; }
41
118
  config;
@@ -61,12 +138,19 @@ let SocketChannel = class SocketChannel {
61
138
  chatType: 'PRIVATE',
62
139
  channelName: SocketChannel_1.channelName,
63
140
  };
141
+ const images = message.images?.map(toChatFile).filter((x) => !!x);
142
+ const documents = message.documents
143
+ ?.map(toChatFile)
144
+ .filter((x) => !!x);
64
145
  await channel.callBack({
65
146
  channel: socketChannelName,
66
147
  chatConnection,
67
148
  message: {
68
149
  text: message.text,
69
150
  senderName: message.senderName,
151
+ metadata: message.metadata,
152
+ images: images && images.length > 0 ? images : undefined,
153
+ documents: documents && documents.length > 0 ? documents : undefined,
70
154
  },
71
155
  reply: async (message) => {
72
156
  socket.emit('message', message);
@@ -108,4 +192,4 @@ SocketChannel = SocketChannel_1 = __decorate([
108
192
  __metadata("design:paramtypes", [SocketChannelConfig])
109
193
  ], SocketChannel);
110
194
 
111
- export { SocketChannel, SocketChannelReceivedMessage };
195
+ export { SocketChannel, SocketChannelMessageFile, SocketChannelReceivedMessage };
@@ -1,5 +1,6 @@
1
1
  import '../../../feature/chat-bot/ChatBot.js';
2
2
  import { ChatItem } from '../../../feature/chat-bot/ChatItem.js';
3
+ import '../../../feature/chat-bot/ChatOperator.js';
3
4
  import '../../../core/injection/index.js';
4
5
  import 'uuid';
5
6
  import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -6,6 +6,7 @@ import '../../../../feature/chat-controller/metadata/ControllerMetadataStore.js'
6
6
  import { ChatResolver } from '../../../../feature/chat-controller/ChatResolver.js';
7
7
  import '../../../../feature/chat-controller/runChatControllers.js';
8
8
  import '../../../../feature/chat-bot/ChatBot.js';
9
+ import '../../../../feature/chat-bot/ChatOperator.js';
9
10
  import { ChatRepository } from '../../../../feature/chat-bot/ChatRepository.js';
10
11
  import 'uuid';
11
12
  import '../../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -3,6 +3,7 @@ import { WhatsAppSender } from '../WhatsAppSender.js';
3
3
  import { singleton } from '../../../../core/injection/index.js';
4
4
  import { Logger } from '../../../../core/logger/Logger.js';
5
5
  import '../../../../feature/chat-bot/ChatBot.js';
6
+ import '../../../../feature/chat-bot/ChatOperator.js';
6
7
  import { ChatRepository } from '../../../../feature/chat-bot/ChatRepository.js';
7
8
  import 'uuid';
8
9
  import '../../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
@@ -1,6 +1,11 @@
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import { injectable } from '../../core/injection/index.js';
3
+ import { Chat } from './Chat.js';
1
4
  import { ChatItem } from './ChatItem.js';
5
+ import { ChatMemory } from './ChatMemory.js';
6
+ import { ChatRepository } from './ChatRepository.js';
2
7
 
3
- class ChatOperator {
8
+ let ChatOperator = class ChatOperator {
4
9
  chat;
5
10
  memory;
6
11
  repository;
@@ -49,6 +54,12 @@ class ChatOperator {
49
54
  this.chat.removeAssociation(association);
50
55
  await this.repository.update(this.chat);
51
56
  }
52
- }
57
+ };
58
+ ChatOperator = __decorate([
59
+ injectable(),
60
+ __metadata("design:paramtypes", [Chat,
61
+ ChatMemory,
62
+ ChatRepository])
63
+ ], ChatOperator);
53
64
 
54
65
  export { ChatOperator };
@@ -1,6 +1,7 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import { Chat } from '../chat-bot/Chat.js';
3
3
  import '../chat-bot/ChatBot.js';
4
+ import '../chat-bot/ChatOperator.js';
4
5
  import { ChatRepository } from '../chat-bot/ChatRepository.js';
5
6
  import { injectable } from '../../core/injection/index.js';
6
7
  import 'uuid';
@@ -4,6 +4,7 @@ import { Logger } from '../../core/logger/Logger.js';
4
4
  import { Chat } from '../chat-bot/Chat.js';
5
5
  import { ChatBot } from '../chat-bot/ChatBot.js';
6
6
  import { ChatMemory } from '../chat-bot/ChatMemory.js';
7
+ import '../chat-bot/ChatOperator.js';
7
8
  import { ChatRepository } from '../chat-bot/ChatRepository.js';
8
9
  import 'uuid';
9
10
  import { ChatBotMetadataStore } from '../chat-bot/metadata/ChatBotMetadataStore.js';
@@ -950,11 +950,19 @@ interface IChatRepository {
950
950
  findOperator(chatId: string): Promise<ChatOperator | null>;
951
951
  }
952
952
 
953
+ declare class ChatRepository implements IChatRepository {
954
+ create(chat: Chat): Promise<void>;
955
+ update(chat: Chat): Promise<void>;
956
+ findByConnection(query: IChatConnection): Promise<Chat | null>;
957
+ findMemory(chatId: string): Promise<IChatMemory | null>;
958
+ findOperator(chatId: string): Promise<ChatOperator | null>;
959
+ }
960
+
953
961
  declare class ChatOperator {
954
962
  private chat;
955
963
  private memory;
956
964
  private repository;
957
- constructor(chat: Chat, memory: IChatMemory, repository: IChatRepository);
965
+ constructor(chat: Chat, memory: ChatMemory, repository: ChatRepository);
958
966
  saveHumanMessage(message: IChatMessage): Promise<ChatItem>;
959
967
  saveBotMessage(message: IChatMessage): Promise<ChatItem>;
960
968
  getConnections(): IChatConnection[];
@@ -967,14 +975,6 @@ declare class ChatOperator {
967
975
  removeAssociation(association: IChatAssociation): Promise<void>;
968
976
  }
969
977
 
970
- declare class ChatRepository implements IChatRepository {
971
- create(chat: Chat): Promise<void>;
972
- update(chat: Chat): Promise<void>;
973
- findByConnection(query: IChatConnection): Promise<Chat | null>;
974
- findMemory(chatId: string): Promise<IChatMemory | null>;
975
- findOperator(chatId: string): Promise<ChatOperator | null>;
976
- }
977
-
978
978
  declare function chatBot(mindset: IConstructor<IMindset>): (target: object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
979
979
 
980
980
  interface IChatBotMetadata {
@@ -1701,15 +1701,28 @@ interface ISocketChannelMessage extends ISocketReceivedMessage {
1701
1701
  injectInstances?: [any, any][];
1702
1702
  }
1703
1703
 
1704
+ declare class SocketChannelMessageFile {
1705
+ id: string;
1706
+ mimeType: string;
1707
+ name?: string;
1708
+ publicUrl?: string;
1709
+ base64Url?: string;
1710
+ }
1704
1711
  interface ISocketChannelReceivedMessage {
1705
1712
  chatId: string;
1706
1713
  senderName?: string;
1707
1714
  text?: string;
1715
+ metadata?: Record<string, string>;
1716
+ images?: SocketChannelMessageFile[];
1717
+ documents?: SocketChannelMessageFile[];
1708
1718
  }
1709
1719
  declare class SocketChannelReceivedMessage implements ISocketChannelReceivedMessage {
1710
1720
  chatId: string;
1711
1721
  senderName?: string;
1712
1722
  text?: string;
1723
+ metadata?: Record<string, string>;
1724
+ images?: SocketChannelMessageFile[];
1725
+ documents?: SocketChannelMessageFile[];
1713
1726
  }
1714
1727
  declare class SocketChannel implements IChatChannel {
1715
1728
  private config;
@@ -2217,4 +2230,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
2217
2230
  new (): {};
2218
2231
  };
2219
2232
 
2220
- export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatOperator, ChatRepository, ChatResolver, type ClientMap, CmdChannel, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, type ErrorSeverity, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatAssociation, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatMessageDocument, type IChatMessageFile, type IChatMessageImage, type IChatMessagesPrivateFile, type IChatMessagesPublicFile, type IChatRepository, type IChatType, type ICmdChannelMessage, type ICmdReceivedMessage, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICronJobData, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IErrorHandlersConfig, type IErrorMonitor, type IErrorMonitorContext, type IExtractChatMessageTextOptions, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type ILockerKey, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type IScheduleAt, type IScheduleDelay, type ISendByWasenderRequest, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelMessage, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type ISocketReceivedMessage, type IStorableData, type ITelegramChannelConfig, type ITelegramChannelMessage, type ITelegramReceivedMessage, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWasenderChannelMessageListener, type IWasenderDeviceListMetadata, type IWasenderEvent, type IWasenderMessageContent, type IWasenderMessageContextInfo, type IWasenderMessageKey, type IWasenderMessageReceivedData, type IWasenderMessageReceivedEvent, type IWasenderQrUpdatedEvent, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppByWasenderChannelConfig, type IWhatsAppByWasenderReceivedMessage, type IWhatsAppChannelMessage, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppReceivedMessage, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenRouterChatAdapter, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCronJobRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WasenderWebhookController, WhatsApp, WhatsAppByWasenderChannel, WhatsAppByWasenderChannelConfig, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppReceiverByWasender, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppSenderByWasender, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, cmdChannelName, command, commandHandler, container, cron, description, errorToPlainObject, extractChatMessageText, extractNumberFromWasenderMessageKey, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isChatMessageEmpty, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, safeJsonParse, scoped, setupErrorHandlers, singleton, socket, socketChannelName, socketController, stopCommandHandlers, stopCronHandlers, telegram, telegramChannelName, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, whatsAppByWasender, whatsAppByWasenderChannelName, whatsAppChannelName, withPgClient, withPgTransaction, writeJsonToFile };
2233
+ export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatOperator, ChatRepository, ChatResolver, type ClientMap, CmdChannel, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, type ErrorSeverity, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatAssociation, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatMessageDocument, type IChatMessageFile, type IChatMessageImage, type IChatMessagesPrivateFile, type IChatMessagesPublicFile, type IChatRepository, type IChatType, type ICmdChannelMessage, type ICmdReceivedMessage, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICronJobData, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IErrorHandlersConfig, type IErrorMonitor, type IErrorMonitorContext, type IExtractChatMessageTextOptions, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type ILockerKey, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type IScheduleAt, type IScheduleDelay, type ISendByWasenderRequest, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelMessage, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type ISocketReceivedMessage, type IStorableData, type ITelegramChannelConfig, type ITelegramChannelMessage, type ITelegramReceivedMessage, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWasenderChannelMessageListener, type IWasenderDeviceListMetadata, type IWasenderEvent, type IWasenderMessageContent, type IWasenderMessageContextInfo, type IWasenderMessageKey, type IWasenderMessageReceivedData, type IWasenderMessageReceivedEvent, type IWasenderQrUpdatedEvent, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppByWasenderChannelConfig, type IWhatsAppByWasenderReceivedMessage, type IWhatsAppChannelMessage, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppReceivedMessage, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenRouterChatAdapter, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCronJobRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelMessageFile, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WasenderWebhookController, WhatsApp, WhatsAppByWasenderChannel, WhatsAppByWasenderChannelConfig, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppReceiverByWasender, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppSenderByWasender, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, cmdChannelName, command, commandHandler, container, cron, description, errorToPlainObject, extractChatMessageText, extractNumberFromWasenderMessageKey, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isChatMessageEmpty, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, safeJsonParse, scoped, setupErrorHandlers, singleton, socket, socketChannelName, socketController, stopCommandHandlers, stopCronHandlers, telegram, telegramChannelName, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, whatsAppByWasender, whatsAppByWasenderChannelName, whatsAppChannelName, withPgClient, withPgTransaction, writeJsonToFile };
package/dist/src/index.js CHANGED
@@ -138,7 +138,7 @@ export { cmd } from './addon/chat-controller/cmd/@cmd.js';
138
138
  export { CmdChannel, readJsonFromFile, writeJsonToFile } from './addon/chat-controller/cmd/CmdChannel.js';
139
139
  export { cmdChannelName } from './addon/chat-controller/cmd/cmdChannelName.js';
140
140
  export { socket } from './addon/chat-controller/socket/@socket.js';
141
- export { SocketChannel, SocketChannelReceivedMessage } from './addon/chat-controller/socket/SocketChannel.js';
141
+ export { SocketChannel, SocketChannelMessageFile, SocketChannelReceivedMessage } from './addon/chat-controller/socket/SocketChannel.js';
142
142
  export { SocketChannelConfig } from './addon/chat-controller/socket/SocketChannelConfig.js';
143
143
  export { socketChannelName } from './addon/chat-controller/socket/socketChannelName.js';
144
144
  export { telegram } from './addon/chat-controller/telegram/@telegram.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wabot-dev/framework",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Framework for IA Chat Bots",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",