@lua-ai-global/channels-contract
v0.3.0
Published
The contract between Lua's server and every app that connects an agent's channels: request and response types with zod schemas.
Readme
@lua-ai-global/channels-contract
The contract between Lua's server and every app that connects an agent's channels (Email, Slack, WhatsApp): request and response types, plus every channel's status and settings, each with a zod schema. No UI and no network code; each app sends with its own client.
npm install @lua-ai-global/channels-contract zodzod is a peer dependency (^3.25 || ^4); the schemas import zod/v4, which both majors ship.
| Area | Routes | Exports |
| ------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Channel list | GET /admin/agents/:agentId/channels | channelsListResponseSchema, Channel, ChannelLink |
| Connect | POST /admin/agents/:agentId/channels | connectChannelBodySchema (email, slack, whatsapp) |
| Update | PUT /admin/agents/:agentId/channels/:channelIdentifier | updateChannelBodySchema |
| Disconnect | DELETE /admin/agents/:agentId/channels/:channelId | removedChannelSchema |
| Status and settings | GET/PATCH …/:channelId/settings, GET …/:channelId/settings/history?limit= | channelSettingsViewSchema, updateChannelSettingsBodySchema, channelSettingsErrorSchema, channelSettingsHistorySchema |
| Connect attempt | GET {auth}/channels/connect-attempt/:attemptId | connectAttemptStatusSchema, ATTEMPT_ID_PATTERN |
| Slack | …/slack/manifest, …/:channelId/slack/{manifest/merge,check,install-url,workspace-channels} | slackSetupSchema, slackManifestViewSchema, slackConnectionCheckSchema, … |
| WhatsApp personal link | …/whatsapp/{link,link/status,links,unlink} | whatsappLink*Schema |
| WhatsApp Business hosted signup | POST …/whatsapp/connect-session | whatsappConnectSessionSchema |
Response schemas are for apps that want to check what they get; types alone cost nothing at runtime.
