Commit Graph

35 Commits

Author SHA1 Message Date
Stênio Aníbal
03c32de743 Merge branch 'ev2' into v2.0.0 2024-08-23 10:56:17 -03:00
Stênio Aníbal
05ee65f422 Simplify events structure and fix minor issues 2024-08-23 10:53:31 -03:00
Davidson Gomes
a83a358620 refactor: channel integration folders 2024-08-23 07:55:26 -03:00
Davidson Gomes
0e6a78d011 feat: flowise integration 2024-08-21 17:21:23 -03:00
Davidson Gomes
35bde8498b feat: generic chatbot 2024-08-21 14:42:26 -03:00
Davidson Gomes
edeb1efd2a refactor: chatbot integration 2024-08-21 13:37:22 -03:00
Davidson Gomes
583ce33868 refactor: channel controller 2024-08-20 18:47:24 -03:00
Davidson Gomes
3b39f13180 refactor: adjusts in module init 2024-08-20 18:41:12 -03:00
Davidson Gomes
2ec0b842c1 refactor: integrations folder 2024-08-20 16:22:02 -03:00
Davidson Gomes
7b79591e42 refactor: event folder 2024-08-20 15:27:32 -03:00
Davidson Gomes
64ed0faa83 refactor: integrations router folder structure 2024-08-20 13:13:49 -03:00
Davidson Gomes
d68d42b984 refactor: integrations folder structure 2024-08-20 12:27:04 -03:00
Stênio Aníbal
dc04eb16fc Refactor websocket structure 2024-08-16 17:45:09 -03:00
Judson Cairo
32e58debc6 Path mapping & deps fix & bundler changed to tsup 2024-08-11 20:47:17 -03:00
Davidson Gomes
a5d72a0dfd feat: Integration with Dify
Adds support for Dify integration, including new routes, services, and controllers. The configuration for Dify has been added to the environment file, and the necessary changes have been made to the `.env.example` file. Additionally, the WhatsApp Baileys service has been updated to handle Dify notifications.

Modified files:
- `.env.example`
- `package.json`
- `src/api/integrations/openai/services/openai.service.ts`
- `src/api/routes/index.router.ts`
- `src/api/server.module.ts`
- `src/api/services/channel.service.ts`
- `src/api/services/channels/whatsapp.baileys.service.ts`
- `src/config/env.config.ts`
- `src/validate/validate.schema.ts`

Introduced files:
- `src/api/integrations/dify/`
- `src/api/integrations/dify/controllers/dify.controller.ts`
- `src/api/integrations/dify/dto/dify.dto.ts`
- `src/api/integrations/dify/routes/dify.router.ts`
- `src/api/integrations/dify/services/dify.service.ts`
- `src/api/integrations/dify/validate/dify.schema.ts`
2024-07-30 13:34:35 -03:00
Davidson Gomes
29b9e688a8 chore: Crud openai complete 2024-07-18 10:14:53 -03:00
Davidson Gomes
e73d9c1982 chore: Integration with MinIO and S3
Adds support for MinIO and S3 for storing media files. Modified several files to implement this feature, including package.json, prisma/postgresql-schema.prisma, src/api/integrations/typebot/services/typebot.service.ts, src/api/routes/index.router.ts, src/api/services/channels/whatsapp.baileys.service.ts, and src/config/env.config.ts. Added untracked files for the new S3 integration. Also added a new S3Controller and S3Service for handling S3 related operations.

This change allows for more flexible media storage options and enables the use of MinIO or S3 for storing media files.
2024-07-13 16:07:16 -03:00
Davidson Gomes
26bddf3c53 Add support for managing WhatsApp templates via official API
This commit introduces changes to support managing WhatsApp templates using the official WhatsApp Business API. The following modifications have been made:

- Implemented a new Template model in the Prisma schema, including fields for template ID, name, language, and associated Instance (business ID, instance ID, and created/updated timestamps).
- Modified the Instance model in the Prisma schema to include a Template relationship.
- Updated InstanceController to include a new `businessId` property in the InstanceDto.
- Added a new TemplateRouter, TemplateController, and TemplateService to handle template-related requests and services.
- Updated the WebhookService to utilize the new TemplateService.
- Added new TypebotController, WebhookController, and WAMonitoringService methods to handle template-related events.
- Updated the validate schema to include a new template schema.

The main goal of this commit is to enable managing WhatsApp templates, including creating, updating, and deleting templates, as well as associating them with specific instances.
2024-07-12 12:32:44 -03:00
Davidson Gomes
4737c71ae1 refactor: change webhook reception for all instances
This commit refactors the webhook reception to handle all instances at once. Previously, each instance had its own webhook endpoint, but now there is a single endpoint for all instances. This change simplifies the codebase and reduces the potential for errors.

The main changes include:
- Modifying the `InstanceController` to update the webhook URL for all instances.
- Modifying the `WebhookController` to handle the reception of webhooks for all instances.
- Modifying the `IndexRouter` and `WebhookRouter` to add a new route for the webhook reception endpoint.
- Modifying the `ServerModule` to inject the `PrismaRepository` into the `WebhookService`.
- Modifying the `WebhookService` to handle the reception of webhooks for all instances.

These changes improve the maintainability and scalability of the application, as there is no longer a need to manage individual webhook endpoints for each instance.
2024-07-12 08:52:18 -03:00
Davidson Gomes
87c68df0f6 fix: provider variables are no longer mandatory in the env 2024-06-11 12:40:00 -03:00
Davidson Gomes
72de0a6e4d Chatwoot review and improvements 2024-06-09 08:44:06 -03:00
Davidson Gomes
fe9803b828 feat: Now you can register several typebots with triggers 2024-06-08 19:04:57 -03:00
Davidson Gomes
de89f03f13 integrations 2024-06-08 10:31:52 -03:00
Davidson Gomes
a578384e85 chore: Simplified payloads and instance endpoint 2024-06-07 11:09:08 -03:00
Davidson Gomes
eed32a3bd9 chore: optimization in instance registration 2024-06-07 08:28:22 -03:00
Davidson Gomes
1be9c7f95d added chatwoot integration activation 2024-06-06 16:38:43 -03:00
Davidson Gomes
36ec67cef9 feat: prisma and remove mongodb 2024-06-06 14:47:58 -03:00
Davidson Gomes
272bed1351 feat: prisma 2024-06-06 01:08:24 -03:00
Davidson Gomes
8034e7f587 cacheGroupMetadata 2024-06-05 21:25:55 -03:00
Davidson Gomes
696261d749 New method of saving sessions to a file using worker 2024-06-01 09:54:56 -03:00
Davidson Gomes
61bd5b3484 fix: Adjusts in redis for save instances 2024-04-18 10:39:24 -03:00
Davidson Gomes
5ae5d8546e fix: retry messages 2024-04-17 18:10:43 -03:00
Davidson Gomes
901b121695 fix: reorganization of files and folders 2024-04-12 17:28:02 -03:00
Davidson Gomes
94f5c130bf fix: reorganization of files and folders 2024-04-12 17:22:11 -03:00
Davidson Gomes
8ece6fb998 fix: reorganization of files and folders 2024-04-12 17:13:15 -03:00