Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Contributor

@lucas-a-pelegrino lucas-a-pelegrino commented Sep 25, 2025

Proposed changes (including videos or screenshots)

This PR adds a deprecation warning for livechat:addMonitor meteor method, as well as a new endpoint to replace it; livechat/monitors.create

Issue(s)

CTZ-74
CTZ-1403

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Added a REST endpoint to create/manage livechat monitors with request validation.
  • Deprecations

    • Deprecated the livechat:addMonitor method — migrate to /v1/livechat/monitors.create.
  • Bug Fixes

    • Improved error handling and clearer error messages for monitor operations.
  • Chores

    • Updated dependencies to patch versions.
  • Localization

    • Added "Error adding monitor" translation key.
  • Tests

    • Updated tests to use the new REST endpoints and simplified payloads.

✏️ Tip: You can customize this high-level summary in your review settings.

@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.12.0 milestone Sep 25, 2025
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 25, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.14.0, but it targets 7.13.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2025

🦋 Changeset detected

Latest commit: 4049425

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/core-typings Patch
@rocket.chat/apps Patch
@rocket.chat/freeswitch Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Walkthrough

Adds a deprecation warning for the Meteor method livechat:addMonitor, and introduces a new REST endpoint POST /livechat/monitors.create with request validation, permission and license checks. Tests and test utilities updated to use the REST flows; REST typings and i18n key added.

Changes

Cohort / File(s) Summary
API Endpoint Implementation
apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts
Adds POST /livechat/monitors.create endpoint with auth, manage-livechat-monitors permission and enterprise license check; validates request with isPOSTLivechatMonitorCreateRequest; maps errors (400/401/403); calls LivechatEnterprise.addMonitor(username) and returns result. Also defines LivechatMonitorsEndpoints type and augments @rocket.chat/rest-typings Endpoints.
Method Deprecation
apps/meteor/ee/app/livechat-enterprise/server/methods/addMonitor.ts
Adds methodDeprecationLogger.method('livechat:addMonitor', '8.0.0', '/v1/livechat/monitors') at method start to log deprecation; no other control-flow changes.
REST Typings & Validation
packages/rest-typings/src/v1/omnichannel.ts
Adds POSTLivechatMonitorCreateRequest type and AJV schema, isPOSTLivechatMonitorCreateRequest validator, POSTLivechatMonitorsCreateSuccess type and response schema/validator; re-adds related POSTLivechatRemoveCustomFields typings/validators.
Test Utilities (unit & e2e)
apps/meteor/tests/data/livechat/units.ts, apps/meteor/tests/e2e/utils/omnichannel/monitors.ts
Updates createMonitor() signatures and payloads to call the REST endpoint (now using { username }), adjust response parsing to return { _id, username, role } (units) or raw JSON (e2e), and update cleanup to remove by username.
End-to-end Tests
apps/meteor/tests/end-to-end/api/livechat/22-monitors.ts
Replaces RPC-style JSON-RPC envelopes and methodCall('livechat:addMonitor') usage with direct REST requests (payloads like { username }), updates expectations to inspect body.success/body.error, and expects HTTP 400 for invalid inputs.
Internationalization
packages/i18n/src/locales/en.i18n.json
Adds translation key "error-adding-monitor": "Error adding monitor".
Changeset Documentation
.changeset/many-walls-impress.md
Documents deprecation of livechat:addMonitor, notes replacement REST endpoint (livechat/monitors.create), and dependency patch updates.

Sequence Diagram

