@wabot-dev/framework 0.2.0-beta.3 → 0.2.0-beta.5
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/jwt/JwtSigner.js +1 -1
- package/dist/src/core/mapper/Mapper.js +22 -6
- package/dist/src/core/validation/{validate.js → validateAndTransform.js} +2 -2
- package/dist/src/feature/rest-controller/runRestControllers.js +2 -2
- package/dist/src/feature/socket-controller/runSocketControllers.js +2 -2
- package/dist/src/index.d.ts +46 -43
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ let JwtSigner = class JwtSigner {
|
|
|
23
23
|
const token = jwt.sign(_authInfo, this.config.secretOrPrivateKey, {
|
|
24
24
|
expiresIn: this.config.accessExpirationSeconds,
|
|
25
25
|
});
|
|
26
|
-
const expiration = new Date().getTime() + this.config.accessExpirationSeconds * 1000;
|
|
26
|
+
const expiration = new Date(new Date().getTime() + this.config.accessExpirationSeconds * 1000);
|
|
27
27
|
return this.mapper.map({ token, expiration }, JwtTokenDto);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
@@ -2,9 +2,9 @@ import { Storable } from '../storable/Storable.js';
|
|
|
2
2
|
import { CustomError } from '../error/CustomError.js';
|
|
3
3
|
import '../injection/index.js';
|
|
4
4
|
import '../validation/metadata/ValidationMetadataStore.js';
|
|
5
|
-
import {
|
|
5
|
+
import { validateAndTransform } from '../validation/validateAndTransform.js';
|
|
6
6
|
|
|
7
|
-
function deepCopyWithStorable(obj) {
|
|
7
|
+
function deepCopyWithStorable(obj, visited = new WeakMap()) {
|
|
8
8
|
if (obj === null || typeof obj !== 'object') {
|
|
9
9
|
return obj;
|
|
10
10
|
}
|
|
@@ -12,22 +12,38 @@ function deepCopyWithStorable(obj) {
|
|
|
12
12
|
return obj.getTime();
|
|
13
13
|
}
|
|
14
14
|
if (obj instanceof Storable) {
|
|
15
|
-
|
|
15
|
+
const dataCopy = deepCopyWithStorable(obj['data'], visited);
|
|
16
|
+
const result = { ...dataCopy };
|
|
17
|
+
// Handle getters from prototype
|
|
18
|
+
const proto = Object.getPrototypeOf(obj);
|
|
19
|
+
const descriptors = Object.getOwnPropertyDescriptors(proto);
|
|
20
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
21
|
+
if (typeof descriptor.get === 'function') {
|
|
22
|
+
try {
|
|
23
|
+
const value = obj[key];
|
|
24
|
+
result[key] = deepCopyWithStorable(value, visited);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Silently ignore getters that throw
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
16
32
|
}
|
|
17
33
|
if (Array.isArray(obj)) {
|
|
18
|
-
return obj.map((item) => deepCopyWithStorable(item));
|
|
34
|
+
return obj.map((item) => deepCopyWithStorable(item, visited));
|
|
19
35
|
}
|
|
20
36
|
const copy = {};
|
|
21
37
|
for (const key in obj) {
|
|
22
38
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
23
|
-
copy[key] = deepCopyWithStorable(obj[key]);
|
|
39
|
+
copy[key] = deepCopyWithStorable(obj[key], visited);
|
|
24
40
|
}
|
|
25
41
|
}
|
|
26
42
|
return copy;
|
|
27
43
|
}
|
|
28
44
|
class Mapper {
|
|
29
45
|
map(data, ctor) {
|
|
30
|
-
const validationResult =
|
|
46
|
+
const validationResult = validateAndTransform(deepCopyWithStorable(data), ctor);
|
|
31
47
|
if (validationResult.error) {
|
|
32
48
|
throw new CustomError({
|
|
33
49
|
httpCode: 500,
|
|
@@ -2,10 +2,10 @@ import { container } from '../injection/index.js';
|
|
|
2
2
|
import { ValidationMetadataStore } from './metadata/ValidationMetadataStore.js';
|
|
3
3
|
import { validateModel } from './core/validateModel.js';
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function validateAndTransform(value, modelConstructor) {
|
|
6
6
|
const metadataStore = container.resolve(ValidationMetadataStore);
|
|
7
7
|
const info = metadataStore.getModelValidatorsInfo(modelConstructor);
|
|
8
8
|
return validateModel(value, info);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export {
|
|
11
|
+
export { validateAndTransform };
|
|
@@ -2,7 +2,7 @@ import { CustomError } from '../../core/error/CustomError.js';
|
|
|
2
2
|
import { container } from '../../core/injection/index.js';
|
|
3
3
|
import { Logger } from '../../core/logger/Logger.js';
|
|
4
4
|
import '../../core/validation/metadata/ValidationMetadataStore.js';
|
|
5
|
-
import {
|
|
5
|
+
import { validateAndTransform } from '../../core/validation/validateAndTransform.js';
|
|
6
6
|
import { ExpressProvider } from '../express/ExpressProvider.js';
|
|
7
7
|
import { json, urlencoded } from 'express';
|
|
8
8
|
import path__default from 'path';
|
|
@@ -51,7 +51,7 @@ function runRestControllers(controllers) {
|
|
|
51
51
|
}
|
|
52
52
|
defaultArgFound = true;
|
|
53
53
|
if (typeof paramType === 'function') {
|
|
54
|
-
const { value, error } =
|
|
54
|
+
const { value, error } = validateAndTransform(buildRequest(req), paramType);
|
|
55
55
|
if (error) {
|
|
56
56
|
throw new CustomError({ httpCode: 400, message: error.description, info: error });
|
|
57
57
|
}
|
|
@@ -5,7 +5,7 @@ import { Logger } from '../../core/logger/Logger.js';
|
|
|
5
5
|
import { SocketServerProvider } from '../socket/SocketServerProvider.js';
|
|
6
6
|
import { CustomError } from '../../core/error/CustomError.js';
|
|
7
7
|
import '../../core/validation/metadata/ValidationMetadataStore.js';
|
|
8
|
-
import {
|
|
8
|
+
import { validateAndTransform } from '../../core/validation/validateAndTransform.js';
|
|
9
9
|
|
|
10
10
|
function runSocketControllers(controllers) {
|
|
11
11
|
const logger = new Logger('wabot:socket');
|
|
@@ -52,7 +52,7 @@ function runSocketControllers(controllers) {
|
|
|
52
52
|
message: 'Unable to validate request',
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
const { value, error } =
|
|
55
|
+
const { value, error } = validateAndTransform(req, reqType);
|
|
56
56
|
if (error) {
|
|
57
57
|
throw new CustomError({
|
|
58
58
|
httpCode: 400,
|
package/dist/src/index.d.ts
CHANGED
|
@@ -129,47 +129,6 @@ declare class Logger {
|
|
|
129
129
|
private log;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
declare class Mapper {
|
|
133
|
-
map<T>(data: any, ctor: IConstructor<T>): T;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
interface PasswordHashOptions {
|
|
137
|
-
password: string;
|
|
138
|
-
saltLength?: number;
|
|
139
|
-
keyLength?: number;
|
|
140
|
-
}
|
|
141
|
-
declare class Password {
|
|
142
|
-
static hash(options: PasswordHashOptions): string;
|
|
143
|
-
static isValid(req: {
|
|
144
|
-
password: string;
|
|
145
|
-
hash: string;
|
|
146
|
-
}): boolean;
|
|
147
|
-
static generate(length: number): string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
declare class Random {
|
|
151
|
-
static integer(options: {
|
|
152
|
-
min: number;
|
|
153
|
-
max: number;
|
|
154
|
-
}): number;
|
|
155
|
-
static slug(name: string, options: {
|
|
156
|
-
randomLength: number;
|
|
157
|
-
}): string;
|
|
158
|
-
static alphaNumeric(length: number): string;
|
|
159
|
-
static alphaNumericLowerCase(length: number): string;
|
|
160
|
-
static numberCode(length: number): string;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
interface ICrudRepository<T> {
|
|
164
|
-
find(id: string): Promise<T | null>;
|
|
165
|
-
findOrThrow(id: string): Promise<T>;
|
|
166
|
-
findByIds(ids: string[]): Promise<T[]>;
|
|
167
|
-
findAll(id: string): Promise<T[]>;
|
|
168
|
-
create(item: T): Promise<void>;
|
|
169
|
-
update(item: T): Promise<void>;
|
|
170
|
-
delete(item: T): Promise<void>;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
132
|
declare function isModel(model: IConstructor<any>): (target: object, propertyKey: string | symbol) => void;
|
|
174
133
|
|
|
175
134
|
declare function isOptional(): (target: object, propertyKey: string | symbol) => void;
|
|
@@ -252,7 +211,10 @@ declare class ValidationMetadataStore {
|
|
|
252
211
|
|
|
253
212
|
declare function validateModel<V>(value: any, info: IModelValidatorsInfo<V>): IModelValidationResult<V>;
|
|
254
213
|
|
|
255
|
-
|
|
214
|
+
type IValidateInputShape<T> = T extends Date ? Date : T extends Array<infer U> ? Array<IValidateInputShape<U>> : T extends object ? {
|
|
215
|
+
[K in keyof T]: IValidateInputShape<T[K]>;
|
|
216
|
+
} : T;
|
|
217
|
+
declare function validateAndTransform<V>(value: IValidateInputShape<V>, modelConstructor: IConstructor<V>): IModelValidationResult<V>;
|
|
256
218
|
|
|
257
219
|
declare function modelInfo<V>(modelConstructor: IConstructor<V>): IModelValidatorsInfo<V>;
|
|
258
220
|
|
|
@@ -301,6 +263,47 @@ interface IValidateMinOptions {
|
|
|
301
263
|
}
|
|
302
264
|
declare function validateMin(value: any, options: IValidateMinOptions): IValidationResult<any>;
|
|
303
265
|
|
|
266
|
+
declare class Mapper {
|
|
267
|
+
map<T>(data: IValidateInputShape<T>, ctor: IConstructor<T>): T;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
interface PasswordHashOptions {
|
|
271
|
+
password: string;
|
|
272
|
+
saltLength?: number;
|
|
273
|
+
keyLength?: number;
|
|
274
|
+
}
|
|
275
|
+
declare class Password {
|
|
276
|
+
static hash(options: PasswordHashOptions): string;
|
|
277
|
+
static isValid(req: {
|
|
278
|
+
password: string;
|
|
279
|
+
hash: string;
|
|
280
|
+
}): boolean;
|
|
281
|
+
static generate(length: number): string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
declare class Random {
|
|
285
|
+
static integer(options: {
|
|
286
|
+
min: number;
|
|
287
|
+
max: number;
|
|
288
|
+
}): number;
|
|
289
|
+
static slug(name: string, options: {
|
|
290
|
+
randomLength: number;
|
|
291
|
+
}): string;
|
|
292
|
+
static alphaNumeric(length: number): string;
|
|
293
|
+
static alphaNumericLowerCase(length: number): string;
|
|
294
|
+
static numberCode(length: number): string;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface ICrudRepository<T> {
|
|
298
|
+
find(id: string): Promise<T | null>;
|
|
299
|
+
findOrThrow(id: string): Promise<T>;
|
|
300
|
+
findByIds(ids: string[]): Promise<T[]>;
|
|
301
|
+
findAll(id: string): Promise<T[]>;
|
|
302
|
+
create(item: T): Promise<void>;
|
|
303
|
+
update(item: T): Promise<void>;
|
|
304
|
+
delete(item: T): Promise<void>;
|
|
305
|
+
}
|
|
306
|
+
|
|
304
307
|
interface ICommandConfig {
|
|
305
308
|
name?: string;
|
|
306
309
|
}
|
|
@@ -1632,4 +1635,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
1632
1635
|
new (): {};
|
|
1633
1636
|
};
|
|
1634
1637
|
|
|
1635
|
-
export { AnthropicChatAdapter, ApiKey, ApiKeyConnectionGuardMiddleware, ApiKeyGuardMiddleware, 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 IChatAdapterNextItemReq, type IChatAdapterNextItemRes, 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 IConnectionMiddleware, type IConnectionMiddlewareMetadata, 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 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 ISocketConnectionConfig, type ISocketConnectionMetadata, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, 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, JwtConnectionGuardMiddleware, JwtGuardMiddleware, 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, 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, apiKeyConnectionGuard, apiKeyGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, connectionMiddleware, container, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtConnectionGuard, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, param, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketConnection, socketController, socketEvent, telegram,
|
|
1638
|
+
export { AnthropicChatAdapter, ApiKey, ApiKeyConnectionGuardMiddleware, ApiKeyGuardMiddleware, 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 IChatAdapterNextItemReq, type IChatAdapterNextItemRes, 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 IConnectionMiddleware, type IConnectionMiddlewareMetadata, 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 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 ISocketConnectionConfig, type ISocketConnectionMetadata, 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, JwtConnectionGuardMiddleware, JwtGuardMiddleware, 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, 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, apiKeyConnectionGuard, apiKeyGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, connectionMiddleware, container, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtConnectionGuard, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, param, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketConnection, socketController, socketEvent, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsApp, writeJsonToFile };
|
package/dist/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { isArray } from './core/validation/metadata/@isArray.js';
|
|
|
14
14
|
export { ValidationMetadataStore } from './core/validation/metadata/ValidationMetadataStore.js';
|
|
15
15
|
export { validateModel } from './core/validation/core/validateModel.js';
|
|
16
16
|
export { validateArray } from './core/validation/core/validateArray.js';
|
|
17
|
-
export {
|
|
17
|
+
export { validateAndTransform } from './core/validation/validateAndTransform.js';
|
|
18
18
|
export { modelInfo } from './core/validation/modelInfo.js';
|
|
19
19
|
export { isBoolean } from './core/validation/validators/is-boolean/@isBoolean.js';
|
|
20
20
|
export { validateIsBoolean } from './core/validation/validators/is-boolean/validateIsBoolean.js';
|