@wabot-dev/framework 0.8.1 → 0.8.3
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.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ConfigResolver } from './resolver.js';
|
|
2
|
+
|
|
3
|
+
function resolveConfigReferences(config) {
|
|
4
|
+
const resolved = {};
|
|
5
|
+
for (const [key, value] of Object.entries(config)) {
|
|
6
|
+
if (isConfigReference(value)) {
|
|
7
|
+
resolved[key] = ConfigResolver.resolve(value);
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
resolved[key] = value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return resolved;
|
|
14
|
+
}
|
|
15
|
+
function isConfigReference(value) {
|
|
16
|
+
return (typeof value === 'object' &&
|
|
17
|
+
value !== null &&
|
|
18
|
+
'__isConfigReference' in value &&
|
|
19
|
+
value.__isConfigReference === true);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { resolveConfigReferences };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
class ConfigResolver {
|
|
2
|
+
static resolve(reference) {
|
|
3
|
+
const envValue = this.loadFromEnv(reference.path);
|
|
4
|
+
if (envValue === undefined) {
|
|
5
|
+
if (reference.default !== undefined) {
|
|
6
|
+
return this.coerce(reference.default, reference.type);
|
|
7
|
+
}
|
|
8
|
+
throw new Error(`Config not found: ${reference.path} (env: ${this.pathToEnvVar(reference.path)})`);
|
|
9
|
+
}
|
|
10
|
+
return this.coerce(envValue, reference.type);
|
|
11
|
+
}
|
|
12
|
+
static loadFromEnv(path) {
|
|
13
|
+
const envVar = this.pathToEnvVar(path);
|
|
14
|
+
const value = process.env[envVar];
|
|
15
|
+
return value === '' ? undefined : value;
|
|
16
|
+
}
|
|
17
|
+
static pathToEnvVar(path) {
|
|
18
|
+
return path.toUpperCase().replace(/\./g, '_');
|
|
19
|
+
}
|
|
20
|
+
static coerce(value, type) {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case 'string':
|
|
23
|
+
return value;
|
|
24
|
+
case 'number':
|
|
25
|
+
const num = Number(value);
|
|
26
|
+
if (isNaN(num)) {
|
|
27
|
+
throw new Error(`Cannot coerce "${value}" to number`);
|
|
28
|
+
}
|
|
29
|
+
return num;
|
|
30
|
+
case 'boolean':
|
|
31
|
+
return value.toLowerCase() === 'true' || value === '1' || value === 'yes';
|
|
32
|
+
case 'object':
|
|
33
|
+
try {
|
|
34
|
+
return JSON.parse(value);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw new Error(`Cannot coerce "${value}" to object (invalid JSON)`);
|
|
38
|
+
}
|
|
39
|
+
case 'string-array':
|
|
40
|
+
case 'number-array':
|
|
41
|
+
case 'boolean-array': {
|
|
42
|
+
const items = this.parseArrayItems(value);
|
|
43
|
+
const itemType = type === 'string-array' ? 'string' : type === 'number-array' ? 'number' : 'boolean';
|
|
44
|
+
return items.map((item) => this.coerce(item, itemType));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
static parseArrayItems(value) {
|
|
49
|
+
const trimmed = value.trim();
|
|
50
|
+
if (trimmed.startsWith('[') || trimmed.startsWith('{')) {
|
|
51
|
+
let parsed;
|
|
52
|
+
try {
|
|
53
|
+
parsed = JSON.parse(trimmed);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
throw new Error(`Cannot coerce "${value}" to array (invalid JSON)`);
|
|
57
|
+
}
|
|
58
|
+
if (!Array.isArray(parsed)) {
|
|
59
|
+
throw new Error(`Expected JSON array but got ${typeof parsed}: "${value}"`);
|
|
60
|
+
}
|
|
61
|
+
return parsed.map((item) => String(item));
|
|
62
|
+
}
|
|
63
|
+
return value
|
|
64
|
+
.split(',')
|
|
65
|
+
.map((s) => s.trim())
|
|
66
|
+
.filter((s) => s.length > 0);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { ConfigResolver };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function parsePathAndDefault(strings) {
|
|
2
|
+
if (strings.length > 1) {
|
|
3
|
+
throw new Error('Config tag templates do not support interpolation. Use a literal path like str`my.path:default`.');
|
|
4
|
+
}
|
|
5
|
+
const template = strings[0];
|
|
6
|
+
const idx = template.indexOf(':');
|
|
7
|
+
if (idx === -1)
|
|
8
|
+
return [template.trim(), undefined];
|
|
9
|
+
const path = template.slice(0, idx).trim();
|
|
10
|
+
const defaultValue = template.slice(idx + 1).trim();
|
|
11
|
+
return [path, defaultValue];
|
|
12
|
+
}
|
|
13
|
+
function createConfigReference(type, strings) {
|
|
14
|
+
const [path, defaultValue] = parsePathAndDefault(strings);
|
|
15
|
+
return {
|
|
16
|
+
type,
|
|
17
|
+
path,
|
|
18
|
+
default: defaultValue,
|
|
19
|
+
__isConfigReference: true,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function str(strings) {
|
|
23
|
+
return createConfigReference('string', strings);
|
|
24
|
+
}
|
|
25
|
+
function num(strings) {
|
|
26
|
+
return createConfigReference('number', strings);
|
|
27
|
+
}
|
|
28
|
+
function bool(strings) {
|
|
29
|
+
return createConfigReference('boolean', strings);
|
|
30
|
+
}
|
|
31
|
+
function obj(strings) {
|
|
32
|
+
return createConfigReference('object', strings);
|
|
33
|
+
}
|
|
34
|
+
function strArr(strings) {
|
|
35
|
+
return createConfigReference('string-array', strings);
|
|
36
|
+
}
|
|
37
|
+
function numArr(strings) {
|
|
38
|
+
return createConfigReference('number-array', strings);
|
|
39
|
+
}
|
|
40
|
+
function boolArr(strings) {
|
|
41
|
+
return createConfigReference('boolean-array', strings);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { bool, boolArr, num, numArr, obj, str, strArr };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -31,6 +31,32 @@ declare class Auth<D> {
|
|
|
31
31
|
wasOverrided(): boolean;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
type ConfigReferenceType = 'string' | 'number' | 'boolean' | 'object' | 'string-array' | 'number-array' | 'boolean-array';
|
|
35
|
+
interface ConfigReference {
|
|
36
|
+
type: ConfigReferenceType;
|
|
37
|
+
path: string;
|
|
38
|
+
default?: string;
|
|
39
|
+
__isConfigReference: true;
|
|
40
|
+
}
|
|
41
|
+
|
|
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;
|
|
49
|
+
|
|
50
|
+
declare class ConfigResolver {
|
|
51
|
+
static resolve(reference: ConfigReference): unknown;
|
|
52
|
+
private static loadFromEnv;
|
|
53
|
+
private static pathToEnvVar;
|
|
54
|
+
private static coerce;
|
|
55
|
+
private static parseArrayItems;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function resolveConfigReferences<T extends Record<string, any>>(config: T): T;
|
|
59
|
+
|
|
34
60
|
interface ILockKey {
|
|
35
61
|
run<T>(fn: () => Promise<T>): Promise<T>;
|
|
36
62
|
tryRun<T>(fn: () => Promise<T>): Promise<T | undefined>;
|
|
@@ -2230,4 +2256,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
2230
2256
|
new (): {};
|
|
2231
2257
|
};
|
|
2232
2258
|
|
|
2233
|
-
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatOperator, ChatRepository, ChatResolver, type ClientMap, CmdChannel, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, type ErrorSeverity, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatAssociation, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type 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, 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, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, safeJsonParse, scoped, setupErrorHandlers, singleton, socket, socketChannelName, socketController, stopCommandHandlers, stopCronHandlers, telegram, telegramChannelName, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, whatsAppByWasender, whatsAppByWasenderChannelName, whatsAppChannelName, withPgClient, withPgTransaction, writeJsonToFile };
|
|
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 };
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { Auth } from './core/auth/Auth.js';
|
|
2
|
+
export { bool, boolArr, num, numArr, obj, str, strArr } from './core/config/tag-functions.js';
|
|
3
|
+
export { ConfigResolver } from './core/config/resolver.js';
|
|
4
|
+
export { resolveConfigReferences } from './core/config/decorators.js';
|
|
2
5
|
export { Entity, Persistent } from './core/entity/Entity.js';
|
|
3
6
|
export { Env } from './core/env/Env.js';
|
|
4
7
|
export { CustomError, errorToPlainObject } from './core/error/CustomError.js';
|