@wabot-dev/framework 0.5.5 → 0.5.7
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.
- package/dist/src/addon/auth/api-key/@apiKeyGuard.js +1 -1
- package/dist/src/addon/auth/jwt/@jwtGuard.js +1 -1
- package/dist/src/addon/chat-bot/anthropic/AnthropicChatAdapter.js +2 -1
- package/dist/src/addon/chat-bot/deepseek/DeepSeekChatAdapter.js +7 -1
- package/dist/src/addon/chat-bot/google/GoogleChatAdapter.js +2 -1
- package/dist/src/addon/chat-bot/openia/OpenaiChatAdapter.js +7 -2
- package/dist/src/feature/chat-bot/extractChatMessageText.js +13 -0
- package/dist/src/feature/rest-controller/RestRequest.js +0 -10
- package/dist/src/feature/rest-controller/runRestControllers.js +16 -10
- package/dist/src/index.d.ts +5 -2
- package/dist/src/index.js +1 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import '../../../core/validation/metadata/ValidationMetadataStore.js';
|
|
|
7
7
|
import '../../../feature/express/ExpressProvider.js';
|
|
8
8
|
import 'express';
|
|
9
9
|
import 'path';
|
|
10
|
-
import '
|
|
10
|
+
import 'http';
|
|
11
11
|
import { ApiKeyGuardMiddleware } from './ApiKeyGuardMiddleware.js';
|
|
12
12
|
|
|
13
13
|
function apiKeyGuard() {
|
|
@@ -7,7 +7,7 @@ import '../../../core/validation/metadata/ValidationMetadataStore.js';
|
|
|
7
7
|
import '../../../feature/express/ExpressProvider.js';
|
|
8
8
|
import 'express';
|
|
9
9
|
import 'path';
|
|
10
|
-
import '
|
|
10
|
+
import 'http';
|
|
11
11
|
import { JwtGuardMiddleware } from './JwtGuardMiddleware.js';
|
|
12
12
|
|
|
13
13
|
function jwtGuard() {
|
|
@@ -6,6 +6,7 @@ import '../../../feature/chat-bot/ChatBot.js';
|
|
|
6
6
|
import 'uuid';
|
|
7
7
|
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
8
8
|
import { safeJsonParse } from '../../../feature/chat-bot/safeJsonParse.js';
|
|
9
|
+
import { extractChatMessageText } from '../../../feature/chat-bot/extractChatMessageText.js';
|
|
9
10
|
import { Anthropic } from '@anthropic-ai/sdk';
|
|
10
11
|
|
|
11
12
|
let AnthropicChatAdapter = class AnthropicChatAdapter {
|
|
@@ -58,7 +59,7 @@ let AnthropicChatAdapter = class AnthropicChatAdapter {
|
|
|
58
59
|
if (!item.text) {
|
|
59
60
|
throw new Error('Assistant message content is empty');
|
|
60
61
|
}
|
|
61
|
-
return { role: 'assistant', content: item
|
|
62
|
+
return { role: 'assistant', content: extractChatMessageText(item) };
|
|
62
63
|
}
|
|
63
64
|
mapFunctionCall(item) {
|
|
64
65
|
return [
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Logger } from '../../../core/logger/Logger.js';
|
|
2
|
+
import '../../../feature/chat-bot/ChatBot.js';
|
|
3
|
+
import '../../../core/injection/index.js';
|
|
4
|
+
import 'uuid';
|
|
5
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
6
|
+
import '../../../core/error/setupErrorHandlers.js';
|
|
7
|
+
import { extractChatMessageText } from '../../../feature/chat-bot/extractChatMessageText.js';
|
|
2
8
|
import { OpenAI } from 'openai';
|
|
3
9
|
|
|
4
10
|
class DeepSeekChatAdapter {
|
|
@@ -52,7 +58,7 @@ class DeepSeekChatAdapter {
|
|
|
52
58
|
if (!item.text) {
|
|
53
59
|
throw new Error('User message content is empty');
|
|
54
60
|
}
|
|
55
|
-
return { role: 'user', content: item
|
|
61
|
+
return { role: 'user', content: extractChatMessageText(item) };
|
|
56
62
|
}
|
|
57
63
|
mapBotMessage(item) {
|
|
58
64
|
if (!item.text) {
|
|
@@ -7,6 +7,7 @@ import '../../../feature/chat-bot/ChatBot.js';
|
|
|
7
7
|
import 'uuid';
|
|
8
8
|
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
9
9
|
import { safeJsonParse } from '../../../feature/chat-bot/safeJsonParse.js';
|
|
10
|
+
import { extractChatMessageText } from '../../../feature/chat-bot/extractChatMessageText.js';
|
|
10
11
|
import { GoogleGenAI } from '@google/genai';
|
|
11
12
|
|
|
12
13
|
let GoogleChatAdapter = class GoogleChatAdapter {
|
|
@@ -54,7 +55,7 @@ let GoogleChatAdapter = class GoogleChatAdapter {
|
|
|
54
55
|
if (!item.text) {
|
|
55
56
|
throw new Error('Bot message content is empty');
|
|
56
57
|
}
|
|
57
|
-
return { role: 'model', parts: [{ text: item
|
|
58
|
+
return { role: 'model', parts: [{ text: extractChatMessageText(item) }] };
|
|
58
59
|
}
|
|
59
60
|
mapFunctionCall(item) {
|
|
60
61
|
return [
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
+
import '../../../feature/chat-bot/ChatBot.js';
|
|
3
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
4
|
+
import 'uuid';
|
|
5
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
6
|
+
import '../../../core/error/setupErrorHandlers.js';
|
|
7
|
+
import { extractChatMessageText } from '../../../feature/chat-bot/extractChatMessageText.js';
|
|
2
8
|
import { Logger } from '../../../core/logger/Logger.js';
|
|
3
9
|
import { OpenAI } from 'openai';
|
|
4
|
-
import { singleton } from '../../../core/injection/index.js';
|
|
5
10
|
|
|
6
11
|
let OpenaiChatAdapter = class OpenaiChatAdapter {
|
|
7
12
|
openai = new OpenAI();
|
|
@@ -38,7 +43,7 @@ let OpenaiChatAdapter = class OpenaiChatAdapter {
|
|
|
38
43
|
mapConectionMessage(item) {
|
|
39
44
|
const content = [];
|
|
40
45
|
if (item.text)
|
|
41
|
-
content.push({ type: 'input_text', text: item
|
|
46
|
+
content.push({ type: 'input_text', text: extractChatMessageText(item) });
|
|
42
47
|
if (item.images) {
|
|
43
48
|
for (const image of item.images) {
|
|
44
49
|
content.push({
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function extractChatMessageText(message) {
|
|
2
|
+
const messageData = {
|
|
3
|
+
senderId: message.senderId,
|
|
4
|
+
senderName: message.senderName,
|
|
5
|
+
text: message.text,
|
|
6
|
+
object: message.object,
|
|
7
|
+
metadata: message.metadata,
|
|
8
|
+
images: message.images?.map((x) => ({ id: x.id, name: x.name })),
|
|
9
|
+
};
|
|
10
|
+
return JSON.stringify(messageData);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { extractChatMessageText };
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import '../../core/injection/index.js';
|
|
3
|
-
import '../../core/validation/metadata/ValidationMetadataStore.js';
|
|
4
|
-
import { isRecord } from '../../core/validation/validators/is-record/@isRecord.js';
|
|
5
|
-
|
|
6
1
|
class RestRequest {
|
|
7
|
-
headers;
|
|
8
2
|
}
|
|
9
|
-
__decorate([
|
|
10
|
-
isRecord('string', 'string'),
|
|
11
|
-
__metadata("design:type", Object)
|
|
12
|
-
], RestRequest.prototype, "headers", void 0);
|
|
13
3
|
|
|
14
4
|
export { RestRequest };
|
|
@@ -10,6 +10,7 @@ import path__default from 'path';
|
|
|
10
10
|
import { EXPRESS_REQ, EXPRESS_RES } from './injection-tokens.js';
|
|
11
11
|
import { RestControllerMetadataStore } from './metadata/RestControllerMetadataStore.js';
|
|
12
12
|
import { RestRequest } from './RestRequest.js';
|
|
13
|
+
import { IncomingMessage } from 'http';
|
|
13
14
|
|
|
14
15
|
function buildRequest(req) {
|
|
15
16
|
return Object.assign({}, req.body, req.query, req.params);
|
|
@@ -51,18 +52,23 @@ function runRestControllers(controllers) {
|
|
|
51
52
|
}
|
|
52
53
|
if (endPoint.paramsTypes.length === 1) {
|
|
53
54
|
const paramType = endPoint.paramsTypes[0];
|
|
54
|
-
if (
|
|
55
|
-
|
|
55
|
+
if (paramType === IncomingMessage) {
|
|
56
|
+
endPointArgs.push(req);
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
else {
|
|
59
|
+
if (typeof paramType !== 'function') {
|
|
60
|
+
throw new Error(`invalid rest controller endpoint parameter type`);
|
|
61
|
+
}
|
|
62
|
+
const paramInfo = validationMetadataStore.getModelValidatorsInfo(paramType);
|
|
63
|
+
const validableReq = paramInfo.modelHierarchy.includes(RestRequest)
|
|
64
|
+
? req
|
|
65
|
+
: buildRequest(req);
|
|
66
|
+
const { value, error } = validateModel(validableReq, paramInfo);
|
|
67
|
+
if (error) {
|
|
68
|
+
throw new CustomError({ httpCode: 400, message: error.description, info: error });
|
|
69
|
+
}
|
|
70
|
+
endPointArgs.push(value);
|
|
64
71
|
}
|
|
65
|
-
endPointArgs.push(value);
|
|
66
72
|
}
|
|
67
73
|
const response = await controllerInstance[endPoint.functionName].apply(controllerInstance, endPointArgs);
|
|
68
74
|
res.status(200).json(response ?? null);
|
package/dist/src/index.d.ts
CHANGED
|
@@ -824,12 +824,14 @@ interface IChatMessagesPublicImage {
|
|
|
824
824
|
publicUrl: string;
|
|
825
825
|
base64Url?: undefined;
|
|
826
826
|
mimeType: string;
|
|
827
|
+
id: string;
|
|
827
828
|
}
|
|
828
829
|
interface IChatMessagesPrivateImage {
|
|
829
830
|
name?: string;
|
|
830
831
|
publicUrl?: undefined;
|
|
831
832
|
base64Url: string;
|
|
832
833
|
mimeType: string;
|
|
834
|
+
id: string;
|
|
833
835
|
}
|
|
834
836
|
type IChatMessageImage = IChatMessagesPrivateImage | IChatMessagesPublicImage;
|
|
835
837
|
|
|
@@ -958,6 +960,8 @@ declare class ChatBotMetadataStore {
|
|
|
958
960
|
|
|
959
961
|
declare function safeJsonParse<T = unknown>(json: string | undefined | null, context?: string): T;
|
|
960
962
|
|
|
963
|
+
declare function extractChatMessageText(message: IChatMessage): string;
|
|
964
|
+
|
|
961
965
|
interface IchatControllerConfig {
|
|
962
966
|
}
|
|
963
967
|
|
|
@@ -1221,7 +1225,6 @@ declare const EXPRESS_REQ = "EXPRESS_REQ";
|
|
|
1221
1225
|
declare const EXPRESS_RES = "EXPRESS_RES";
|
|
1222
1226
|
|
|
1223
1227
|
declare class RestRequest {
|
|
1224
|
-
headers?: Record<string, string>;
|
|
1225
1228
|
}
|
|
1226
1229
|
|
|
1227
1230
|
declare class SocketServerConfig {
|
|
@@ -1963,4 +1966,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
1963
1966
|
new (): {};
|
|
1964
1967
|
};
|
|
1965
1968
|
|
|
1966
|
-
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, 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 IChatRepository, type IChatType, 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 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 ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, 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 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, 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, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, cron, description, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, 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, socketController, stopCommandHandlers, stopCronHandlers, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, withPgClient, withPgTransaction, writeJsonToFile };
|
|
1969
|
+
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, 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 IChatRepository, type IChatType, 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 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 ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, 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 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, 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, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, cron, description, extractChatMessageText, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, 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, socketController, stopCommandHandlers, stopCronHandlers, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, withPgClient, withPgTransaction, writeJsonToFile };
|
package/dist/src/index.js
CHANGED
|
@@ -62,6 +62,7 @@ export { chatItemTypeOptions } from './feature/chat-bot/IChatItem.js';
|
|
|
62
62
|
export { chatBot } from './feature/chat-bot/metadata/@chatBot.js';
|
|
63
63
|
export { ChatBotMetadataStore } from './feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
64
64
|
export { safeJsonParse } from './feature/chat-bot/safeJsonParse.js';
|
|
65
|
+
export { extractChatMessageText } from './feature/chat-bot/extractChatMessageText.js';
|
|
65
66
|
export { chatController } from './feature/chat-controller/metadata/controller/@chatController.js';
|
|
66
67
|
export { ControllerMetadataStore } from './feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
67
68
|
export { ChatResolver } from './feature/chat-controller/ChatResolver.js';
|