sequenceDiagram
    participant Client
    participant REST_API as REST API
    participant Validator
    participant Handler
    note right of REST_API `#DDEBF7`: New endpoint /livechat/monitors.create

    Client->>REST_API: POST /livechat/monitors.create\n{ username: "alice" }
    REST_API->>Validator: isPOSTLivechatMonitorCreateRequest(payload)
    alt valid
        Validator-->>REST_API: ok
        REST_API->>Handler: authorize & license check\nmanage-livechat-monitors, enterprise
        alt authorized
            Handler->>Handler: LivechatEnterprise.addMonitor("alice")
            Handler-->>REST_API: { _id, username, roles }
            REST_API-->>Client: 200 OK\n{ success: true, body: { _id, username, roles } }
        else not authorized
            REST_API-->>Client: 403 Forbidden
        end
    else invalid
        Validator-->>REST_API: invalid
        REST_API-->>Client: 400 Bad Request\n{ success: false, error: "..." }
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to validation schema correctness and AJV usage in packages/rest-typings.
  • Verify permission/license checks and error mappings in the new endpoint.
  • Confirm tests and utilities use the correct endpoint name and response shape (username vs _id) and that cleanup uses the intended identifier.

Suggested reviewers

  • tassoevan
  • aleksandernsilva
  • KevLehman

Poem

🐰 A rabbit hops with joyous cheer,
New monitors born, the old ones steer,
A deprecation nibble, soft and kind,
REST doors open, logs to find,
Tests and typings dance — a tidy year! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes changes to test utilities and RE-added a removed type POSTLivechatRemoveCustomFields. This re-addition appears unrelated to the primary deprecation objective. Clarify whether re-adding POSTLivechatRemoveCustomFields is intentional or a merge artifact. Verify all test changes directly support the livechat:addMonitor deprecation migration.
Linked Issues check ❓ Inconclusive The linked issue CORE-1403 provides no specific requirements. The PR implements deprecation logging, new REST endpoint, and API migration, but without issue details, full compliance cannot be assessed. Provide detailed requirements from CORE-1403 to validate that all coding objectives are met by the implementation.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding a deprecation warning to livechat:addMonitor and introducing a new endpoint to replace it, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v7/CTZ-74

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CTZ-1403: Request failed with status code 404

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.80%. Comparing base (f5eedbe) to head (4049425).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37061      +/-   ##
===========================================
- Coverage    68.83%   68.80%   -0.04%     
===========================================
  Files         3361     3361              
  Lines       114340   114308      -32     
  Branches     20619    20640      +21     
===========================================
- Hits         78706    78648      -58     
- Misses       33536    33566      +30     
+ Partials      2098     2094       -4     
Flag Coverage Δ
e2e 57.27% <100.00%> (-0.07%) ⬇️
e2e-api 42.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review October 3, 2025 16:21
@lucas-a-pelegrino lucas-a-pelegrino requested review from a team as code owners October 3, 2025 16:21
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
.changeset/many-walls-impress.md (1)

6-6: Clarify the endpoint path notation.

The changeset describes the replacement endpoint as livechat/monitors.save, but the actual REST endpoint path is /v1/livechat/monitors.save (including the version prefix). Consider using the full path for clarity in user-facing documentation.

apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (1)

63-95: LGTM! Consider enhancing error details in failure response.

The new REST endpoint is well-structured with proper authentication, validation, and error handling. However, the generic failure message at line 92 might make debugging difficult.

Consider logging the error details for debugging:

 	} catch (error: unknown) {
 		if (error instanceof Meteor.Error) {
 			return API.v1.failure(error.reason);
 		}
 
+		console.error('Error adding monitor:', error);
 		return API.v1.failure('error-adding-monitor');
 	}
apps/meteor/tests/end-to-end/api/livechat/22-monitors.ts (1)

113-145: Consider migrating monitor removal tests to REST endpoint.

The monitor creation tests have been migrated to the REST endpoint, but the removal tests (lines 113-145) still use the Meteor method livechat:removeMonitor. For consistency and to complete the REST migration, consider adding a REST endpoint for monitor removal and updating these tests accordingly.

If a REST endpoint for removal already exists or is planned, verify its usage here. Otherwise, this inconsistency should be tracked for future work.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 22b63f0 and b8a4520.

