Commit Graph

2498 Commits

Author SHA1 Message Date
Davidson Gomes
22465c0a56 fix: corrigido incompatibilidade no use voise call da wavoip com versao nova da baileys 2025-09-26 13:00:52 -03:00
Davidson Gomes
da6f1bd540 chore(changelog): update CHANGELOG for Baileys v7.0.0-rc.4 and PostgreSQL connection improvements
- Added entry for Baileys version update to v7.0.0-rc.4.
- Refactored PostgreSQL connection handling and enhanced message processing capabilities.
2025-09-26 12:58:36 -03:00
Davidson Gomes
069786b9fe chore(deps): update baileys package to version 7.0.0-rc.4
- Bumped baileys dependency version in package.json and package-lock.json to 7.0.0-rc.4 for improved functionality and bug fixes.
2025-09-26 12:56:40 -03:00
Davidson Gomes
bd0c43feac
Merge pull request #2017 from Vitordotpy/fix/enhanced-chatwoot-database-connection
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
Fix Chatwoot DB Connection Instability and Implement Stale Conversation Cache Handling
2025-09-26 07:35:26 -03:00
Vitordotpy
5dc1d02d0a refactor(chatbot): melhorar tratamento de erros em mensagens no Chatwoot
- Implementada a função `handleStaleConversationError` para centralizar a lógica de tratamento de erros relacionados a conversas não encontradas.
- A lógica de retry foi aprimorada para as funções `createMessage` e `sendData`, garantindo que as operações sejam reprocessadas corretamente em caso de falhas.
- Removido código duplicado e melhorada a legibilidade do serviço Chatwoot.
2025-09-25 17:38:10 -03:00
Vitor Manoel Santos Moura
8697329f71
Update src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts
aplicação de desestruturação de objetos que é uma boa prática do ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-09-25 17:30:43 -03:00
Vitor Manoel Santos Moura
58b5561f72
Update src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts
aplicação de desestruturação de objetos que é uma boa prática do ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-09-25 17:30:30 -03:00
Vitordotpy
093515555d refactor(chatbot): refatorar conexão com PostgreSQL e melhorar tratamento de mensagens
- Alterado método de obtenção da conexão PostgreSQL para ser assíncrono, melhorando a gestão de conexões.
- Implementada lógica de retry para criação de mensagens e conversas, garantindo maior robustez em caso de falhas.
- Ajustadas chamadas de consulta ao banco de dados para utilizar a nova abordagem de conexão.
- Adicionada nova propriedade `messageBodyForRetry` para facilitar o reenvio de mensagens em caso de erro.
2025-09-25 17:08:40 -03:00
Davidson Gomes
d8268b0eb1 fix(migration): resolve PostgreSQL migration error for Kafka integration
Some checks failed
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
Security Scan / Dependency Review (push) Has been cancelled
- Corrected table reference in migration SQL to align with naming conventions.
- Fixed foreign key constraint issue that caused migration failure.
- Ensured successful setup of Kafka integration by addressing database migration errors.
2025-09-24 13:59:23 -03:00
Davidson Gomes
4585850741 chore(release): bump version to 2.3.5 and update bug report template
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
- Updated package and lock files to version 2.3.5.
- Modified bug report template to reflect the new version number.
- Removed outdated Kafka Docker README file.
2025-09-23 18:42:07 -03:00
Davidson Gomes
6c150eed6d chore(docker): add Kafka and frontend services to Docker configurations
- Introduced Kafka and Zookeeper services in a new docker-compose file for better message handling.
- Added frontend service to both development and production docker-compose files for improved UI management.
- Updated evolution-manager-v2 submodule to the latest commit.
- Updated CHANGELOG for version 2.3.5 release.
2025-09-23 18:40:19 -03:00
Davidson Gomes
78c7b96f0f Merge branch 'release/2.3.4'
Some checks failed
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
Security Scan / Dependency Review (push) Has been cancelled
2025-09-23 11:42:25 -03:00
Davidson Gomes
dfea584aa7 chore(changelog): update CHANGELOG for version 2.3.4 release
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
- Enhanced EvolutionBot functionality with splitMessages and linkPreview support
- Centralized message splitting logic across chatbot services for consistency
- Improved message formatting and delivery capabilities
2025-09-23 11:41:51 -03:00
Davidson Gomes
6c5b056615 chore(changelog): remove empty line in CHANGELOG for consistency 2025-09-23 11:37:48 -03:00
Davidson Gomes
d8b4378163
Merge pull request #1986 from dersonbsb2022/main
Some checks failed
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
Security Scan / Dependency Review (push) Has been cancelled
fix(evolutionbot):  Fixing the correct message sending method so that messages are split.
2025-09-22 08:02:11 -03:00
Davidson Gomes
838cc14531
Merge pull request #1989 from JamsMendez/update-docker-compose
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
fix(docker): change private image to public image in docker-compose
2025-09-21 15:18:13 -03:00
Jose A. Mendez Santiago
878da12fa4 fix(docker): change private image to public image in docker-compose 2025-09-20 22:02:25 -06:00
Anderson Silva
10a2b60595 refactor(chatbot): centralize split logic and ensure linkPreview consistency
- Centralize double-line-break message splitting logic into dedicated helper methods
- Add targeted debug logs for better observability without clutter
- Ensure linkPreview parameter is consistently passed across all chatbot services
- Extract splitMessageByDoubleLineBreaks() and sendSingleMessage() helpers
- Update all chatbot services to explicitly pass linkPreview: true
- Improve code testability and maintainability

