chore: migrate livechat/config, livechat/webhook.test, and livechat/integrations.settings to OpenAPI chained API pattern with AJV validation

Closed
NA
3mo ago
+244-141

Changes

  • Migrated livechat/config GET endpoint from API.v1.addRoute to chained .get() pattern, chained with existing livechat/config/routing
  • Migrated livechat/webhook.test POST endpoint from API.v1.addRoute to chained .post() pattern
  • Migrated livechat/integrations.settings GET endpoint from API.v1.addRoute to chained .get() pattern
  • Removed manual type definitions for all 3 endpoints from rest-typings/omnichannel.ts (now auto-inferred via ExtractRoutesFromAPI)
  • 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.