@wabot-dev/framework 0.8.3 → 0.9.1

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.
Files changed (50) hide show
  1. package/dist/src/addon/async/pg/PgCronJobRepository.js +2 -0
  2. package/dist/src/addon/async/pg/PgJobRepository.js +2 -0
  3. package/dist/src/addon/auth/api-key/@apiKeyGuard.js +2 -2
  4. package/dist/src/addon/auth/api-key/PgApiKeyRepository.js +3 -1
  5. package/dist/src/addon/auth/jwt/@jwtGuard.js +2 -2
  6. package/dist/src/addon/auth/jwt/PgJwtRefreshTokenRepository.js +2 -0
  7. package/dist/src/addon/chat-bot/anthropic/AnthropicChatAdapter.js +38 -14
  8. package/dist/src/addon/chat-bot/deepseek/DeepSeekChatAdapter.js +42 -13
  9. package/dist/src/addon/chat-bot/google/GoogleChatAdapter.js +77 -26
  10. package/dist/src/addon/chat-bot/openia/OpenaiChatAdapter.js +31 -9
  11. package/dist/src/addon/chat-bot/openrouter/OpenRouterChatAdapter.js +23 -4
  12. package/dist/src/addon/chat-bot/pg/PgChatMemory.js +6 -1
  13. package/dist/src/addon/chat-bot/pg/PgChatRepository.js +5 -0
  14. package/dist/src/addon/chat-bot/ram/RamChatRepository.js +3 -0
  15. package/dist/src/addon/chat-bot/wabot/WabotChatAdapter.js +9 -0
  16. package/dist/src/addon/chat-controller/cmd/CmdChannel.js +3 -3
  17. package/dist/src/addon/chat-controller/wasender/WasenderWebhookController.js +1 -1
  18. package/dist/src/addon/chat-controller/whatsapp/PgWhatsAppRepository.js +2 -0
  19. package/dist/src/addon/chat-controller/whatsapp/WhatsAppSender.js +3 -0
  20. package/dist/src/addon/chat-controller/whatsapp/cloud-api/WhatsAppSenderByCloudApi.js +3 -0
  21. package/dist/src/addon/chat-controller/whatsapp/proxy/WhatsAppSenderByWabotProxy.js +3 -0
  22. package/dist/src/core/config/resolver.js +19 -1
  23. package/dist/src/feature/chat-bot/Chat.js +2 -1
  24. package/dist/src/feature/chat-bot/ChatAdapterRegistry.js +26 -0
  25. package/dist/src/feature/chat-bot/ChatBot.js +9 -6
  26. package/dist/src/feature/chat-bot/UnionChatAdapter.js +64 -0
  27. package/dist/src/feature/chat-bot/isChatMessageEmpty.js +1 -1
  28. package/dist/src/feature/chat-bot/isRetryableError.js +63 -0
  29. package/dist/src/feature/chat-bot/metadata/@chatAdapter.js +11 -0
  30. package/dist/src/feature/chat-bot/metadata/ChatAdapterMetadataStore.js +17 -0
  31. package/dist/src/feature/chat-bot/runChatAdapters.js +22 -0
  32. package/dist/src/feature/chat-controller/ChatResolver.js +3 -0
  33. package/dist/src/feature/chat-controller/runChatControllers.js +3 -0
  34. package/dist/src/feature/http/HttpServerProvider.js +1 -1
  35. package/dist/src/feature/mindset/IMindset.js +4 -0
  36. package/dist/src/feature/mindset/MindsetOperator.js +30 -2
  37. package/dist/src/feature/pg/pgStorage.js +1 -1
  38. package/dist/src/feature/pg/query/@pgJsonRepository.js +73 -0
  39. package/dist/src/feature/pg/query/@query.js +14 -0
  40. package/dist/src/feature/pg/query/PgJsonRepository.js +23 -0
  41. package/dist/src/feature/pg/query/PgRepositoryMetadataStore.js +44 -0
  42. package/dist/src/feature/pg/query/buildQuerySql.js +164 -0
  43. package/dist/src/feature/pg/query/parseQueryMethodName.js +151 -0
  44. package/dist/src/feature/pg/withPgClient.js +1 -1
  45. package/dist/src/feature/rest-controller/runRestControllers.js +2 -2
  46. package/dist/src/index.d.ts +147 -27
  47. package/dist/src/index.js +15 -4
  48. package/dist/src/node_modules/cron-parser/dist/CronFileParser.js +2 -2
  49. package/package.json +1 -1
  50. package/dist/src/core/config/decorators.js +0 -22
