@wabot-dev/framework 0.2.0-beta.15 → 0.2.0-beta.16
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.
|
@@ -96,24 +96,6 @@ let AnthropicChatAdapter = class AnthropicChatAdapter {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
mapResponse(response) {
|
|
99
|
-
let chatItem;
|
|
100
|
-
const content = response.content[0];
|
|
101
|
-
if (content.type === 'text') {
|
|
102
|
-
chatItem = { type: 'botMessage', botMessage: { text: content.text } };
|
|
103
|
-
}
|
|
104
|
-
else if (content.type === 'tool_use') {
|
|
105
|
-
chatItem = {
|
|
106
|
-
type: 'functionCall',
|
|
107
|
-
functionCall: {
|
|
108
|
-
id: content.id,
|
|
109
|
-
name: content.name,
|
|
110
|
-
arguments: JSON.stringify(content.input),
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
throw new Error('Not supported Claude Response');
|
|
116
|
-
}
|
|
117
99
|
let usage;
|
|
118
100
|
if (response.usage) {
|
|
119
101
|
usage = {
|
|
@@ -124,7 +106,23 @@ let AnthropicChatAdapter = class AnthropicChatAdapter {
|
|
|
124
106
|
else {
|
|
125
107
|
throw new Error('Unable to found usage info');
|
|
126
108
|
}
|
|
127
|
-
|
|
109
|
+
const nextItems = [];
|
|
110
|
+
for (const content of response.content) {
|
|
111
|
+
if (content.type === 'text' && content.text) {
|
|
112
|
+
nextItems.push({ type: 'botMessage', botMessage: { text: content.text } });
|
|
113
|
+
}
|
|
114
|
+
else if (content.type === 'tool_use') {
|
|
115
|
+
nextItems.push({
|
|
116
|
+
type: 'functionCall',
|
|
117
|
+
functionCall: {
|
|
118
|
+
id: content.id,
|
|
119
|
+
name: content.name,
|
|
120
|
+
arguments: JSON.stringify(content.input),
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { usage, nextItems };
|
|
128
126
|
}
|
|
129
127
|
};
|
|
130
128
|
AnthropicChatAdapter = __decorate([
|
|
@@ -2,122 +2,133 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
2
2
|
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
|
-
import
|
|
5
|
+
import { Random } from '../../../core/random/Random.js';
|
|
6
|
+
import { GoogleGenAI } from '@google/genai';
|
|
6
7
|
|
|
7
8
|
let GoogleChatAdapter = class GoogleChatAdapter {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
logger = new Logger('wabot:google-chat-adapter');
|
|
9
|
+
ai;
|
|
10
|
+
logger = new Logger('wabot:google-chat-adapter-v2');
|
|
11
11
|
constructor(env) {
|
|
12
|
-
this.
|
|
13
|
-
const apiKey = this.env.requireString('GOOGLE_API_KEY');
|
|
14
|
-
this.openai = new OpenAI({
|
|
15
|
-
apiKey,
|
|
16
|
-
baseURL: 'https://generativelanguage.googleapis.com/v1beta/openai/',
|
|
17
|
-
});
|
|
12
|
+
this.ai = new GoogleGenAI({ apiKey: env.requireString('GOOGLE_API_KEY') });
|
|
18
13
|
}
|
|
19
14
|
async nextItems(req) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
15
|
+
const contents = [];
|
|
16
|
+
contents.push({ role: 'user', parts: [{ text: req.systemPrompt }] });
|
|
17
|
+
contents.push(...this.mapChatItems(req.prevItems));
|
|
18
|
+
const functionDeclarations = req.tools.map((x) => this.mapTool(x));
|
|
19
|
+
const response = await this.ai.models.generateContent({
|
|
25
20
|
model: req.model,
|
|
26
|
-
|
|
27
|
-
tools,
|
|
28
|
-
};
|
|
29
|
-
const response = await this.openai.chat.completions.create(request);
|
|
21
|
+
contents,
|
|
22
|
+
config: { tools: [{ functionDeclarations }] },
|
|
23
|
+
});
|
|
30
24
|
return this.mapResponse(response);
|
|
31
25
|
}
|
|
32
26
|
mapChatItems(chatItems) {
|
|
33
|
-
const
|
|
27
|
+
const contents = [];
|
|
34
28
|
for (const chatItem of chatItems) {
|
|
35
29
|
switch (chatItem.type) {
|
|
36
30
|
case 'humanMessage':
|
|
37
|
-
|
|
31
|
+
contents.push(this.mapHumanMessage(chatItem.humanMessage));
|
|
38
32
|
break;
|
|
39
33
|
case 'botMessage':
|
|
40
|
-
|
|
34
|
+
contents.push(this.mapBotMessage(chatItem.botMessage));
|
|
41
35
|
break;
|
|
42
36
|
case 'functionCall':
|
|
43
|
-
|
|
37
|
+
contents.push(...this.mapFunctionCall(chatItem.functionCall));
|
|
44
38
|
break;
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
|
-
return
|
|
41
|
+
return contents;
|
|
48
42
|
}
|
|
49
43
|
mapHumanMessage(item) {
|
|
50
44
|
if (!item.text) {
|
|
51
45
|
throw new Error('User message content is empty');
|
|
52
46
|
}
|
|
53
|
-
return { role: 'user',
|
|
47
|
+
return { role: 'user', parts: [{ text: item.text }] };
|
|
54
48
|
}
|
|
55
49
|
mapBotMessage(item) {
|
|
56
50
|
if (!item.text) {
|
|
57
51
|
throw new Error('Bot message content is empty');
|
|
58
52
|
}
|
|
59
|
-
return { role: '
|
|
53
|
+
return { role: 'model', parts: [{ text: item.text }] };
|
|
60
54
|
}
|
|
61
55
|
mapFunctionCall(item) {
|
|
62
56
|
return [
|
|
57
|
+
{
|
|
58
|
+
role: 'model',
|
|
59
|
+
parts: [
|
|
60
|
+
{
|
|
61
|
+
functionCall: {
|
|
62
|
+
id: item.id,
|
|
63
|
+
name: item.name,
|
|
64
|
+
args: JSON.parse(item.arguments ?? '{}'),
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
63
69
|
{
|
|
64
70
|
role: 'function',
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
parts: [
|
|
72
|
+
{
|
|
73
|
+
functionResponse: {
|
|
74
|
+
id: item.id,
|
|
75
|
+
name: item.name,
|
|
76
|
+
response: { output: item.result ?? '' },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
],
|
|
67
80
|
},
|
|
68
81
|
];
|
|
69
82
|
}
|
|
70
83
|
mapTool(tool) {
|
|
71
84
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
description: param.description,
|
|
83
|
-
},
|
|
84
|
-
}), {}),
|
|
85
|
-
required: tool.parameters.map((param) => param.name),
|
|
86
|
-
additionalProperties: false,
|
|
87
|
-
}
|
|
85
|
+
name: tool.name,
|
|
86
|
+
description: tool.description,
|
|
87
|
+
parametersJsonSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: tool.parameters.reduce((prev, param) => ({
|
|
90
|
+
...prev,
|
|
91
|
+
[param.name]: { type: param.type, description: param.description },
|
|
92
|
+
}), {}),
|
|
93
|
+
required: tool.parameters.map((param) => param.name),
|
|
94
|
+
additionalProperties: false,
|
|
88
95
|
},
|
|
89
96
|
};
|
|
90
97
|
}
|
|
91
98
|
mapResponse(response) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (responseText) {
|
|
95
|
-
chatItem = { type: 'botMessage', botMessage: { text: responseText } };
|
|
99
|
+
if (!response.candidates || !response.candidates.length) {
|
|
100
|
+
throw new Error('No candidates in response');
|
|
96
101
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
id: responseFunctionCall[0].id,
|
|
102
|
-
name: responseFunctionCall[0].function.name,
|
|
103
|
-
arguments: responseFunctionCall[0].function.arguments,
|
|
104
|
-
},
|
|
105
|
-
};
|
|
102
|
+
if (!response.usageMetadata ||
|
|
103
|
+
!response.usageMetadata.promptTokenCount ||
|
|
104
|
+
!response.usageMetadata.candidatesTokenCount) {
|
|
105
|
+
throw new Error('Not usage metadata');
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
const content = response.candidates.find((x) => x.content)?.content;
|
|
108
|
+
if (!content) {
|
|
109
|
+
throw new Error('Candidates has no content');
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
const nextItems = [];
|
|
112
|
+
for (const part of content.parts ?? []) {
|
|
113
|
+
if (part.text) {
|
|
114
|
+
nextItems.push({ type: 'botMessage', botMessage: { text: part.text } });
|
|
115
|
+
}
|
|
116
|
+
if (part.functionCall) {
|
|
117
|
+
const { id, name, args } = part.functionCall;
|
|
118
|
+
if (!name) {
|
|
119
|
+
throw new Error('invalid function call');
|
|
120
|
+
}
|
|
121
|
+
nextItems.push({
|
|
122
|
+
type: 'functionCall',
|
|
123
|
+
functionCall: { id: id ?? Random.alphaNumericLowerCase(10), name, arguments: args && JSON.stringify(args) },
|
|
124
|
+
});
|
|
125
|
+
}
|
|
119
126
|
}
|
|
120
|
-
|
|
127
|
+
let usage = {
|
|
128
|
+
inputTokens: response.usageMetadata.promptTokenCount,
|
|
129
|
+
outputTokens: response.usageMetadata.candidatesTokenCount,
|
|
130
|
+
};
|
|
131
|
+
return { usage, nextItems };
|
|
121
132
|
}
|
|
122
133
|
};
|
|
123
134
|
GoogleChatAdapter = __decorate([
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1197,10 +1197,12 @@ declare class DeepSeekChatAdapter implements IChatAdapter {
|
|
|
1197
1197
|
private mapResponse;
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
+
interface GoogleChatAdapterV2Options {
|
|
1201
|
+
apiKey?: string;
|
|
1202
|
+
}
|
|
1200
1203
|
declare class GoogleChatAdapter implements IChatAdapter {
|
|
1201
|
-
private
|
|
1202
|
-
private
|
|
1203
|
-
private logger;
|
|
1204
|
+
private ai;
|
|
1205
|
+
private readonly logger;
|
|
1204
1206
|
constructor(env: Env);
|
|
1205
1207
|
nextItems(req: IChatAdapterNextItemsReq): Promise<IChatAdapterNextItemsRes>;
|
|
1206
1208
|
private mapChatItems;
|
|
@@ -1623,4 +1625,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
1623
1625
|
new (): {};
|
|
1624
1626
|
};
|
|
1625
1627
|
|
|
1626
|
-
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GoogleChatAdapter, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, 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 ICrudRepository, type ICustomErrorData, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, 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 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, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, 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, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, param, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsApp, writeJsonToFile };
|
|
1628
|
+
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, 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 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 ICrudRepository, type ICustomErrorData, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, 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 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, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, 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, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, param, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsApp, writeJsonToFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wabot-dev/framework",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.16",
|
|
4
4
|
"description": "Framework for IA Chat Bots",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rollup --config rollup.config.ts --configPlugin typescript && tsup --dts-only --format esm --out-dir dist/src src/index.ts",
|
|
14
14
|
"test:units": "node --import @yucacodes/ts/src/custom-import.mjs --test './src/**/*.unit.test.ts'",
|
|
15
|
-
"test:integration": "node --import @yucacodes/ts/src/custom-import.mjs --test './src/**/*.integration.test.ts'",
|
|
15
|
+
"test:integration": "node --import ./env.mjs --import @yucacodes/ts/src/custom-import.mjs --test './src/**/*.integration.test.ts'",
|
|
16
16
|
"fmt": "prettier --write .",
|
|
17
17
|
"fmt:check": "prettier --check .",
|
|
18
18
|
"types:check": "tsc --noEmit",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@types/big.js": "^6.2.2",
|
|
38
38
|
"@types/debug": "^4.1.12",
|
|
39
39
|
"@types/express": "^5.0.1",
|
|
40
|
-
"@types/jsonwebtoken": "^9.0.10",
|
|
41
|
-
"@types/pg": "^8.11.14",
|
|
42
40
|
"@types/html-to-text": "^9.0.4",
|
|
41
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
43
42
|
"@types/node": "22.14.1",
|
|
43
|
+
"@types/pg": "^8.11.14",
|
|
44
44
|
"@yucacodes/ts": "^0.0.4",
|
|
45
45
|
"big.js": "^7.0.1",
|
|
46
46
|
"body-parser": "^2.2.0",
|