📒 Files selected for processing (8)
  • .changeset/many-walls-impress.md (1 hunks)
  • apps/meteor/client/omnichannel/monitors/MonitorsTable.tsx (2 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (2 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/methods/addMonitor.ts (2 hunks)
  • apps/meteor/tests/data/livechat/units.ts (1 hunks)
  • apps/meteor/tests/e2e/utils/omnichannel/monitors.ts (1 hunks)
  • apps/meteor/tests/end-to-end/api/livechat/22-monitors.ts (1 hunks)
  • packages/rest-typings/src/v1/omnichannel.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/utils/omnichannel/monitors.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/utils/omnichannel/monitors.ts
🧬 Code graph analysis (6)
apps/meteor/tests/end-to-end/api/livechat/22-monitors.ts (1)
apps/meteor/tests/data/api-data.ts (2)
  • request (10-10)
  • credentials (39-42)
apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (5)
packages/rest-typings/src/v1/omnichannel.ts (2)
  • POSTLivechatMonitorsSaveSuccessResponse (546-546)
  • isPOSTLivechatMonitorSaveRequest (531-531)
packages/rest-typings/src/v1/Ajv.ts (3)
  • validateBadRequestErrorResponse (46-46)
  • validateUnauthorizedErrorResponse (69-69)
  • validateForbiddenErrorResponse (92-92)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • LivechatEnterprise (13-183)
apps/meteor/app/api/server/ApiClass.ts (1)
  • ExtractRoutesFromAPI (73-77)
packages/rest-typings/src/index.ts (1)
  • Endpoints (51-98)
apps/meteor/client/omnichannel/monitors/MonitorsTable.tsx (2)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • addMonitor (14-30)
packages/ui-contexts/src/index.ts (1)
  • useEndpoint (32-32)
apps/meteor/tests/data/livechat/units.ts (2)
apps/meteor/tests/e2e/utils/omnichannel/monitors.ts (1)
  • createMonitor (8-22)
apps/meteor/tests/data/api-data.ts (2)
  • request (10-10)
  • credentials (39-42)
packages/rest-typings/src/v1/omnichannel.ts (1)
packages/core-typings/src/IUser.ts (1)
  • IUser (186-253)
apps/meteor/tests/e2e/utils/omnichannel/monitors.ts (2)
apps/meteor/tests/data/livechat/units.ts (1)
  • createMonitor (7-21)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • removeMonitor (32-51)
🔇 Additional comments (5)
apps/meteor/ee/app/livechat-enterprise/server/methods/addMonitor.ts (1)

7-7: LGTM!

The deprecation logging is correctly implemented and positioned before the permission check, ensuring all invocations are logged regardless of authorization outcome. The specified version and replacement endpoint align with the REST migration strategy.

Also applies to: 19-19

apps/meteor/tests/data/livechat/units.ts (1)

7-21: LGTM!

The migration from the Meteor method call to the REST endpoint is correctly implemented. The simplified response handling (directly using res.body instead of parsing JSON-RPC envelope) aligns with REST conventions and the updated return type accurately reflects the new endpoint's response shape.

apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (1)

97-102: LGTM!

The type extraction and module augmentation correctly expose the new endpoint types to consumers, enabling type-safe usage across the codebase.

apps/meteor/tests/end-to-end/api/livechat/22-monitors.ts (1)

83-111: LGTM!

The test updates correctly migrate from RPC-style Meteor method calls to REST endpoint usage. The assertions now properly validate HTTP status codes and REST response shapes, including appropriate error handling for invalid inputs.

packages/rest-typings/src/v1/omnichannel.ts (1)

516-531: LGTM!

The request type and validator are correctly defined with appropriate AJV schema validation. The required username field and schema structure align with the endpoint requirements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/i18n/src/locales/en.i18n.json (1)

6246-6246: Avoid duplicate strings for the same error; confirm intended key and usages

You added error-adding-monitor, but a similar key already exists: Failed_to_add_monitor (Line 2087). This risks divergence. Prefer reusing one key across flows (or deprecate the legacy one) to keep i18n consistent.

  • Confirm which key the new REST path uses and whether the old Meteor path still references the other.
  • If the REST path can reuse the existing label, drop the new key; otherwise plan a cleanup to migrate consumers to kebab-case and remove the legacy key in a follow-up.
  • Ensure other locales add this key if keeping it.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b8a4520 and 4b63861.

📒 Files selected for processing (1)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

@lucas-a-pelegrino lucas-a-pelegrino added the stat: QA assured Means it has been tested and approved by a company insider label Oct 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 12, 2025
Copy link
Contributor

@tassoevan tassoevan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't *.save endpoints supposed to update or insert objects? Since the original method uses add as verb I'm not sure if it just inserts a new monitor or it's idempotent.

@lucas-a-pelegrino
Copy link
Contributor Author

Aren't *.save endpoints supposed to update or insert objects? Since the original method uses add as verb I'm not sure if it just inserts a new monitor or it's idempotent.

We use the .save suffix as the standard in the backend for endpoints that adds a resource, updates it, or both.

tassoevan
tassoevan previously approved these changes Nov 19, 2025
@tassoevan tassoevan requested a review from KevLehman November 19, 2025 15:04
KevLehman
KevLehman previously approved these changes Nov 21, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 346MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -317B
queue-worker-service 132MiB 132MiB -97B
ddp-streamer-service 127MiB 127MiB -406B
account-service 114MiB 114MiB +888B
stream-hub-service 111MiB 111MiB +481B
authorization-service 111MiB 111MiB +1.1KiB
presence-service 111MiB 111MiB -653B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/25 21:17 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 7 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37061
  • Baseline: develop
  • Timestamp: 2025-11-25 21:17:27 UTC
  • Historical data points: 7

Updated: Tue, 25 Nov 2025 21:17:28 GMT

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 497677f and b0fd14a.

📒 Files selected for processing (2)
  • apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (2 hunks)
  • packages/rest-typings/src/v1/omnichannel.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/rest-typings/src/v1/omnichannel.ts
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37408
File: apps/meteor/client/views/admin/ABAC/useRoomAttributeOptions.tsx:53-69
Timestamp: 2025-11-10T19:06:20.146Z
Learning: In the Rocket.Chat repository, do not provide suggestions or recommendations about code sections marked with TODO comments. The maintainers have already identified these as future work and external reviewers lack the full context about implementation plans and timing.
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.673Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.
🧬 Code graph analysis (1)
apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (5)
packages/rest-typings/src/v1/omnichannel.ts (2)
  • POSTLivechatMonitorsCreateSuccessResponse (546-548)
  • isPOSTLivechatMonitorCreateRequest (531-531)
packages/rest-typings/src/v1/Ajv.ts (3)
  • validateBadRequestErrorResponse (47-47)
  • validateUnauthorizedErrorResponse (70-70)
  • validateForbiddenErrorResponse (93-93)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • LivechatEnterprise (14-186)
apps/meteor/app/api/server/ApiClass.ts (1)
  • ExtractRoutesFromAPI (73-77)
packages/rest-typings/src/index.ts (1)
  • Endpoints (51-98)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/ee/app/livechat-enterprise/server/api/monitors.ts (3)

2-8: LGTM! Clean imports for the new endpoint.

All imported validators and types are properly used in the endpoint definition.

Also applies to: 12-12, 14-14


63-76: Endpoint configuration looks solid.

The endpoint properly enforces authentication, permissions (manage-livechat-monitors), license checks, and request/response validation. The use of .create in the route name clearly indicates this is a create-only operation.


86-91: Type augmentation correctly implemented.

The pattern of extracting routes and augmenting the Endpoints interface ensures type-safe access to the new endpoint across the codebase.

@scuciatto scuciatto modified the milestones: 7.13.0, 7.14.0 Nov 25, 2025
@kodiakhq kodiakhq bot merged commit a5a7343 into develop Nov 26, 2025
88 of 90 checks passed
@kodiakhq kodiakhq bot deleted the chore/v7/CTZ-74 branch November 26, 2025 10:36
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants