chore: migrate livechat/config, livechat/webhook.test, and livechat/integrations.settings to OpenAPI chained API pattern with AJV validation
Closed
NA
3mo ago+244+244+012345678901234567890123456789-141-141-012345678901234567890123456789
Changes
- Migrated
livechat/configGET endpoint fromAPI.v1.addRouteto chained.get()pattern, chained with existinglivechat/config/routing - Migrated
livechat/webhook.testPOST endpoint fromAPI.v1.addRouteto chained.post()pattern - Migrated
livechat/integrations.settingsGET endpoint fromAPI.v1.addRouteto chained.get()pattern - Removed manual type definitions for all 3 endpoints from
rest-typings/omnichannel.ts(now auto-inferred viaExtractRoutesFromAPI) - Added AJV response schema validation for 200, 401 responses
- No changes to endpoint logic or behavior
Part of
Part of the ongoing REST API migration effort: RocketChat/Rocket.Chat-Open-API#150
Summary by CodeRabbit
-
New Features
- Richer webhook test payloads and improved webhook testing flow for more realistic previews.
- New structured livechat config and integrations endpoint surfaces.
-
Bug Fixes
- Explicit webhook URL validation and clearer success/failure reporting.
- Added explicit auth/permission checks and 401 handling for livechat endpoints.
-
Refactor
- Standardized livechat REST surfaces with explicit request/response schemas and updated public API typings, and cleanup of outdated public endpoint signatures.