Services updated:
- BaseChatbotService: Refactored split logic and added debug logs
- TypebotService: Added linkPreview parameter to all sendMessageWhatsApp calls
- OpenAIService: Added linkPreview parameter to all sendMessageWhatsApp calls
- N8nService: Added linkPreview parameter to sendMessageWhatsApp call
- FlowiseService: Added linkPreview parameter to sendMessageWhatsApp call
- EvoaiService: Added linkPreview parameter to sendMessageWhatsApp call
- DifyService: Added linkPreview parameter to all sendMessageWhatsApp calls
2025-09-20 11:35:15 -03:00
Anderson Silva
b0ca79cd11 fix(evolutionbot): implement splitMessages and linkPreview functionality
- Replace instance.textMessage() with sendMessageWhatsApp() method
- Enable message splitting by double line breaks (\n\n)
- Add proper delay and typing indicators between split messages
- Fix linkPreview parameter passing to base class methods
- Support linkPreview: false/true from webhook response
- Remove unnecessary debug logs for cleaner output

Fixes: EvolutionBot was not respecting splitMessages and linkPreview configurations
2025-09-20 10:57:03 -03:00
Davidson Gomes
71eb189a6d chore(changelog): update CHANGELOG for recent enhancements and fixes
Some checks failed
Security Scan / Dependency Review (push) Has been cancelled
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
- Fixed `instanceName` field error in message creation, resolving Prisma validation issues.
- Enhanced media message processing across chatbot services, improving base64 conversion and media URL handling.
- Resolved ESLint configuration conflicts in Evolution Manager v2, updating rules and fixing code formatting issues.
- Streamlined media message handling and improved data consistency in database operations.
2025-09-18 17:47:54 -03:00
Davidson Gomes
407d254cf7 refactor(chatbot): streamline media message handling across chatbot services
- Removed redundant instance name references in EvolutionStartupService to enhance data consistency.
- Updated media message processing in various chatbot services to utilize base64 and mediaUrl more effectively, ensuring better handling of image messages.
- Improved overall code readability and maintainability by simplifying media handling logic.
2025-09-18 17:46:47 -03:00
Davidson Gomes
5f44da61fb feat(evolution-manager): add evolution-manager-v2 as a submodule and update changelog
- Introduced evolution-manager-v2 as a git submodule for easier access and integration.
- Updated CHANGELOG to reflect the addition of evolution-manager-v2 with details on its features and open-source setup.
- Adjusted media message handling in EvolutionStartupService to use null instead of undefined for base64 and mediaUrl properties, ensuring better data consistency.
2025-09-18 17:00:15 -03:00
Davidson Gomes
41a36bbb19 feat(changelog): update CHANGELOG for version 2.3.4
- Added Apache Kafka integration for real-time event streaming, including a new controller, router, and schema.
- Fixed MySQL schema issues related to default values and added missing relation fields in the Instance model.
- Introduced new environment variables for comprehensive Kafka configuration.
2025-09-18 15:48:27 -03:00
Davidson Gomes
8ab41fcfc9 feat(kafka): add Kafka integration for event streaming
- Introduced Kafka support in the Evolution API, allowing for real-time event streaming and processing.
- Updated environment configuration to include Kafka-related variables.
- Added KafkaController and KafkaRouter for managing Kafka events.
- Enhanced event management to support Kafka alongside existing integrations.
- Updated database schemas and migrations for Kafka integration in both MySQL and PostgreSQL.
- Documented Kafka integration in the README file.
2025-09-18 15:44:56 -03:00
Davidson Gomes
5e08628d89 refactor(eslint): change unused vars rule to error and update error handling in services
- Update ESLint configuration to set `@typescript-eslint/no-unused-vars` from 'warn' to 'error' for stricter linting.
- Refactor error handling in various services to omit error variable in catch blocks for cleaner code.
2025-09-18 14:59:33 -03:00
Davidson Gomes
4726c4727d Merge branch 'release/2.3.3'
Some checks failed
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
Security Scan / Dependency Review (push) Has been cancelled
2025-09-18 14:55:45 -03:00
Davidson Gomes
0787a10f39 chore(dependabot): remove dependabot configuration file
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
2025-09-18 14:55:11 -03:00
Davidson Gomes
5bdd6ad9d8 chore(dependencies): upgrade eslint-plugin-simple-import-sort to version 12.1.1 2025-09-18 14:54:12 -03:00
Davidson Gomes
f602ba343f Merge branch 'hotfix/2.3.3' into develop 2025-09-18 14:49:20 -03:00
Davidson Gomes
9d42ad3495 refactor(eslint): update TypeScript object type usage and adjust linting rules
- Change usage of `Object` to `object` in various files for better type safety.
- Update ESLint configuration to change `@typescript-eslint/no-unused-vars` from 'error' to 'warn' and disable certain rules related to object types.
2025-09-18 14:48:56 -03:00
Davidson Gomes
e4da6a1763 Merge branch 'release/2.3.3' 2025-09-18 14:45:42 -03:00
Davidson Gomes
55125856fe chore(docker): upgrade Node.js version in Dockerfile and update dependencies
- Change base image from node:20-alpine to node:24-alpine in Dockerfile for both builder and final stages.
- Update package dependencies in package.json and package-lock.json, including @aws-sdk/client-sqs, @prisma/client, @sentry/node, multer, pino, and others to their latest versions.
- Adjust GitHub Actions workflows to use updated action versions for better performance and security.
2025-09-18 14:45:02 -03:00
Davidson Gomes
a1281927a8 Merge branch 'release/2.3.3' 2025-09-18 14:17:50 -03:00
Davidson Gomes
250cb61748 chore(changelog): update version date for release 2.3.3 2025-09-18 14:17:39 -03:00
Davidson Gomes
ff9ff60e3b
Merge pull request #1955 from ricaelchiquetti/fix/upsert_remote_jid_alt
Fix/Adjust remote message key handling in WhatsApp service to include alternative JID
2025-09-18 09:30:28 -03:00
ricael
c6a7e2368b fix: ajustar a manipulação da chave remota da mensagem no serviço WhatsApp para incluir JID alternativo 2025-09-18 09:22:40 -03:00
Davidson Gomes
deb4494fc0 chore(commitlint): increase body and footer line length limits to 150 characters
Some checks are pending
Check Code Quality / check-lint-and-build (push) Waiting to run
Build Docker image / Build and Deploy (push) Waiting to run
Security Scan / CodeQL Analysis (javascript) (push) Waiting to run
Security Scan / Dependency Review (push) Waiting to run
- Update body-max-line-length and footer-max-line-length in commitlint configuration to allow for longer lines, enhancing readability and accommodating more detailed commit messages.
2025-09-17 16:52:03 -03:00
Davidson Gomes
0a357089b3 chore(commitlint): update line length rules for body and footer to 120 characters
- Adjust body-max-line-length and footer-max-line-length in commitlint configuration to allow for longer lines, improving readability and accommodating more detailed commit messages.
2025-09-17 16:51:46 -03:00
Davidson Gomes
3ddbd6a7fb feat(config): add telemetry and metrics configuration options
- Introduce new environment variables for telemetry and Prometheus metrics in .env.example
- Create example configuration files for Prometheus and Grafana dashboards
- Update main application to utilize new configuration settings for Sentry, audio converter, and proxy
- Enhance channel services to support audio conversion API integration
- Implement middleware for metrics IP whitelisting and basic authentication in routes
2025-09-17 16:50:36 -03:00
Davidson Gomes
81a991a62e docs(agents.md and claude.md): update and expand AI Agent guidelines in AGENTS.md and CLAUDE.md
Revise AGENTS.md to provide comprehensive guidelines for AI agents working with the Evolution API.
Enhance CLAUDE.md with detailed project overview, common development commands, and integration
points. Include architecture patterns, coding standards, and testing strategies for better clarity
and consistency.
2025-09-17 15:54:39 -03:00
Davidson Gomes
a721beda3c chore(rules): update input validation standards to use JSONSchema7 and add commit standards 2025-09-17 15:47:26 -03:00
Davidson Gomes
7088ad05d2 feat: add project guidelines and configuration files for development standards
- Introduce AGENTS.md for repository guidelines and project structure
- Add core development principles in .cursor/rules/core-development.mdc
- Establish project-specific context in .cursor/rules/project-context.mdc
- Implement Cursor IDE configuration in .cursor/rules/cursor.json
- Create specialized rules for controllers, services, DTOs, guards, routes, and integrations
- Update .gitignore to exclude unnecessary files
- Enhance CLAUDE.md with project overview and common development commands
2025-09-17 15:43:32 -03:00
Davidson Gomes
805f40c841 feat: add code quality tools and security policy
- Configure Husky with pre-commit and pre-push hooks
- Add commitlint for conventional commit validation
- Create comprehensive security policy (SECURITY.md)
- Add GitHub Actions for security scanning and dependency review
- Create PR and issue templates for better collaboration
- Add Canny.io references for community feedback
- Fix path traversal vulnerability in /assets endpoint
- Create MySQL schema sync analysis tools
2025-09-17 15:05:17 -03:00
Davidson Gomes
09ee2e6296 feat: integrate Husky and lint-staged for automated code quality checks; update changelog and README for new features 2025-09-17 14:49:26 -03:00
Davidson Gomes
dd931eee36 docs: changelog 2.3.3 2025-09-17 14:38:48 -03:00
Davidson Gomes
55822f9443 style: improve code formatting for better readability in WhatsApp service files 2025-09-17 14:30:27 -03:00
Davidson Gomes
00780157db style(sqs): format messageGroupId assignment for improved readability 2025-09-17 14:27:19 -03:00
Davidson Gomes
b514fab30e fix: address Path Traversal vulnerability in /assets endpoint by implementing security checks 2025-09-17 14:27:19 -03:00
Davidson Gomes
7ba878742e
Merge pull request #1897 from nolramaf/feat/validate-video-type-before-uploading-to-s3
Some checks are pending
Build Docker image / Build and Deploy (push) Waiting to run
feat/validate video type before uploading to S3
2025-09-17 14:27:03 -03:00
Davidson Gomes
d998baa839
Merge pull request #1896 from nolramaf/feat/add-global-sqs-mode
feat/add global SQS mode with single-queue-per-event and payload size control
2025-09-17 14:26:15 -03:00