@wabot-dev/framework 0.5.6 → 0.5.8
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/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/addon/chat-controller/wasender/@whatsAppByWasender.js +20 -0
- package/dist/src/addon/chat-controller/wasender/WasenderWebhookController.js +90 -0
- package/dist/src/addon/chat-controller/wasender/WhatsAppByWasenderChannel.js +58 -0
- package/dist/src/addon/chat-controller/wasender/WhatsAppByWasenderChannelConfig.js +16 -0
- package/dist/src/addon/chat-controller/wasender/WhatsAppReceiverByWasender.js +39 -0
- package/dist/src/addon/chat-controller/wasender/WhatsAppSenderByWasender.js +33 -0
- package/dist/src/addon/chat-controller/wasender/extractNumberFromWasenderKey.js +5 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/@whatsAppByWasender.js +20 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/WhatsAppByWasenderChannel.js +52 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/WhatsAppByWasenderChannelConfig.js +16 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/WhatsAppReceiverByWasender.js +106 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/WhatsAppSenderByWasender.js +40 -0
- package/dist/src/addon/chat-controller/whatsapp-by-wasender/extractNumberFromWasenderKey.js +5 -0
- package/dist/src/feature/chat-bot/extractChatMessageText.js +13 -0
- package/dist/src/feature/rest-controller/metadata/RestControllerMetadataStore.js +35 -8
- package/dist/src/index.d.ts +136 -3
- package/dist/src/index.js +8 -0
- package/dist/src/node_modules/wasenderapi/dist/index.js +553 -0
- package/package.json +3 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { DependencyContainer } from 'tsyringe';
|
|
|
4
4
|
import InjectionToken from 'tsyringe/dist/typings/providers/injection-token';
|
|
5
5
|
import DependencyContainer, { PreResolutionInterceptorCallback, PostResolutionInterceptorCallback } from 'tsyringe/dist/typings/types/dependency-container';
|
|
6
6
|
import InterceptionOptions from 'tsyringe/dist/typings/types/interceptor-options';
|
|
7
|
-
import { Server } from 'http';
|
|
7
|
+
import { Server, IncomingMessage } from 'http';
|
|
8
8
|
import { Express, Request, Response } from 'express';
|
|
9
9
|
import * as big_js from 'big.js';
|
|
10
10
|
import { Pool, PoolClient } from 'pg';
|
|
@@ -12,6 +12,7 @@ import { AsyncLocalStorage } from 'async_hooks';
|
|
|
12
12
|
import { Server as Server$1, Socket } from 'socket.io';
|
|
13
13
|
import { Algorithm } from 'jsonwebtoken';
|
|
14
14
|
import { Socket as Socket$1 } from 'socket.io-client';
|
|
15
|
+
import { Wasender } from 'wasenderapi';
|
|
15
16
|
|
|
16
17
|
type IStorablePrimitive = null | number | string | boolean | undefined;
|
|
17
18
|
|
|
@@ -824,12 +825,14 @@ interface IChatMessagesPublicImage {
|
|
|
824
825
|
publicUrl: string;
|
|
825
826
|
base64Url?: undefined;
|
|
826
827
|
mimeType: string;
|
|
828
|
+
id: string;
|
|
827
829
|
}
|
|
828
830
|
interface IChatMessagesPrivateImage {
|
|
829
831
|
name?: string;
|
|
830
832
|
publicUrl?: undefined;
|
|
831
833
|
base64Url: string;
|
|
832
834
|
mimeType: string;
|
|
835
|
+
id: string;
|
|
833
836
|
}
|
|
834
837
|
type IChatMessageImage = IChatMessagesPrivateImage | IChatMessagesPublicImage;
|
|
835
838
|
|
|
@@ -958,6 +961,8 @@ declare class ChatBotMetadataStore {
|
|
|
958
961
|
|
|
959
962
|
declare function safeJsonParse<T = unknown>(json: string | undefined | null, context?: string): T;
|
|
960
963
|
|
|
964
|
+
declare function extractChatMessageText(message: IChatMessage): string;
|
|
965
|
+
|
|
961
966
|
interface IchatControllerConfig {
|
|
962
967
|
}
|
|
963
968
|
|
|
@@ -1205,11 +1210,11 @@ declare class RestControllerMetadataStore {
|
|
|
1205
1210
|
saveEndPointMetadata(endPointMetadata: IEndPointMetadata): void;
|
|
1206
1211
|
saveMiddlewareMetadata(middlewareMetadata: IMiddlewareMetadata): void;
|
|
1207
1212
|
getControllerEndPointsInfo(controllerConstructor: IConstructor<any>): {
|
|
1213
|
+
controllerConstructor: IConstructor<any>;
|
|
1208
1214
|
middlewares: IMiddlewareMetadata[];
|
|
1209
1215
|
controller: IRestControllerMetadata;
|
|
1210
1216
|
method: "get" | "post" | "put" | "delete";
|
|
1211
1217
|
config?: IEndPointConfig;
|
|
1212
|
-
controllerConstructor: IConstructor<any>;
|
|
1213
1218
|
functionName: string;
|
|
1214
1219
|
paramsTypes: any[];
|
|
1215
1220
|
}[];
|
|
@@ -1954,6 +1959,134 @@ declare class WhatsAppSenderByWabotProxy extends WhatsAppSender {
|
|
|
1954
1959
|
sendWhatsApp(request: ISendWhatsAppRequest, options?: IWhatsAppSenderOptions): Promise<void>;
|
|
1955
1960
|
}
|
|
1956
1961
|
|
|
1962
|
+
interface IWhatsAppByWasenderChannelConfig {
|
|
1963
|
+
apiKey?: string;
|
|
1964
|
+
webhookSecret?: string;
|
|
1965
|
+
phoneNumber?: string;
|
|
1966
|
+
webhookPath?: string;
|
|
1967
|
+
retryOptions?: {
|
|
1968
|
+
enabled: boolean;
|
|
1969
|
+
maxRetries: number;
|
|
1970
|
+
};
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
declare function whatsAppByWasender(config?: IWhatsAppByWasenderChannelConfig): (target: object, propertyKey: string | symbol) => void;
|
|
1974
|
+
|
|
1975
|
+
type IWasenderEvent = IWasenderMessageReceivedEvent | IWasenderQrUpdatedEvent;
|
|
1976
|
+
interface IWasenderQrUpdatedEvent {
|
|
1977
|
+
event: 'qrcode.updated';
|
|
1978
|
+
}
|
|
1979
|
+
interface IWasenderMessageReceivedEvent {
|
|
1980
|
+
event: 'messages.received';
|
|
1981
|
+
sessionId: string;
|
|
1982
|
+
data: {
|
|
1983
|
+
messages: IWasenderMessageReceivedData | IWasenderMessageReceivedData[];
|
|
1984
|
+
};
|
|
1985
|
+
timestamp: number;
|
|
1986
|
+
}
|
|
1987
|
+
interface IWasenderMessageReceivedData {
|
|
1988
|
+
key: IWasenderMessageKey;
|
|
1989
|
+
messageTimestamp: number;
|
|
1990
|
+
pushName: string;
|
|
1991
|
+
broadcast: boolean;
|
|
1992
|
+
message: IWasenderMessageContent;
|
|
1993
|
+
remoteJid: string;
|
|
1994
|
+
id: string;
|
|
1995
|
+
}
|
|
1996
|
+
interface IWasenderMessageKey {
|
|
1997
|
+
remoteJid: string;
|
|
1998
|
+
fromMe: boolean;
|
|
1999
|
+
id: string;
|
|
2000
|
+
senderLid: string;
|
|
2001
|
+
senderPn?: string;
|
|
2002
|
+
cleanedSenderPn?: string;
|
|
2003
|
+
}
|
|
2004
|
+
interface IWasenderMessageContent {
|
|
2005
|
+
conversation: string;
|
|
2006
|
+
messageContextInfo: IWasenderMessageContextInfo;
|
|
2007
|
+
}
|
|
2008
|
+
interface IWasenderMessageContextInfo {
|
|
2009
|
+
deviceListMetadata: IWasenderDeviceListMetadata;
|
|
2010
|
+
deviceListMetadataVersion: number;
|
|
2011
|
+
messageSecret: string;
|
|
2012
|
+
}
|
|
2013
|
+
interface IWasenderDeviceListMetadata {
|
|
2014
|
+
senderKeyHash: string;
|
|
2015
|
+
senderTimestamp: string;
|
|
2016
|
+
recipientKeyHash: string;
|
|
2017
|
+
recipientTimestamp: string;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
declare class WhatsAppByWasenderChannelConfig implements IWhatsAppByWasenderChannelConfig {
|
|
2021
|
+
readonly apiKey?: string;
|
|
2022
|
+
readonly webhookSecret?: string;
|
|
2023
|
+
readonly phoneNumber?: string;
|
|
2024
|
+
readonly webhookPath: string;
|
|
2025
|
+
readonly retryOptions: {
|
|
2026
|
+
enabled: boolean;
|
|
2027
|
+
maxRetries: number;
|
|
2028
|
+
};
|
|
2029
|
+
constructor(config: IWhatsAppByWasenderChannelConfig);
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
declare class WhatsAppByWasenderChannel implements IChatChannel {
|
|
2033
|
+
private logger;
|
|
2034
|
+
private sender;
|
|
2035
|
+
private receiver;
|
|
2036
|
+
private phoneNumber;
|
|
2037
|
+
constructor(config: WhatsAppByWasenderChannelConfig, env: Env);
|
|
2038
|
+
listen(callback: (message: IChannelMessage) => Promise<void>): void;
|
|
2039
|
+
connect(): void;
|
|
2040
|
+
disconnect(): void;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
type IWasenderChannelMessageListener = (message: Omit<IChannelMessage, 'reply'>) => Promise<void>;
|
|
2044
|
+
declare class WasenderWebhookController {
|
|
2045
|
+
private wasender;
|
|
2046
|
+
private listener;
|
|
2047
|
+
private logger;
|
|
2048
|
+
constructor(wasender: Wasender, listener: IWasenderChannelMessageListener);
|
|
2049
|
+
handleWebhook(req: IncomingMessage): Promise<void>;
|
|
2050
|
+
private handleMessages;
|
|
2051
|
+
private parseEvent;
|
|
2052
|
+
private getRawBody;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
declare class WhatsAppReceiverByWasender {
|
|
2056
|
+
private config;
|
|
2057
|
+
private wasender;
|
|
2058
|
+
private listener;
|
|
2059
|
+
constructor(config: {
|
|
2060
|
+
apiKey: string;
|
|
2061
|
+
webhookSecret: string;
|
|
2062
|
+
webhookPath: string;
|
|
2063
|
+
retryOptions?: {
|
|
2064
|
+
enabled: boolean;
|
|
2065
|
+
maxRetries: number;
|
|
2066
|
+
};
|
|
2067
|
+
});
|
|
2068
|
+
listenMessage(listener: IWasenderChannelMessageListener): void;
|
|
2069
|
+
connect(): void;
|
|
2070
|
+
disconnect(): void;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
interface ISendByWasenderRequest {
|
|
2074
|
+
from: string;
|
|
2075
|
+
to: string;
|
|
2076
|
+
message: IChatMessage;
|
|
2077
|
+
}
|
|
2078
|
+
declare class WhatsAppSenderByWasender {
|
|
2079
|
+
private wasender;
|
|
2080
|
+
private logger;
|
|
2081
|
+
constructor(apiKey: string, retryOptions?: {
|
|
2082
|
+
enabled: boolean;
|
|
2083
|
+
maxRetries: number;
|
|
2084
|
+
});
|
|
2085
|
+
send(request: ISendByWasenderRequest): Promise<void>;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
declare function extractNumberFromWasenderMessageKey(key: IWasenderMessageKey): string;
|
|
2089
|
+
|
|
1957
2090
|
interface IHtmlModuleOptions {
|
|
1958
2091
|
url: string;
|
|
1959
2092
|
title: string;
|
|
@@ -1962,4 +2095,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
1962
2095
|
new (): {};
|
|
1963
2096
|
};
|
|
1964
2097
|
|
|
1965
|
-
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 };
|
|
2098
|
+
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 ISendByWasenderRequest, 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 IWasenderChannelMessageListener, type IWasenderDeviceListMetadata, type IWasenderEvent, type IWasenderMessageContent, type IWasenderMessageContextInfo, type IWasenderMessageKey, type IWasenderMessageReceivedData, type IWasenderMessageReceivedEvent, type IWasenderQrUpdatedEvent, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppByWasenderChannelConfig, 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, WasenderWebhookController, WhatsApp, WhatsAppByWasenderChannel, WhatsAppByWasenderChannelConfig, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppReceiverByWasender, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppSenderByWasender, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, cron, description, extractChatMessageText, extractNumberFromWasenderMessageKey, 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, whatsAppByWasender, 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';
|
|
@@ -153,5 +154,12 @@ export { WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_P
|
|
|
153
154
|
export { WhatsAppReceiverByWabotProxy } from './addon/chat-controller/whatsapp/proxy/WhatsAppReceiverByWabotProxy.js';
|
|
154
155
|
export { WhatsAppSenderByWabotProxy } from './addon/chat-controller/whatsapp/proxy/WhatsAppSenderByWabotProxy.js';
|
|
155
156
|
export { WhatsAppWabotProxyConnection } from './addon/chat-controller/whatsapp/proxy/WhatsAppWabotProxyConnection.js';
|
|
157
|
+
export { whatsAppByWasender } from './addon/chat-controller/wasender/@whatsAppByWasender.js';
|
|
158
|
+
export { WhatsAppByWasenderChannel } from './addon/chat-controller/wasender/WhatsAppByWasenderChannel.js';
|
|
159
|
+
export { WhatsAppByWasenderChannelConfig } from './addon/chat-controller/wasender/WhatsAppByWasenderChannelConfig.js';
|
|
160
|
+
export { WhatsAppReceiverByWasender } from './addon/chat-controller/wasender/WhatsAppReceiverByWasender.js';
|
|
161
|
+
export { WhatsAppSenderByWasender } from './addon/chat-controller/wasender/WhatsAppSenderByWasender.js';
|
|
162
|
+
export { WasenderWebhookController } from './addon/chat-controller/wasender/WasenderWebhookController.js';
|
|
163
|
+
export { extractNumberFromWasenderMessageKey } from './addon/chat-controller/wasender/extractNumberFromWasenderKey.js';
|
|
156
164
|
export { HtmlModule } from './addon/mindset/html/HtmlModule.js';
|
|
157
165
|
export { Container } from './core/injection/Container.js';
|