@@ -0,0 +1,164 @@
1
+ // Fields stored as top-level columns; routed to the column instead of
2
+ // extracting from the JSON blob (uses the index, preserves native type
3
+ // for ordering/comparison). All other fields fall back to data->>'field',
4
+ // which yields TEXT — so ORDER BY on numeric JSON fields is lexicographic
5
+ // and In/NotIn compares as text. Use add.columns for sortable hot paths.
6
+ const RESERVED_COLUMN_BY_FIELD = {
7
+ id: 'id',
8
+ createdAt: 'created_at',
9
+ };
10
+ function operatorArity(op) {
11
+ if (op === 'IsNull' || op === 'IsNotNull')
12
+ return 0;
13
+ return 1;
14
+ }
15
+ function escapeJsonKey(field) {
16
+ return field.replace(/'/g, "''");
17
+ }
18
+ function isReservedColumn(field) {
19
+ return Object.prototype.hasOwnProperty.call(RESERVED_COLUMN_BY_FIELD, field);
20
+ }
21
+ function fieldRef(field) {
22
+ const reserved = RESERVED_COLUMN_BY_FIELD[field];
23
+ if (reserved)
24
+ return reserved;
25
+ return `data->>'${escapeJsonKey(field)}'`;
26
+ }
27
+ function fieldExpr(field, op) {
28
+ const ref = fieldRef(field);
29
+ if (op === 'Gt' || op === 'Gte' || op === 'Lt' || op === 'Lte') {
30
+ if (isReservedColumn(field))
31
+ return ref;
32
+ return `(${ref})::numeric`;
33
+ }
34
+ return ref;
35
+ }
36
+ function renderCondition(cond, paramIndex) {
37
+ const lhs = fieldExpr(cond.field, cond.operator);
38
+ const reserved = isReservedColumn(cond.field);
39
+ const numCast = reserved ? '' : '::numeric';
40
+ // Note: In/NotIn cast the param to text[]; passing non-text JSON values
41
+ // (numbers, booleans) relies on pg's TEXT serialization. For sortable
42
+ // numeric fields, prefer a typed add.columns column.
43
+ const arrCast = reserved ? '' : '::text[]';
44
+ switch (cond.operator) {
45
+ case 'Equals':
46
+ return `${lhs} = $${paramIndex}`;
47
+ case 'Not':
48
+ return `${lhs} <> $${paramIndex}`;
49
+ case 'Like':
50
+ return `${lhs} LIKE $${paramIndex}`;
51
+ case 'NotLike':
52
+ return `${lhs} NOT LIKE $${paramIndex}`;
53
+ case 'In':
54
+ return `${lhs} = ANY($${paramIndex}${arrCast})`;
55
+ case 'NotIn':
56
+ return `NOT (${lhs} = ANY($${paramIndex}${arrCast}))`;
57
+ case 'Gt':
58
+ return `${lhs} > $${paramIndex}${numCast}`;
59
+ case 'Gte':
60
+ return `${lhs} >= $${paramIndex}${numCast}`;
61
+ case 'Lt':
62
+ return `${lhs} < $${paramIndex}${numCast}`;
63
+ case 'Lte':
64
+ return `${lhs} <= $${paramIndex}${numCast}`;
65
+ // IS NULL matches both missing JSON keys and explicit JSON nulls
66
+ // (PostgreSQL `data->>'k'` returns NULL for both cases).
67
+ case 'IsNull':
68
+ return `${lhs} IS NULL`;
69
+ case 'IsNotNull':
70
+ return `${lhs} IS NOT NULL`;
71
+ }
72
+ }
73
+ function renderWhere(conditions) {
74
+ if (conditions.length === 0)
75
+ return { sql: '', argCount: 0 };
76
+ const parts = [];
77
+ let paramIndex = 1;
78
+ conditions.forEach((cond, i) => {
79
+ const piece = renderCondition(cond, paramIndex);
80
+ paramIndex += operatorArity(cond.operator);
81
+ if (i === 0) {
82
+ parts.push(piece);
83
+ }
84
+ else {
85
+ parts.push((cond.connector ?? 'And').toUpperCase(), piece);
86
+ }
87
+ });
88
+ return { sql: ` WHERE ${parts.join(' ')}`, argCount: paramIndex - 1 };
89
+ }
90
+ function renderOrderBy(ast) {
91
+ if (ast.orderBy.length === 0)
92
+ return '';
93
+ const parts = ast.orderBy.map((o) => `${fieldRef(o.field)} ${o.direction}`);
94
+ return ` ORDER BY ${parts.join(', ')}`;
95
+ }
96
+ function renderLimit(ast) {
97
+ if (ast.prefix === 'findOne')
98
+ return ' LIMIT 1';
99
+ if (ast.limit !== undefined)
100
+ return ` LIMIT ${ast.limit}`;
101
+ return '';
102
+ }
103
+ function buildSelectSql(ast, table, columns) {
104
+ const where = renderWhere(ast.conditions);
105
+ const order = renderOrderBy(ast);
106
+ const limit = renderLimit(ast);
107
+ const sql = `SELECT ${columns} FROM ${table}${where.sql}${order}${limit}`;
108
+ return { sql, argCount: where.argCount };
109
+ }
110
+ function buildCountSql(ast, table) {
111
+ const where = renderWhere(ast.conditions);
112
+ const sql = `SELECT COUNT(*)::int AS count FROM ${table}${where.sql}`;
113
+ return { sql, argCount: where.argCount };
114
+ }
115
+ function buildExistsSql(ast, table) {
116
+ const where = renderWhere(ast.conditions);
117
+ const sql = `SELECT EXISTS(SELECT 1 FROM ${table}${where.sql} LIMIT 1) AS "exists"`;
118
+ return { sql, argCount: where.argCount };
119
+ }
120
+ function buildDeleteSql(ast, table) {
121
+ const where = renderWhere(ast.conditions);
122
+ const sql = `DELETE FROM ${table}${where.sql}`;
123
+ return { sql, argCount: where.argCount };
124
+ }
125
+ function buildQuerySql(ast, table, columns) {
126
+ let sql;
127
+ let argCount;
128
+ switch (ast.prefix) {
129
+ case 'find':
130
+ case 'findOne': {
131
+ const r = buildSelectSql(ast, table, columns);
132
+ sql = r.sql;
133
+ argCount = r.argCount;
134
+ break;
135
+ }
136
+ case 'count': {
137
+ const r = buildCountSql(ast, table);
138
+ sql = r.sql;
139
+ argCount = r.argCount;
140
+ break;
141
+ }
142
+ case 'exists': {
143
+ const r = buildExistsSql(ast, table);
144
+ sql = r.sql;
145
+ argCount = r.argCount;
146
+ break;
147
+ }
148
+ case 'delete': {
149
+ const r = buildDeleteSql(ast, table);
150
+ sql = r.sql;
151
+ argCount = r.argCount;
152
+ break;
153
+ }
154
+ }
155
+ const buildParams = (args) => {
156
+ if (args.length !== argCount) {
157
+ throw new Error(`Query expected ${argCount} argument(s), received ${args.length}`);
158
+ }
159
+ return args;
160
+ };
161
+ return { sql, argCount, buildParams };
162
+ }
163
+
164
+ export { buildQuerySql };
@@ -0,0 +1,151 @@
1
+ const PREFIXES = ['findOne', 'find', 'count', 'exists', 'delete'];
2
+ const OPERATOR_MATCHERS = [
3
+ { tokens: ['Greater', 'Than', 'Equal'], op: 'Gte' },
4
+ { tokens: ['Less', 'Than', 'Equal'], op: 'Lte' },
5
+ { tokens: ['Greater', 'Than'], op: 'Gt' },
6
+ { tokens: ['Less', 'Than'], op: 'Lt' },
7
+ { tokens: ['Is', 'Not', 'Null'], op: 'IsNotNull' },
8
+ { tokens: ['Is', 'Null'], op: 'IsNull' },
9
+ { tokens: ['Not', 'Like'], op: 'NotLike' },
10
+ { tokens: ['Not', 'In'], op: 'NotIn' },
11
+ { tokens: ['Like'], op: 'Like' },
12
+ { tokens: ['In'], op: 'In' },
13
+ { tokens: ['Not'], op: 'Not' },
14
+ { tokens: ['Gte'], op: 'Gte' },
15
+ { tokens: ['Lte'], op: 'Lte' },
16
+ { tokens: ['Gt'], op: 'Gt' },
17
+ { tokens: ['Lt'], op: 'Lt' },
18
+ ];
19
+ const CONNECTOR_TOKENS = new Set(['And', 'Or']);
20
+ const FIELD_NAME_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
21
+ function splitCamelCase(s) {
22
+ return s.match(/[A-Z][a-z0-9]*/g) ?? [];
23
+ }
24
+ function tokensToFieldName(tokens) {
25
+ if (tokens.length === 0) {
26
+ throw new Error('Query method: missing field name');
27
+ }
28
+ const joined = tokens.join('');
29
+ const field = joined.charAt(0).toLowerCase() + joined.slice(1);
30
+ if (!FIELD_NAME_REGEX.test(field)) {
31
+ throw new Error(`Query method: invalid field name "${field}"`);
32
+ }
33
+ return field;
34
+ }
35
+ function matchPrefix(name) {
36
+ for (const prefix of PREFIXES) {
37
+ if (name.startsWith(prefix)) {
38
+ const next = name.charAt(prefix.length);
39
+ if (next === '' || (next >= 'A' && next <= 'Z')) {
40
+ return { prefix, rest: name.slice(prefix.length) };
41
+ }
42
+ }
43
+ }
44
+ throw new Error(`Query method "${name}" must start with one of: ${PREFIXES.join(', ')}`);
45
+ }
46
+ function parseConditionTokens(tokens) {
47
+ for (const matcher of OPERATOR_MATCHERS) {
48
+ if (tokens.length < matcher.tokens.length)
49
+ continue;
50
+ const tail = tokens.slice(tokens.length - matcher.tokens.length);
51
+ if (tail.every((t, i) => t === matcher.tokens[i])) {
52
+ const head = tokens.slice(0, tokens.length - matcher.tokens.length);
53
+ return { field: tokensToFieldName(head), operator: matcher.op };
54
+ }
55
+ }
56
+ return { field: tokensToFieldName(tokens), operator: 'Equals' };
57
+ }
58
+ function parseConditions(body) {
59
+ if (body === '')
60
+ return [];
61
+ const tokens = splitCamelCase(body);
62
+ if (tokens.length === 0)
63
+ return [];
64
+ if (CONNECTOR_TOKENS.has(tokens[0])) {
65
+ throw new Error(`Query method: condition cannot start with connector "${tokens[0]}"`);
66
+ }
67
+ const conditions = [];
68
+ let buffer = [];
69
+ let pendingConnector;
70
+ const flush = () => {
71
+ if (buffer.length === 0) {
72
+ throw new Error('Query method: empty condition between connectors');
73
+ }
74
+ const { field, operator } = parseConditionTokens(buffer);
75
+ conditions.push({ field, operator, connector: pendingConnector });
76
+ buffer = [];
77
+ };
78
+ for (const token of tokens) {
79
+ if (CONNECTOR_TOKENS.has(token) && buffer.length > 0) {
80
+ flush();
81
+ pendingConnector = token;
82
+ }
83
+ else {
84
+ buffer.push(token);
85
+ }
86
+ }
87
+ flush();
88
+ return conditions;
89
+ }
90
+ function parseOrderBy(body) {
91
+ const tokens = splitCamelCase(body);
92
+ const result = [];
93
+ let buffer = [];
94
+ for (const token of tokens) {
95
+ if (token === 'Asc' || token === 'Desc') {
96
+ if (buffer.length === 0) {
97
+ throw new Error('Query method: OrderBy direction without field');
98
+ }
99
+ result.push({
100
+ field: tokensToFieldName(buffer),
101
+ direction: token === 'Asc' ? 'ASC' : 'DESC',
102
+ });
103
+ buffer = [];
104
+ }
105
+ else {
106
+ buffer.push(token);
107
+ }
108
+ }
109
+ if (buffer.length > 0) {
110
+ throw new Error(`Query method: OrderBy field "${tokensToFieldName(buffer)}" missing Asc/Desc direction`);
111
+ }
112
+ if (result.length === 0) {
113
+ throw new Error('Query method: OrderBy clause has no fields');
114
+ }
115
+ return result;
116
+ }
117
+ // Conditions are joined left-to-right; the DSL has no parentheses,
118
+ // so SQL precedence applies (AND binds tighter than OR). Group with
119
+ // explicit method names if the implicit precedence is not what you want.
120
+ function parseQueryMethodName(name) {
121
+ const { prefix, rest: afterPrefix } = matchPrefix(name);
122
+ let rest = afterPrefix;
123
+ let limit;
124
+ const limitMatch = rest.match(/Limit(\d+)$/);
125
+ if (limitMatch) {
126
+ if (prefix === 'findOne') {
127
+ throw new Error(`Query method "${name}": findOne implies LIMIT 1; remove the Limit suffix`);
128
+ }
129
+ limit = parseInt(limitMatch[1], 10);
130
+ rest = rest.slice(0, rest.length - limitMatch[0].length);
131
+ }
132
+ let orderBy = [];
133
+ const orderByIdx = rest.indexOf('OrderBy');
134
+ if (orderByIdx >= 0) {
135
+ orderBy = parseOrderBy(rest.slice(orderByIdx + 'OrderBy'.length));
136
+ rest = rest.slice(0, orderByIdx);
137
+ }
138
+ let conditions = [];
139
+ if (rest === '' || rest === 'All') {
140
+ conditions = [];
141
+ }
142
+ else if (rest.startsWith('By')) {
143
+ conditions = parseConditions(rest.slice(2));
144
+ }
145
+ else {
146
+ throw new Error(`Query method "${name}": expected "By<...>" or "All" after prefix, got "${rest}"`);
147
+ }
148
+ return { prefix, conditions, orderBy, limit };
149
+ }
150
+
151
+ export { parseQueryMethodName };
@@ -1,4 +1,4 @@
1
- import { AsyncLocalStorage } from 'async_hooks';
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
2
 
3
3
  // Async-local storage for clients per pool
4
4
  const pgStorage = new AsyncLocalStorage();
@@ -6,11 +6,11 @@ import { validateModel } from '../../core/validation/core/validateModel.js';
6
6
  import { ValidationMetadataStore } from '../../core/validation/metadata/ValidationMetadataStore.js';
7
7
  import { ExpressProvider } from '../express/ExpressProvider.js';
8
8
  import { json, urlencoded } from 'express';
9
- import path__default from 'path';
9
+ import path__default from 'node:path';
10
10
  import { EXPRESS_REQ, EXPRESS_RES } from './injection-tokens.js';
11
11
  import { RestControllerMetadataStore } from './metadata/RestControllerMetadataStore.js';
12
12
  import { RestRequest } from './RestRequest.js';
13
- import { IncomingMessage } from 'http';
13
+ import { IncomingMessage } from 'node:http';
14
14
  import { Container } from '../../core/injection/Container.js';
15
15
 
16
16
  function buildRequest(req) {
@@ -4,11 +4,11 @@ export { DependencyContainer } from 'tsyringe';
4
4
  import InjectionToken from 'tsyringe/dist/typings/providers/injection-token';
5
5
  import DependencyContainer, { PreResolutionInterceptorCallback, PostResolutionInterceptorCallback } from 'tsyringe/dist/typings/types/dependency-container';
6
6
  import InterceptionOptions from 'tsyringe/dist/typings/types/interceptor-options';
7
- import { Server, IncomingMessage } from 'http';
7
+ import { Server, IncomingMessage } from 'node:http';
8
8
  import { Express, Request, Response } from 'express';
9
9
  import * as big_js from 'big.js';
10
10
  import { Pool, PoolClient } from 'pg';
11
- import { AsyncLocalStorage } from 'async_hooks';
11
+ import { AsyncLocalStorage } from 'node:async_hooks';
12
12
  import { Server as Server$1, Socket } from 'socket.io';
13
13
  import { Algorithm } from 'jsonwebtoken';
14
14
  import { Socket as Socket$1 } from 'socket.io-client';
@@ -32,21 +32,26 @@ declare class Auth<D> {
32
32
  }
33
33
 
34
34
  type ConfigReferenceType = 'string' | 'number' | 'boolean' | 'object' | 'string-array' | 'number-array' | 'boolean-array';
35
- interface ConfigReference {
35
+ interface ConfigReference<TResolved = unknown> {
36
36
  type: ConfigReferenceType;
37
37
  path: string;
38
38
  default?: string;
39
39
  __isConfigReference: true;
40
+ __resolvedType?: TResolved;
40
41
  }
41
42
 
42
- declare function str(strings: TemplateStringsArray): ConfigReference;
43
- declare function num(strings: TemplateStringsArray): ConfigReference;
44
- declare function bool(strings: TemplateStringsArray): ConfigReference;
45
- declare function obj(strings: TemplateStringsArray): ConfigReference;
46
- declare function strArr(strings: TemplateStringsArray): ConfigReference;
47
- declare function numArr(strings: TemplateStringsArray): ConfigReference;
48
- declare function boolArr(strings: TemplateStringsArray): ConfigReference;
43
+ declare function str(strings: TemplateStringsArray): ConfigReference<string>;
44
+ declare function num(strings: TemplateStringsArray): ConfigReference<number>;
45
+ declare function bool(strings: TemplateStringsArray): ConfigReference<boolean>;
46
+ declare function obj<T = unknown>(strings: TemplateStringsArray): ConfigReference<T>;
47
+ declare function strArr(strings: TemplateStringsArray): ConfigReference<string[]>;
48
+ declare function numArr(strings: TemplateStringsArray): ConfigReference<number[]>;
49
+ declare function boolArr(strings: TemplateStringsArray): ConfigReference<boolean[]>;
49
50
 
51
+ type ResolvedConfig<T> = {
52
+ [K in keyof T]: T[K] extends ConfigReference<infer R> ? R : T[K];
53
+ };
54
+ declare function resolveConfigReferences<T extends Record<string, any>>(config: T): ResolvedConfig<T>;
50
55
  declare class ConfigResolver {
51
56
  static resolve(reference: ConfigReference): unknown;
52
57
  private static loadFromEnv;
@@ -55,8 +60,6 @@ declare class ConfigResolver {
55
60
  private static parseArrayItems;
56
61
  }
57
62
 
58
- declare function resolveConfigReferences<T extends Record<string, any>>(config: T): T;
59
-
60
63
  interface ILockKey {
61
64
  run<T>(fn: () => Promise<T>): Promise<T>;
62
65
  tryRun<T>(fn: () => Promise<T>): Promise<T | undefined>;
@@ -724,17 +727,34 @@ interface IMindsetIdentity {
724
727
  personality?: string;
725
728
  emotions?: string;
726
729
  }
730
+ /** @deprecated use {@link IMindsetModelRef} */
727
731
  interface IMindsetLlm {
728
732
  provider?: string;
729
733
  model: string;
730
734
  }
735
+ interface IMindsetModelRef {
736
+ provider?: string;
737
+ model: string;
738
+ }
739
+ type IMindsetModelKind = 'llm' | 'visionLlm' | 'audioLlm' | 'speechToText' | 'textToSpeech' | 'imageGen' | 'embedding';
740
+ interface IMindsetModels {
741
+ llm?: IMindsetModelRef[];
742
+ visionLlm?: IMindsetModelRef[];
743
+ audioLlm?: IMindsetModelRef[];
744
+ speechToText?: IMindsetModelRef[];
745
+ textToSpeech?: IMindsetModelRef[];
746
+ imageGen?: IMindsetModelRef[];
747
+ embedding?: IMindsetModelRef[];
748
+ }
731
749
  interface IMindset {
732
750
  context(): Promise<string>;
733
751
  identity(): Promise<IMindsetIdentity>;
734
752
  skills(): Promise<string>;
735
753
  limits(): Promise<string>;
736
754
  workflow(): Promise<string>;
737
- llms(): Promise<IMindsetLlm[]>;
755
+ models?(): Promise<IMindsetModels>;
756
+ /** @deprecated implement {@link IMindset.models} instead */
757
+ llms?(): Promise<IMindsetLlm[]>;
738
758
  }
739
759
  declare class Mindset implements IMindset {
740
760
  context(): Promise<string>;
@@ -742,7 +762,9 @@ declare class Mindset implements IMindset {
742
762
  skills(): Promise<string>;
743
763
  limits(): Promise<string>;
744
764
  workflow(): Promise<string>;
745
- llms(): Promise<IMindsetLlm[]>;
765
+ models?(): Promise<IMindsetModels>;
766
+ /** @deprecated implement {@link Mindset.models} instead */
767
+ llms?(): Promise<IMindsetLlm[]>;
746
768
  }
747
769
 
748
770
  interface IMindsetConfig {
@@ -842,7 +864,10 @@ declare class MindsetOperator implements IMindset {
842
864
  skills(): Promise<string>;
843
865
  limits(): Promise<string>;
844
866
  workflow(): Promise<string>;
867
+ /** @deprecated use {@link MindsetOperator.models} */
845
868
  llms(): Promise<IMindsetLlm[]>;
869
+ models(): Promise<IMindsetModels>;
870
+ resolveModels(kind: IMindsetModelKind): Promise<IMindsetModelRef[]>;
846
871
  systemPrompt(): Promise<string>;
847
872
  tools(): IMindsetTool[];
848
873
  protected paramDescription(rawDescription: string, rawType: string): string;
@@ -887,6 +912,7 @@ interface IFunctionCall {
887
912
  name: string;
888
913
  arguments?: string;
889
914
  result?: string;
915
+ signature?: string;
890
916
  }
891
917
 
892
918
  declare const chatItemTypeOptions: readonly ["botMessage", "humanMessage", "functionCall"];
@@ -914,10 +940,15 @@ type IChatItemType = (typeof chatItemTypeOptions)[number];
914
940
  interface ILanguageModelUsage {
915
941
  inputTokens: number;
916
942
  outputTokens: number;
943
+ cacheReadTokens?: number;
944
+ cacheWriteTokens?: number;
945
+ costUsd?: number;
946
+ provider?: string;
947
+ model?: string;
917
948
  }
918
949
 
919
950
  interface IChatAdapterNextItemsReq {
920
- model: string;
951
+ models: IMindsetModelRef[];
921
952
  systemPrompt: string;
922
953
  tools: IMindsetTool[];
923
954
  prevItems: IChatItem[];
@@ -931,9 +962,16 @@ interface IChatAdapter {
931
962
  }
932
963
 
933
964
  declare class ChatAdapter implements IChatAdapter {
934
- nextItems(req: IChatAdapterNextItemsReq & {
935
- provider?: string;
936
- }): Promise<IChatAdapterNextItemsRes>;
965
+ nextItems(req: IChatAdapterNextItemsReq): Promise<IChatAdapterNextItemsRes>;
966
+ }
967
+
968
+ declare class ChatAdapterRegistry {
969
+ private adapters;
970
+ private order;
971
+ register(provider: string, adapter: IChatAdapter): void;
972
+ get(provider: string): IChatAdapter | undefined;
973
+ defaultProvider(): string | undefined;
974
+ size(): number;
937
975
  }
938
976
 
939
977
  type IChatItemData = IEntityData & IChatItem;
@@ -1001,8 +1039,47 @@ declare class ChatOperator {
1001
1039
  removeAssociation(association: IChatAssociation): Promise<void>;
1002
1040
  }
1003
1041
 
1042
+ declare class UnionChatAdapter implements IChatAdapter {
1043
+ private registry;
1044
+ private logger;
1045
+ constructor(registry: ChatAdapterRegistry);
1046
+ nextItems(req: IChatAdapterNextItemsReq): Promise<IChatAdapterNextItemsRes>;
1047
+ private groupByProvider;
1048
+ }
1049
+
1050
+ interface IExtractChatMessageTextOptions {
1051
+ supportedImageMimeTypes?: readonly string[];
1052
+ supportedDocumentMimeTypes?: readonly string[];
1053
+ }
1054
+ declare function extractChatMessageText(message: IChatMessage, options?: IExtractChatMessageTextOptions): string;
1055
+
1056
+ declare function isChatMessageEmpty(message: IChatMessage): boolean;
1057
+
1058
+ /**
1059
+ * Returns true when an error from a chat adapter is worth retrying with another
1060
+ * model or another adapter (transient/availability issues), false when retrying
1061
+ * would just propagate the same configuration problem (auth, validation).
1062
+ */
1063
+ declare function isRetryableError(err: unknown): boolean;
1064
+
1065
+ interface IChatAdapterDecoratorConfig {
1066
+ provider: string;
1067
+ }
1068
+ declare function chatAdapter(config: IChatAdapterDecoratorConfig): (target: IConstructor<IChatAdapter>) => void;
1069
+
1004
1070
  declare function chatBot(mindset: IConstructor<IMindset>): (target: object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
1005
1071
 
1072
+ interface IChatAdapterMetadata {
1073
+ constructor: IConstructor<IChatAdapter>;
1074
+ provider: string;
1075
+ }
1076
+
1077
+ declare class ChatAdapterMetadataStore {
1078
+ private adapters;
1079
+ save(metadata: IChatAdapterMetadata): void;
1080
+ get(ctor: IConstructor<IChatAdapter>): IChatAdapterMetadata | undefined;
1081
+ }
1082
+
1006
1083
  interface IChatBotMetadata {
1007
1084
  constructor: IConstructor<any>;
1008
1085
  mindsetConstructor: IConstructor<IMindset>;
@@ -1015,15 +1092,9 @@ declare class ChatBotMetadataStore {
1015
1092
  getChatBotsMetadata(): IChatBotMetadata[];
1016
1093
  }
1017
1094
 
1018
- declare function safeJsonParse<T = unknown>(json: string | undefined | null, context?: string): T;
1095
+ declare function runChatAdapters(adapters: IConstructor<IChatAdapter>[]): void;
1019
1096
 
1020
- interface IExtractChatMessageTextOptions {
1021
- supportedImageMimeTypes?: readonly string[];
1022
- supportedDocumentMimeTypes?: readonly string[];
1023
- }
1024
- declare function extractChatMessageText(message: IChatMessage, options?: IExtractChatMessageTextOptions): string;
1025
-
1026
- declare function isChatMessageEmpty(message: IChatMessage): boolean;
1097
+ declare function safeJsonParse<T = unknown>(json: string | undefined | null, context?: string): T;
1027
1098
 
1028
1099
  interface IchatControllerConfig {
1029
1100
  }
@@ -1206,6 +1277,55 @@ declare const pgStorage: AsyncLocalStorage<ClientMap>;
1206
1277
  */
1207
1278
  declare function getClientMap(): ClientMap;
1208
1279
 
1280
+ declare function pgJsonRepository<P extends Entity<IEntityData>>(config: IPgRepositoryConfig<P>): (target: IConstructor<any>) => void;
1281
+
1282
+ declare function query(): (target: object, propertyKey: string | symbol) => void;
1283
+
1284
+ declare class PgJsonRepository<P extends Entity<IEntityData>> extends PgCrudRepository<P> {
1285
+ constructor(pool: Pool);
1286
+ }
1287
+
1288
+ interface IQueryMethodMetadata {
1289
+ repositoryConstructor: IConstructor<any>;
1290
+ functionName: string;
1291
+ }
1292
+ declare class PgRepositoryMetadataStore {
1293
+ private queryMethods;
1294
+ private repositoryConfigs;
1295
+ saveQueryMethodMetadata(metadata: IQueryMethodMetadata): void;
1296
+ saveRepositoryConfig<P extends Entity<IEntityData>>(ctor: IConstructor<any>, config: IPgRepositoryConfig<P>): void;
1297
+ getRepositoryConfig(ctor: IConstructor<any>): IPgRepositoryConfig<any> | undefined;
1298
+ getQueryMethods(ctor: IConstructor<any>): IQueryMethodMetadata[];
1299
+ }
1300
+
1301
+ type QueryPrefix = 'find' | 'findOne' | 'count' | 'exists' | 'delete';
1302
+ type QueryOperator = 'Equals' | 'Not' | 'Like' | 'NotLike' | 'In' | 'NotIn' | 'Gt' | 'Gte' | 'Lt' | 'Lte' | 'IsNull' | 'IsNotNull';
1303
+ type QueryConnector = 'And' | 'Or';
1304
+ interface IQueryCondition {
1305
+ field: string;
1306
+ operator: QueryOperator;
1307
+ connector?: QueryConnector;
1308
+ }
1309
+ interface IQueryOrderBy {
1310
+ field: string;
1311
+ direction: 'ASC' | 'DESC';
1312
+ }
1313
+ interface IQueryAst {
1314
+ prefix: QueryPrefix;
1315
+ conditions: IQueryCondition[];
1316
+ orderBy: IQueryOrderBy[];
1317
+ limit?: number;
1318
+ }
1319
+
1320
+ interface IBuiltQuery {
1321
+ sql: string;
1322
+ argCount: number;
1323
+ buildParams: (args: any[]) => any[];
1324
+ }
1325
+ declare function buildQuerySql(ast: IQueryAst, table: string, columns: string): IBuiltQuery;
1326
+
1327
+ declare function parseQueryMethodName(name: string): IQueryAst;
1328
+
1209
1329
  /**
1210
1330
  * Runs a function with a shared Postgres client for the given pool.
1211
1331
  * Reuses the client if already present in the async context.
@@ -2256,4 +2376,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
2256
2376
  new (): {};
2257
2377
  };
2258
2378
 
2259
- export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatOperator, ChatRepository, ChatResolver, type ClientMap, CmdChannel, type ConfigReference, type ConfigReferenceType, ConfigResolver, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, type ErrorSeverity, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatAssociation, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatMessageDocument, type IChatMessageFile, type IChatMessageImage, type IChatMessagesPrivateFile, type IChatMessagesPublicFile, type IChatRepository, type IChatType, type ICmdChannelMessage, type ICmdReceivedMessage, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICronJobData, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IErrorHandlersConfig, type IErrorMonitor, type IErrorMonitorContext, type IExtractChatMessageTextOptions, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type ILockerKey, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type IScheduleAt, type IScheduleDelay, type ISendByWasenderRequest, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelMessage, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type ISocketReceivedMessage, type IStorableData, type ITelegramChannelConfig, type ITelegramChannelMessage, type ITelegramReceivedMessage, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWasenderChannelMessageListener, type IWasenderDeviceListMetadata, type IWasenderEvent, type IWasenderMessageContent, type IWasenderMessageContextInfo, type IWasenderMessageKey, type IWasenderMessageReceivedData, type IWasenderMessageReceivedEvent, type IWasenderQrUpdatedEvent, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppByWasenderChannelConfig, type IWhatsAppByWasenderReceivedMessage, type IWhatsAppChannelMessage, 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 IWhatsAppReceivedMessage, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenRouterChatAdapter, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCronJobRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelMessageFile, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WasenderWebhookController, WhatsApp, WhatsAppByWasenderChannel, WhatsAppByWasenderChannelConfig, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppReceiverByWasender, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppSenderByWasender, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, bool, boolArr, chatBot, chatController, chatItemTypeOptions, cmd, cmdChannelName, command, commandHandler, container, cron, description, errorToPlainObject, extractChatMessageText, extractNumberFromWasenderMessageKey, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isChatMessageEmpty, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, num, numArr, obj, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, resolveConfigReferences, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, safeJsonParse, scoped, setupErrorHandlers, singleton, socket, socketChannelName, socketController, stopCommandHandlers, stopCronHandlers, str, strArr, telegram, telegramChannelName, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, whatsAppByWasender, whatsAppByWasenderChannelName, whatsAppChannelName, withPgClient, withPgTransaction, writeJsonToFile };
2379
+ export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatAdapterMetadataStore, ChatAdapterRegistry, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatOperator, ChatRepository, ChatResolver, type ClientMap, CmdChannel, type ConfigReference, type ConfigReferenceType, ConfigResolver, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, type ErrorSeverity, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IBuiltQuery, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterDecoratorConfig, type IChatAdapterMetadata, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatAssociation, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatMessageDocument, type IChatMessageFile, type IChatMessageImage, type IChatMessagesPrivateFile, type IChatMessagesPublicFile, type IChatRepository, type IChatType, type ICmdChannelMessage, type ICmdReceivedMessage, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICronJobData, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IErrorHandlersConfig, type IErrorMonitor, type IErrorMonitorContext, type IExtractChatMessageTextOptions, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type ILockerKey, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModelKind, type IMindsetModelRef, type IMindsetModels, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IQueryAst, type IQueryCondition, type IQueryMethodMetadata, type IQueryOrderBy, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type IScheduleAt, type IScheduleDelay, type ISendByWasenderRequest, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelMessage, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type ISocketReceivedMessage, type IStorableData, type ITelegramChannelConfig, type ITelegramChannelMessage, type ITelegramReceivedMessage, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWasenderChannelMessageListener, type IWasenderDeviceListMetadata, type IWasenderEvent, type IWasenderMessageContent, type IWasenderMessageContextInfo, type IWasenderMessageKey, type IWasenderMessageReceivedData, type IWasenderMessageReceivedEvent, type IWasenderQrUpdatedEvent, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppByWasenderChannelConfig, type IWhatsAppByWasenderReceivedMessage, type IWhatsAppChannelMessage, 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 IWhatsAppReceivedMessage, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenRouterChatAdapter, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCronJobRepository, PgCrudRepository, PgJobRepository, PgJsonRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgRepositoryMetadataStore, PgWhatsAppRepository, type QueryConnector, type QueryOperator, type QueryPrefix, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, type ResolvedConfig, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelMessageFile, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerConfig, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, UnionChatAdapter, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WasenderWebhookController, WhatsApp, WhatsAppByWasenderChannel, WhatsAppByWasenderChannelConfig, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppReceiverByWasender, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppSenderByWasender, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, bool, boolArr, buildQuerySql, chatAdapter, chatBot, chatController, chatItemTypeOptions, cmd, cmdChannelName, command, commandHandler, container, cron, description, errorToPlainObject, extractChatMessageText, extractNumberFromWasenderMessageKey, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isChatMessageEmpty, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isRetryableError, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, num, numArr, obj, onDelete, onGet, onPost, onPut, onSocketEvent, parseQueryMethodName, pgJsonRepository, pgStorage, query, readJsonFromFile, resolveConfigReferences, restController, runChatAdapters, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, safeJsonParse, scoped, setupErrorHandlers, singleton, socket, socketChannelName, socketController, stopCommandHandlers, stopCronHandlers, str, strArr, telegram, telegramChannelName, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, whatsAppByWasender, whatsAppByWasenderChannelName, whatsAppChannelName, withPgClient, withPgTransaction, writeJsonToFile };