@wabot-dev/framework 0.2.1-beta.2 → 0.2.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.
- package/{LICENSE → LICENSE.md} +1 -1
- package/README.md +115 -0
- package/dist/src/index.d.ts +18 -16
- package/dist/src/index.js +2 -0
- package/package.json +1 -1
package/{LICENSE → LICENSE.md}
RENAMED
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# 🤖 Wabot
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@wabot-dev/framework)
|
|
6
|
+
[](https://github.com/wabot-dev/wabot-ts/blob/main/LICENSE.md)
|
|
7
|
+
[](https://docs.wabot.dev)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
**Un framework moderno y flexible para crear bots con TypeScript e Inteligencia Artificial**
|
|
11
|
+
|
|
12
|
+
[Documentación](https://docs.wabot.dev) • [Inicio Rápido](https://docs.wabot.dev/guides/start-new-project/) • [Repositorio](https://github.com/wabot-dev/wabot-ts)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🌟 Introducción
|
|
19
|
+
|
|
20
|
+
**Wabot** es un framework diseñado para desarrolladores que desean crear bots inteligentes de manera rápida y profesional. Con soporte nativo para TypeScript, múltiples plataformas de mensajería y los principales proveedores de IA, Wabot te permite enfocarte en la lógica de tu bot mientras nosotros nos encargamos de la infraestructura.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## ✨ Características Principales
|
|
25
|
+
|
|
26
|
+
- 🔷 **Tipado estricto con TypeScript** - Desarrollo seguro y predecible
|
|
27
|
+
- 🧩 **Modular y extensible** - Arquitectura flexible para escalar
|
|
28
|
+
- 🔌 **Fácil integración con múltiples plataformas** - Conecta con diversos canales
|
|
29
|
+
- 🤖 **Soporte para bots con IA** - Inteligencia artificial lista para usar
|
|
30
|
+
- 🧠 **Múltiples proveedores de IA** - OpenAI, Google Gemini, Anthropic Claude
|
|
31
|
+
- 💬 **Múltiples canales de chat** - Telegram, WhatsApp, Socket y más
|
|
32
|
+
- 📖 **Documentación clara y en español** - Aprende sin barreras de idioma
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 🚀 Inicio Rápido
|
|
37
|
+
|
|
38
|
+
visita nuestra documentación 📘 **[Ver guía completa de inicio →](https://docs.wabot.dev/guides/start-new-project/)**
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 💬 Plataformas Soportadas
|
|
43
|
+
|
|
44
|
+
Wabot se integra nativamente con las principales plataformas de mensajería:
|
|
45
|
+
|
|
46
|
+
| Plataforma | Estado |
|
|
47
|
+
|------------|--------|
|
|
48
|
+
| 📱 **WhatsApp** | ✅ Soportado |
|
|
49
|
+
| ✈️ **Telegram** | ✅ Soportado |
|
|
50
|
+
| 🔌 **Socket** | ✅ Soportado |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🧠 Proveedores de IA
|
|
55
|
+
|
|
56
|
+
Conecta tu bot con los principales modelos de lenguaje del mercado:
|
|
57
|
+
|
|
58
|
+
| Proveedor | Modelos |
|
|
59
|
+
|-----------|---------|
|
|
60
|
+
| 🟢 **OpenAI** | GPT-4, GPT-3.5, y más |
|
|
61
|
+
| 🔵 **Google** | Gemini Pro, Gemini Ultra |
|
|
62
|
+
| 🟣 **Anthropic** | Claude 3 y más |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 📚 Documentación
|
|
67
|
+
|
|
68
|
+
Explora nuestra documentación completa para dominar Wabot:
|
|
69
|
+
|
|
70
|
+
- 📖 **[Introducción](https://docs.wabot.dev)** - Conoce el framework
|
|
71
|
+
- 🧠 **[Mentalidad del Bot](https://docs.wabot.dev/guides/mentality-of-your-bot/)** - Diseña bots inteligentes
|
|
72
|
+
- ⚙️ **[Agregar Funcionalidades](https://docs.wabot.dev/guides/add-functions-modules/)** - Extiende tu bot con módulos
|
|
73
|
+
- 🔍 **[Documentación Completa](https://docs.wabot.dev)** - Explora todas las guías
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 💡 Ejemplos
|
|
78
|
+
|
|
79
|
+
💡 **Ver más ejemplos en la [documentación oficial](https://docs.wabot.dev)**
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🛠️ Desarrollo y Contribución
|
|
84
|
+
|
|
85
|
+
¿Quieres contribuir al proyecto? ¡Serás bienvenido!
|
|
86
|
+
|
|
87
|
+
- 📦 **Repositorio:** [github.com/wabot-dev/wabot-ts](https://github.com/wabot-dev/wabot-ts)
|
|
88
|
+
- 🐛 **Reportar bugs:** [Issues](https://github.com/wabot-dev/wabot-ts/issues)
|
|
89
|
+
- 💬 **Discusiones:** [Discussions](https://github.com/wabot-dev/wabot-ts/discussions)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 📞 Soporte
|
|
94
|
+
|
|
95
|
+
¿Necesitas ayuda? Estamos aquí para ti:
|
|
96
|
+
|
|
97
|
+
- 📧 **Email:** [soporte@wabot.dev](mailto:soporte@wabot.dev)
|
|
98
|
+
- 🐛 **Issues:** [Reportar un problema](https://github.com/wabot-dev/wabot-ts/issues)
|
|
99
|
+
- 📖 **Documentación:** [docs.wabot.dev](https://docs.wabot.dev)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 📄 Licencia
|
|
104
|
+
|
|
105
|
+
Este proyecto está licenciado bajo [Licencia MIT](https://github.com/wabot-dev/wabot-ts/blob/main/LICENSE).
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
<div align="center">
|
|
110
|
+
|
|
111
|
+
**Hecho con ❤️ por el equipo de Wabot**
|
|
112
|
+
|
|
113
|
+
[Sitio Web](https://wabot.dev) • [Documentación](https://docs.wabot.dev) • [GitHub](https://github.com/wabot-dev/wabot-ts) • [npm](https://www.npmjs.com/package/@wabot-dev/framework)
|
|
114
|
+
|
|
115
|
+
</div>
|
package/dist/src/index.d.ts
CHANGED
|
@@ -317,6 +317,23 @@ interface ICrudRepository<T> {
|
|
|
317
317
|
delete(item: T): Promise<void>;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
declare function description(description: string): (target: any, propertyKey: string | symbol) => void;
|
|
321
|
+
|
|
322
|
+
interface IDescriptionMetadata {
|
|
323
|
+
constructor: IConstructor<any>;
|
|
324
|
+
propertyName: string;
|
|
325
|
+
propertyType?: Function;
|
|
326
|
+
functionArgsTypes?: Function[];
|
|
327
|
+
functionReturnType?: Function;
|
|
328
|
+
description: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
declare class DescriptionMetadataStore {
|
|
332
|
+
private descriptions;
|
|
333
|
+
saveDescriptionMetadata(metadata: IDescriptionMetadata): void;
|
|
334
|
+
getModelDescriptions(model: IConstructor<any>): IDescriptionMetadata[];
|
|
335
|
+
}
|
|
336
|
+
|
|
320
337
|
interface ICommandConfig {
|
|
321
338
|
name?: string;
|
|
322
339
|
}
|
|
@@ -481,21 +498,6 @@ interface IMindsetModuleMetadata {
|
|
|
481
498
|
config?: IMindsetModuleConfig;
|
|
482
499
|
}
|
|
483
500
|
|
|
484
|
-
interface IDescriptionMetadata {
|
|
485
|
-
constructor: IConstructor<any>;
|
|
486
|
-
propertyName: string;
|
|
487
|
-
propertyType?: Function;
|
|
488
|
-
functionArgsTypes?: Function[];
|
|
489
|
-
functionReturnType?: Function;
|
|
490
|
-
description: string;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
declare class DescriptionMetadataStore {
|
|
494
|
-
private descriptions;
|
|
495
|
-
saveDescriptionMetadata(metadata: IDescriptionMetadata): void;
|
|
496
|
-
getModelDescriptions(model: IConstructor<any>): IDescriptionMetadata[];
|
|
497
|
-
}
|
|
498
|
-
|
|
499
501
|
declare class MindsetMetadataStore {
|
|
500
502
|
private descriptionMetadataStore;
|
|
501
503
|
private validationMetadataStore;
|
|
@@ -1627,4 +1629,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
|
|
|
1627
1629
|
new (): {};
|
|
1628
1630
|
};
|
|
1629
1631
|
|
|
1630
|
-
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICrudRepository, type ICustomErrorData, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type 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 IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, writeJsonToFile };
|
|
1632
|
+
export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Command, CommandMetadataStore, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobEvent, type IJobEventListener, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type 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 IPrimitive, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, JobsEventsHub, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, description, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, readJsonFromFile, restController, runAsyncCommandHandlers, runChatControllers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, writeJsonToFile };
|
package/dist/src/index.js
CHANGED
|
@@ -36,6 +36,8 @@ export { min } from './core/validation/validators/min/@min.js';
|
|
|
36
36
|
export { validateMin } from './core/validation/validators/min/validateMin.js';
|
|
37
37
|
export { isRecord } from './core/validation/validators/is-record/@isRecord.js';
|
|
38
38
|
export { validateIsRecord } from './core/validation/validators/is-record/validateIsRecord.js';
|
|
39
|
+
export { description } from './core/description/metadata/@description.js';
|
|
40
|
+
export { DescriptionMetadataStore } from './core/description/metadata/DescriptionMetadataStore.js';
|
|
39
41
|
export { command } from './feature/async/@command.js';
|
|
40
42
|
export { commandHandler } from './feature/async/@commandHandler.js';
|
|
41
43
|
export { Async } from './feature/async/Async.js';
|