@wabot-dev/framework 0.1.0-beta.29 → 0.1.0-beta.30
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/async/pg/PgJobRepository.js +26 -0
- package/dist/src/addon/chat-bot/claude/ClaudeChatBotAdapter.js +107 -0
- package/dist/src/addon/chat-bot/deepseek/DeepSeekChatBotAdapter.js +103 -0
- package/dist/src/{ai → addon/chat-bot}/openia/OpenaiChatAdapter.js +3 -3
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/pg/PgChatMemory.js +5 -4
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/pg/PgChatRepository.js +5 -5
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/ram/RamChatRepository.js +1 -1
- package/dist/src/addon/chat-controller/cmd/@cmd.js +22 -0
- package/dist/src/{channels → addon/chat-controller}/cmd/CmdChannel.js +5 -27
- package/dist/src/{channels → addon/chat-controller}/socket/@socket.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/socket/SocketChannel.js +6 -24
- package/dist/src/{channels → addon/chat-controller}/socket/SocketChannelConfig.js +1 -1
- package/dist/src/{channels → addon/chat-controller}/telegram/@telegram.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/telegram/TelegramChannel.js +5 -23
- package/dist/src/{channels → addon/chat-controller}/whatsapp/@whatsapp.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/whatsapp/EnvWhatsAppRepository.js +2 -2
- package/dist/src/{channels → addon/chat-controller}/whatsapp/PgWhatsAppRepository.js +1 -1
- package/dist/src/{channels/wabot → addon/chat-controller/whatsapp}/WabotDevConnection.js +2 -2
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsApp.js +1 -3
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppChannel.js +6 -18
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiver.js +13 -10
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiverByDevConnection.js +3 -9
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiverByWebHook.js +2 -9
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSender.js +12 -7
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSenderByCloudApi.js +10 -7
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSenderByDevConnection.js +12 -9
- package/dist/src/{pre-made/module → addon/mindset}/html/HtmlModule.js +6 -6
- package/dist/src/{repository → addon/repository}/pg/PgCrudRepository.js +1 -1
- package/dist/src/addon/rest-controller/jwt/@jwtGuard.js +17 -0
- package/dist/src/{jwt → addon/rest-controller/jwt}/Jwt.js +7 -2
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtAccessAndRefreshTokenDto.js +3 -3
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtConfig.js +2 -2
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtGuardMiddleware.js +8 -3
- package/dist/src/addon/rest-controller/jwt/JwtRefreshToken.js +9 -0
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtRefreshTokenRepository.js +2 -2
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtSigner.js +2 -2
- package/dist/src/{jwt → addon/rest-controller/jwt}/JwtTokenDto.js +5 -5
- package/dist/src/{validation/metadata → addon/validation/is-boolean}/@isBoolean.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/is-date}/@isDate.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/is-not-empty}/@isNotEmpty.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/is-number}/@isNumber.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/is-present}/@isPresent.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/is-string}/@isString.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/max}/@max.js +3 -3
- package/dist/src/{validation/metadata → addon/validation/min}/@min.js +3 -3
- package/dist/src/core/{Entity.js → entity/Entity.js} +1 -1
- package/dist/src/{mapper → core/mapper}/Mapper.js +1 -3
- package/dist/src/{async → feature/async}/@command.js +1 -1
- package/dist/src/{async → feature/async}/@commandHandler.js +1 -1
- package/dist/src/{async → feature/async}/Async.js +1 -1
- package/dist/src/feature/async/Command.js +9 -0
- package/dist/src/{async → feature/async}/CommandMetadataStore.js +1 -1
- package/dist/src/{async → feature/async}/Job.js +2 -4
- package/dist/src/feature/async/JobRepository.js +31 -0
- package/dist/src/{async → feature/async}/JobRunner.js +1 -1
- package/dist/src/{async → feature/async}/JobsEventsHub.js +1 -1
- package/dist/src/{async → feature/async}/runCommandHandlers.js +1 -1
- package/dist/src/{core/chat → feature/chat-bot}/Chat.js +1 -1
- package/dist/src/feature/chat-bot/ChatAdapter.js +7 -0
- package/dist/src/feature/chat-bot/ChatBot.js +50 -0
- package/dist/src/feature/chat-bot/ChatItem.js +24 -0
- package/dist/src/feature/chat-bot/ChatMemory.js +10 -0
- package/dist/src/{core/chat/repository/IChatRepository.js → feature/chat-bot/ChatRepository.js} +2 -8
- package/dist/src/feature/chat-bot/IChatItem.js +3 -0
- package/dist/src/{chatbot → feature/chat-bot}/metadata/@chatBot.js +1 -1
- package/dist/src/{chatbot → feature/chat-bot}/metadata/ChatBotMetadataStore.js +1 -1
- package/dist/src/{controller/channel → feature/chat-controller}/ChatResolver.js +5 -4
- package/dist/src/{controller → feature/chat-controller}/metadata/ControllerMetadataStore.js +1 -1
- package/dist/src/{controller → feature/chat-controller}/metadata/controller/@chatController.js +1 -1
- package/dist/src/feature/chat-controller/runChatControllers.js +69 -0
- package/dist/src/{channels → feature}/express/ExpressProvider.js +1 -1
- package/dist/src/{channels → feature}/http/HttpServerProvider.js +1 -1
- package/dist/src/{mindset → feature/mindset}/MindsetOperator.js +2 -61
- package/dist/src/{mindset → feature/mindset}/metadata/MindsetMetadataStore.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/functions/@mindsetFunction.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/mindsets/@mindset.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/modules/@mindsetModule.js +1 -2
- package/dist/src/{mindset → feature/mindset}/metadata/params/@param.js +1 -1
- package/dist/src/{auth → feature/rest-controller/auth}/Auth.js +2 -2
- package/dist/src/{rest-controller → feature/rest-controller}/metadata/@get.js +1 -1
- package/dist/src/{rest-controller → feature/rest-controller}/metadata/@middleware.js +1 -1
- package/dist/src/{rest-controller → feature/rest-controller}/metadata/@post.js +1 -1
- package/dist/src/{rest-controller → feature/rest-controller}/metadata/@restController.js +1 -1
- package/dist/src/{rest-controller → feature/rest-controller}/metadata/RestControllerMetadataStore.js +1 -1
- package/dist/src/{rest-controller → feature/rest-controller}/runRestControllers.js +6 -24
- package/dist/src/{channels → feature}/socket/SocketServerProvider.js +1 -1
- package/dist/src/index.d.ts +550 -724
- package/dist/src/index.js +118 -133
- package/package.json +1 -1
- package/dist/src/ai/claude/ClaudeChatBotAdapter.js +0 -112
- package/dist/src/ai/deepseek/DeepSeekChatBotAdapter.js +0 -107
- package/dist/src/ai/openia/OpenaiChatBotAdapter.js +0 -88
- package/dist/src/async/Command.js +0 -11
- package/dist/src/async/JobRepository.js +0 -21
- package/dist/src/channels/cmd/@cmd.js +0 -18
- package/dist/src/chatbot/ChatBot.js +0 -50
- package/dist/src/chatbot/ChatBotAdapter.js +0 -70
- package/dist/src/controller/channel/UserResolver.js +0 -21
- package/dist/src/core/IMessageContext.js +0 -12
- package/dist/src/core/chat/ChatItem.js +0 -15
- package/dist/src/core/chat/IChatAdapter.js +0 -3
- package/dist/src/core/chat/repository/IChatMemory.js +0 -10
- package/dist/src/core/user/IUserRepository.js +0 -19
- package/dist/src/core/user/User.js +0 -26
- package/dist/src/jwt/@jwtGuard.js +0 -34
- package/dist/src/jwt/JwtRefreshToken.js +0 -11
- package/dist/src/pre-made/module/authentication/AuthenticationModule.js +0 -97
- package/dist/src/pre-made/module/authentication/requests/SendOneTimePasswordRequest.js +0 -25
- package/dist/src/pre-made/module/authentication/requests/ValidateOneTimePasswordRequest.js +0 -25
- package/dist/src/pre-made/module/register-user/RegisterUserModule.js +0 -56
- package/dist/src/pre-made/module/register-user/requests/RegisterUserWithEmailRequest.js +0 -25
- package/dist/src/pre-made/repository/user/pg/PgUserRepository.js +0 -33
- package/dist/src/pre-made/repository/user/ram/RamUserRepository.js +0 -27
- package/dist/src/pre-made/service/EmailService.js +0 -13
- package/dist/src/pre-made/service/OtpService.js +0 -14
- package/dist/src/server/prepareChatContainer.js +0 -43
- package/dist/src/server/runChannel.js +0 -27
- package/dist/src/server/runServer.js +0 -40
- /package/dist/src/{pre-made/repository/chat → addon/chat-bot}/ram/RamChatMemory.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/telegram/TelegramChannelConfig.js +0 -0
- /package/dist/src/{channels/wabot → addon/chat-controller/whatsapp}/WabotDevSocketContracts.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppChannelConfig.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppRepository.js +0 -0
- /package/dist/src/{repository → addon/repository}/pg/PgRepositoryBase.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-boolean}/validateIsBoolean.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-date}/validateIsDate.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-not-empty}/validateIsNotEmpty.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-number}/validateIsNumber.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-present}/validateIsPresent.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/is-string}/validateIsString.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/max}/validateMax.js +0 -0
- /package/dist/src/{validation/validators → addon/validation/min}/validateMin.js +0 -0
- /package/dist/src/{env → core/env}/Env.js +0 -0
- /package/dist/src/{error → core/error}/CustomError.js +0 -0
- /package/dist/src/{injection → core/injection}/Container.js +0 -0
- /package/dist/src/{injection → core/injection}/index.js +0 -0
- /package/dist/src/{logger → core/logger}/Logger.js +0 -0
- /package/dist/src/{random → core/random}/Random.js +0 -0
- /package/dist/src/core/{Storable.js → storable/Storable.js} +0 -0
- /package/dist/src/{validation → core/validation}/metadata/@isArray.js +0 -0
- /package/dist/src/{validation → core/validation}/metadata/@isModel.js +0 -0
- /package/dist/src/{validation → core/validation}/metadata/@isOptional.js +0 -0
- /package/dist/src/{validation → core/validation}/metadata/ValidationMetadataStore.js +0 -0
- /package/dist/src/{validation → core/validation}/modelInfo.js +0 -0
- /package/dist/src/{validation → core/validation}/validate.js +0 -0
- /package/dist/src/{validation → core/validation}/validators/validateArray.js +0 -0
- /package/dist/src/{validation → core/validation}/validators/validateIsOptional.js +0 -0
- /package/dist/src/{validation → core/validation}/validators/validateModel.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/IMindset.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/functions/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/mindsets/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/modules/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/params/decoratorNames.js +0 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,32 +1,16 @@
|
|
|
1
|
+
import * as tsyringe from 'tsyringe';
|
|
2
|
+
import { DependencyContainer as DependencyContainer$1 } from 'tsyringe';
|
|
3
|
+
export { DependencyContainer } from 'tsyringe';
|
|
1
4
|
import InjectionToken from 'tsyringe/dist/typings/providers/injection-token';
|
|
2
5
|
import DependencyContainer, { PreResolutionInterceptorCallback, PostResolutionInterceptorCallback } from 'tsyringe/dist/typings/types/dependency-container';
|
|
3
6
|
import InterceptionOptions from 'tsyringe/dist/typings/types/interceptor-options';
|
|
4
|
-
import { Pool } from 'pg';
|
|
5
7
|
import { Server } from 'http';
|
|
6
8
|
import { Express, Request, Response } from 'express';
|
|
7
9
|
import { Server as Server$1 } from 'socket.io';
|
|
10
|
+
import { Pool } from 'pg';
|
|
8
11
|
import { Socket } from 'socket.io-client';
|
|
9
|
-
import * as tsyringe from 'tsyringe';
|
|
10
|
-
import { DependencyContainer as DependencyContainer$1 } from 'tsyringe';
|
|
11
|
-
export { DependencyContainer } from 'tsyringe';
|
|
12
12
|
import { Algorithm } from 'jsonwebtoken';
|
|
13
13
|
|
|
14
|
-
interface IMindsetFunctionConfig {
|
|
15
|
-
description: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare function mindsetFunction(config: IMindsetFunctionConfig): (target: object, propertyKey: string | symbol) => void;
|
|
19
|
-
|
|
20
|
-
declare const MINDSET_FUNCTION_DECORATION_FUNCTION = "mindsetFunction";
|
|
21
|
-
|
|
22
|
-
interface IMindsetFunctionDecoration {
|
|
23
|
-
decorationName: string;
|
|
24
|
-
functionName: string;
|
|
25
|
-
constructor: Function;
|
|
26
|
-
paramsTypes: Function[];
|
|
27
|
-
decorationConfig: any;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
14
|
type IPrimitive = null | number | string | boolean | undefined;
|
|
31
15
|
type IStorableData = {
|
|
32
16
|
[key: string]: IPrimitive | IPrimitive[] | IStorableData | IStorableData[];
|
|
@@ -68,73 +52,278 @@ interface IPersistentData extends IEntityData {
|
|
|
68
52
|
declare class Persistent<D extends IPersistentData> extends Entity<D> {
|
|
69
53
|
}
|
|
70
54
|
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
type IEnvType = 'development' | 'staging' | 'testing' | 'production';
|
|
56
|
+
declare class Env {
|
|
57
|
+
private envType;
|
|
58
|
+
constructor();
|
|
59
|
+
isDevelopment(): boolean;
|
|
60
|
+
isProduction(): boolean;
|
|
61
|
+
isTesting(): boolean;
|
|
62
|
+
requireString(varName: string, options?: {
|
|
63
|
+
default?: string;
|
|
64
|
+
}): string;
|
|
65
|
+
requireNumber(varName: string, options?: {
|
|
66
|
+
default?: number;
|
|
67
|
+
}): number;
|
|
73
68
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
|
|
70
|
+
interface ICustomErrorData {
|
|
71
|
+
message: string;
|
|
72
|
+
humanMessage?: string;
|
|
73
|
+
code?: string;
|
|
74
|
+
httpCode?: number;
|
|
75
|
+
cause?: Error;
|
|
76
|
+
info?: any;
|
|
79
77
|
}
|
|
80
|
-
declare
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
declare class CustomError extends Error {
|
|
79
|
+
humanMessage?: string;
|
|
80
|
+
code?: string;
|
|
81
|
+
httpCode?: number;
|
|
82
|
+
info?: any;
|
|
83
|
+
constructor(data: ICustomErrorData);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
type IConstructor<T> = new (...args: any[]) => T;
|
|
87
|
+
|
|
88
|
+
declare class Container implements DependencyContainer {
|
|
89
|
+
register(token: unknown, provider: unknown, options?: unknown): DependencyContainer;
|
|
90
|
+
registerSingleton(from: unknown, to?: unknown): DependencyContainer;
|
|
91
|
+
registerType<T>(from: InjectionToken<T>, to: InjectionToken<T>): DependencyContainer;
|
|
92
|
+
registerInstance<T>(token: InjectionToken<T>, instance: T): DependencyContainer;
|
|
93
|
+
resolve<T>(token: InjectionToken<T>): T;
|
|
94
|
+
resolveAll<T>(token: InjectionToken<T>): T[];
|
|
95
|
+
isRegistered<T>(token: InjectionToken<T>, recursive?: boolean): boolean;
|
|
96
|
+
reset(): void;
|
|
97
|
+
clearInstances(): void;
|
|
98
|
+
createChildContainer(): DependencyContainer;
|
|
99
|
+
beforeResolution<T>(token: InjectionToken<T>, callback: PreResolutionInterceptorCallback<T>, options?: InterceptionOptions): void;
|
|
100
|
+
afterResolution<T>(token: InjectionToken<T>, callback: PostResolutionInterceptorCallback<T>, options?: InterceptionOptions): void;
|
|
101
|
+
dispose(): Promise<void> | void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare const injectable: typeof tsyringe.injectable;
|
|
105
|
+
declare const container: tsyringe.DependencyContainer;
|
|
106
|
+
declare const singleton: typeof tsyringe.singleton;
|
|
107
|
+
declare const inject: typeof tsyringe.inject;
|
|
108
|
+
declare const scoped: typeof tsyringe.scoped;
|
|
109
|
+
declare const Lifecycle: typeof tsyringe.Lifecycle;
|
|
110
|
+
|
|
111
|
+
declare class Logger {
|
|
112
|
+
private debuggers;
|
|
113
|
+
constructor(name: string);
|
|
114
|
+
trace(...args: any[]): void;
|
|
115
|
+
debug(...args: any[]): void;
|
|
116
|
+
info(...args: any[]): void;
|
|
117
|
+
warn(...args: any[]): void;
|
|
118
|
+
error(...args: any[]): void;
|
|
119
|
+
fatal(...args: any[]): void;
|
|
120
|
+
private log;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare class Mapper {
|
|
124
|
+
map<T>(data: any, ctor: IConstructor<T>): T;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare class Random {
|
|
128
|
+
static slug(name: string, options: {
|
|
129
|
+
randomLength: number;
|
|
130
|
+
}): string;
|
|
131
|
+
static string(length: number): string;
|
|
132
|
+
static numberCode(length: number): string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface ICrudRepository<T> {
|
|
136
|
+
find(id: string): Promise<T | null>;
|
|
137
|
+
findOrThrow(id: string): Promise<T>;
|
|
138
|
+
findByIds(ids: string[]): Promise<T[]>;
|
|
139
|
+
findAll(id: string): Promise<T[]>;
|
|
140
|
+
create(item: T): Promise<void>;
|
|
141
|
+
update(item: T): Promise<void>;
|
|
142
|
+
discard(item: T): Promise<void>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare function isModel(model: IConstructor<any>): (target: object, propertyKey: string | symbol) => void;
|
|
146
|
+
|
|
147
|
+
declare function isOptional(): (target: object, propertyKey: string | symbol) => void;
|
|
148
|
+
|
|
149
|
+
interface IValidationError {
|
|
150
|
+
description: string;
|
|
151
|
+
}
|
|
152
|
+
interface IModelValidationError extends IValidationError {
|
|
153
|
+
properties: {
|
|
154
|
+
[key: string]: string[];
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
interface IArrayValidationError extends IValidationError {
|
|
158
|
+
items: (IValidationError[] | null)[];
|
|
159
|
+
}
|
|
160
|
+
type IValidationResult<V> = {
|
|
161
|
+
value: V;
|
|
162
|
+
error?: undefined;
|
|
163
|
+
} | {
|
|
164
|
+
value?: undefined;
|
|
165
|
+
error: IValidationError;
|
|
84
166
|
};
|
|
85
|
-
type
|
|
86
|
-
|
|
87
|
-
|
|
167
|
+
type IModelValidationResult<V> = {
|
|
168
|
+
value: V;
|
|
169
|
+
error?: undefined;
|
|
170
|
+
} | {
|
|
171
|
+
value?: undefined;
|
|
172
|
+
error: IModelValidationError;
|
|
88
173
|
};
|
|
89
|
-
type
|
|
90
|
-
|
|
91
|
-
|
|
174
|
+
type IArrayValidationResult<V> = {
|
|
175
|
+
value: V[];
|
|
176
|
+
error?: undefined;
|
|
177
|
+
} | {
|
|
178
|
+
value?: undefined;
|
|
179
|
+
error: IArrayValidationError;
|
|
92
180
|
};
|
|
93
|
-
type
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
description: string;
|
|
181
|
+
type IValidator<V = any, O = any> = (value: V, options: O) => IValidationResult<V>;
|
|
182
|
+
interface IPropertyValidatorInfo {
|
|
183
|
+
propertyName: string;
|
|
184
|
+
validator: IValidator;
|
|
185
|
+
validatorOptions?: any;
|
|
99
186
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
187
|
+
type IModelValidatorsInfo<V> = {
|
|
188
|
+
modelConstructor: IConstructor<V>;
|
|
189
|
+
properties: {
|
|
190
|
+
[prop: string]: {
|
|
191
|
+
isOptional?: boolean;
|
|
192
|
+
validators?: IPropertyValidatorInfo[];
|
|
193
|
+
} | undefined;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
interface IValidateArrayOptions {
|
|
105
198
|
}
|
|
106
|
-
interface
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
199
|
+
interface IValidateArrayOptionsWithItemsValidators extends IValidateArrayOptions {
|
|
200
|
+
itemsValidator?: {
|
|
201
|
+
validator: IValidator;
|
|
202
|
+
options: any;
|
|
203
|
+
}[];
|
|
111
204
|
}
|
|
112
|
-
|
|
113
|
-
|
|
205
|
+
declare function validateArray(value: any, options?: IValidateArrayOptionsWithItemsValidators): IArrayValidationResult<any>;
|
|
206
|
+
|
|
207
|
+
declare function isArray(options?: IValidateArrayOptions): (target: object, propertyKey: string | symbol) => void;
|
|
208
|
+
|
|
209
|
+
interface IValidatorMetadata {
|
|
210
|
+
modelConstructor: IConstructor<any>;
|
|
211
|
+
propertyName: string;
|
|
212
|
+
validator: IValidator;
|
|
213
|
+
validatorOptions?: any;
|
|
114
214
|
}
|
|
115
215
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
216
|
+
declare class ValidationMetadataStore {
|
|
217
|
+
private validators;
|
|
218
|
+
saveValidatorMetadata(validatorMetadata: IValidatorMetadata): void;
|
|
219
|
+
getModelValidatorsInfo<V>(modelConstructor: IConstructor<V>): IModelValidatorsInfo<V>;
|
|
220
|
+
private getConstructorPropertiesValidatorsInfo;
|
|
121
221
|
}
|
|
122
222
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
223
|
+
declare function validateModel<V>(value: any, info: IModelValidatorsInfo<V>): IModelValidationResult<V>;
|
|
224
|
+
|
|
225
|
+
declare function validate<V>(value: any, modelConstructor: IConstructor<V>): IModelValidationResult<V>;
|
|
226
|
+
|
|
227
|
+
declare function modelInfo<V>(modelConstructor: IConstructor<V>): IModelValidatorsInfo<V>;
|
|
228
|
+
|
|
229
|
+
interface ICommandConfig {
|
|
230
|
+
name?: string;
|
|
126
231
|
}
|
|
127
|
-
declare
|
|
128
|
-
|
|
129
|
-
|
|
232
|
+
declare function command(config?: ICommandConfig): (target: IConstructor<any>) => void;
|
|
233
|
+
|
|
234
|
+
declare class Command<T extends IStorableData> extends Storable<T> {
|
|
235
|
+
getData(): T;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface ICommandHandler<C extends Command<any>> {
|
|
239
|
+
handle(command: C): void | Promise<void>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
interface ICommandHandlerConfig<C extends Command<any>> {
|
|
243
|
+
command: IConstructor<C>;
|
|
244
|
+
}
|
|
245
|
+
declare function commandHandler<C extends Command<any>>(config: ICommandHandlerConfig<C>): (target: IConstructor<ICommandHandler<C>>) => void;
|
|
246
|
+
|
|
247
|
+
declare class CommandMetadataStore {
|
|
248
|
+
private handlersMap;
|
|
249
|
+
private handlersInverseMap;
|
|
250
|
+
private commandsMap;
|
|
251
|
+
private commandsInverseMap;
|
|
252
|
+
registerCommand(command: IConstructor<Command<any>>, commandName: string): void;
|
|
253
|
+
registerHandler(command: IConstructor<Command<any>>, handlerConstructor: IConstructor<ICommandHandler<any>>): void;
|
|
254
|
+
getHandlerForCommandName(commandName: string): IConstructor<ICommandHandler<any>> | null;
|
|
255
|
+
getCommandNameForHandler(handlerConstructor: IConstructor<ICommandHandler<any>>): string | null;
|
|
256
|
+
getCommandName(command: IConstructor<Command<any>>): string | null;
|
|
257
|
+
getCommandForCommandName(commandName: string): IConstructor<Command<any>> | null;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
interface IJobData extends IEntityData {
|
|
261
|
+
commandName: string;
|
|
262
|
+
commandData: any;
|
|
263
|
+
startedAt?: number;
|
|
264
|
+
successAt?: number;
|
|
265
|
+
failedAt?: number;
|
|
266
|
+
error?: {
|
|
267
|
+
message: string;
|
|
268
|
+
stack?: string;
|
|
269
|
+
info?: any;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
declare class Job extends Entity<IJobData> {
|
|
273
|
+
get commandName(): string;
|
|
274
|
+
setAsStarted(): void;
|
|
275
|
+
setAsSuccess(): void;
|
|
276
|
+
setAsFailed(error: Error): void;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
interface IJobRepository extends ICrudRepository<Job> {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare class JobRepository implements IJobRepository {
|
|
283
|
+
find(id: string): Promise<Job | null>;
|
|
284
|
+
findOrThrow(id: string): Promise<Job>;
|
|
285
|
+
findByIds(ids: string[]): Promise<Job[]>;
|
|
286
|
+
findAll(id: string): Promise<Job[]>;
|
|
287
|
+
create(item: Job): Promise<void>;
|
|
288
|
+
update(item: Job): Promise<void>;
|
|
289
|
+
discard(item: Job): Promise<void>;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
interface IJobEvent extends IStorableData {
|
|
293
|
+
jobId: string;
|
|
294
|
+
type: 'created';
|
|
295
|
+
}
|
|
296
|
+
type IJobEventListener = (event: IJobEvent) => void | Promise<void>;
|
|
297
|
+
declare class JobsEventsHub {
|
|
298
|
+
private jobsEventsListener;
|
|
299
|
+
notifyJobCreated(job: Job): void;
|
|
300
|
+
listenJobsEvents(listener: IJobEventListener): void;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare class Async {
|
|
304
|
+
private jobRepository;
|
|
305
|
+
private handlerContainer;
|
|
306
|
+
private jobsEventsHub;
|
|
307
|
+
constructor(jobRepository: JobRepository, handlerContainer: CommandMetadataStore, jobsEventsHub: JobsEventsHub);
|
|
308
|
+
run<T extends IStorableData>(command: Command<T>): Promise<Job>;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
declare class JobRunner {
|
|
312
|
+
private jobRepository;
|
|
313
|
+
private handlerContainer;
|
|
314
|
+
constructor(jobRepository: JobRepository, handlerContainer: CommandMetadataStore);
|
|
315
|
+
run(job: Job): Promise<void>;
|
|
130
316
|
}
|
|
131
317
|
|
|
132
|
-
|
|
318
|
+
declare function runAsyncCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
|
|
319
|
+
|
|
133
320
|
interface IChatConnection extends IStorableData {
|
|
134
|
-
chatType: IChatType;
|
|
135
321
|
channelName: string;
|
|
136
322
|
id: string;
|
|
137
323
|
}
|
|
324
|
+
|
|
325
|
+
type IChatType = 'PRIVATE' | 'GROUP';
|
|
326
|
+
|
|
138
327
|
interface IChatData extends IEntityData {
|
|
139
328
|
type: IChatType;
|
|
140
329
|
connections: IChatConnection[];
|
|
@@ -149,74 +338,22 @@ declare class Chat extends Entity<IChatData> {
|
|
|
149
338
|
validate(): void;
|
|
150
339
|
}
|
|
151
340
|
|
|
152
|
-
interface
|
|
153
|
-
|
|
154
|
-
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
155
|
-
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
156
|
-
}
|
|
157
|
-
declare class ChatRepository implements IChatRepository {
|
|
158
|
-
create(chat: Chat): Promise<void>;
|
|
159
|
-
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
160
|
-
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
interface IChatFunctionCall {
|
|
164
|
-
id: string;
|
|
165
|
-
name: string;
|
|
166
|
-
arguments?: string;
|
|
167
|
-
result?: string;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
interface IUserConnection extends IStorableData {
|
|
171
|
-
channelName: string;
|
|
172
|
-
id: string;
|
|
173
|
-
}
|
|
174
|
-
interface IUserData extends IEntityData {
|
|
175
|
-
shortName: string;
|
|
176
|
-
connections: IUserConnection[];
|
|
177
|
-
keyValueData: {
|
|
178
|
-
[key: string]: string;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
declare class User extends Entity<IUserData> {
|
|
182
|
-
constructor(data: IUserData);
|
|
183
|
-
hasConnection(connection: IUserConnection): boolean;
|
|
184
|
-
getValue(key: string): string;
|
|
185
|
-
setValue(key: string, value: string): void;
|
|
186
|
-
addConnection(connection: IUserConnection): void;
|
|
341
|
+
interface IMindsetFunctionConfig {
|
|
342
|
+
description: string;
|
|
187
343
|
}
|
|
188
344
|
|
|
189
|
-
|
|
190
|
-
create(chat: User): Promise<void>;
|
|
191
|
-
update(chat: User): Promise<void>;
|
|
192
|
-
findByConnection(query: IUserConnection): Promise<User | null>;
|
|
193
|
-
}
|
|
194
|
-
declare class UserRepository implements IUserRepository {
|
|
195
|
-
create(chat: User): Promise<void>;
|
|
196
|
-
update(chat: User): Promise<void>;
|
|
197
|
-
findByConnection(query: IUserConnection): Promise<User | null>;
|
|
198
|
-
}
|
|
345
|
+
declare function mindsetFunction(config: IMindsetFunctionConfig): (target: object, propertyKey: string | symbol) => void;
|
|
199
346
|
|
|
200
|
-
|
|
201
|
-
chatConnection: IChatConnection;
|
|
202
|
-
userConnection: IUserConnection;
|
|
203
|
-
userId?: string;
|
|
204
|
-
}
|
|
347
|
+
declare const MINDSET_FUNCTION_DECORATION_FUNCTION = "mindsetFunction";
|
|
205
348
|
|
|
206
|
-
interface
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
message: IConnectionChatMessage;
|
|
213
|
-
chat: Chat;
|
|
214
|
-
user: User | null;
|
|
215
|
-
constructor(message: IConnectionChatMessage, chat: Chat, user: User | null);
|
|
349
|
+
interface IMindsetFunctionDecoration {
|
|
350
|
+
decorationName: string;
|
|
351
|
+
functionName: string;
|
|
352
|
+
constructor: Function;
|
|
353
|
+
paramsTypes: Function[];
|
|
354
|
+
decorationConfig: any;
|
|
216
355
|
}
|
|
217
356
|
|
|
218
|
-
type IConstructor<T> = new (...args: any[]) => T;
|
|
219
|
-
|
|
220
357
|
interface IMindsetIdentity {
|
|
221
358
|
name: string;
|
|
222
359
|
language: string;
|
|
@@ -321,28 +458,17 @@ declare class MindsetMetadataStore {
|
|
|
321
458
|
getMindsetMetadata(ctor: Function): IMindsetMetadata;
|
|
322
459
|
}
|
|
323
460
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
createChildContainer(): DependencyContainer;
|
|
335
|
-
beforeResolution<T>(token: InjectionToken<T>, callback: PreResolutionInterceptorCallback<T>, options?: InterceptionOptions): void;
|
|
336
|
-
afterResolution<T>(token: InjectionToken<T>, callback: PostResolutionInterceptorCallback<T>, options?: InterceptionOptions): void;
|
|
337
|
-
dispose(): Promise<void> | void;
|
|
461
|
+
interface IMindsetToolParameter {
|
|
462
|
+
type: string;
|
|
463
|
+
name: string;
|
|
464
|
+
description: string;
|
|
465
|
+
}
|
|
466
|
+
interface IMindsetTool {
|
|
467
|
+
language: string;
|
|
468
|
+
name: string;
|
|
469
|
+
description: string;
|
|
470
|
+
parameters: IMindsetToolParameter[];
|
|
338
471
|
}
|
|
339
|
-
|
|
340
|
-
declare const injectable: typeof tsyringe.injectable;
|
|
341
|
-
declare const container: tsyringe.DependencyContainer;
|
|
342
|
-
declare const singleton: typeof tsyringe.singleton;
|
|
343
|
-
declare const inject: typeof tsyringe.inject;
|
|
344
|
-
declare const scoped: typeof tsyringe.scoped;
|
|
345
|
-
declare const Lifecycle: typeof tsyringe.Lifecycle;
|
|
346
472
|
|
|
347
473
|
declare class MindsetOperator implements IMindset {
|
|
348
474
|
private mindset;
|
|
@@ -353,34 +479,97 @@ declare class MindsetOperator implements IMindset {
|
|
|
353
479
|
skills(): Promise<string>;
|
|
354
480
|
limits(): Promise<string>;
|
|
355
481
|
systemPrompt(): Promise<string>;
|
|
356
|
-
tools():
|
|
357
|
-
tool(fn: IMindsetFunctionMetadata, module: IMindsetModuleMetadata):
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* @deprecated use id
|
|
361
|
-
*/
|
|
482
|
+
tools(): IMindsetTool[];
|
|
483
|
+
protected tool(fn: IMindsetFunctionMetadata, module: IMindsetModuleMetadata): IMindsetTool;
|
|
484
|
+
protected toolParameter(param: IMindsetFunctionParamMetadata): IMindsetToolParameter;
|
|
362
485
|
callFunction(name: string, params: string): Promise<string>;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
interface IChatMessage extends IStorableData {
|
|
489
|
+
senderId?: string;
|
|
490
|
+
senderName?: string;
|
|
491
|
+
text?: string;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
interface IFunctionCall extends IStorableData {
|
|
495
|
+
id: string;
|
|
496
|
+
name: string;
|
|
497
|
+
arguments?: string;
|
|
498
|
+
result?: string;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
declare const chatItemTypeOptions: readonly ["botMessage", "humanMessage", "functionCall"];
|
|
502
|
+
type IBotMessageItem = {
|
|
503
|
+
type: 'botMessage';
|
|
504
|
+
botMessage: IChatMessage;
|
|
505
|
+
};
|
|
506
|
+
type IHumanMessageItem = {
|
|
507
|
+
type: 'humanMessage';
|
|
508
|
+
humanMessage: IChatMessage;
|
|
509
|
+
};
|
|
510
|
+
type IFunctionCallItem = {
|
|
511
|
+
type: 'functionCall';
|
|
512
|
+
functionCall: IFunctionCall;
|
|
513
|
+
};
|
|
514
|
+
type IChatItem = IBotMessageItem | IHumanMessageItem | IFunctionCallItem;
|
|
515
|
+
type IChatItemType = (typeof chatItemTypeOptions)[number];
|
|
516
|
+
|
|
517
|
+
interface IChatAdapterNextItemReq {
|
|
518
|
+
model: string;
|
|
519
|
+
systemPrompt: string;
|
|
520
|
+
tools: IMindsetTool[];
|
|
521
|
+
prevItems: IChatItem[];
|
|
522
|
+
}
|
|
523
|
+
interface IChatAdapter {
|
|
524
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatItem>;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
declare class ChatAdapter implements IChatAdapter {
|
|
528
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatItem>;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
type IChatItemData = IEntityData & IChatItem;
|
|
532
|
+
declare class ChatItem extends Entity<IChatItemData> {
|
|
533
|
+
get type(): "botMessage" | "humanMessage" | "functionCall";
|
|
534
|
+
get botMessage(): IChatMessage;
|
|
535
|
+
get functionCall(): IFunctionCall;
|
|
536
|
+
setFunctionResult(result: string): void;
|
|
537
|
+
getData(): IChatItemData;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
interface IChatMemory {
|
|
541
|
+
findLastItems(count: number): Promise<ChatItem[]>;
|
|
542
|
+
create(item: ChatItem): Promise<void>;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
declare class ChatMemory implements IChatMemory {
|
|
546
|
+
findLastItems(count: number): Promise<ChatItem[]>;
|
|
547
|
+
create(item: ChatItem): Promise<void>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
interface IChatBot {
|
|
551
|
+
sendMessage(message: IChatMessage, callback: (message: IChatMessage) => void): void | Promise<void>;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
declare class ChatBot implements IChatBot {
|
|
555
|
+
private memory;
|
|
556
|
+
private adapter;
|
|
557
|
+
private mindset;
|
|
558
|
+
constructor(memory: ChatMemory, adapter: ChatAdapter, mindset: MindsetOperator);
|
|
559
|
+
sendMessage(message: IChatMessage, callback: (message: IChatMessage) => void): Promise<void>;
|
|
560
|
+
protected processLoop(callback: (message: IChatMessage) => void): Promise<void>;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
interface IChatRepository {
|
|
564
|
+
create(chat: Chat): Promise<void>;
|
|
565
|
+
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
566
|
+
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
declare class ChatRepository implements IChatRepository {
|
|
570
|
+
create(chat: Chat): Promise<void>;
|
|
571
|
+
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
572
|
+
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
384
573
|
}
|
|
385
574
|
|
|
386
575
|
declare function chatBot(mindset: IConstructor<IMindset>): (target: object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
@@ -397,127 +586,156 @@ declare class ChatBotMetadataStore {
|
|
|
397
586
|
getChatBotsMetadata(): IChatBotMetadata[];
|
|
398
587
|
}
|
|
399
588
|
|
|
400
|
-
interface
|
|
401
|
-
generateNextChatItem(chatItems: ChatItem[]): Promise<ChatItem>;
|
|
589
|
+
interface IchatControllerConfig {
|
|
402
590
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
protected buildBotMessageItem(text: string): Promise<any>;
|
|
409
|
-
protected buildFunctionCallItem(id: string, functionName: string, functionArguments: string): Promise<any>;
|
|
591
|
+
|
|
592
|
+
declare function chatController(config?: IchatControllerConfig): (target: IConstructor<any>) => void;
|
|
593
|
+
|
|
594
|
+
interface IChatControllerMetadata {
|
|
595
|
+
controllerConstructor: Function;
|
|
410
596
|
}
|
|
411
597
|
|
|
412
|
-
interface
|
|
413
|
-
|
|
598
|
+
interface IReceivedMessage {
|
|
599
|
+
message: IChatMessage;
|
|
600
|
+
reply: (message: IChatMessage) => void;
|
|
414
601
|
}
|
|
415
602
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
private adapter;
|
|
419
|
-
constructor(memory: ChatMemory, adapter: ChatBotAdapter);
|
|
420
|
-
sendMessage(message: IConnectionChatMessage, callback: (message: IChatMessage) => void): Promise<void>;
|
|
421
|
-
protected processLoop(callback: (message: IChatMessage) => void): Promise<void>;
|
|
603
|
+
interface IChannelMessage extends IReceivedMessage {
|
|
604
|
+
chatConnection: IChatConnection;
|
|
422
605
|
}
|
|
423
606
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
constructor(mindset: MindsetOperator);
|
|
428
|
-
validateEnvVariables(envVariables: (string | undefined)[]): void;
|
|
429
|
-
generateNextChatItem(chatItems: ChatItem[]): Promise<ChatItem>;
|
|
430
|
-
private mapChatItems;
|
|
607
|
+
interface IChatChannel {
|
|
608
|
+
listen(callback: (received: IChannelMessage) => void): void;
|
|
609
|
+
connect(): void;
|
|
431
610
|
}
|
|
432
611
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
generateNextChatItem(chatItems: ChatItem[]): Promise<ChatItem>;
|
|
439
|
-
private mapChatItems;
|
|
612
|
+
interface IChannelMetadata {
|
|
613
|
+
controllerConstructor: IConstructor<any>;
|
|
614
|
+
functionName: string;
|
|
615
|
+
channelConstructor: IConstructor<IChatChannel>;
|
|
616
|
+
channelConfig?: object;
|
|
440
617
|
}
|
|
441
618
|
|
|
442
|
-
declare class
|
|
443
|
-
private
|
|
619
|
+
declare class ControllerMetadataStore {
|
|
620
|
+
private channels;
|
|
621
|
+
private chatControllers;
|
|
622
|
+
saveChannelMetadata(channelMetadata: IChannelMetadata): void;
|
|
623
|
+
saveChatControllerMetadata(controllerMetadata: IChatControllerMetadata): void;
|
|
624
|
+
getChatControllerMetadata(controllerConstructor: Function): {
|
|
625
|
+
config: IChatControllerMetadata;
|
|
626
|
+
channels: IChannelMetadata[];
|
|
627
|
+
} | null;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
declare class ChatResolver {
|
|
631
|
+
private chatRepository;
|
|
632
|
+
constructor(chatRepository: ChatRepository);
|
|
633
|
+
resolve(connection: IChatConnection): Promise<Chat>;
|
|
634
|
+
private resolveGroupChat;
|
|
635
|
+
private resolvePrivateChat;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
interface IMessageContext extends IReceivedMessage {
|
|
639
|
+
chat: Chat;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
declare function runChatControllers(controllers: IConstructor<any>[]): void;
|
|
643
|
+
|
|
644
|
+
declare class HttpServerProvider {
|
|
645
|
+
server: Server | null;
|
|
646
|
+
private listening;
|
|
444
647
|
private logger;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
private mapConectionMessage;
|
|
448
|
-
private mapBotMessage;
|
|
449
|
-
private mapFunctionCall;
|
|
450
|
-
private mapTool;
|
|
451
|
-
private mapResponse;
|
|
648
|
+
getHttpServer(): Server;
|
|
649
|
+
listen(): void;
|
|
452
650
|
}
|
|
453
651
|
|
|
454
|
-
declare class
|
|
455
|
-
private
|
|
456
|
-
private
|
|
652
|
+
declare class ExpressProvider {
|
|
653
|
+
private httpServerProvider;
|
|
654
|
+
private expressApp;
|
|
457
655
|
private logger;
|
|
458
|
-
constructor(
|
|
459
|
-
|
|
460
|
-
|
|
656
|
+
constructor(httpServerProvider: HttpServerProvider);
|
|
657
|
+
getExpress(): Express;
|
|
658
|
+
listen(): void;
|
|
659
|
+
private createExpress;
|
|
461
660
|
}
|
|
462
661
|
|
|
463
|
-
interface
|
|
464
|
-
|
|
662
|
+
interface IGetConfig {
|
|
663
|
+
path?: string;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
declare function get(config?: string | IGetConfig): (target: object, propertyKey: string | symbol) => void;
|
|
667
|
+
|
|
668
|
+
interface IMiddleware {
|
|
669
|
+
handle(req: Request, res: Response, container: DependencyContainer$1): Promise<void>;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare function middleware(middlewareConstructor: IConstructor<IMiddleware>): (target: object, propertyKey: string | symbol) => void;
|
|
673
|
+
|
|
674
|
+
interface IPostConfig {
|
|
675
|
+
path?: string;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
declare function post(config?: string | IPostConfig): (target: object, propertyKey: string | symbol) => void;
|
|
679
|
+
|
|
680
|
+
interface IRestControllerConfig {
|
|
681
|
+
path: string;
|
|
465
682
|
}
|
|
466
|
-
declare function command(config?: ICommandConfig): (target: IConstructor<any>) => void;
|
|
467
683
|
|
|
468
|
-
declare
|
|
469
|
-
getData(): T;
|
|
470
|
-
}
|
|
684
|
+
declare function restController(config: string | IRestControllerConfig): (target: IConstructor<any>) => void;
|
|
471
685
|
|
|
472
|
-
interface
|
|
473
|
-
|
|
686
|
+
interface IEndPointMetadata {
|
|
687
|
+
method: 'get' | 'post';
|
|
688
|
+
path?: string;
|
|
689
|
+
controllerConstructor: IConstructor<any>;
|
|
690
|
+
functionName: string;
|
|
691
|
+
paramsTypes: any[];
|
|
474
692
|
}
|
|
475
693
|
|
|
476
|
-
interface
|
|
477
|
-
|
|
694
|
+
interface IMiddlewareMetadata {
|
|
695
|
+
controllerConstructor: IConstructor<any>;
|
|
696
|
+
functionName: string;
|
|
697
|
+
middlewareConstructor: IConstructor<IMiddleware>;
|
|
478
698
|
}
|
|
479
|
-
declare function commandHandler<C extends Command<any>>(config: ICommandHandlerConfig<C>): (target: IConstructor<ICommandHandler<C>>) => void;
|
|
480
699
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
private commandsMap;
|
|
485
|
-
private commandsInverseMap;
|
|
486
|
-
registerCommand(command: IConstructor<Command<any>>, commandName: string): void;
|
|
487
|
-
registerHandler(command: IConstructor<Command<any>>, handlerConstructor: IConstructor<ICommandHandler<any>>): void;
|
|
488
|
-
getHandlerForCommandName(commandName: string): IConstructor<ICommandHandler<any>> | null;
|
|
489
|
-
getCommandNameForHandler(handlerConstructor: IConstructor<ICommandHandler<any>>): string | null;
|
|
490
|
-
getCommandName(command: IConstructor<Command<any>>): string | null;
|
|
491
|
-
getCommandForCommandName(commandName: string): IConstructor<Command<any>> | null;
|
|
700
|
+
interface IRestControllerMetadata {
|
|
701
|
+
controllerConstructor: IConstructor<any>;
|
|
702
|
+
path: string;
|
|
492
703
|
}
|
|
493
704
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
705
|
+
declare class RestControllerMetadataStore {
|
|
706
|
+
private endPoints;
|
|
707
|
+
private middlewares;
|
|
708
|
+
private restControllers;
|
|
709
|
+
saveControllerMetadata(controllerMetadata: IRestControllerMetadata): void;
|
|
710
|
+
saveEndPointMetadata(endPointMetadata: IEndPointMetadata): void;
|
|
711
|
+
saveMiddlewareMetadata(middlewareMetadata: IMiddlewareMetadata): void;
|
|
712
|
+
getControllerEndPointsInfo(controllerConstructor: IConstructor<any>): {
|
|
713
|
+
middlewares: IMiddlewareMetadata[];
|
|
714
|
+
controller: IRestControllerMetadata;
|
|
715
|
+
method: "get" | "post";
|
|
716
|
+
path?: string;
|
|
717
|
+
controllerConstructor: IConstructor<any>;
|
|
718
|
+
functionName: string;
|
|
719
|
+
paramsTypes: any[];
|
|
720
|
+
}[];
|
|
505
721
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
722
|
+
|
|
723
|
+
declare function runRestControllers(controllers: IConstructor<any>[]): void;
|
|
724
|
+
|
|
725
|
+
declare class Auth<D extends IStorableData> {
|
|
726
|
+
private authInfo;
|
|
727
|
+
require(): D;
|
|
728
|
+
assign(authInfo: D): void;
|
|
511
729
|
}
|
|
512
730
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
731
|
+
declare class SocketServerProvider {
|
|
732
|
+
private httpServerProvider;
|
|
733
|
+
private socketServer;
|
|
734
|
+
private logger;
|
|
735
|
+
constructor(httpServerProvider: HttpServerProvider);
|
|
736
|
+
getSocketServer(): Server$1;
|
|
737
|
+
listen(): void;
|
|
738
|
+
private createSocketServer;
|
|
521
739
|
}
|
|
522
740
|
|
|
523
741
|
type IPgRepositoryConfig<P extends Entity<IEntityData>> = {
|
|
@@ -572,123 +790,65 @@ declare class PgCrudRepository<P extends Entity<IEntityData>> extends PgReposito
|
|
|
572
790
|
discard(item: P): Promise<void>;
|
|
573
791
|
}
|
|
574
792
|
|
|
575
|
-
declare class
|
|
793
|
+
declare class PgJobRepository extends PgCrudRepository<Job> implements IJobRepository {
|
|
576
794
|
constructor(pool: Pool);
|
|
577
795
|
}
|
|
578
796
|
|
|
579
|
-
|
|
580
|
-
jobId: string;
|
|
581
|
-
type: 'created';
|
|
582
|
-
}
|
|
583
|
-
type IJobEventListener = (event: IJobEvent) => void | Promise<void>;
|
|
584
|
-
declare class JobsEventsHub {
|
|
585
|
-
private jobsEventsListener;
|
|
586
|
-
notifyJobCreated(job: Job): void;
|
|
587
|
-
listenJobsEvents(listener: IJobEventListener): void;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
declare class Async {
|
|
591
|
-
private jobRepository;
|
|
592
|
-
private handlerContainer;
|
|
593
|
-
private jobsEventsHub;
|
|
594
|
-
constructor(jobRepository: JobRepository, handlerContainer: CommandMetadataStore, jobsEventsHub: JobsEventsHub);
|
|
595
|
-
run<T extends IStorableData>(command: Command<T>): Promise<Job>;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
declare class JobRunner {
|
|
599
|
-
private jobRepository;
|
|
600
|
-
private handlerContainer;
|
|
601
|
-
constructor(jobRepository: JobRepository, handlerContainer: CommandMetadataStore);
|
|
602
|
-
run(job: Job): Promise<void>;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
declare function runAsyncCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
|
|
606
|
-
|
|
607
|
-
declare class Auth<D extends IStorableData> {
|
|
608
|
-
private authInfo;
|
|
609
|
-
require(): D;
|
|
610
|
-
assign(authInfo: D): void;
|
|
797
|
+
declare class DummyClaudeChatBotAdapter {
|
|
611
798
|
}
|
|
612
799
|
|
|
613
|
-
declare
|
|
614
|
-
|
|
615
|
-
declare class ChatResolver {
|
|
616
|
-
private chatRepository;
|
|
617
|
-
constructor(chatRepository: ChatRepository);
|
|
618
|
-
resolve(connection: IChatConnection): Promise<Chat>;
|
|
619
|
-
private resolveGroupChat;
|
|
620
|
-
private resolvePrivateChat;
|
|
800
|
+
declare class DummyDeepSeekChatBotAdapter {
|
|
621
801
|
}
|
|
622
802
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
803
|
+
declare class OpenaiChatAdapter implements IChatAdapter {
|
|
804
|
+
private openai;
|
|
805
|
+
private logger;
|
|
806
|
+
nextItem(req: IChatAdapterNextItemReq): Promise<IChatItem>;
|
|
807
|
+
private mapChatItems;
|
|
808
|
+
private mapConectionMessage;
|
|
809
|
+
private mapBotMessage;
|
|
810
|
+
private mapFunctionCall;
|
|
811
|
+
private mapTool;
|
|
812
|
+
private mapResponse;
|
|
629
813
|
}
|
|
630
814
|
|
|
631
|
-
declare class
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
815
|
+
declare class PgChatRepository extends PgCrudRepository<Chat> implements IChatRepository {
|
|
816
|
+
constructor(pool: Pool);
|
|
817
|
+
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
818
|
+
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
635
819
|
}
|
|
636
820
|
|
|
637
|
-
|
|
821
|
+
declare class PgChatMemory extends PgCrudRepository<ChatItem> implements IChatMemory {
|
|
822
|
+
private chatId;
|
|
823
|
+
constructor(pool: Pool, chatId: string);
|
|
824
|
+
findLastItems(count: number): Promise<ChatItem[]>;
|
|
638
825
|
}
|
|
639
826
|
|
|
640
|
-
declare
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
827
|
+
declare class RamChatMemory implements IChatMemory {
|
|
828
|
+
private memory;
|
|
829
|
+
findLastItems(count: number): Promise<ChatItem[]>;
|
|
830
|
+
create(item: ChatItem): Promise<void>;
|
|
831
|
+
clearMemory(): Promise<void>;
|
|
644
832
|
}
|
|
645
833
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
834
|
+
declare class RamChatRepository implements IChatRepository {
|
|
835
|
+
private items;
|
|
836
|
+
private memories;
|
|
837
|
+
create(chat: Chat): Promise<void>;
|
|
838
|
+
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
839
|
+
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
840
|
+
private getMemory;
|
|
651
841
|
}
|
|
652
842
|
|
|
653
|
-
declare
|
|
654
|
-
private channels;
|
|
655
|
-
private chatControllers;
|
|
656
|
-
saveChannelMetadata(channelMetadata: IChannelMetadata): void;
|
|
657
|
-
saveChatControllerMetadata(controllerMetadata: IChatControllerMetadata): void;
|
|
658
|
-
getChatControllerMetadata(controllerConstructor: Function): {
|
|
659
|
-
config: IChatControllerMetadata;
|
|
660
|
-
channels: IChannelMetadata[];
|
|
661
|
-
} | null;
|
|
662
|
-
}
|
|
843
|
+
declare function cmd(): (target: object, propertyKey: string | symbol) => void;
|
|
663
844
|
|
|
664
845
|
declare class CmdChannel implements IChatChannel {
|
|
665
|
-
private chatResolver;
|
|
666
|
-
private userResolver;
|
|
667
846
|
private rl;
|
|
668
847
|
private callBack;
|
|
669
|
-
|
|
670
|
-
listen(callback: (message: IReceivedMessage) => void): void;
|
|
848
|
+
listen(callback: (message: IChannelMessage) => void): void;
|
|
671
849
|
connect(): void;
|
|
672
850
|
}
|
|
673
851
|
|
|
674
|
-
declare class HttpServerProvider {
|
|
675
|
-
server: Server | null;
|
|
676
|
-
private listening;
|
|
677
|
-
private logger;
|
|
678
|
-
getHttpServer(): Server;
|
|
679
|
-
listen(): void;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
declare class ExpressProvider {
|
|
683
|
-
private httpServerProvider;
|
|
684
|
-
private expressApp;
|
|
685
|
-
private logger;
|
|
686
|
-
constructor(httpServerProvider: HttpServerProvider);
|
|
687
|
-
getExpress(): Express;
|
|
688
|
-
listen(): void;
|
|
689
|
-
private createExpress;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
852
|
interface ISocketChannelConfig {
|
|
693
853
|
channel: string;
|
|
694
854
|
}
|
|
@@ -700,16 +860,6 @@ declare class SocketChannelConfig implements ISocketChannelConfig {
|
|
|
700
860
|
|
|
701
861
|
declare function socket(config: SocketChannelConfig): (target: object, propertyKey: string | symbol) => void;
|
|
702
862
|
|
|
703
|
-
declare class SocketServerProvider {
|
|
704
|
-
private httpServerProvider;
|
|
705
|
-
private socketServer;
|
|
706
|
-
private logger;
|
|
707
|
-
constructor(httpServerProvider: HttpServerProvider);
|
|
708
|
-
getSocketServer(): Server$1;
|
|
709
|
-
listen(): void;
|
|
710
|
-
private createSocketServer;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
863
|
interface ISocketChannelReceivedMessage {
|
|
714
864
|
chatId: string;
|
|
715
865
|
userId: string;
|
|
@@ -719,12 +869,10 @@ interface ISocketChannelReceivedMessage {
|
|
|
719
869
|
declare class SocketChannel implements IChatChannel {
|
|
720
870
|
private config;
|
|
721
871
|
private socketServerProvider;
|
|
722
|
-
private chatResolver;
|
|
723
|
-
private userResolver;
|
|
724
872
|
private callBack;
|
|
725
873
|
private server;
|
|
726
|
-
constructor(config: SocketChannelConfig, socketServerProvider: SocketServerProvider
|
|
727
|
-
listen(callback: (message:
|
|
874
|
+
constructor(config: SocketChannelConfig, socketServerProvider: SocketServerProvider);
|
|
875
|
+
listen(callback: (message: IChannelMessage) => void): void;
|
|
728
876
|
connect(): void;
|
|
729
877
|
}
|
|
730
878
|
|
|
@@ -740,11 +888,9 @@ declare function telegram(config: ITelegramChannelConfig): (target: object, prop
|
|
|
740
888
|
|
|
741
889
|
declare class TelegramChannel implements IChatChannel {
|
|
742
890
|
private config;
|
|
743
|
-
private chatResolver;
|
|
744
|
-
private userResolver;
|
|
745
891
|
private bot;
|
|
746
|
-
constructor(config: TelegramChannelConfig
|
|
747
|
-
listen(callback: (message:
|
|
892
|
+
constructor(config: TelegramChannelConfig);
|
|
893
|
+
listen(callback: (message: IChannelMessage) => void): void;
|
|
748
894
|
connect(): void;
|
|
749
895
|
}
|
|
750
896
|
|
|
@@ -790,21 +936,6 @@ interface IWhatsAppRepository {
|
|
|
790
936
|
findByBusinessNumber(number: string): Promise<WhatsApp | null>;
|
|
791
937
|
}
|
|
792
938
|
|
|
793
|
-
type IEnvType = 'development' | 'staging' | 'testing' | 'production';
|
|
794
|
-
declare class Env {
|
|
795
|
-
private envType;
|
|
796
|
-
constructor();
|
|
797
|
-
isDevelopment(): boolean;
|
|
798
|
-
isProduction(): boolean;
|
|
799
|
-
isTesting(): boolean;
|
|
800
|
-
requireString(varName: string, options?: {
|
|
801
|
-
default?: string;
|
|
802
|
-
}): string;
|
|
803
|
-
requireNumber(varName: string, options?: {
|
|
804
|
-
default?: number;
|
|
805
|
-
}): number;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
939
|
declare class EnvWhatsAppRepository implements IWhatsAppRepository {
|
|
809
940
|
private env;
|
|
810
941
|
constructor(env: Env);
|
|
@@ -920,19 +1051,7 @@ declare class PgWhatsAppRepository extends PgCrudRepository<WhatsApp> implements
|
|
|
920
1051
|
findByBusinessNumber(number: string): Promise<WhatsApp | null>;
|
|
921
1052
|
}
|
|
922
1053
|
|
|
923
|
-
|
|
924
|
-
private debuggers;
|
|
925
|
-
constructor(name: string);
|
|
926
|
-
trace(...args: any[]): void;
|
|
927
|
-
debug(...args: any[]): void;
|
|
928
|
-
info(...args: any[]): void;
|
|
929
|
-
warn(...args: any[]): void;
|
|
930
|
-
error(...args: any[]): void;
|
|
931
|
-
fatal(...args: any[]): void;
|
|
932
|
-
private log;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
type IWhatsAppMessageListener = (message: IConnectionChatMessage) => Promise<void>;
|
|
1054
|
+
type IWhatsAppMessageListener = (message: Omit<IChannelMessage, 'reply'>) => Promise<void>;
|
|
936
1055
|
interface IListenWhatsAppMessageRequest {
|
|
937
1056
|
to: string;
|
|
938
1057
|
listener: IWhatsAppMessageListener;
|
|
@@ -990,13 +1109,11 @@ declare class WhatsAppSender {
|
|
|
990
1109
|
|
|
991
1110
|
declare class WhatsAppChannel implements IChatChannel {
|
|
992
1111
|
private config;
|
|
993
|
-
private chatResolver;
|
|
994
|
-
private userResolver;
|
|
995
1112
|
private sender;
|
|
996
1113
|
private receiver;
|
|
997
1114
|
private logger;
|
|
998
|
-
constructor(config: WhatsappChannelConfig,
|
|
999
|
-
listen(callback: (message:
|
|
1115
|
+
constructor(config: WhatsappChannelConfig, sender: WhatsAppSender, receiver: WhatsAppReceiver);
|
|
1116
|
+
listen(callback: (message: IChannelMessage) => void): void;
|
|
1000
1117
|
connect(): void;
|
|
1001
1118
|
}
|
|
1002
1119
|
|
|
@@ -1040,21 +1157,13 @@ declare class WhatsAppSenderByDevConnection extends WhatsAppSender {
|
|
|
1040
1157
|
handleGetWhatsAppTemplate(request: IGetWhatsAppTemplateRequest): Promise<IWhatsAppTemplate | null>;
|
|
1041
1158
|
}
|
|
1042
1159
|
|
|
1043
|
-
interface
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
code?: string;
|
|
1047
|
-
httpCode?: number;
|
|
1048
|
-
cause?: Error;
|
|
1049
|
-
info?: any;
|
|
1050
|
-
}
|
|
1051
|
-
declare class CustomError extends Error {
|
|
1052
|
-
humanMessage?: string;
|
|
1053
|
-
code?: string;
|
|
1054
|
-
httpCode?: number;
|
|
1055
|
-
info?: any;
|
|
1056
|
-
constructor(data: ICustomErrorData);
|
|
1160
|
+
interface IHtmlModuleOptions {
|
|
1161
|
+
url: string;
|
|
1162
|
+
title: string;
|
|
1057
1163
|
}
|
|
1164
|
+
declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
1165
|
+
new (): {};
|
|
1166
|
+
};
|
|
1058
1167
|
|
|
1059
1168
|
declare function jwtGuard(): (target: object, propertyKey: string | symbol) => void;
|
|
1060
1169
|
|
|
@@ -1084,10 +1193,6 @@ declare class JwtRefreshToken<A extends IStorableData> extends Entity<IJwtRefres
|
|
|
1084
1193
|
get authInfo(): A;
|
|
1085
1194
|
}
|
|
1086
1195
|
|
|
1087
|
-
declare class Mapper {
|
|
1088
|
-
map<T>(data: any, ctor: IConstructor<T>): T;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1196
|
declare class JwtSigner {
|
|
1092
1197
|
private config;
|
|
1093
1198
|
private mapper;
|
|
@@ -1109,69 +1214,6 @@ declare class Jwt {
|
|
|
1109
1214
|
createToken(): Promise<JwtAccessAndRefreshTokenDto>;
|
|
1110
1215
|
}
|
|
1111
1216
|
|
|
1112
|
-
interface IGetConfig {
|
|
1113
|
-
path?: string;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
declare function get(config?: string | IGetConfig): (target: object, propertyKey: string | symbol) => void;
|
|
1117
|
-
|
|
1118
|
-
interface IMiddleware {
|
|
1119
|
-
handle(req: Request, res: Response, container: DependencyContainer$1): Promise<void>;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
declare function middleware(middlewareConstructor: IConstructor<IMiddleware>): (target: object, propertyKey: string | symbol) => void;
|
|
1123
|
-
|
|
1124
|
-
interface IPostConfig {
|
|
1125
|
-
path?: string;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
declare function post(config?: string | IPostConfig): (target: object, propertyKey: string | symbol) => void;
|
|
1129
|
-
|
|
1130
|
-
interface IRestControllerConfig {
|
|
1131
|
-
path: string;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
declare function restController(config: string | IRestControllerConfig): (target: IConstructor<any>) => void;
|
|
1135
|
-
|
|
1136
|
-
interface IEndPointMetadata {
|
|
1137
|
-
method: 'get' | 'post';
|
|
1138
|
-
path?: string;
|
|
1139
|
-
controllerConstructor: IConstructor<any>;
|
|
1140
|
-
functionName: string;
|
|
1141
|
-
paramsTypes: any[];
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
interface IMiddlewareMetadata {
|
|
1145
|
-
controllerConstructor: IConstructor<any>;
|
|
1146
|
-
functionName: string;
|
|
1147
|
-
middlewareConstructor: IConstructor<IMiddleware>;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
interface IRestControllerMetadata {
|
|
1151
|
-
controllerConstructor: IConstructor<any>;
|
|
1152
|
-
path: string;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
declare class RestControllerMetadataStore {
|
|
1156
|
-
private endPoints;
|
|
1157
|
-
private middlewares;
|
|
1158
|
-
private restControllers;
|
|
1159
|
-
saveControllerMetadata(controllerMetadata: IRestControllerMetadata): void;
|
|
1160
|
-
saveEndPointMetadata(endPointMetadata: IEndPointMetadata): void;
|
|
1161
|
-
saveMiddlewareMetadata(middlewareMetadata: IMiddlewareMetadata): void;
|
|
1162
|
-
getControllerEndPointsInfo(controllerConstructor: IConstructor<any>): {
|
|
1163
|
-
middlewares: IMiddlewareMetadata[];
|
|
1164
|
-
controller: IRestControllerMetadata;
|
|
1165
|
-
method: "get" | "post";
|
|
1166
|
-
path?: string;
|
|
1167
|
-
controllerConstructor: IConstructor<any>;
|
|
1168
|
-
functionName: string;
|
|
1169
|
-
paramsTypes: any[];
|
|
1170
|
-
}[];
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
declare function runRestControllers(controllers: IConstructor<any>[]): void;
|
|
1174
|
-
|
|
1175
1217
|
declare class JwtGuardMiddleware implements IMiddleware {
|
|
1176
1218
|
private config;
|
|
1177
1219
|
private auth;
|
|
@@ -1179,258 +1221,42 @@ declare class JwtGuardMiddleware implements IMiddleware {
|
|
|
1179
1221
|
handle(req: Request, res: Response, container: DependencyContainer$1): Promise<void>;
|
|
1180
1222
|
}
|
|
1181
1223
|
|
|
1182
|
-
declare class SendOneTimePasswordRequest {
|
|
1183
|
-
fromEmail: string;
|
|
1184
|
-
toEmail: string;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
declare class ValidateOneTimePasswordRequest {
|
|
1188
|
-
userEmail: string;
|
|
1189
|
-
otp: string;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
interface ISendEmailRequest {
|
|
1193
|
-
from: string;
|
|
1194
|
-
to: string;
|
|
1195
|
-
subject: string;
|
|
1196
|
-
html: string;
|
|
1197
|
-
}
|
|
1198
|
-
interface IEmailService {
|
|
1199
|
-
sendEmail(request: ISendEmailRequest): Promise<void>;
|
|
1200
|
-
}
|
|
1201
|
-
declare class EmailService implements IEmailService {
|
|
1202
|
-
sendEmail(request: ISendEmailRequest): Promise<void>;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
interface IOtpService {
|
|
1206
|
-
generate(): Promise<string>;
|
|
1207
|
-
}
|
|
1208
|
-
declare class OtpService implements IOtpService {
|
|
1209
|
-
generate(): Promise<string>;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
declare class AuthenticationModule {
|
|
1213
|
-
private userRepository;
|
|
1214
|
-
private emailService;
|
|
1215
|
-
private otpService;
|
|
1216
|
-
private context;
|
|
1217
|
-
constructor(userRepository: UserRepository, emailService: EmailService, otpService: OtpService, context: MessageContext);
|
|
1218
|
-
sendOneTimePassword(request: SendOneTimePasswordRequest): Promise<string>;
|
|
1219
|
-
validateOneTimePassword(request: ValidateOneTimePasswordRequest): Promise<string>;
|
|
1220
|
-
protected generateOtpEmailHtml(otp: string, user: User): Promise<string>;
|
|
1221
|
-
protected generateOtpEmailSubject(): Promise<string>;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
declare class RegisterUserWithEmailRequest {
|
|
1225
|
-
email: string;
|
|
1226
|
-
shortName: string;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
declare class RegisterUserModule {
|
|
1230
|
-
private userRepository;
|
|
1231
|
-
private context;
|
|
1232
|
-
constructor(userRepository: UserRepository, context: MessageContext);
|
|
1233
|
-
registerUserWithEmail(request: RegisterUserWithEmailRequest): Promise<string>;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
interface IHtmlModuleOptions {
|
|
1237
|
-
url: string;
|
|
1238
|
-
title: string;
|
|
1239
|
-
}
|
|
1240
|
-
declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
1241
|
-
new (): {};
|
|
1242
|
-
};
|
|
1243
|
-
|
|
1244
|
-
declare class PgUserRepository extends PgCrudRepository<User> implements IUserRepository {
|
|
1245
|
-
constructor(pool: Pool);
|
|
1246
|
-
findByConnection(query: IUserConnection): Promise<User | null>;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
declare class RamUserRepository implements IUserRepository {
|
|
1250
|
-
private items;
|
|
1251
|
-
create(chat: User): Promise<void>;
|
|
1252
|
-
findByConnection(query: IUserConnection): Promise<User | null>;
|
|
1253
|
-
update(chat: User): Promise<void>;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
declare class PgChatRepository extends PgCrudRepository<Chat> implements IChatRepository {
|
|
1257
|
-
constructor(pool: Pool);
|
|
1258
|
-
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
1259
|
-
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
declare class PgChatMemory extends PgCrudRepository<ChatItem> implements IChatMemory {
|
|
1263
|
-
private chatId;
|
|
1264
|
-
constructor(pool: Pool, chatId: string);
|
|
1265
|
-
findLastItems(count: number): Promise<ChatItem[]>;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
declare class RamChatMemory implements IChatMemory {
|
|
1269
|
-
private memory;
|
|
1270
|
-
findLastItems(count: number): Promise<ChatItem[]>;
|
|
1271
|
-
create(item: ChatItem): Promise<void>;
|
|
1272
|
-
clearMemory(): Promise<void>;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
declare class RamChatRepository implements IChatRepository {
|
|
1276
|
-
private items;
|
|
1277
|
-
private memories;
|
|
1278
|
-
create(chat: Chat): Promise<void>;
|
|
1279
|
-
findByConnection(query: IChatConnection): Promise<Chat | null>;
|
|
1280
|
-
findMemory(chatId: string): Promise<IChatMemory | null>;
|
|
1281
|
-
private getMemory;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
declare class Random {
|
|
1285
|
-
static slug(name: string, options: {
|
|
1286
|
-
randomLength: number;
|
|
1287
|
-
}): string;
|
|
1288
|
-
static string(length: number): string;
|
|
1289
|
-
static numberCode(length: number): string;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
declare function prepareChatContainer(container: DependencyContainer$1, context: IMessageContext, mindsetCtor?: IConstructor<IMindset>): Promise<DependencyContainer$1>;
|
|
1293
|
-
|
|
1294
|
-
interface IrunChannelProps {
|
|
1295
|
-
channel: IConstructor<IChatChannel>;
|
|
1296
|
-
channelConfig?: object;
|
|
1297
|
-
mindset: IConstructor<IMindset>;
|
|
1298
|
-
chatRepository: IConstructor<IChatRepository>;
|
|
1299
|
-
chatBotAdapter: IConstructor<IChatBotAdapter>;
|
|
1300
|
-
}
|
|
1301
|
-
declare function runChannel(props: IrunChannelProps): void;
|
|
1302
|
-
|
|
1303
|
-
interface IServerProvider<T, ST extends T> {
|
|
1304
|
-
replace: IConstructor<T>;
|
|
1305
|
-
with: IConstructor<ST>;
|
|
1306
|
-
singleton?: true;
|
|
1307
|
-
}
|
|
1308
|
-
interface IServerConfig {
|
|
1309
|
-
controllers: IConstructor<any>[];
|
|
1310
|
-
providers?: IServerProvider<unknown, unknown>[];
|
|
1311
|
-
}
|
|
1312
|
-
declare function runServer(config: IServerConfig): void;
|
|
1313
|
-
|
|
1314
1224
|
declare function isBoolean(): (target: object, propertyKey: string | symbol) => void;
|
|
1315
1225
|
|
|
1226
|
+
declare function validateIsBoolean(value: any): IValidationResult<boolean>;
|
|
1227
|
+
|
|
1316
1228
|
declare function isDate(): (target: object, propertyKey: string | symbol) => void;
|
|
1317
1229
|
|
|
1318
|
-
declare function
|
|
1230
|
+
declare function validateIsDate(value: any): IValidationResult<Date>;
|
|
1319
1231
|
|
|
1320
1232
|
declare function isNotEmpty(): (target: object, propertyKey: string | symbol) => void;
|
|
1321
1233
|
|
|
1234
|
+
declare function validateIsNotEmpty(value: any): IValidationResult<any>;
|
|
1235
|
+
|
|
1322
1236
|
declare function isNumber(): (target: object, propertyKey: string | symbol) => void;
|
|
1323
1237
|
|
|
1324
|
-
declare function
|
|
1238
|
+
declare function validateIsNumber(value: any): IValidationResult<number>;
|
|
1325
1239
|
|
|
1326
1240
|
declare function isPresent(): (target: object, propertyKey: string | symbol) => void;
|
|
1327
1241
|
|
|
1242
|
+
declare function validateIsPresent(value: any): IValidationResult<any>;
|
|
1243
|
+
|
|
1328
1244
|
declare function isString(): (target: object, propertyKey: string | symbol) => void;
|
|
1329
1245
|
|
|
1330
|
-
declare function
|
|
1246
|
+
declare function validateIsString(value: any): IValidationResult<string>;
|
|
1331
1247
|
|
|
1332
1248
|
declare function min(limit: any): (target: object, propertyKey: string | symbol) => void;
|
|
1333
1249
|
|
|
1334
|
-
interface
|
|
1335
|
-
|
|
1336
|
-
}
|
|
1337
|
-
interface IModelValidationError extends IValidationError {
|
|
1338
|
-
properties: {
|
|
1339
|
-
[key: string]: string[];
|
|
1340
|
-
};
|
|
1341
|
-
}
|
|
1342
|
-
interface IArrayValidationError extends IValidationError {
|
|
1343
|
-
items: (IValidationError[] | null)[];
|
|
1344
|
-
}
|
|
1345
|
-
type IValidationResult<V> = {
|
|
1346
|
-
value: V;
|
|
1347
|
-
error?: undefined;
|
|
1348
|
-
} | {
|
|
1349
|
-
value?: undefined;
|
|
1350
|
-
error: IValidationError;
|
|
1351
|
-
};
|
|
1352
|
-
type IModelValidationResult<V> = {
|
|
1353
|
-
value: V;
|
|
1354
|
-
error?: undefined;
|
|
1355
|
-
} | {
|
|
1356
|
-
value?: undefined;
|
|
1357
|
-
error: IModelValidationError;
|
|
1358
|
-
};
|
|
1359
|
-
type IArrayValidationResult<V> = {
|
|
1360
|
-
value: V[];
|
|
1361
|
-
error?: undefined;
|
|
1362
|
-
} | {
|
|
1363
|
-
value?: undefined;
|
|
1364
|
-
error: IArrayValidationError;
|
|
1365
|
-
};
|
|
1366
|
-
type IValidator<V = any, O = any> = (value: V, options: O) => IValidationResult<V>;
|
|
1367
|
-
interface IPropertyValidatorInfo {
|
|
1368
|
-
propertyName: string;
|
|
1369
|
-
validator: IValidator;
|
|
1370
|
-
validatorOptions?: any;
|
|
1371
|
-
}
|
|
1372
|
-
type IModelValidatorsInfo<V> = {
|
|
1373
|
-
modelConstructor: IConstructor<V>;
|
|
1374
|
-
properties: {
|
|
1375
|
-
[prop: string]: {
|
|
1376
|
-
isOptional?: boolean;
|
|
1377
|
-
validators?: IPropertyValidatorInfo[];
|
|
1378
|
-
} | undefined;
|
|
1379
|
-
};
|
|
1380
|
-
};
|
|
1381
|
-
|
|
1382
|
-
interface IValidatorMetadata {
|
|
1383
|
-
modelConstructor: IConstructor<any>;
|
|
1384
|
-
propertyName: string;
|
|
1385
|
-
validator: IValidator;
|
|
1386
|
-
validatorOptions?: any;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
declare class ValidationMetadataStore {
|
|
1390
|
-
private validators;
|
|
1391
|
-
saveValidatorMetadata(validatorMetadata: IValidatorMetadata): void;
|
|
1392
|
-
getModelValidatorsInfo<V>(modelConstructor: IConstructor<V>): IModelValidatorsInfo<V>;
|
|
1393
|
-
private getConstructorPropertiesValidatorsInfo;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
interface IValidateArrayOptions {
|
|
1397
|
-
}
|
|
1398
|
-
interface IValidateArrayOptionsWithItemsValidators extends IValidateArrayOptions {
|
|
1399
|
-
itemsValidator?: {
|
|
1400
|
-
validator: IValidator;
|
|
1401
|
-
options: any;
|
|
1402
|
-
}[];
|
|
1250
|
+
interface IValidateMinOptions {
|
|
1251
|
+
limit: any;
|
|
1403
1252
|
}
|
|
1404
|
-
declare function
|
|
1405
|
-
|
|
1406
|
-
declare function isArray(options?: IValidateArrayOptions): (target: object, propertyKey: string | symbol) => void;
|
|
1407
|
-
|
|
1408
|
-
declare function validateIsBoolean(value: any): IValidationResult<boolean>;
|
|
1409
|
-
|
|
1410
|
-
declare function validateIsDate(value: any): IValidationResult<Date>;
|
|
1411
|
-
|
|
1412
|
-
declare function validateIsNotEmpty(value: any): IValidationResult<any>;
|
|
1413
|
-
|
|
1414
|
-
declare function validateIsNumber(value: any): IValidationResult<number>;
|
|
1253
|
+
declare function validateMin(value: any, options: IValidateMinOptions): IValidationResult<any>;
|
|
1415
1254
|
|
|
1416
|
-
declare function
|
|
1255
|
+
declare function max(limit: any): (target: object, propertyKey: string | symbol) => void;
|
|
1417
1256
|
|
|
1418
1257
|
interface IValidateMaxOptions {
|
|
1419
1258
|
limit: any;
|
|
1420
1259
|
}
|
|
1421
1260
|
declare function validateMax(value: any, options: IValidateMaxOptions): IValidationResult<any>;
|
|
1422
1261
|
|
|
1423
|
-
|
|
1424
|
-
limit: any;
|
|
1425
|
-
}
|
|
1426
|
-
declare function validateMin(value: any, options: IValidateMinOptions): IValidationResult<any>;
|
|
1427
|
-
|
|
1428
|
-
declare function validateIsPresent(value: any): IValidationResult<any>;
|
|
1429
|
-
|
|
1430
|
-
declare function validateModel<V>(value: any, info: IModelValidatorsInfo<V>): IModelValidationResult<V>;
|
|
1431
|
-
|
|
1432
|
-
declare function validate<V>(value: any, modelConstructor: IConstructor<V>): IModelValidationResult<V>;
|
|
1433
|
-
|
|
1434
|
-
declare function modelInfo<V>(modelConstructor: IConstructor<V>): IModelValidatorsInfo<V>;
|
|
1435
|
-
|
|
1436
|
-
export { Async, Auth, AuthenticationModule, Chat, ChatBot, ChatBotAdapter, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, ClaudeChatBotAdapter, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatBotAdapter, EmailService, Entity, Env, EnvWhatsAppRepository, ExpressProvider, HtmlModule, HttpServerProvider, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemReq, type IChatBot, type IChatBotAdapter, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatFunctionCall, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatTool, type IChatToolParameter, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConnectionChatMessage, type IConnectionMessageItem, type IConstructor, type ICrudRepository, type ICustomErrorData, type IEmailService, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGetConfig, type IGetWhatsAppTemplateRequest, type IHtmlModuleOptions, type IJobData, type IJobEvent, type IJobEventListener, type IJwtRefreshTokenData, type IListenWhatsAppMessageRequest, type IMessageContext, type IMessageMetadata, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IOtpService, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPostConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRestControllerConfig, type IRestControllerMetadata, type ISendEmailRequest, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type IServerConfig, type IServerProvider, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type IStorableData, type ITelegramChannelConfig, type IUserConnection, type IUserData, type IUserRepository, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppContact, type IWhatsAppData, type IWhatsAppMessage, type IWhatsAppMessageListener, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsAppTemplate, type IWhatsAppTemplateComponent, type IWhatsAppTemplateMessage, type IWhatsAppTemplateParameter, type IWhatsAppTemplateResponse, type IWhatsAppWebhookPayload, type IWhatsappChannelConfig, type IchatControllerConfig, type IrunChannelProps, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, MessageContext, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatAdapter, OpenaiChatBotAdapter, OtpService, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgCrudRepository, PgRepositoryBase, PgUserRepository, PgWhatsAppRepository, RamChatMemory, RamChatRepository, RamUserRepository, Random, RegisterUserModule, RegisterUserWithEmailRequest, RestControllerMetadataStore, SendOneTimePasswordRequest, SocketChannel, SocketChannelConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, User, UserRepository, UserResolver, ValidateOneTimePasswordRequest, ValidationMetadataStore, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByDevConnection, WhatsAppReceiverByWebHook, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByDevConnection, WhatsappChannelConfig, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, get, inject, injectable, isArray, isBoolean, isDate, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, param, post, prepareChatContainer, restController, runAsyncCommandHandlers, runChannel, runRestControllers, runServer, scoped, singleton, socket, telegram, validate, validateArray, validateIsBoolean, validateIsDate, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsapp };
|
|
1262
|
+
export { Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DummyClaudeChatBotAdapter, DummyDeepSeekChatBotAdapter, Entity, Env, EnvWhatsAppRepository, ExpressProvider, HtmlModule, HttpServerProvider, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemReq, 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 IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGetConfig, type IGetWhatsAppTemplateRequest, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IListenWhatsAppMessageRequest, type IMessageContext, type IMessageMetadata, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IParamConfig, type IParamDecoration, type IPersistentData, type IPgRepositoryConfig, type IPostConfig, type IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppContact, type IWhatsAppData, type IWhatsAppMessage, type IWhatsAppMessageListener, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsAppTemplate, type IWhatsAppTemplateComponent, type IWhatsAppTemplateMessage, type IWhatsAppTemplateParameter, type IWhatsAppTemplateResponse, type IWhatsAppWebhookPayload, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatAdapter, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RestControllerMetadataStore, SocketChannel, SocketChannelConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByDevConnection, WhatsAppReceiverByWebHook, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByDevConnection, WhatsappChannelConfig, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, get, inject, injectable, isArray, isBoolean, isDate, isModel, isNotEmpty, isNumber, isOptional, isPresent, isString, jwtGuard, max, middleware, min, mindset, mindsetFunction, mindsetModule, modelInfo, param, post, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, scoped, singleton, socket, telegram, validate, validateArray, validateIsBoolean, validateIsDate, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsString, validateMax, validateMin, validateModel, whatsapp };
|