iachat/app/views/api/v1/models
Cayo P. R. Oliveira acd1e56a28 feat: baileys provider for whatsapp (#7)
* feat: baileys provider and placeholder for link device modal

* chore: drop qrcode.vue in favor of just img tag

* chore: update modal props

* feat: setup channel provider connection

* chore: update .env.example with Baileys API default configuration

* feat: add support for Baileys provider in WhatsApp events processing

* chore: rename Baileys API default host variable to DEFAULT_BAILEYS_URL

* feat: add setup and disconnect methods for Baileys channel provider in inboxes controller that will be implemented

* feat: add CHANNEL_CONNECTION_UPDATE event and include it in broadcast data preparation

* refactor: simplify channel retrieval logic in WhatsappEventsJob

* refactor: revert CHANNEL_UPDATE_EVENTS constant from ActionCableBroadcastJob

* feat: add 'baileys' as a provider option in Whatsapp channel model

* feat: add provider_connection field to Whatsapp channel model and migration

* refactor: remove unnecessary  CHANNEL_CONNECTION_UPDATE event type

* feat: implement channel provider connection with baileys API

* feat: add inbox association to Whatsapp channel model and update webhook URL handling

* feat: enhance Baileys service to handle webhook multiple event types

* refactor: simplify webhook verification logic in Baileys service

* feat: add setup channel provider call, and refactor some logic

* chore: adapt logic to new API

* refactor: fix typo

* refactor: fix import

* refactor: fix typo

* chore: add fixme comment about race condition

* fix: remove double disconnect call

* feat: implement message processing for incoming WhatsApp messages

* refactor: streamline message type determination and improve readability

* chore: increase cache key granularity

provider connection info might be updated multiple times within 1 second, so updates might be lost due to cache key not being updated. changing cache key to milliseconds solves this

* feat: add `is-loading` to buttons

* feat: update send_message method to use 'to' parameter and improve error handling

* refactor: simplify test setup and update API key in specs

* chore: add setup and disconnect channel provider specs

* test: fix spec after increase cache key granularity

* feat: handle reconnecting state on modal

* style: centered error text

* feat: advanced options on create inbox

* feat: handle new reconnecting on backend

* refactor: update inbox controller specs and leave a FIXME note

* test: add specs for Whatsapp::IncomingMessageBaileysService

* feat: add baileys configuration page

* feat: link device button when disconnected on conversation

* chore: refactor .env.example

* feat: add TODO for unimplemented methods in IncomingMessageBaileysService

* fix: correct method name and update environment variable references in WhatsappBaileysService

* refactor: simplify channel lookup by removing redundant method and handling phone number check directly

* chore: add TODO for unimplemented event processing methods in IncomingMessageBaileysService

* fix: update environment variable references in WhatsappBaileysService tests

* chore(webhook): add pt-BR translations

* chore: add pt-br translations

* chore: inboxname component margin

* refactor: inboxname computed prop

* feat: enhance WhatsApp provider connection handling and message processing

* test: inbox controller

* chore: improve baileys connection and messages handling

* test: incoming message service baileys

* refactor: update provider config validation and improve test setup for WhatsApp Baileys service

* fix: ensure only text messages are sent and update message source ID

* fix: create message

* fix: only update message on success

* test: fix broken specs

* chore: raise error on unsupported message content type

* feat: hide provider connection data from non-admins

* fix: update advanced options

* chore: move class definition

* fix: issue with send_message not returning id

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
2025-04-03 23:28:38 -03:00
..
_account.json.jbuilder feat: Ability to delete account for administrators (#1874) 2025-04-03 10:41:39 +05:30
_agent_bot.json.jbuilder feat: Add native support for CSML in agent_bot API (#4913) 2022-06-23 19:17:46 +05:30
_agent.json.jbuilder feat: Add APIs to manage custom roles in Chatwoot (#9995) 2024-08-23 17:18:28 +05:30
_app.json.jbuilder fix: Allow integration apps to be listed by an agent (#6587) 2023-03-02 13:02:21 +05:30
_campaign.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
_contact_inbox.json.jbuilder feat: hide tokens and password on contact inbox payloads (#10888) 2025-02-20 21:22:12 -08:00
_contact.json.jbuilder feat: Add the ability to block/unblock contact via contact details page (#10899) 2025-02-13 14:59:35 -08:00
_conversation.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30
_csat_survey_response.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
_custom_attribute_definition.json.jbuilder feat: Support Regex validation for custom attributes (#7856) 2024-01-23 18:01:57 +04:00
_custom_filter.json.jbuilder fix: Revert the changes for SyncCustomFilterCountJob (#8238) 2023-10-27 10:45:48 -07:00
_dashboard_app.json.jbuilder feat: Allow users to create dashboard apps to give agents more context (#4761) 2022-06-01 11:13:10 +05:30
_hook.json.jbuilder fix: Update email alerts for Slack integration (#7739) 2023-08-17 11:46:37 -07:00
_inbox_slim.json.jbuilder chore: Fix issue with compose conversation form (#10991) 2025-02-27 21:45:20 +05:30
_inbox.json.jbuilder feat: baileys provider for whatsapp (#7) 2025-04-03 23:28:38 -03:00
_macro.json.jbuilder chore: Macros enhancement (#5609) 2022-10-20 19:41:48 -07:00
_message.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30
_note.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
_portal_config.json.jbuilder chore: Add missing locale info in portal API (#5177) 2022-08-03 10:33:48 +05:30
_team.json.jbuilder chore: Improve search, list performance of contact/conversation APIs (#2696) 2021-07-23 18:39:24 +05:30
_user.json.jbuilder chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
_widget_message.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30