chore(outbound): Permissions & Validations for endpoints#36709
chore(outbound): Permissions & Validations for endpoints#36709kodiakhq[bot] merged 25 commits intodevelopfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #36709 +/- ##
========================================
Coverage 66.27% 66.28%
========================================
Files 3325 3326 +1
Lines 111544 111579 +35
Branches 21160 21163 +3
========================================
+ Hits 73929 73960 +31
- Misses 34913 34921 +8
+ Partials 2702 2698 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
apps/meteor/ee/app/livechat-enterprise/server/outboundcomms/rest.ts
Outdated
Show resolved
Hide resolved
|
…st.ts Co-authored-by: Aleksander Nicacio da Silva <aleksander.silva@rocket.chat>
0e7abb6 to
3595401
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements permissions and validations for outbound messaging endpoints. It introduces permission-based access controls for sending outbound messages and validates agent/department assignments based on user permissions.
- Adds four new permission types for outbound messaging capabilities with granular control over agent assignment
- Implements validation logic to ensure users can only assign agents/departments according to their permission level
- Extends outbound message interfaces to include optional agent and department assignment fields
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/i18n/src/locales/en.i18n.json | Adds translation keys for the new outbound messaging permissions |
| packages/core-typings/src/omnichannel/outbound.ts | Extends IOutboundMessage interface with optional departmentId and agentId fields |
| packages/apps-engine/src/definition/outboundComunication/IOutboundMessage.ts | Extends IOutboundMessage interface with optional agentId and departmentId fields |
| ee/packages/omni-core-ee/src/outbound-communication/validators/canSendMessage.ts | Implements validation logic for outbound message permissions and agent/department assignments |
| ee/packages/omni-core-ee/src/outbound-communication/validators/canSendMessage.spec.ts | Comprehensive test suite for the validation functions |
| ee/packages/omni-core-ee/src/outbound-communication/index.ts | Exports validation functions from the outbound communication module |
| ee/packages/omni-core-ee/src/index.ts | Exports outbound communication functionality |
| apps/meteor/ee/app/livechat-enterprise/server/permissions.ts | Defines the new outbound messaging permissions and their role assignments |
| apps/meteor/ee/app/livechat-enterprise/server/outboundcomms/rest.ts | Updates REST schema to include agentId and departmentId parameters |
| apps/meteor/ee/app/livechat-enterprise/server/api/outbound.ts | Integrates permission checks and validation into the outbound messaging API endpoints |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Proposed changes (including videos or screenshots)
Issue(s)
https://rocketchat.atlassian.net/browse/CTZ-221
Steps to test or reproduce
Further comments