import type { RequestOptions } from "../base-client"; import { RequestBuilder } from "../request-builder"; /** * Request parameters for obtaining a scoped channel token. * * Available channel patterns: * - `"audit"` — Audit log events (log created, export completed, anomaly detected) * - `"chat_thread"` — Chat thread messages * - `"voice"` — Voice session events * - `"agent_execution"` — Agent execution progress (tokens, tools, approvals) * - `"pipeline_execution"` — Pipeline HITL checkpoint events (reached, approved, rejected) * - `"activity"` — Workspace activity feed * - `"workspace"` — Workspace-level notifications * - `"extraction_export"` — Document extraction exports * - `"campaigns_export"` — Campaign export progress * - `"email_builder"` — Email builder live preview * - `"watcher"` — File watcher events * - `"crm"` — CRM entity changes (contacts, companies, deals, activities, relationships) * - `"cases"` — Case workflow events scoped by `cases:{workspaceId}`: case lifecycle (created, updated, destroyed, state_transitioned, owner_assigned, decided, reopened, closed), document/entity/pipeline link lifecycle (attached, detached), case type lifecycle (created, updated, activated, deactivated) — 18 event types, IDs + enums only. * - `"contracts"` — Contract lifecycle events scoped by `contracts:{workspaceId}`: contract_synced, contract_created, contract_updated, contract_clause_extracted, contract_renewal_due, contract_renewal_alert_sent — 6 event types, IDs + enums only, no `body_text` payload content. * - `"meetings"` — Meeting lifecycle events scoped by `meetings:{workspaceId}`: meeting_synced, meeting_created, meeting_updated, meeting_transcript_ready, meeting_processed, meeting_action_item_created, meeting_transcript_fetch_skipped — 7 event types, IDs + non-PHI metadata only (no `transcript_text`, `summary_text`, `task_text`, or `attendees` payload content). ISVs hydrate transcript and action item content via authenticated GET routes. * - `"scheduling"` — Scheduling events (bookings, cancellations, rescheduling) * - `"clinical"` — Clinical events (patients, sessions, notes) — IDs only, no PHI * - `"import"` — Per-import progress events (topic: `import:{importId}`) — validation, progress, completion, failure * - `"social"` — Social media events (accounts, posts, metrics, trending, campaigns) * - `"connectors"` — Connector events (lifecycle, credential rotation/refresh, sync completion/failure, tool lifecycle) * - `"forms"` — AI form generation events (`generation_completed`, `generation_failed`) on the `forms:{workspace_id}` topic * - `"reviews"` — Review workflow events scoped by `reviews:{workspaceId}`: review lifecycle (created, assigned, claimed, unclaimed, approved, rejected, corrected, escalated, expired), queue lifecycle (created, archived), queue membership lifecycle (granted, revoked) — IDs + enums only. * - `"authorization"` — Authorization events scoped by `authorization:{tenantId}`: access grant lifecycle (created, updated, revoked), role lifecycle (created, updated), permission changes (granted, revoked), ownership cascade (nullified on access revocation) — IDs + enums only, no permission strings or custom_permissions contents. `ComplianceTagsChanged` is application-scoped and delivered via webhooks only. */ export interface ChannelTokenRequest { /** The workspace UUID to scope the token to. */ workspaceId: string; /** Channel patterns to authorize (e.g., ["chat_thread", "voice"]). */ channels: string[]; } /** Response from the channel token endpoint. */ export interface ChannelTokenResponse { /** The scoped channel token (prefixed with "cht_"). */ channelToken: string; /** ISO 8601 expiry timestamp. */ expiresAt: string; /** Authorized channel patterns. */ channels: string[]; /** The workspace this token is scoped to. */ workspaceId: string; } /** * Creates the channels namespace for the admin SDK. * * Uses the ISV endpoint (`POST /isv/channels/token`). * * @example * ```typescript * const result = await admin.channels.authorize({ * workspaceId: "ws-uuid", * channels: ["chat_thread"], * }); * ``` */ export declare function createChannelsNamespace(rb: RequestBuilder): { /** * Exchange the current bearer token for a scoped channel token. * * **Important:** This endpoint requires user context (Bearer token from a * `sk_tenant_` key). Server keys (`sk_srv_`, `sk_sys_`) are explicitly * rejected — channel tokens are scoped to end-user sessions. * * @param request - Workspace and channel scope * @param options - Request options (signal, etc.) * @returns Channel token response */ authorize(request: ChannelTokenRequest, options?: RequestOptions): Promise; }; //# sourceMappingURL=channels.d.ts.map