Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(calls): add a supported way for programs to join calls (#9960)

Eric Hayes54058bdb8bef
diff --git a/.github/kafka-cluster-topics.json b/.github/kafka-cluster-topics.json
index a3cb692efb..1a55c3e928 100644
--- a/.github/kafka-cluster-topics.json
+++ b/.github/kafka-cluster-topics.json
@@ -5,6 +5,7 @@
"macro.agent_sessions",
"macro.bots",
"macro.calendar",
+ "macro.call_notifications",
"macro.calls",
"macro.channels",
"macro.chats",
diff --git a/.sqlx/query-2173e18e9b8eefc750c767c53f4219733ab4f3707925baff280928a5d9c72b96.json b/.sqlx/query-2173e18e9b8eefc750c767c53f4219733ab4f3707925baff280928a5d9c72b96.json
new file mode 100644
index 0000000000..794948c922
--- /dev/null
+++ b/.sqlx/query-2173e18e9b8eefc750c767c53f4219733ab4f3707925baff280928a5d9c72b96.json
@@ -0,0 +1,24 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT (\n EXISTS (SELECT 1 FROM call_participants WHERE call_id = $1 AND left_at IS NULL AND client <> 'person')\n AND NOT EXISTS (SELECT 1 FROM call_participants WHERE call_id = $1 AND left_at IS NULL AND client = 'person')\n AND NOT EXISTS (SELECT 1 FROM call_guests WHERE call_id = $1 AND left_at IS NULL)\n AND COALESCE((SELECT MAX(left_at) FROM call_participants WHERE call_id = $1 AND client = 'person'), $2) <= $3\n AND COALESCE((SELECT MAX(left_at) FROM call_guests WHERE call_id = $1), $2) <= $3\n ) AS \"eligible!\"",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "eligible!",
+ "type_info": "Bool"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Uuid",
+ "Timestamptz",
+ "Timestamptz"
+ ]
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "2173e18e9b8eefc750c767c53f4219733ab4f3707925baff280928a5d9c72b96"
+}
diff --git a/.sqlx/query-5838be43d4152f9c6bd7288d47c8b0de4fd11aba36f0b7024134a3a21315c264.json b/.sqlx/query-5838be43d4152f9c6bd7288d47c8b0de4fd11aba36f0b7024134a3a21315c264.json
new file mode 100644
index 0000000000..e4f6eb8782
--- /dev/null
+++ b/.sqlx/query-5838be43d4152f9c6bd7288d47c8b0de4fd11aba36f0b7024134a3a21315c264.json
@@ -0,0 +1,16 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "UPDATE call_participants SET client = $3 WHERE call_id = $1 AND user_id = $2 AND left_at IS NULL",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Uuid",
+ "Text",
+ "Text"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "5838be43d4152f9c6bd7288d47c8b0de4fd11aba36f0b7024134a3a21315c264"
+}
diff --git a/.sqlx/query-db773176d34fd31126967b3cf7eb6e64128552591ec56d4f36f40795f0cad5ce.json b/.sqlx/query-db773176d34fd31126967b3cf7eb6e64128552591ec56d4f36f40795f0cad5ce.json
new file mode 100644
index 0000000000..6c063c2568
--- /dev/null
+++ b/.sqlx/query-db773176d34fd31126967b3cf7eb6e64128552591ec56d4f36f40795f0cad5ce.json
@@ -0,0 +1,23 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT (\n EXISTS (\n SELECT 1 FROM calls c\n JOIN comms_channel_participants p ON p.channel_id = c.channel_id\n WHERE c.id = $1 AND p.user_id = $2 AND p.left_at IS NULL\n ) OR EXISTS (\n SELECT 1 FROM calls c\n JOIN call_meetings m ON m.id = c.meeting_id\n WHERE c.id = $1 AND c.channel_id IS NULL AND m.cancelled_at IS NULL\n AND (m.user_id = $2 OR EXISTS (\n SELECT 1 FROM call_participants p\n WHERE p.call_id = c.id AND p.user_id = $2\n ) OR EXISTS (\n SELECT 1 FROM call_invitees i\n WHERE i.call_id = c.id AND i.user_id = $2\n ))\n )\n ) AS \"allowed!\"",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "allowed!",
+ "type_info": "Bool"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Uuid",
+ "Text"
+ ]
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "db773176d34fd31126967b3cf7eb6e64128552591ec56d4f36f40795f0cad5ce"
+}
diff --git a/.sqlx/query-e6f56a896d5fb0845c33946a8d72c6ca111a17c70ae4e836042e8f1bd767236e.json b/.sqlx/query-e6f56a896d5fb0845c33946a8d72c6ca111a17c70ae4e836042e8f1bd767236e.json
new file mode 100644
index 0000000000..abb955ffe2
--- /dev/null
+++ b/.sqlx/query-e6f56a896d5fb0845c33946a8d72c6ca111a17c70ae4e836042e8f1bd767236e.json
@@ -0,0 +1,52 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n SELECT c.id, c.channel_id, c.room_name, c.created_by, c.created_at, c.egress_id\n FROM calls c\n WHERE EXISTS (\n SELECT 1 FROM comms_channel_participants p\n WHERE p.channel_id = c.channel_id AND p.user_id = $1 AND p.left_at IS NULL\n ) OR (c.channel_id IS NULL AND EXISTS (\n SELECT 1 FROM call_meetings m\n WHERE m.id = c.meeting_id AND m.cancelled_at IS NULL\n AND (m.user_id = $1 OR EXISTS (\n SELECT 1 FROM call_participants p WHERE p.call_id = c.id AND p.user_id = $1\n ) OR EXISTS (\n SELECT 1 FROM call_invitees i WHERE i.call_id = c.id AND i.user_id = $1\n ))\n ))\n ORDER BY c.created_at DESC\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 1,
+ "name": "channel_id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 2,
+ "name": "room_name",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 3,
+ "name": "created_by",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 4,
+ "name": "created_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 5,
+ "name": "egress_id",
+ "type_info": "Text"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Text"
+ ]
+ },
+ "nullable": [
+ false,
+ true,
+ false,
+ false,
+ false,
+ true
+ ]
+ },
+ "hash": "e6f56a896d5fb0845c33946a8d72c6ca111a17c70ae4e836042e8f1bd767236e"
+}
diff --git a/Cargo.lock b/Cargo.lock
index 98a1e88078..d30f48fc8d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4053,6 +4053,7 @@ dependencies = [
"aws-sdk-s3",
"axum",
"base64 0.22.1",
+ "bot_id",
"channels",
"chrono",
"cloudfront_sign",
@@ -4079,6 +4080,7 @@ dependencies = [
"mockall",
"model-entity",
"model-error-response",
+ "model_user",
"models_pagination",
"models_permissions",
"notification",
@@ -22245,6 +22247,7 @@ dependencies = [
"axum",
"axum-extra",
"bot_id",
+ "call",
"channel_sender",
"channels",
"chrono",
diff --git a/apps/web/src/features/channel/Call/CallOverlay.tsx b/apps/web/src/features/channel/Call/CallOverlay.tsx
index 62adcf43dc..5e76603f9e 100644
--- a/apps/web/src/features/channel/Call/CallOverlay.tsx
+++ b/apps/web/src/features/channel/Call/CallOverlay.tsx
@@ -18,7 +18,7 @@ import ChatIcon from '@icon/system/regular/chat-circle.svg';
import CornersInIcon from '@icon/system/regular/corners-in.svg';
import CornersOutIcon from '@icon/system/regular/corners-out.svg';
import UsersIcon from '@icon/system/regular/users.svg';
-import { Button, cn } from '@ui';
+import { Badge, Button, cn } from '@ui';
import type { RemoteParticipant, Track } from 'livekit-client';
import {
createEffect,
@@ -43,6 +43,7 @@ import {
} from './chat/components/CallChatPanel';
import { createControlsVisibility } from './create-controls-visibility';
import type { CallPanelState } from './discussion/CallDiscussionContent';
+import { isProgramParticipant } from './is-program-participant';
import { LK_TRACK_SOURCE } from './livekit-loader';
import { MutedMicrophoneBadge } from './MutedMicrophoneBadge';
import { ParticipantAvatarBackground } from './ParticipantAvatarBackground';
@@ -56,16 +57,22 @@ function VideoTag(props: {
children: JSXElement;
class?: string;
variant?: 'default' | 'truncated';
+ isProgram?: boolean;
}) {
return (
<div
class={cn(
- 'absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-surface/70 text-ink text-xs',
- props.variant === 'truncated' ? 'truncate max-w-[80%]' : '',
+ 'absolute bottom-1 left-1 flex max-w-[calc(100%-0.5rem)] items-center gap-1 rounded bg-surface/70 px-1.5 py-0.5 text-ink text-xs',
+ props.variant === 'truncated' && 'max-w-[80%]',
props.class
)}
>
- {props.children}
+ <span class="min-w-0 truncate">{props.children}</span>
+ <Show when={props.isProgram}>
+ <Badge variant="secondary" size="xs">
+ {t('calls.agent')}
+ </Badge>
+ </Show>
</div>
);
}
@@ -187,6 +194,7 @@ function LocalParticipantTile(props: {
track: Track | undefined;
userId: string | undefined;
fallbackName: string | undefined;
+ isProgram: boolean;
avatarSize?: 'sm' | 'md';
class?: string;
isFocused?: boolean;
@@ -216,7 +224,10 @@ function LocalParticipantTile(props: {
<MutedMicrophoneBadge muted={props.isAudioMuted} label="You are muted" />
- <Show when={props.isConnecting} fallback={<VideoTag>You</VideoTag>}>
+ <Show
+ when={props.isConnecting}
+ fallback={<VideoTag isProgram={props.isProgram}>You</VideoTag>}
+ >
<div class="absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-surface/70 text-ink-muted text-xs">
Connecting...
</div>
@@ -281,7 +292,12 @@ function ParticipantTile(props: {
label={`${displayName()} is muted`}
/>
- <VideoTag variant="truncated">{displayName()}</VideoTag>
+ <VideoTag
+ variant="truncated"
+ isProgram={isProgramParticipant(props.participant.attributes)}
+ >
+ {displayName()}
+ </VideoTag>
</ParticipantTileWrapper>
);
}
@@ -302,7 +318,12 @@ function ScreenShareTile(props: { participant: RemoteParticipant }) {
<div class="relative size-full flex items-center justify-center rounded-lg overflow-hidden bg-panel border border-edge-muted">
<TrackView track={screenTrack()} fit="contain" />
- <VideoTag variant="truncated">{displayName()}'s screen</VideoTag>
+ <VideoTag
+ variant="truncated"
+ isProgram={isProgramParticipant(props.participant.attributes)}
+ >
+ {displayName()}'s screen
+ </VideoTag>
</div>
);
}
@@ -615,7 +636,13 @@ export function CallOverlay(props: {
<div class="relative size-full">
<TrackView track={localScreenTrack()} fit="contain" />
- <VideoTag>Your screen</VideoTag>
+ <VideoTag
+ isProgram={isProgramParticipant(
+ callCtx.room()?.localParticipant.attributes
+ )}
+ >
+ Your screen
+ </VideoTag>
</div>
</Show>
<For each={remoteScreenShares()}>
@@ -648,6 +675,9 @@ export function CallOverlay(props: {
callCtx.room()?.localParticipant.name ||
currentUserName()
}
+ isProgram={isProgramParticipant(
+ callCtx.room()?.localParticipant.attributes
+ )}
isFocused={focusedParticipant() === 'local'}
/>
}
@@ -712,6 +742,9 @@ export function CallOverlay(props: {
callCtx.room()?.localParticipant.name ||
currentUserName()
}
+ isProgram={isProgramParticipant(
+ callCtx.room()?.localParticipant.attributes
+ )}
avatarSize="sm"
isFocused={focusedParticipant() === 'local'}
onToggleFocus={() => toggleParticipantFocus('local')}
diff --git a/apps/web/src/features/channel/Call/CallParticipantsList.tsx b/apps/web/src/features/channel/Call/CallParticipantsList.tsx
index e1caa541bb..7041239b03 100644
--- a/apps/web/src/features/channel/Call/CallParticipantsList.tsx
+++ b/apps/web/src/features/channel/Call/CallParticipantsList.tsx
@@ -6,16 +6,18 @@ import Microphone from '@icon/system/regular/microphone.svg';
import MicrophoneSlash from '@icon/system/regular/microphone-slash.svg';
import VideoCamera from '@icon/system/regular/video-camera.svg';
import VideoCameraSlash from '@icon/system/regular/video-camera-slash.svg';
-import { Avatar, cn } from '@ui';
+import { Avatar, Badge, cn } from '@ui';
import type { RemoteParticipant } from 'livekit-client';
import { createMemo, For, Show } from 'solid-js';
import { useCallContext } from './CallContext';
+import { isProgramParticipant } from './is-program-participant';
import { LK_TRACK_SOURCE } from './livekit-loader';
function ParticipantRow(props: {
name: string;
userId?: string;
local?: boolean;
+ isProgram: boolean;
speaking: boolean;
muted: boolean;
videoEnabled: boolean;
@@ -37,11 +39,18 @@ function ParticipantRow(props: {
</Show>
</div>
<div class="min-w-0 flex-1">
- <p class="truncate text-sm" title={props.name}>
- {props.local
- ? t('calls.localParticipant', { name: props.name })
- : props.name}
- </p>
+ <div class="flex min-w-0 items-center gap-1">
+ <p class="min-w-0 truncate text-sm" title={props.name}>
+ {props.local
+ ? t('calls.localParticipant', { name: props.name })
+ : props.name}
+ </p>
+ <Show when={props.isProgram}>
+ <Badge variant="secondary" size="xs">
+ {t('calls.agent')}
+ </Badge>
+ </Show>
+ </div>
<Show when={props.speaking}>
<p class="text-xs text-accent">{t('calls.speaking')}</p>
</Show>
@@ -94,6 +103,7 @@ function RemoteParticipantRow(props: { participant: RemoteParticipant }) {
<ParticipantRow
name={name()}
userId={userId()}
+ isProgram={isProgramParticipant(props.participant.attributes)}
speaking={call.isParticipantSpeaking(props.participant)}
muted={publication(LK_TRACK_SOURCE.Microphone)?.isMuted ?? true}
videoEnabled={publication(LK_TRACK_SOURCE.Camera)?.isMuted === false}
@@ -130,6 +140,9 @@ export function CallParticipantsList(props: { localName?: string }) {
name={localName()}
userId={localUserId()}
local
+ isProgram={isProgramParticipant(
+ call.room()?.localParticipant.attributes
+ )}
speaking={call.isLocalSpeaking()}
muted={call.isAudioMuted()}
videoEnabled={!call.isVideoMuted()}
diff --git a/apps/web/src/features/channel/Call/is-program-participant.ts b/apps/web/src/features/channel/Call/is-program-participant.ts
new file mode 100644
index 0000000000..b3d8989839
--- /dev/null
+++ b/apps/web/src/features/channel/Call/is-program-participant.ts
@@ -0,0 +1,5 @@
+export function isProgramParticipant(
+ attributes: Record<string, string> | undefined
+): boolean {
+ return Boolean(attributes?.['macro.program']);
+}
diff --git a/apps/web/src/features/channel/Call/tests/call-lifecycle.test.ts b/apps/web/src/features/channel/Call/tests/call-lifecycle.test.ts
index b7f351186d..f58fa851be 100644
--- a/apps/web/src/features/channel/Call/tests/call-lifecycle.test.ts
+++ b/apps/web/src/features/channel/Call/tests/call-lifecycle.test.ts
@@ -25,6 +25,7 @@ const token: CallTokenResponse = {
token: 'token',
serverUrl: 'ws://localhost',
participantId: 'macro|[email protected]',
+ started: false,
shareToken: null,
} satisfies CallTokenResponse;
const cleanups: (() => void)[] = [];
diff --git a/apps/web/src/features/channel/Call/tests/call-session-controller.test.ts b/apps/web/src/features/channel/Call/tests/call-session-controller.test.ts
index 6f2955e06e..0fd8ef6533 100644
--- a/apps/web/src/features/channel/Call/tests/call-session-controller.test.ts
+++ b/apps/web/src/features/channel/Call/tests/call-session-controller.test.ts
@@ -22,6 +22,7 @@ const token: CallTokenResponse = {
serverUrl: 'wss://example.com',
token: 'scoped-token',
participantId: 'guest-1',
+ started: false,
shareToken: 'meeting-secret',
};
diff --git a/apps/web/src/features/channel/Call/tests/is-program-participant.test.ts b/apps/web/src/features/channel/Call/tests/is-program-participant.test.ts
new file mode 100644
index 0000000000..8cd4012f74
--- /dev/null
+++ b/apps/web/src/features/channel/Call/tests/is-program-participant.test.ts
@@ -0,0 +1,16 @@
+import { describe, expect, it } from 'vitest';
+import { isProgramParticipant } from '../is-program-participant';
+
+describe('isProgramParticipant', () => {
+ it('recognizes program participants by their LiveKit attribute', () => {
+ expect(isProgramParticipant({ 'macro.program': 'agent' })).toBe(true);
+ expect(isProgramParticipant({ 'macro.program': 'api_key' })).toBe(true);
+ expect(isProgramParticipant({ 'macro.program': 'bot' })).toBe(true);
+ });
+
+ it('leaves people without a program attribute unmarked', () => {
+ expect(isProgramParticipant(undefined)).toBe(false);
+ expect(isProgramParticipant({})).toBe(false);
+ expect(isProgramParticipant({ 'macro.program': '' })).toBe(false);
+ });
+});
diff --git a/apps/web/src/features/channel/Call/tests/native-call-lifecycle.test.ts b/apps/web/src/features/channel/Call/tests/native-call-lifecycle.test.ts
index d552b1e132..b71cd215ee 100644
--- a/apps/web/src/features/channel/Call/tests/native-call-lifecycle.test.ts
+++ b/apps/web/src/features/channel/Call/tests/native-call-lifecycle.test.ts
@@ -55,6 +55,7 @@ function setup(initial: NativeCallSnapshot | null = first) {
token: 'token',
serverUrl: 'ws://localhost',
participantId: 'macro|[email protected]',
+ started: false,
shareToken: null,
})),
connect: vi.fn(async () => {}),
@@ -522,6 +523,7 @@ describe('native snapshot events and call ownership', () => {
token: 'token',
serverUrl: 'ws://localhost',
participantId: 'macro|[email protected]',
+ started: false,
shareToken: null,
};
});
@@ -579,6 +581,7 @@ describe('native snapshot events and call ownership', () => {
token: 'new-token',
serverUrl: 'ws://localhost',
participantId: 'macro|[email protected]',
+ started: false,
shareToken: null,
});
native.setSnapshot(first);
@@ -654,6 +657,7 @@ describe('native snapshot events and call ownership', () => {
token: 'new-token',
serverUrl: 'ws://localhost',
participantId: 'macro|[email protected]',
+ started: false,
shareToken: null,
};
});
diff --git a/apps/web/src/features/meetings/context/meeting-session.ts b/apps/web/src/features/meetings/context/meeting-session.ts
index 8cf8bb8598..5434cfaa4e 100644
--- a/apps/web/src/features/meetings/context/meeting-session.ts
+++ b/apps/web/src/features/meetings/context/meeting-session.ts
@@ -10,6 +10,7 @@ export type MeetingCredentials = {
token: string;
participantId: string;
shareToken: string | null;
+ started: boolean;
};
/** Live waiting-room capture tracks; whoever holds them must stop them. */
diff --git a/apps/web/src/features/meetings/primitives/meeting-session.test.ts b/apps/web/src/features/meetings/primitives/meeting-session.test.ts
index 56979bea7d..dd0eca0f5c 100644
--- a/apps/web/src/features/meetings/primitives/meeting-session.test.ts
+++ b/apps/web/src/features/meetings/primitives/meeting-session.test.ts
@@ -17,6 +17,7 @@ const token: MeetingCredentials = {
serverUrl: 'wss://example.com',
token: 'scoped-rtc-token',
participantId: 'guest-1',
+ started: false,
shareToken: 'meeting-secret',
};
const preferences = { microphoneEnabled: false, cameraEnabled: false };
diff --git a/apps/web/src/features/meetings/primitives/new-meeting.test.ts b/apps/web/src/features/meetings/primitives/new-meeting.test.ts
index a2c6acba8b..e7a448ad87 100644
--- a/apps/web/src/features/meetings/primitives/new-meeting.test.ts
+++ b/apps/web/src/features/meetings/primitives/new-meeting.test.ts
@@ -27,6 +27,7 @@ const credentials = {
serverUrl: 'wss://example.com',
token: 'rtc-token',
participantId: 'host',
+ started: false,
shareToken: meeting.shareToken,
};
const preferences = { microphoneEnabled: false, cameraEnabled: false };
diff --git a/apps/web/src/features/meetings/views/meeting-page-auth.test.tsx b/apps/web/src/features/meetings/views/meeting-page-auth.test.tsx
index 575b9caa11..a77639ee3b 100644
--- a/apps/web/src/features/meetings/views/meeting-page-auth.test.tsx
+++ b/apps/web/src/features/meetings/views/meeting-page-auth.test.tsx
@@ -106,6 +106,7 @@ it.each([
serverUrl: 'wss://example.com',
token: 'token',
participantId: 'member',
+ started: false,
shareToken: 'share',
}),
release: () => released,
diff --git a/apps/web/src/lib/i18n/locales/en/calls.ts b/apps/web/src/lib/i18n/locales/en/calls.ts
index b63cb234d1..fa9a56106f 100644
--- a/apps/web/src/lib/i18n/locales/en/calls.ts
+++ b/apps/web/src/lib/i18n/locales/en/calls.ts
@@ -25,6 +25,7 @@ export default {
localParticipant: '{{name}} (You)',
you: 'You',
guest: 'Guest',
+ agent: 'Agent',
speaking: 'Speaking',
microphoneOff: 'Microphone off',
microphoneOn: 'Microphone on',
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEvent.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEvent.ts
new file mode 100644
index 0000000000..ebb901e791
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEvent.ts
@@ -0,0 +1,31 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOf } from './callNotificationEventOneOf';
+import type { CallNotificationEventOneOfFive } from './callNotificationEventOneOfFive';
+import type { CallNotificationEventOneOfNine } from './callNotificationEventOneOfNine';
+import type { CallNotificationEventOneOfOnefive } from './callNotificationEventOneOfOnefive';
+import type { CallNotificationEventOneOfOnenine } from './callNotificationEventOneOfOnenine';
+import type { CallNotificationEventOneOfOneone } from './callNotificationEventOneOfOneone';
+import type { CallNotificationEventOneOfOneseven } from './callNotificationEventOneOfOneseven';
+import type { CallNotificationEventOneOfOnethree } from './callNotificationEventOneOfOnethree';
+import type { CallNotificationEventOneOfSeven } from './callNotificationEventOneOfSeven';
+import type { CallNotificationEventOneOfThree } from './callNotificationEventOneOfThree';
+
+/**
+ * Public call events. Private variants carry a recipient on the broker only.
+ */
+export type CallNotificationEvent =
+ | CallNotificationEventOneOf
+ | CallNotificationEventOneOfThree
+ | CallNotificationEventOneOfFive
+ | CallNotificationEventOneOfSeven
+ | CallNotificationEventOneOfNine
+ | CallNotificationEventOneOfOneone
+ | CallNotificationEventOneOfOnethree
+ | CallNotificationEventOneOfOnefive
+ | CallNotificationEventOneOfOneseven
+ | CallNotificationEventOneOfOnenine;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOf.ts
new file mode 100644
index 0000000000..992b1f0c21
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOf.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfEventType } from './callNotificationEventOneOfEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A call started.
+ */
+export type CallNotificationEventOneOf = {
+ event_type: CallNotificationEventOneOfEventType;
+ /** A call started. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfEventType.ts
new file mode 100644
index 0000000000..1500bc12df
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfEventType =
+ (typeof CallNotificationEventOneOfEventType)[keyof typeof CallNotificationEventOneOfEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfEventType = {
+ callstarted: 'call.started',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFive.ts
new file mode 100644
index 0000000000..72d7d79ece
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFive.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfFiveEventType } from './callNotificationEventOneOfFiveEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A participant entered the RTC room.
+ */
+export type CallNotificationEventOneOfFive = {
+ event_type: CallNotificationEventOneOfFiveEventType;
+ /** A participant entered the RTC room. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFiveEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFiveEventType.ts
new file mode 100644
index 0000000000..031e3c9be5
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfFiveEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfFiveEventType =
+ (typeof CallNotificationEventOneOfFiveEventType)[keyof typeof CallNotificationEventOneOfFiveEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfFiveEventType = {
+ callparticipant_joined: 'call.participant_joined',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNine.ts
new file mode 100644
index 0000000000..f4f7d4cb0f
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNine.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfNineEventType } from './callNotificationEventOneOfNineEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A recording became available.
+ */
+export type CallNotificationEventOneOfNine = {
+ event_type: CallNotificationEventOneOfNineEventType;
+ /** A recording became available. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNineEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNineEventType.ts
new file mode 100644
index 0000000000..1be59abe15
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfNineEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfNineEventType =
+ (typeof CallNotificationEventOneOfNineEventType)[keyof typeof CallNotificationEventOneOfNineEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfNineEventType = {
+ callrecording_ready: 'call.recording_ready',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefive.ts
new file mode 100644
index 0000000000..91639d76d0
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefive.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfOnefiveEventType } from './callNotificationEventOneOfOnefiveEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * The recipient answered.
+ */
+export type CallNotificationEventOneOfOnefive = {
+ event_type: CallNotificationEventOneOfOnefiveEventType;
+ /** The recipient answered. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefiveEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefiveEventType.ts
new file mode 100644
index 0000000000..0296d935f4
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnefiveEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfOnefiveEventType =
+ (typeof CallNotificationEventOneOfOnefiveEventType)[keyof typeof CallNotificationEventOneOfOnefiveEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfOnefiveEventType = {
+ callanswered: 'call.answered',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenine.ts
new file mode 100644
index 0000000000..b274d0fcba
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenine.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfOnenineEventType } from './callNotificationEventOneOfOnenineEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * The recipient was invited.
+ */
+export type CallNotificationEventOneOfOnenine = {
+ event_type: CallNotificationEventOneOfOnenineEventType;
+ /** The recipient was invited. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenineEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenineEventType.ts
new file mode 100644
index 0000000000..2f10e333d7
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnenineEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfOnenineEventType =
+ (typeof CallNotificationEventOneOfOnenineEventType)[keyof typeof CallNotificationEventOneOfOnenineEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfOnenineEventType = {
+ callinvited: 'call.invited',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneone.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneone.ts
new file mode 100644
index 0000000000..94e4f9855f
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneone.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfOneoneEventType } from './callNotificationEventOneOfOneoneEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A summary became available.
+ */
+export type CallNotificationEventOneOfOneone = {
+ event_type: CallNotificationEventOneOfOneoneEventType;
+ /** A summary became available. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneoneEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneoneEventType.ts
new file mode 100644
index 0000000000..e7cce454ee
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneoneEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfOneoneEventType =
+ (typeof CallNotificationEventOneOfOneoneEventType)[keyof typeof CallNotificationEventOneOfOneoneEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfOneoneEventType = {
+ callsummarized: 'call.summarized',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneseven.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneseven.ts
new file mode 100644
index 0000000000..44612f037b
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOneseven.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfOnesevenEventType } from './callNotificationEventOneOfOnesevenEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * The recipient declined.
+ */
+export type CallNotificationEventOneOfOneseven = {
+ event_type: CallNotificationEventOneOfOnesevenEventType;
+ /** The recipient declined. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnesevenEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnesevenEventType.ts
new file mode 100644
index 0000000000..cdb51568a6
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnesevenEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfOnesevenEventType =
+ (typeof CallNotificationEventOneOfOnesevenEventType)[keyof typeof CallNotificationEventOneOfOnesevenEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfOnesevenEventType = {
+ calldeclined: 'call.declined',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethree.ts
new file mode 100644
index 0000000000..f74bb6efff
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethree.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfOnethreeEventType } from './callNotificationEventOneOfOnethreeEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * The recipient is being rung.
+ */
+export type CallNotificationEventOneOfOnethree = {
+ event_type: CallNotificationEventOneOfOnethreeEventType;
+ /** The recipient is being rung. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethreeEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethreeEventType.ts
new file mode 100644
index 0000000000..315c8d2c96
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfOnethreeEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfOnethreeEventType =
+ (typeof CallNotificationEventOneOfOnethreeEventType)[keyof typeof CallNotificationEventOneOfOnethreeEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfOnethreeEventType = {
+ callringing: 'call.ringing',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSeven.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSeven.ts
new file mode 100644
index 0000000000..97f59ab46c
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSeven.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfSevenEventType } from './callNotificationEventOneOfSevenEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A participant left the RTC room.
+ */
+export type CallNotificationEventOneOfSeven = {
+ event_type: CallNotificationEventOneOfSevenEventType;
+ /** A participant left the RTC room. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSevenEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSevenEventType.ts
new file mode 100644
index 0000000000..d3fedf2393
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfSevenEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfSevenEventType =
+ (typeof CallNotificationEventOneOfSevenEventType)[keyof typeof CallNotificationEventOneOfSevenEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfSevenEventType = {
+ callparticipant_left: 'call.participant_left',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThree.ts
new file mode 100644
index 0000000000..3ee12f5ebd
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThree.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationEventOneOfThreeEventType } from './callNotificationEventOneOfThreeEventType';
+import type { CallNotificationMetadata } from './callNotificationMetadata';
+
+/**
+ * A call ended.
+ */
+export type CallNotificationEventOneOfThree = {
+ event_type: CallNotificationEventOneOfThreeEventType;
+ /** A call ended. */
+ metadata: CallNotificationMetadata;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThreeEventType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThreeEventType.ts
new file mode 100644
index 0000000000..c215467db1
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationEventOneOfThreeEventType.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type CallNotificationEventOneOfThreeEventType =
+ (typeof CallNotificationEventOneOfThreeEventType)[keyof typeof CallNotificationEventOneOfThreeEventType];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const CallNotificationEventOneOfThreeEventType = {
+ callended: 'call.ended',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadata.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadata.ts
new file mode 100644
index 0000000000..ab6e37101a
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadata.ts
@@ -0,0 +1,33 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { CallNotificationMetadataChannelId } from './callNotificationMetadataChannelId';
+import type { CallNotificationMetadataCreatedBy } from './callNotificationMetadataCreatedBy';
+import type { CallNotificationMetadataIdentity } from './callNotificationMetadataIdentity';
+import type { CallNotificationMetadataInvitedBy } from './callNotificationMetadataInvitedBy';
+import type { CallNotificationMetadataMeetingId } from './callNotificationMetadataMeetingId';
+import type { CallNotificationMetadataUserId } from './callNotificationMetadataUserId';
+
+/**
+ * Identifiers and actors for a public call notification. Optional fields are
+absent when they do not apply to the event.
+ */
+export interface CallNotificationMetadata {
+ /** Call identifier. */
+ call_id: string;
+ /** Channel containing the call, if any. */
+ channel_id?: CallNotificationMetadataChannelId;
+ /** User who created the call. */
+ created_by?: CallNotificationMetadataCreatedBy;
+ /** Room identity of the joining or departing participant. */
+ identity?: CallNotificationMetadataIdentity;
+ /** User who sent an invitation. */
+ invited_by?: CallNotificationMetadataInvitedBy;
+ /** Meeting associated with an invitation. */
+ meeting_id?: CallNotificationMetadataMeetingId;
+ /** Account identifier of the participant or answering user. */
+ user_id?: CallNotificationMetadataUserId;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataChannelId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataChannelId.ts
new file mode 100644
index 0000000000..e4bcca82d6
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataChannelId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Channel containing the call, if any.
+ */
+export type CallNotificationMetadataChannelId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataCreatedBy.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataCreatedBy.ts
new file mode 100644
index 0000000000..05d277bc6a
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataCreatedBy.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * User who created the call.
+ */
+export type CallNotificationMetadataCreatedBy = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataIdentity.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataIdentity.ts
new file mode 100644
index 0000000000..ade438ddf0
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataIdentity.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Room identity of the joining or departing participant.
+ */
+export type CallNotificationMetadataIdentity = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataInvitedBy.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataInvitedBy.ts
new file mode 100644
index 0000000000..0a96a780ec
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataInvitedBy.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * User who sent an invitation.
+ */
+export type CallNotificationMetadataInvitedBy = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataMeetingId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataMeetingId.ts
new file mode 100644
index 0000000000..d7f77a48a3
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataMeetingId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Meeting associated with an invitation.
+ */
+export type CallNotificationMetadataMeetingId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataUserId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataUserId.ts
new file mode 100644
index 0000000000..7998de8898
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callNotificationMetadataUserId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Account identifier of the participant or answering user.
+ */
+export type CallNotificationMetadataUserId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callTokenResponse.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callTokenResponse.ts
index cf2cebe262..ecebf8a52e 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callTokenResponse.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callTokenResponse.ts
@@ -23,6 +23,8 @@ export interface CallTokenResponse {
serverUrl: string;
/** Meeting link capability, when joined using a link. */
shareToken?: CallTokenResponseShareToken;
+ /** Whether this request allocated the call. */
+ started: boolean;
/** The RTC token for connecting to the room. */
token: string;
}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
index 161383c400..5f408b2023 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
@@ -297,6 +297,34 @@ export * from './callEntryStatusOneOfThreeState';
export * from './callFilters';
export * from './callFiltersAttended';
export * from './callFiltersStatus';
+export * from './callNotificationEvent';
+export * from './callNotificationEventOneOf';
+export * from './callNotificationEventOneOfEventType';
+export * from './callNotificationEventOneOfFive';
+export * from './callNotificationEventOneOfFiveEventType';
+export * from './callNotificationEventOneOfNine';
+export * from './callNotificationEventOneOfNineEventType';
+export * from './callNotificationEventOneOfOnefive';
+export * from './callNotificationEventOneOfOnefiveEventType';
+export * from './callNotificationEventOneOfOnenine';
+export * from './callNotificationEventOneOfOnenineEventType';
+export * from './callNotificationEventOneOfOneone';
+export * from './callNotificationEventOneOfOneoneEventType';
+export * from './callNotificationEventOneOfOneseven';
+export * from './callNotificationEventOneOfOnesevenEventType';
+export * from './callNotificationEventOneOfOnethree';
+export * from './callNotificationEventOneOfOnethreeEventType';
+export * from './callNotificationEventOneOfSeven';
+export * from './callNotificationEventOneOfSevenEventType';
+export * from './callNotificationEventOneOfThree';
+export * from './callNotificationEventOneOfThreeEventType';
+export * from './callNotificationMetadata';
+export * from './callNotificationMetadataChannelId';
+export * from './callNotificationMetadataCreatedBy';
+export * from './callNotificationMetadataIdentity';
+export * from './callNotificationMetadataInvitedBy';
+export * from './callNotificationMetadataMeetingId';
+export * from './callNotificationMetadataUserId';
export * from './callProvider';
export * from './callRecord';
export * from './callRecordChannelId';
@@ -1353,6 +1381,8 @@ export * from './item';
export * from './itemWithUserAccessLevel';
export * from './jobId';
export * from './jobStatus';
+export * from './joinCallRequest';
+export * from './joinCallRequestName';
export * from './keySegment';
export * from './lane';
export * from './laneKey';
@@ -1401,6 +1431,20 @@ export * from './listSlackImportsParams';
export * from './listTeamCalendarParams';
export * from './listTeamOutOfOfficeParams';
export * from './listWebhooksResponse';
+export * from './liveCallKind';
+export * from './liveCallParticipant';
+export * from './liveCallParticipantJoinedAt';
+export * from './liveCallParticipantsResponse';
+export * from './liveCallParticipantUserId';
+export * from './liveCallSummary';
+export * from './liveCallSummaryChannelId';
+export * from './liveCallSummaryMeetingId';
+export * from './liveCallSummaryShareToken';
+export * from './liveCallSummaryTitle';
+export * from './liveCallsResponse';
+export * from './liveCallTrack';
+export * from './liveParticipantKind';
+export * from './liveTrackSource';
export * from './locationResponseData';
export * from './locationResponseDataOneOf';
export * from './locationResponseDataOneOfTwo';
@@ -1536,6 +1580,7 @@ export * from './newView';
export * from './notificationFilters';
export * from './notificationState';
export * from './numberOperator';
+export * from './onOtherCall';
export * from './opBatch';
export * from './opBatchBaseVersions';
export * from './operator';
@@ -1738,6 +1783,7 @@ export * from './questionTally';
export * from './reactionInput';
export * from './reactionInputNonce';
export * from './recentlyDeletedResponseData';
+export * from './recordingBytes';
export * from './registerUploads';
export * from './removeParticipantsRequest';
export * from './renameChannelLabelParams';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequest.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequest.ts
new file mode 100644
index 0000000000..60a8ec3079
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequest.ts
@@ -0,0 +1,20 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { JoinCallRequestName } from './joinCallRequestName';
+import type { OnOtherCall } from './onOtherCall';
+
+/**
+ * Options for an authenticated call join.
+ */
+export interface JoinCallRequest {
+ /** Optional display name in the RTC room. */
+ name?: JoinCallRequestName;
+ /** What to do when this account is participating in another call. */
+ onOtherCall?: OnOtherCall;
+ /** Disconnect an existing RTC connection for this identity. */
+ replace?: boolean;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequestName.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequestName.ts
new file mode 100644
index 0000000000..4e62dd09c8
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/joinCallRequestName.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Optional display name in the RTC room.
+ */
+export type JoinCallRequestName = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallKind.ts
new file mode 100644
index 0000000000..16cebfe306
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallKind.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Whether a live call is associated with a channel.
+ */
+export type LiveCallKind = (typeof LiveCallKind)[keyof typeof LiveCallKind];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const LiveCallKind = {
+ channel: 'channel',
+ standalone: 'standalone',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipant.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipant.ts
new file mode 100644
index 0000000000..e8c6d3a0e6
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipant.ts
@@ -0,0 +1,30 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { LiveCallParticipantJoinedAt } from './liveCallParticipantJoinedAt';
+import type { LiveCallParticipantUserId } from './liveCallParticipantUserId';
+import type { LiveCallTrack } from './liveCallTrack';
+import type { LiveParticipantKind } from './liveParticipantKind';
+
+/**
+ * A connected participant in an RTC room.
+ */
+export interface LiveCallParticipant {
+ /** Name displayed to room members. */
+ displayName: string;
+ /** RTC identity. */
+ identity: string;
+ /** Whether the caller is a program. */
+ isProgram: boolean;
+ /** RTC connection time. */
+ joinedAt?: LiveCallParticipantJoinedAt;
+ /** User or guest. */
+ kind: LiveParticipantKind;
+ /** Published media tracks. */
+ tracks: LiveCallTrack[];
+ /** Macro account identifier, if this is a user. */
+ userId?: LiveCallParticipantUserId;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantJoinedAt.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantJoinedAt.ts
new file mode 100644
index 0000000000..22af02238a
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantJoinedAt.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * RTC connection time.
+ */
+export type LiveCallParticipantJoinedAt = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantUserId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantUserId.ts
new file mode 100644
index 0000000000..3a7410c957
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantUserId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Macro account identifier, if this is a user.
+ */
+export type LiveCallParticipantUserId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantsResponse.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantsResponse.ts
new file mode 100644
index 0000000000..e4257d63f9
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallParticipantsResponse.ts
@@ -0,0 +1,15 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { LiveCallParticipant } from './liveCallParticipant';
+
+/**
+ * A live RTC room roster.
+ */
+export interface LiveCallParticipantsResponse {
+ /** Connected participants. */
+ participants: LiveCallParticipant[];
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummary.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummary.ts
new file mode 100644
index 0000000000..f5ad421807
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummary.ts
@@ -0,0 +1,38 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+import type { LiveCallKind } from './liveCallKind';
+import type { LiveCallSummaryChannelId } from './liveCallSummaryChannelId';
+import type { LiveCallSummaryMeetingId } from './liveCallSummaryMeetingId';
+import type { LiveCallSummaryShareToken } from './liveCallSummaryShareToken';
+import type { LiveCallSummaryTitle } from './liveCallSummaryTitle';
+
+/**
+ * A live call visible to an account that can join it.
+ */
+export interface LiveCallSummary {
+ /** Session identifier. */
+ callId: string;
+ /** Channel identifier, if present. */
+ channelId?: LiveCallSummaryChannelId;
+ /** When the session was created. */
+ createdAt: string;
+ /** Caller identifier. */
+ createdBy: string;
+ /** Channel or standalone call. */
+ kind: LiveCallKind;
+ /** Invitation identifier, if present. */
+ meetingId?: LiveCallSummaryMeetingId;
+ /** Number of active people and guests. */
+ participantCount: number;
+ /** Whether this account is currently being rung. */
+ ringing: boolean;
+ /** Invitation capability, if present. */
+ shareToken?: LiveCallSummaryShareToken;
+ /** Invitation title, if present. */
+ title?: LiveCallSummaryTitle;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryChannelId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryChannelId.ts
new file mode 100644
index 0000000000..82065daef6
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryChannelId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Channel identifier, if present.
+ */
+export type LiveCallSummaryChannelId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryMeetingId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryMeetingId.ts
new file mode 100644
index 0000000000..c63860de82
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryMeetingId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Invitation identifier, if present.
+ */
+export type LiveCallSummaryMeetingId = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryShareToken.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryShareToken.ts
new file mode 100644
index 0000000000..4323d78027
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryShareToken.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Invitation capability, if present.
+ */
+export type LiveCallSummaryShareToken = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryTitle.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryTitle.ts
new file mode 100644
index 0000000000..c472579d31
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallSummaryTitle.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Invitation title, if present.
+ */
+export type LiveCallSummaryTitle = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallTrack.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallTrack.ts
new file mode 100644
index 0000000000..fc2f9492a0
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallTrack.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { LiveTrackSource } from './liveTrackSource';
+
+/**
+ * A live media track.
+ */
+export interface LiveCallTrack {
+ /** Whether the track is muted. */
+ muted: boolean;
+ /** Microphone, camera, or screen source. */
+ source: LiveTrackSource;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallsResponse.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallsResponse.ts
new file mode 100644
index 0000000000..7790d80726
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveCallsResponse.ts
@@ -0,0 +1,15 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { LiveCallSummary } from './liveCallSummary';
+
+/**
+ * Response containing every live call this account may join.
+ */
+export interface LiveCallsResponse {
+ /** Joinable live calls. */
+ calls: LiveCallSummary[];
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveParticipantKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveParticipantKind.ts
new file mode 100644
index 0000000000..dbc90b8459
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveParticipantKind.ts
@@ -0,0 +1,19 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Participant kind in the live room.
+ */
+export type LiveParticipantKind =
+ (typeof LiveParticipantKind)[keyof typeof LiveParticipantKind];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const LiveParticipantKind = {
+ user: 'user',
+ guest: 'guest',
+ bot: 'bot',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveTrackSource.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveTrackSource.ts
new file mode 100644
index 0000000000..5a094f5a33
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/liveTrackSource.ts
@@ -0,0 +1,21 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * A live media track.
+ */
+export type LiveTrackSource =
+ (typeof LiveTrackSource)[keyof typeof LiveTrackSource];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const LiveTrackSource = {
+ microphone: 'microphone',
+ camera: 'camera',
+ screen_share: 'screen_share',
+ screen_share_audio: 'screen_share_audio',
+ unknown: 'unknown',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/onOtherCall.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/onOtherCall.ts
new file mode 100644
index 0000000000..62b28c74c9
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/onOtherCall.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Policy for another active call.
+ */
+export type OnOtherCall = (typeof OnOtherCall)[keyof typeof OnOtherCall];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const OnOtherCall = {
+ fail: 'fail',
+ switch: 'switch',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/recordingBytes.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/recordingBytes.ts
new file mode 100644
index 0000000000..8e66ef432f
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/recordingBytes.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * OpenAPI representation of streamed recording bytes.
+ */
+export type RecordingBytes = Blob;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
index 765e4a96a6..4d8299167e 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
@@ -2426,6 +2426,52 @@ export const getActiveCallsResponse = zod
'Response listing all active calls in channels the caller is a member of.'
);
+/**
+ * @summary List all channel and standalone calls this account can join.
+ */
+export const getLiveCallsResponse = zod
+ .object({
+ calls: zod
+ .array(
+ zod
+ .object({
+ callId: zod.uuid().describe('Session identifier.'),
+ channelId: zod
+ .uuid()
+ .nullish()
+ .describe('Channel identifier, if present.'),
+ createdAt: zod.iso
+ .datetime({})
+ .describe('When the session was created.'),
+ createdBy: zod.string().describe('Caller identifier.'),
+ kind: zod
+ .enum(['channel', 'standalone'])
+ .describe('Whether a live call is associated with a channel.'),
+ meetingId: zod
+ .uuid()
+ .nullish()
+ .describe('Invitation identifier, if present.'),
+ participantCount: zod
+ .number()
+ .describe('Number of active people and guests.'),
+ ringing: zod
+ .boolean()
+ .describe('Whether this account is currently being rung.'),
+ shareToken: zod
+ .string()
+ .nullish()
+ .describe('Invitation capability, if present.'),
+ title: zod
+ .string()
+ .nullish()
+ .describe('Invitation title, if present.'),
+ })
+ .describe('A live call visible to an account that can join it.')
+ )
+ .describe('Joinable live calls.'),
+ })
+ .describe('Response containing every live call this account may join.');
+
/**
* @summary Read the live call discussion as a verified guest.
*/
@@ -2563,6 +2609,7 @@ export const meetingGuestJoinResponse = zod
.string()
.nullish()
.describe('Meeting link capability, when joined using a link.'),
+ started: zod.boolean().describe('Whether this request allocated the call.'),
token: zod.string().describe('The RTC token for connecting to the room.'),
})
.describe('Response returned when creating or joining a call.');
@@ -2826,6 +2873,23 @@ export const meetingJoinParams = zod.object({
token: zod.string(),
});
+export const meetingJoinBody = zod
+ .object({
+ name: zod
+ .string()
+ .nullish()
+ .describe('Optional display name in the RTC room.'),
+ onOtherCall: zod
+ .enum(['fail', 'switch'])
+ .optional()
+ .describe('Policy for another active call.'),
+ replace: zod
+ .boolean()
+ .optional()
+ .describe('Disconnect an existing RTC connection for this identity.'),
+ })
+ .describe('Options for an authenticated call join.');
+
export const meetingJoinResponse = zod
.object({
callId: zod.uuid().describe('The call identifier.'),
@@ -2842,6 +2906,7 @@ export const meetingJoinResponse = zod
.string()
.nullish()
.describe('Meeting link capability, when joined using a link.'),
+ started: zod.boolean().describe('Whether this request allocated the call.'),
token: zod.string().describe('The RTC token for connecting to the room.'),
})
.describe('Response returned when creating or joining a call.');
@@ -3386,6 +3451,66 @@ export const declineCallParams = zod.object({
call_id: zod.uuid().describe('Call ID'),
});
+/**
+ * @summary Join a live call by its session id.
+ */
+export const joinCallParams = zod.object({
+ call_id: zod.uuid(),
+});
+
+export const joinCallBody = zod
+ .object({
+ name: zod
+ .string()
+ .nullish()
+ .describe('Optional display name in the RTC room.'),
+ onOtherCall: zod
+ .enum(['fail', 'switch'])
+ .optional()
+ .describe('Policy for another active call.'),
+ replace: zod
+ .boolean()
+ .optional()
+ .describe('Disconnect an existing RTC connection for this identity.'),
+ })
+ .describe('Options for an authenticated call join.');
+
+export const joinCallResponse = zod
+ .object({
+ callId: zod.uuid().describe('The call identifier.'),
+ channelId: zod
+ .uuid()
+ .nullish()
+ .describe('The channel this call is associated with.'),
+ participantId: zod.string().describe('RTC participant identity.'),
+ roomName: zod.string().describe('The RTC room name.'),
+ serverUrl: zod
+ .string()
+ .describe('The RTC server URL for the frontend SDK to connect to.'),
+ shareToken: zod
+ .string()
+ .nullish()
+ .describe('Meeting link capability, when joined using a link.'),
+ started: zod.boolean().describe('Whether this request allocated the call.'),
+ token: zod.string().describe('The RTC token for connecting to the room.'),
+ })
+ .describe('Response returned when creating or joining a call.');
+
+/**
+ * @summary Leave a specific live call.
+ */
+export const leaveCallParams = zod.object({
+ call_id: zod.uuid(),
+});
+
+export const leaveCallResponse = zod
+ .object({
+ callEnded: zod
+ .boolean()
+ .describe('Whether the entire call was ended (room deleted).'),
+ })
+ .describe('Response for the leave\/end call operation.');
+
/**
* @summary Handle `POST /call/record/{call_id}/link` through the call domain service.
*/
@@ -3425,6 +3550,88 @@ export const meetingShareResponse = zod
'Persistent meeting metadata. No channel contents or archived media are exposed.'
);
+/**
+ * @summary Read live participants and track state for a joinable call.
+ */
+export const getCallParticipantsParams = zod.object({
+ call_id: zod.uuid(),
+});
+
+export const getCallParticipantsResponse = zod
+ .object({
+ participants: zod
+ .array(
+ zod
+ .object({
+ displayName: zod
+ .string()
+ .describe('Name displayed to room members.'),
+ identity: zod.string().describe('RTC identity.'),
+ isProgram: zod
+ .boolean()
+ .describe('Whether the caller is a program.'),
+ joinedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe('RTC connection time.'),
+ kind: zod
+ .enum(['user', 'guest', 'bot'])
+ .describe('Participant kind in the live room.'),
+ tracks: zod
+ .array(
+ zod
+ .object({
+ muted: zod
+ .boolean()
+ .describe('Whether the track is muted.'),
+ source: zod
+ .enum([
+ 'microphone',
+ 'camera',
+ 'screen_share',
+ 'screen_share_audio',
+ 'unknown',
+ ])
+ .describe('A live media track.'),
+ })
+ .describe('A live media track.')
+ )
+ .describe('Published media tracks.'),
+ userId: zod
+ .string()
+ .nullish()
+ .describe('Macro account identifier, if this is a user.'),
+ })
+ .describe('A connected participant in an RTC room.')
+ )
+ .describe('Connected participants.'),
+ })
+ .describe('A live RTC room roster.');
+
+/**
+ * @summary Stream the recording bytes for a call record the caller may view.
+ */
+export const getCallRecordingParams = zod.object({
+ call_id: zod.uuid().describe('Call ID'),
+});
+
+/**
+ * @summary Read this account's ring state for a call.
+ */
+export const getCallRingStateParams = zod.object({
+ call_id: zod.uuid(),
+});
+
+export const getCallRingStateResponse = zod
+ .object({
+ status: zod
+ .enum(['ringing', 'answered', 'declined', 'ended'])
+ .describe(
+ 'Per-user status of an incoming-call ring, as reported by the\nring-status endpoint while a native client is ringing.'
+ ),
+ })
+ .describe('Response body for `GET \/call\/ring-status\/{call_id}`.');
+
/**
* Flips the live call's share-with-team toggle and returns the new value as
the JSON body. The toggle is applied as canonical team sharing (View for
@@ -3536,6 +3743,52 @@ export const getOrCreateCallResponse = zod
.string()
.nullish()
.describe('Meeting link capability, when joined using a link.'),
+ started: zod.boolean().describe('Whether this request allocated the call.'),
+ token: zod.string().describe('The RTC token for connecting to the room.'),
+ })
+ .describe('Response returned when creating or joining a call.');
+
+/**
+ * @summary Start or join a channel call explicitly.
+ */
+export const startCallParams = zod.object({
+ channel_id: zod.uuid(),
+});
+
+export const startCallBody = zod
+ .object({
+ name: zod
+ .string()
+ .nullish()
+ .describe('Optional display name in the RTC room.'),
+ onOtherCall: zod
+ .enum(['fail', 'switch'])
+ .optional()
+ .describe('Policy for another active call.'),
+ replace: zod
+ .boolean()
+ .optional()
+ .describe('Disconnect an existing RTC connection for this identity.'),
+ })
+ .describe('Options for an authenticated call join.');
+
+export const startCallResponse = zod
+ .object({
+ callId: zod.uuid().describe('The call identifier.'),
+ channelId: zod
+ .uuid()
+ .nullish()
+ .describe('The channel this call is associated with.'),
+ participantId: zod.string().describe('RTC participant identity.'),
+ roomName: zod.string().describe('The RTC room name.'),
+ serverUrl: zod
+ .string()
+ .describe('The RTC server URL for the frontend SDK to connect to.'),
+ shareToken: zod
+ .string()
+ .nullish()
+ .describe('Meeting link capability, when joined using a link.'),
+ started: zod.boolean().describe('Whether this request allocated the call.'),
token: zod.string().describe('The RTC token for connecting to the room.'),
})
.describe('Response returned when creating or joining a call.');
diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.json
index 2d4972c597..cb6e4cc7c6 100644
--- a/apps/web/src/lib/service-clients/service-storage/openapi.json
+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json
@@ -2085,6 +2085,25 @@
}
}
},
+ "/call/active/all": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "List all channel and standalone calls this account can join.",
+ "operationId": "get_live_calls",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LiveCallsResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/guest-chat/{call_id}": {
"get": {
"tags": ["messages::inbound::guest_chat"],
@@ -2764,6 +2783,15 @@
}
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
@@ -3363,6 +3391,102 @@
}
}
},
+ "/call/record/{call_id}/join": {
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Join a live call by its session id.",
+ "operationId": "join_call",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CallTokenResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": ""
+ },
+ "410": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/leave": {
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Leave a specific live call.",
+ "operationId": "leave_call",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LeaveCallResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/record/{call_id}/link": {
"post": {
"tags": ["call::inbound::axum_router::meetings"],
@@ -3433,6 +3557,133 @@
}
}
},
+ "/call/record/{call_id}/participants": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Read live participants and track state for a joinable call.",
+ "operationId": "get_call_participants",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LiveCallParticipantsResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/recording": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Stream the recording bytes for a call record the caller may view.",
+ "operationId": "get_call_recording",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "description": "Call ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "video/mp4": {
+ "schema": {
+ "$ref": "#/components/schemas/RecordingBytes"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/ring": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Read this account's ring state for a call.",
+ "operationId": "get_call_ring_state",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RingStatusResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/record/{call_id}/share-with-team/toggle": {
"post": {
"tags": ["call::inbound::axum_router"],
@@ -3764,6 +4015,57 @@
}
}
},
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Start or join a channel call explicitly.",
+ "operationId": "start_call",
+ "parameters": [
+ {
+ "name": "channel_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CallTokenResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": ""
+ }
+ }
+ },
"delete": {
"tags": ["call::inbound::axum_router"],
"summary": "Handler for `DELETE /call/{channel_id}`.",
@@ -25221,6 +25523,199 @@
}
}
},
+ "CallNotificationEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "description": "A call started.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.started"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A call started."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A call ended.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.ended"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A call ended."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A participant entered the RTC room.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.participant_joined"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A participant entered the RTC room."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A participant left the RTC room.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.participant_left"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A participant left the RTC room."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A recording became available.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.recording_ready"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A recording became available."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A summary became available.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.summarized"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A summary became available."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient is being rung.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.ringing"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient is being rung."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient answered.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.answered"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient answered."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient declined.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.declined"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient declined."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient was invited.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.invited"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient was invited."
+ }
+ }
+ }
+ ],
+ "description": "Public call events. Private variants carry a recipient on the broker only."
+ },
+ "CallNotificationMetadata": {
+ "type": "object",
+ "description": "Identifiers and actors for a public call notification. Optional fields are\nabsent when they do not apply to the event.",
+ "required": ["call_id"],
+ "properties": {
+ "call_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Call identifier."
+ },
+ "channel_id": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Channel containing the call, if any."
+ },
+ "created_by": {
+ "type": ["string", "null"],
+ "description": "User who created the call."
+ },
+ "identity": {
+ "type": ["string", "null"],
+ "description": "Room identity of the joining or departing participant."
+ },
+ "invited_by": {
+ "type": ["string", "null"],
+ "description": "User who sent an invitation."
+ },
+ "meeting_id": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Meeting associated with an invitation."
+ },
+ "user_id": {
+ "type": ["string", "null"],
+ "description": "Account identifier of the participant or answering user."
+ }
+ }
+ },
"CallProvider": {
"type": "string",
"description": "Supported call and transcript providers. Add variants as integrations grow.",
@@ -25583,6 +26078,7 @@
"type": "object",
"description": "Response returned when creating or joining a call.",
"required": [
+ "started",
"participantId",
"callId",
"token",
@@ -25616,6 +26112,10 @@
"type": ["string", "null"],
"description": "Meeting link capability, when joined using a link."
},
+ "started": {
+ "type": "boolean",
+ "description": "Whether this request allocated the call."
+ },
"token": {
"type": "string",
"description": "The RTC token for connecting to the room."
@@ -37459,6 +37959,24 @@
"cancelled"
]
},
+ "JoinCallRequest": {
+ "type": "object",
+ "description": "Options for an authenticated call join.",
+ "properties": {
+ "name": {
+ "type": ["string", "null"],
+ "description": "Optional display name in the RTC room."
+ },
+ "onOtherCall": {
+ "$ref": "#/components/schemas/OnOtherCall",
+ "description": "What to do when this account is participating in another call."
+ },
+ "replace": {
+ "type": "boolean",
+ "description": "Disconnect an existing RTC connection for this identity."
+ }
+ }
+ },
"KeySegment": {
"type": "string",
"description": "Single safe source folder/key segment; never a path or authorization proof."
@@ -37792,6 +38310,168 @@
}
}
},
+ "LiveCallKind": {
+ "type": "string",
+ "description": "Whether a live call is associated with a channel.",
+ "enum": ["channel", "standalone"]
+ },
+ "LiveCallParticipant": {
+ "type": "object",
+ "description": "A connected participant in an RTC room.",
+ "required": ["identity", "displayName", "kind", "isProgram", "tracks"],
+ "properties": {
+ "displayName": {
+ "type": "string",
+ "description": "Name displayed to room members."
+ },
+ "identity": {
+ "type": "string",
+ "description": "RTC identity."
+ },
+ "isProgram": {
+ "type": "boolean",
+ "description": "Whether the caller is a program."
+ },
+ "joinedAt": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "RTC connection time."
+ },
+ "kind": {
+ "$ref": "#/components/schemas/LiveParticipantKind",
+ "description": "User or guest."
+ },
+ "tracks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallTrack"
+ },
+ "description": "Published media tracks."
+ },
+ "userId": {
+ "type": ["string", "null"],
+ "description": "Macro account identifier, if this is a user."
+ }
+ }
+ },
+ "LiveCallParticipantsResponse": {
+ "type": "object",
+ "description": "A live RTC room roster.",
+ "required": ["participants"],
+ "properties": {
+ "participants": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallParticipant"
+ },
+ "description": "Connected participants."
+ }
+ }
+ },
+ "LiveCallSummary": {
+ "type": "object",
+ "description": "A live call visible to an account that can join it.",
+ "required": [
+ "callId",
+ "kind",
+ "createdBy",
+ "createdAt",
+ "participantCount",
+ "ringing"
+ ],
+ "properties": {
+ "callId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Session identifier."
+ },
+ "channelId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Channel identifier, if present."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the session was created."
+ },
+ "createdBy": {
+ "type": "string",
+ "description": "Caller identifier."
+ },
+ "kind": {
+ "$ref": "#/components/schemas/LiveCallKind",
+ "description": "Channel or standalone call."
+ },
+ "meetingId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Invitation identifier, if present."
+ },
+ "participantCount": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of active people and guests."
+ },
+ "ringing": {
+ "type": "boolean",
+ "description": "Whether this account is currently being rung."
+ },
+ "shareToken": {
+ "type": ["string", "null"],
+ "description": "Invitation capability, if present."
+ },
+ "title": {
+ "type": ["string", "null"],
+ "description": "Invitation title, if present."
+ }
+ }
+ },
+ "LiveCallTrack": {
+ "type": "object",
+ "description": "A live media track.",
+ "required": ["source", "muted"],
+ "properties": {
+ "muted": {
+ "type": "boolean",
+ "description": "Whether the track is muted."
+ },
+ "source": {
+ "$ref": "#/components/schemas/LiveTrackSource",
+ "description": "Microphone, camera, or screen source."
+ }
+ }
+ },
+ "LiveCallsResponse": {
+ "type": "object",
+ "description": "Response containing every live call this account may join.",
+ "required": ["calls"],
+ "properties": {
+ "calls": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallSummary"
+ },
+ "description": "Joinable live calls."
+ }
+ }
+ },
+ "LiveParticipantKind": {
+ "type": "string",
+ "description": "Participant kind in the live room.",
+ "enum": ["user", "guest", "bot"]
+ },
+ "LiveTrackSource": {
+ "type": "string",
+ "description": "A live media track.",
+ "enum": [
+ "microphone",
+ "camera",
+ "screen_share",
+ "screen_share_audio",
+ "unknown"
+ ]
+ },
"LocationResponseData": {
"oneOf": [
{
@@ -39527,6 +40207,11 @@
"lessThanOrEqual"
]
},
+ "OnOtherCall": {
+ "type": "string",
+ "description": "Policy for another active call.",
+ "enum": ["fail", "switch"]
+ },
"OpBatch": {
"type": "object",
"description": "A batch of ops for one database and the versions its tables must be at.",
@@ -41497,6 +42182,11 @@
}
}
},
+ "RecordingBytes": {
+ "type": "string",
+ "format": "binary",
+ "description": "OpenAPI representation of streamed recording bytes."
+ },
"RegisterUploads": {
"type": "object",
"description": "Batched registration, also used to renew an unchanged descriptor's grant.",
@@ -48685,6 +49375,10 @@
"$ref": "#/components/schemas/ChannelTopicEvent",
"description": "Channel lifecycle events from the `macro.channels` topic."
},
+ {
+ "$ref": "#/components/schemas/CallNotificationEvent",
+ "description": "Access-checked call notifications from `macro.call_notifications`."
+ },
{
"$ref": "#/components/schemas/MessageTopicEvent",
"description": "Message facts for channels and documents from the `macro.messages` topic."
diff --git a/crates/ai_tools/src/tool_context.rs b/crates/ai_tools/src/tool_context.rs
index 8fed9acc56..dba59cd6f9 100644
--- a/crates/ai_tools/src/tool_context.rs
+++ b/crates/ai_tools/src/tool_context.rs
@@ -976,6 +976,45 @@ impl CallRtcClient for NoOpCallRtcClient {
anyhow::bail!("call RTC client not configured")
}
+ async fn list_live_participants(
+ &self,
+ _room_name: &str,
+ ) -> anyhow::Result<Option<Vec<call::domain::models::LiveCallParticipant>>> {
+ anyhow::bail!("call RTC client not configured")
+ }
+
+ async fn generate_bot_token(
+ &self,
+ _room_name: &str,
+ _bot_id: bot_id::BotId,
+ _name: Option<String>,
+ ) -> anyhow::Result<String> {
+ anyhow::bail!("call RTC client not configured")
+ }
+
+ async fn remove_bot(&self, _room_name: &str, _bot_id: bot_id::BotId) -> anyhow::Result<()> {
+ anyhow::bail!("call RTC client not configured")
+ }
+
+ async fn generate_named_token<'a>(
+ &self,
+ _room_name: &str,
+ _participant_identity: MacroUserIdStr<'a>,
+ _name: &str,
+ ) -> anyhow::Result<String> {
+ anyhow::bail!("call RTC client not configured")
+ }
+
+ async fn generate_program_token<'a>(
+ &self,
+ _room_name: &str,
+ _participant_identity: MacroUserIdStr<'a>,
+ _program: &str,
+ _name: Option<String>,
+ ) -> anyhow::Result<String> {
+ anyhow::bail!("call RTC client not configured")
+ }
+
async fn build_voip_push_payloads<'a>(
&self,
_request: call::domain::models::VoipPushPayloadRequest<'a>,
diff --git a/crates/call/AGENTS.md b/crates/call/AGENTS.md
index ecad7dcc02..ffb9027b0e 100644
--- a/crates/call/AGENTS.md
+++ b/crates/call/AGENTS.md
@@ -9,17 +9,26 @@ in-call chat.
## Start here
- `src/domain/service.rs` + `src/domain/models.rs`: call lifecycle policy.
+- `src/domain/service.rs`: programmatic start/join policy, per-call leave,
+ join access, and program-only expiry. Keep these decisions out of HTTP handlers.
- `src/domain/service/guest_chat.rs`: active guest authorization for the shared
call discussion; message storage and delivery belong to `messages`.
- `src/domain/meetings.rs`: scheduled-meeting ↔ call association (used by
`calendar_events`/`calendar_scheduling` meeting links).
+- `src/domain/notification_events.rs`: public call event contract for
+ access-checked webhook and stream subscribers.
- `src/inbound/axum_router.rs`, `src/inbound/stale_call_sweeper.rs`: HTTP routes
and the sweeper that ends abandoned calls and deletes orphaned RTC rooms
(`src/domain/service/orphan_rooms.rs`).
- `src/outbound/livekit_rtc_client.rs`: LiveKit adapter.
+- `src/outbound/programmatic_calls.rs`: per-caller server flag for explicit
+ start, join, and leave routes. The legacy GET flow remains available.
- `src/outbound/pg_call_repo.rs`, `src/outbound/pg_voice_repo.rs`: Postgres.
+- `src/outbound/pg_call_repo/lifecycle.rs`: atomic empty and program-only
+ archival checks; the latter uses the last human departure and a 60-second grace.
- `src/outbound/ai_call_summarizer.rs`, `src/outbound/s3_recording_storage.rs`:
call recording/summarization.
+- Recording downloads use the call record's view-access receipt and stream S3 chunks through `RecordingStorage`.
## Scope
@@ -39,6 +48,8 @@ in-call chat.
- Add a call event/activity: `src/domain/activity.rs` → `src/domain/events.rs`
→ `src/outbound/pg_call_repo.rs`.
+- Add a public call notification: `src/domain/notification_events.rs` →
+ `src/domain/service.rs` or its meeting/channel submodule → `crates/webhook`.
- Change ringing/decline behavior: `src/domain/service.rs` → `src/inbound/axum_router.rs`.
- Add an AI tool over calls: `src/inbound/toolset.rs` (feature `ai_tools`).
@@ -62,6 +73,17 @@ in-call chat.
when one connects. Only a room named after an archived `call_records` row is
orphaned (call ids are never reused); meeting preparations and get-or-create
candidate rooms have no `calls` row yet and must be left alone.
+- Bot RTC identities use `bot|<uuid>`. Webhooks never write bot attendance or
+ participant events; an archived call's recreated room evicts the bot.
+- `enable-programmatic-calls` fails closed for the explicit start, join, and
+ leave routes. Meeting join ignores optional join settings while disabled.
+- `GET /call/{channel_id}` remains the shipped get-or-create path. New callers
+ start with `POST /call/{channel_id}` and join a specific live session with
+ `POST /call/record/{call_id}/join`; the latter never creates a call.
+- A view grant alone does not admit a user to a live call. Channel membership,
+ standalone ownership, attendance, or an explicit invite is required.
+- Every token-producing HTTP route refuses `x-macro-code-execution` because
+ tokens can outlive a code execution and cannot be revoked.
## Related
diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml
index cb53da1e17..490a6d7b39 100644
--- a/crates/call/Cargo.toml
+++ b/crates/call/Cargo.toml
@@ -26,7 +26,6 @@ outbound = [
"channels/outbound",
"dep:entity_access_db_utils",
"dep:feature_flags",
- "dep:futures",
"dep:livekit-api",
"dep:livekit-protocol",
"dep:macro_aws_config",
@@ -36,7 +35,7 @@ outbound = [
"dep:urlencoding",
"ports",
]
-ports = ["dep:entity_access", "dep:tokio", "dep:async-trait", "dep:messages"]
+ports = ["dep:entity_access", "dep:tokio", "dep:async-trait", "dep:messages", "dep:futures"]
[dependencies]
activity = { path = "../activity", default-features = false }
@@ -45,6 +44,7 @@ ai_usage = { path = "../ai_usage", optional = true }
ai_toolset = { path = "../ai_toolset", optional = true }
anyhow = { workspace = true }
async-trait = { workspace = true, optional = true }
+bot_id = { path = "../bot_id" }
aws-sdk-s3 = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
chrono = { workspace = true }
@@ -104,6 +104,7 @@ subtle = { workspace = true }
base64 = { workspace = true }
macro_db_migrator = { path = "../macro_db_migrator" }
mockall = { workspace = true }
+model_user = { path = "../model_user" }
rate_limit = { path = "../rate_limit", features = ["axum", "testing"] }
rootcause = { workspace = true }
sha2 = { workspace = true }
diff --git a/crates/call/src/domain/entity_mutation.rs b/crates/call/src/domain/entity_mutation.rs
index a13331ba73..bd9c2784c9 100644
--- a/crates/call/src/domain/entity_mutation.rs
+++ b/crates/call/src/domain/entity_mutation.rs
@@ -29,15 +29,19 @@ use crate::domain::ports::{
impl From<CallError> for EntityMutationErrorCode {
fn from(error: CallError) -> Self {
match error {
- error @ CallError::NotFound(_) => Self::not_found(rootcause::report!(error)),
+ error @ (CallError::NotFound(_) | CallError::Ended) => {
+ Self::not_found(rootcause::report!(error))
+ }
error @ (CallError::Auth | CallError::NotInCall) => {
Self::forbidden(rootcause::report!(error))
}
error @ CallError::InvalidRequest(_) => Self::invalid(rootcause::report!(error)),
error @ CallError::Forbidden(_) => Self::forbidden(rootcause::report!(error)),
- error @ (CallError::AlreadyInCall(_) | CallError::Conflict(_)) => {
- Self::conflict(rootcause::report!(error))
- }
+ error @ (CallError::AlreadyInCall(_)
+ | CallError::InOtherCall
+ | CallError::AlreadyConnected
+ | CallError::RateLimited
+ | CallError::Conflict(_)) => Self::conflict(rootcause::report!(error)),
error @ CallError::Internal(_) => Self::internal(rootcause::report!(error)),
}
}
diff --git a/crates/call/src/domain/mod.rs b/crates/call/src/domain/mod.rs
index 3952b56288..b61f472ddc 100644
--- a/crates/call/src/domain/mod.rs
+++ b/crates/call/src/domain/mod.rs
@@ -2,6 +2,8 @@
pub mod activity;
/// Kafka event contracts for call lifecycle events.
pub mod events;
+/// Public call notifications for access-checked subscribers.
+pub mod notification_events;
/// Domain models for calls.
pub mod models;
diff --git a/crates/call/src/domain/models.rs b/crates/call/src/domain/models.rs
index b0cad59d98..14135093a5 100644
--- a/crates/call/src/domain/models.rs
+++ b/crates/call/src/domain/models.rs
@@ -116,6 +116,8 @@ pub struct CallParticipant {
#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
#[serde(rename_all = "camelCase")]
pub struct CallTokenResponse {
+ /// Whether this request allocated the call.
+ pub started: bool,
/// RTC participant identity.
pub participant_id: String,
/// Meeting link capability, when joined using a link.
@@ -132,6 +134,159 @@ pub struct CallTokenResponse {
pub server_url: String,
}
+/// Options for an authenticated call join.
+#[derive(Debug, Clone, Default, serde::Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct JoinCallRequest {
+ /// What to do when this account is participating in another call.
+ #[serde(default)]
+ pub on_other_call: OnOtherCall,
+ /// Disconnect an existing RTC connection for this identity.
+ #[serde(default)]
+ pub replace: bool,
+ /// Optional display name in the RTC room.
+ pub name: Option<String>,
+}
+
+impl JoinCallRequest {
+ /// The app's join: switch out of any other call and reclaim this identity.
+ pub fn for_app() -> Self {
+ Self {
+ on_other_call: OnOtherCall::Switch,
+ replace: true,
+ name: None,
+ }
+ }
+}
+
+/// Whether a live call is associated with a channel.
+#[derive(Debug, Clone, Copy, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "snake_case")]
+pub enum LiveCallKind {
+ /// Call associated with a channel.
+ Channel,
+ /// Independent meeting call.
+ Standalone,
+}
+
+/// A live call visible to an account that can join it.
+#[derive(Debug, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct LiveCallSummary {
+ /// Session identifier.
+ pub call_id: Uuid,
+ /// Channel or standalone call.
+ pub kind: LiveCallKind,
+ /// Channel identifier, if present.
+ pub channel_id: Option<Uuid>,
+ /// Invitation identifier, if present.
+ pub meeting_id: Option<Uuid>,
+ /// Invitation capability, if present.
+ pub share_token: Option<String>,
+ /// Invitation title, if present.
+ pub title: Option<String>,
+ /// Caller identifier.
+ pub created_by: String,
+ /// When the session was created.
+ pub created_at: DateTime<Utc>,
+ /// Number of active people and guests.
+ pub participant_count: i64,
+ /// Whether this account is currently being rung.
+ pub ringing: bool,
+}
+
+/// Response containing every live call this account may join.
+#[derive(Debug, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct LiveCallsResponse {
+ /// Joinable live calls.
+ pub calls: Vec<LiveCallSummary>,
+}
+
+/// A live media track.
+#[derive(Debug, Clone, Copy, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "snake_case")]
+pub enum LiveTrackSource {
+ /// Microphone audio.
+ Microphone,
+ /// Camera video.
+ Camera,
+ /// Screen video.
+ ScreenShare,
+ /// Screen audio.
+ ScreenShareAudio,
+ /// Unrecognized source.
+ Unknown,
+}
+
+/// Participant kind in the live room.
+#[derive(Debug, Clone, Copy, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "snake_case")]
+pub enum LiveParticipantKind {
+ /// Signed-in account.
+ User,
+ /// Link guest.
+ Guest,
+ /// Bot identity.
+ Bot,
+}
+
+/// A live media track.
+#[derive(Debug, Clone, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct LiveCallTrack {
+ /// Microphone, camera, or screen source.
+ pub source: LiveTrackSource,
+ /// Whether the track is muted.
+ pub muted: bool,
+}
+
+/// A connected participant in an RTC room.
+#[derive(Debug, Clone, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct LiveCallParticipant {
+ /// RTC identity.
+ pub identity: String,
+ /// Name displayed to room members.
+ pub display_name: String,
+ /// User or guest.
+ pub kind: LiveParticipantKind,
+ /// Macro account identifier, if this is a user.
+ pub user_id: Option<String>,
+ /// Whether the caller is a program.
+ pub is_program: bool,
+ /// RTC connection time.
+ pub joined_at: Option<DateTime<Utc>>,
+ /// Published media tracks.
+ pub tracks: Vec<LiveCallTrack>,
+}
+
+/// A live RTC room roster.
+#[derive(Debug, serde::Serialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct LiveCallParticipantsResponse {
+ /// Connected participants.
+ pub participants: Vec<LiveCallParticipant>,
+}
+
+/// Policy for another active call.
+#[derive(Debug, Clone, Copy, Default, serde::Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "snake_case")]
+pub enum OnOtherCall {
+ /// Preserve the other call and return a conflict.
+ #[default]
+ Fail,
+ /// Leave the other call before joining.
+ Switch,
+}
+
/// Inputs required by the RTC adapter to produce native VoIP invite payloads.
pub struct VoipPushPayloadRequest<'a> {
/// Users with resolved PushKit endpoints that should receive native VoIP invites.
@@ -283,6 +438,8 @@ pub struct CallWebhookEvent {
pub room_name: Option<String>,
/// Participant identity associated with the event, if any.
pub participant_identity: Option<MacroUserIdStr<'static>>,
+ /// Bot identity, classified separately so it never becomes attendance.
+ pub bot_identity: Option<bot_id::BotId>,
/// Non-account guest identity, classified separately from Macro users.
pub guest_identity: Option<super::meetings::GuestId>,
/// Egress ID associated with the event, if any.
@@ -736,6 +893,18 @@ pub enum CallError {
/// No active call found for this channel.
#[error("no active call found for channel {0}")]
NotFound(String),
+ /// The call existed, but has already ended.
+ #[error("call has ended")]
+ Ended,
+ /// The caller is already participating in a different call.
+ #[error("user is in another call")]
+ InOtherCall,
+ /// This RTC identity is already connected to the room.
+ #[error("identity is already connected")]
+ AlreadyConnected,
+ /// A per-caller start budget has been exhausted.
+ #[error("call start rate limit exceeded")]
+ RateLimited,
/// User is not in the call.
#[error("user not in call")]
NotInCall,
diff --git a/crates/call/src/domain/notification_events.rs b/crates/call/src/domain/notification_events.rs
new file mode 100644
index 0000000000..5698305b8b
--- /dev/null
+++ b/crates/call/src/domain/notification_events.rs
@@ -0,0 +1,166 @@
+//! Public call facts published for access-checked webhook subscribers.
+
+#[cfg(test)]
+mod test;
+
+use macro_event_broker::{Event, MacroEvent, TopicEvent};
+use macro_event_topics::MacroCallNotificationsTopic;
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+
+/// Identifiers and actors for a public call notification. Optional fields are
+/// absent when they do not apply to the event.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct CallNotificationMetadata {
+ /// Call identifier.
+ pub call_id: Uuid,
+ /// Channel containing the call, if any.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub channel_id: Option<Uuid>,
+ /// Meeting associated with an invitation.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub meeting_id: Option<Uuid>,
+ /// User who created the call.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub created_by: Option<String>,
+ /// Room identity of the joining or departing participant.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub identity: Option<String>,
+ /// Account identifier of the participant or answering user.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub user_id: Option<String>,
+ /// User who sent an invitation.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub invited_by: Option<String>,
+ /// Intended recipient of a private event. Removed before delivery.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ #[cfg_attr(feature = "inbound", schema(ignore))]
+ pub recipient_user_id: Option<String>,
+}
+
+impl CallNotificationMetadata {
+ /// Begin metadata for a call; add event-specific fields before publishing.
+ pub fn new(call_id: Uuid, channel_id: Option<Uuid>) -> Self {
+ Self {
+ call_id,
+ channel_id,
+ meeting_id: None,
+ created_by: None,
+ identity: None,
+ user_id: None,
+ invited_by: None,
+ recipient_user_id: None,
+ }
+ }
+}
+
+/// Public call events. Private variants carry a recipient on the broker only.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(tag = "event_type", content = "metadata")]
+pub enum CallNotificationEvent {
+ /// A call started.
+ #[serde(rename = "call.started")]
+ Started(CallNotificationMetadata),
+ /// A call ended.
+ #[serde(rename = "call.ended")]
+ Ended(CallNotificationMetadata),
+ /// A participant entered the RTC room.
+ #[serde(rename = "call.participant_joined")]
+ ParticipantJoined(CallNotificationMetadata),
+ /// A participant left the RTC room.
+ #[serde(rename = "call.participant_left")]
+ ParticipantLeft(CallNotificationMetadata),
+ /// A recording became available.
+ #[serde(rename = "call.recording_ready")]
+ RecordingReady(CallNotificationMetadata),
+ /// A summary became available.
+ #[serde(rename = "call.summarized")]
+ Summarized(CallNotificationMetadata),
+ /// The recipient is being rung.
+ #[serde(rename = "call.ringing")]
+ Ringing(CallNotificationMetadata),
+ /// The recipient answered.
+ #[serde(rename = "call.answered")]
+ Answered(CallNotificationMetadata),
+ /// The recipient declined.
+ #[serde(rename = "call.declined")]
+ Declined(CallNotificationMetadata),
+ /// The recipient was invited.
+ #[serde(rename = "call.invited")]
+ Invited(CallNotificationMetadata),
+}
+
+impl CallNotificationEvent {
+ /// Metadata shared by all variants.
+ pub fn metadata(&self) -> &CallNotificationMetadata {
+ match self {
+ Self::Started(m)
+ | Self::Ended(m)
+ | Self::ParticipantJoined(m)
+ | Self::ParticipantLeft(m)
+ | Self::RecordingReady(m)
+ | Self::Summarized(m)
+ | Self::Ringing(m)
+ | Self::Answered(m)
+ | Self::Declined(m)
+ | Self::Invited(m) => m,
+ }
+ }
+
+ /// Public event name.
+ pub fn name(&self) -> &'static str {
+ match self {
+ Self::Started(_) => "call.started",
+ Self::Ended(_) => "call.ended",
+ Self::ParticipantJoined(_) => "call.participant_joined",
+ Self::ParticipantLeft(_) => "call.participant_left",
+ Self::RecordingReady(_) => "call.recording_ready",
+ Self::Summarized(_) => "call.summarized",
+ Self::Ringing(_) => "call.ringing",
+ Self::Answered(_) => "call.answered",
+ Self::Declined(_) => "call.declined",
+ Self::Invited(_) => "call.invited",
+ }
+ }
+}
+
+impl TopicEvent for CallNotificationEvent {
+ type Topic = MacroCallNotificationsTopic;
+
+ const SCHEMA_VERSION: u8 = 1;
+}
+
+/// Publishable notification keyed by call ID.
+pub struct CallNotificationMacroEvent {
+ key: String,
+ event: Event<CallNotificationEvent>,
+}
+
+impl CallNotificationMacroEvent {
+ /// Wrap a call notification in a broker envelope.
+ pub fn new(event: CallNotificationEvent) -> Self {
+ let key = event.metadata().call_id.to_string();
+ Self {
+ key,
+ event: Event::new(event),
+ }
+ }
+}
+
+impl MacroEvent for CallNotificationMacroEvent {
+ type EventPayload = CallNotificationEvent;
+
+ fn key(&self) -> &str {
+ &self.key
+ }
+
+ fn event(&self) -> &Event<Self::EventPayload> {
+ &self.event
+ }
+
+ fn from_event(key: String, event: Event<Self::EventPayload>) -> Self {
+ Self { key, event }
+ }
+}
diff --git a/crates/call/src/domain/notification_events/test.rs b/crates/call/src/domain/notification_events/test.rs
new file mode 100644
index 0000000000..c47077e014
--- /dev/null
+++ b/crates/call/src/domain/notification_events/test.rs
@@ -0,0 +1,30 @@
+use super::*;
+use macro_event_broker::MacroEvent as _;
+use macro_event_topics::Topic as _;
+use serde_json::json;
+
+#[test]
+fn public_call_notification_uses_the_call_key_and_snake_case_metadata() {
+ let call_id = Uuid::parse_str("0198a1b2-c3d4-7e5f-8061-728394a5b6c7").unwrap();
+ let mut metadata = CallNotificationMetadata::new(call_id, None);
+ metadata.recipient_user_id = Some("macro|[email protected]".to_string());
+ metadata.invited_by = Some("macro|[email protected]".to_string());
+ let event = CallNotificationMacroEvent::new(CallNotificationEvent::Invited(metadata));
+
+ assert_eq!(event.key(), call_id.to_string());
+ assert_eq!(
+ MacroCallNotificationsTopic::TOPIC_STR,
+ "macro.call_notifications"
+ );
+ assert_eq!(
+ serde_json::to_value(&event.event().event).unwrap(),
+ json!({
+ "event_type": "call.invited",
+ "metadata": {
+ "call_id": call_id,
+ "invited_by": "macro|[email protected]",
+ "recipient_user_id": "macro|[email protected]"
+ }
+ })
+ );
+}
diff --git a/crates/call/src/domain/ports.rs b/crates/call/src/domain/ports.rs
index b9693b9dd2..7ae766d5cf 100644
--- a/crates/call/src/domain/ports.rs
+++ b/crates/call/src/domain/ports.rs
@@ -2,9 +2,11 @@
//!
//! These traits define the contracts that adapters must implement.
+use futures::stream::BoxStream;
use std::collections::HashMap;
use std::fmt::Debug;
use std::future::Future;
+use std::pin::Pin;
use chrono::{DateTime, Utc};
@@ -33,9 +35,9 @@ use super::models::{
CallActiveResponse, CallError, CallParticipant, CallRecord, CallRecordPreview,
CallRecordTranscriptSegment, CallTokenResponse, CallTranscriptCustomSpeakerResult,
CallWebhookEvent, EgressS3Config, EnrichedCallTranscript, GetBatchCallRecordPreviewRequest,
- GetBatchCallRecordPreviewResponse, GetCallRecordsRequest, LeaveCallResponse,
- RingStatusResponse, RtcRoom, TranscriptSegmentRequest, VerifiedRingToken,
- VoipPushPayloadRequest,
+ GetBatchCallRecordPreviewResponse, GetCallRecordsRequest, JoinCallRequest, LeaveCallResponse,
+ LiveCallParticipant, LiveCallParticipantsResponse, LiveCallsResponse, RingStatusResponse,
+ RtcRoom, TranscriptSegmentRequest, VerifiedRingToken, VoipPushPayloadRequest,
};
/// Repository port for persisting call state to the database.
@@ -44,6 +46,39 @@ pub trait CallRepository: Send + Sync + 'static {
/// The error type returned by repository operations.
type Err: Into<anyhow::Error> + Send + Debug;
+ /// Whether this account may enter this live call as a participant.
+ fn can_join_call(
+ &self,
+ call_id: &Uuid,
+ user_id: &str,
+ ) -> impl Future<Output = Result<bool, Self::Err>> + Send;
+
+ /// Live calls this account may enter, across channels and invitations.
+ fn list_joinable_calls(
+ &self,
+ user_id: &str,
+ ) -> impl Future<Output = Result<Vec<Call>, Self::Err>> + Send;
+
+ /// Whether this account is an agent account.
+ fn is_agent_account(
+ &self,
+ user_id: &str,
+ ) -> impl Future<Output = Result<bool, Self::Err>> + Send;
+
+ /// Persist the authenticated client kind on a live participant.
+ fn set_participant_client(
+ &self,
+ call_id: &Uuid,
+ user_id: &str,
+ client: &str,
+ ) -> impl Future<Output = Result<(), Self::Err>> + Send;
+
+ /// Atomically archive a call whose only active participants have been programs for 60 seconds.
+ fn archive_call_if_program_only(
+ &self,
+ call_id: &Uuid,
+ ) -> impl Future<Output = Result<Option<ArchivedCall>, CallError>> + Send;
+
/// Persist an owner-bound room reservation and discard expired reservation metadata.
fn insert_meeting_preparation(
&self,
@@ -559,8 +594,33 @@ pub trait CallRepository: Send + Sync + 'static {
) -> impl Future<Output = Result<bool, Self::Err>> + Send;
}
-/// Storage port for generating signed recording GET URLs and deleting objects.
+/// Limit call creation by authenticated account before ringing others.
+pub trait CallStartLimiter: Send + Sync {
+ /// Consume one start attempt.
+ fn check<'a>(
+ &'a self,
+ user_id: &'a str,
+ ) -> Pin<Box<dyn Future<Output = Result<(), CallError>> + Send + 'a>>;
+}
+
+/// A recording returned as a sequence of byte chunks.
+pub struct RecordingDownload {
+ /// MIME type of the stored recording.
+ pub content_type: String,
+ /// Size of the stored recording in bytes.
+ pub content_length: u64,
+ /// Bytes streamed from storage, without loading the full recording.
+ pub chunks: BoxStream<'static, anyhow::Result<Vec<u8>>>,
+}
+
+/// Storage port for reading, signing and deleting recording objects.
pub trait RecordingStorage: Send + Sync + 'static {
+ /// Open a recording for streaming. Returns `None` if the object is absent.
+ fn open_recording(
+ &self,
+ recording_key: &str,
+ ) -> impl Future<Output = anyhow::Result<Option<RecordingDownload>>> + Send;
+
/// Generate a storage- or distribution-signed GET URL for a recording key.
///
/// The key is in `UUID/TIMESTAMP.ext` format. Implementations must
@@ -601,6 +661,16 @@ pub trait RecordingStorage: Send + Sync + 'static {
}
impl<T: RecordingStorage> RecordingStorage for Option<T> {
+ async fn open_recording(
+ &self,
+ recording_key: &str,
+ ) -> anyhow::Result<Option<RecordingDownload>> {
+ match self {
+ Some(inner) => inner.open_recording(recording_key).await,
+ None => anyhow::bail!("recording storage not configured"),
+ }
+ }
+
async fn presign_recording_url(&self, recording_key: &str) -> anyhow::Result<String> {
match self {
Some(inner) => inner.presign_recording_url(recording_key).await,
@@ -705,6 +775,12 @@ pub trait CallRtcClient: Send + Sync + 'static {
room_name: &str,
) -> impl Future<Output = anyhow::Result<Option<Vec<MeetingRtcParticipant>>>> + Send;
+ /// Full live room roster with media state.
+ fn list_live_participants(
+ &self,
+ room_name: &str,
+ ) -> impl Future<Output = anyhow::Result<Option<Vec<LiveCallParticipant>>>> + Send;
+
/// Generate an access token for a participant to join a room.
fn generate_token<'a>(
&self,
@@ -712,6 +788,31 @@ pub trait CallRtcClient: Send + Sync + 'static {
participant_identity: MacroUserIdStr<'a>,
) -> impl Future<Output = anyhow::Result<String>> + Send;
+ /// Mint a room token with a display name for a person.
+ fn generate_named_token<'a>(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'a>,
+ name: &str,
+ ) -> impl Future<Output = anyhow::Result<String>> + Send;
+
+ /// Mint a token for a program, identifying its client in RTC attributes.
+ fn generate_program_token<'a>(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'a>,
+ program: &str,
+ name: Option<String>,
+ ) -> impl Future<Output = anyhow::Result<String>> + Send;
+
+ /// Mint a room token for a bot without treating it as a user.
+ fn generate_bot_token(
+ &self,
+ room_name: &str,
+ bot_id: bot_id::BotId,
+ name: Option<String>,
+ ) -> impl Future<Output = anyhow::Result<String>> + Send;
+
/// Mint a room-scoped token for a validated non-account guest.
fn generate_guest_token(
&self,
@@ -725,6 +826,12 @@ pub trait CallRtcClient: Send + Sync + 'static {
room_name: &str,
guest_id: GuestId,
) -> impl Future<Output = anyhow::Result<()>> + Send;
+ /// Remove a bot from a room.
+ fn remove_bot(
+ &self,
+ room_name: &str,
+ bot_id: bot_id::BotId,
+ ) -> impl Future<Output = anyhow::Result<()>> + Send;
/// Build VoIP payloads for native incoming-call delivery.
fn build_voip_push_payloads<'a>(
@@ -777,6 +884,11 @@ pub trait CallRtcClient: Send + Sync + 'static {
/// Service interface for call operations.
#[cfg_attr(test, mockall::automock)]
pub trait CallService: Send + Sync + 'static {
+ /// Whether explicit programmatic call routes are enabled for this caller.
+ fn programmatic_calls_enabled<'a>(
+ &self,
+ caller: MacroUserIdStr<'a>,
+ ) -> impl Future<Output = bool> + Send;
/// Reserve an empty room without creating a call, recording, or inviting anyone.
fn prepare_meeting<'a>(
&self,
@@ -864,6 +976,15 @@ pub trait CallService: Send + Sync + 'static {
token: MeetingToken,
actor: MacroUserIdStr<'a>,
) -> impl Future<Output = Result<CallTokenResponse, CallError>> + Send;
+ /// Join with an explicit policy for other calls and RTC connections.
+ fn join_meeting_with_options<'a>(
+ &self,
+ token: MeetingToken,
+ actor: MacroUserIdStr<'a>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ agent_attributed: bool,
+ ) -> impl Future<Output = Result<CallTokenResponse, CallError>> + Send;
/// Join as a non-account guest with a server-generated identity.
fn join_meeting_guest(
&self,
@@ -908,6 +1029,51 @@ pub trait CallService: Send + Sync + 'static {
user_id: MacroUserIdStr<'a>,
) -> impl Future<Output = Result<CallTokenResponse, CallError>> + Send;
+ /// Explicit start or join of a channel call.
+ fn start_call<'a>(
+ &self,
+ channel_id: &Uuid,
+ user_id: MacroUserIdStr<'a>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ ) -> impl Future<Output = Result<CallTokenResponse, CallError>> + Send;
+
+ /// Join an existing live call without creating one.
+ fn join_call<'a>(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'a>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ ) -> impl Future<Output = Result<CallTokenResponse, CallError>> + Send;
+
+ /// Leave only this call, never a newer call in the same channel.
+ fn leave_call<'a>(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'a>,
+ ) -> impl Future<Output = Result<LeaveCallResponse, CallError>> + Send;
+
+ /// Ring state for an authenticated account.
+ fn get_call_ring_state<'a>(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'a>,
+ ) -> impl Future<Output = Result<RingStatusResponse, CallError>> + Send;
+
+ /// All live calls this account may join.
+ fn get_live_calls<'a>(
+ &self,
+ user_id: MacroUserIdStr<'a>,
+ ) -> impl Future<Output = Result<LiveCallsResponse, CallError>> + Send;
+
+ /// Connected people in a live call, with the same access as join.
+ fn get_call_participants<'a>(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'a>,
+ ) -> impl Future<Output = Result<LiveCallParticipantsResponse, CallError>> + Send;
+
/// Leave or end a call. Removes the user; if last participant, also deletes the room and call.
fn leave_or_end_call<'a>(
&self,
@@ -974,6 +1140,12 @@ pub trait CallService: Send + Sync + 'static {
receipt: EntityAccessReceipt<ViewAccessLevel>,
) -> impl Future<Output = Result<CallRecord, CallError>> + Send;
+ /// Stream a recording after checking the same access as the call record.
+ fn get_call_recording(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> impl Future<Output = Result<RecordingDownload, CallError>> + Send;
+
/// Delete a [`CallRecord`] the caller has channel-member access to.
///
/// Authorization is carried in the receipt produced by
@@ -1220,6 +1392,13 @@ impl VoiceRepository for NoOpVoiceRepository {
}
}
+/// Per-caller availability of explicit programmatic call routes.
+#[async_trait::async_trait]
+pub trait ProgrammaticCallGate: Send + Sync + 'static {
+ /// Return false when the flag is disabled or unavailable.
+ async fn enabled_for(&self, caller: MacroUserIdStr<'_>) -> bool;
+}
+
/// Whether new channel calls discuss in a channel thread, and creating that thread.
#[async_trait::async_trait]
pub trait ChannelThreads: Send + Sync + 'static {
diff --git a/crates/call/src/domain/service.rs b/crates/call/src/domain/service.rs
index 7c8dabdffd..474e0a070b 100644
--- a/crates/call/src/domain/service.rs
+++ b/crates/call/src/domain/service.rs
@@ -48,6 +48,9 @@ use crate::domain::models::{
CallRecordPage, EditCallRecordRepoArgs, EditCallRecordRequest, EditCallTranscriptRequest,
VoipPushPayloadRequest,
};
+use crate::domain::notification_events::{
+ CallNotificationEvent, CallNotificationMacroEvent, CallNotificationMetadata,
+};
use super::meetings::{
ActiveMeeting, CreateMeetingRequest, GuestJoinRequest, InviteMeetingUsersRequest, Meeting,
@@ -58,11 +61,14 @@ use super::models::{
CallPeople, CallRecord, CallRecordTranscriptSegment, CallTokenResponse,
CallTranscriptCustomSpeakerResult, EgressS3Config, EnrichedCallTranscript,
GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetCallRecordsRequest,
- LeaveCallResponse, RingStatus, RingStatusResponse, TranscriptSegmentRequest,
+ JoinCallRequest, LeaveCallResponse, LiveCallKind, LiveCallParticipantsResponse,
+ LiveCallSummary, LiveCallsResponse, OnOtherCall, RingStatus, RingStatusResponse,
+ TranscriptSegmentRequest,
};
use super::ports::{
CallRecordQueryService, CallRecordReader, CallRepository, CallRtcClient, CallService,
- CallSummarizer, NoOpVoiceRepository, RecordingStorage, VoiceRepository,
+ CallStartLimiter, CallSummarizer, NoOpVoiceRepository, ProgrammaticCallGate, RecordingDownload,
+ RecordingStorage, VoiceRepository,
};
/// The concrete call service implementation.
@@ -93,6 +99,8 @@ pub struct CallServiceImpl<
ring_status_base_url: Option<String>,
event_broker: B,
channel_threads: Option<Arc<dyn crate::domain::ports::ChannelThreads>>,
+ start_limiter: Option<Arc<dyn CallStartLimiter>>,
+ programmatic_call_gate: Option<Arc<dyn ProgrammaticCallGate>>,
}
impl<
@@ -131,6 +139,8 @@ impl<
ring_status_base_url: None,
event_broker: NoopMacroEventBroker,
channel_threads: None,
+ start_limiter: None,
+ programmatic_call_gate: None,
}
}
}
@@ -157,6 +167,18 @@ impl<
self
}
+ /// Attach a per-account budget for calls that ring others.
+ pub fn with_start_limiter(mut self, limiter: impl CallStartLimiter + 'static) -> Self {
+ self.start_limiter = Some(Arc::new(limiter));
+ self
+ }
+
+ /// Attach the per-caller switch for explicit programmatic call routes.
+ pub fn with_programmatic_call_gate(mut self, gate: impl ProgrammaticCallGate) -> Self {
+ self.programmatic_call_gate = Some(Arc::new(gate));
+ self
+ }
+
/// Enable auto-recording with the given S3 configuration.
pub fn with_egress(mut self, s3_config: EgressS3Config) -> Self {
self.egress_s3_config = Some(s3_config);
@@ -206,6 +228,8 @@ impl<
ring_status_base_url: self.ring_status_base_url,
event_broker: self.event_broker,
channel_threads: self.channel_threads,
+ start_limiter: self.start_limiter,
+ programmatic_call_gate: self.programmatic_call_gate,
}
}
@@ -230,6 +254,8 @@ impl<
ring_status_base_url: self.ring_status_base_url,
event_broker: self.event_broker,
channel_threads: self.channel_threads,
+ start_limiter: self.start_limiter,
+ programmatic_call_gate: self.programmatic_call_gate,
}
}
@@ -254,6 +280,8 @@ impl<
ring_status_base_url: self.ring_status_base_url,
event_broker,
channel_threads: self.channel_threads,
+ start_limiter: self.start_limiter,
+ programmatic_call_gate: self.programmatic_call_gate,
}
}
@@ -261,6 +289,10 @@ impl<
publish_call_event(&self.event_broker, event);
}
+ fn publish_call_notification(&self, event: CallNotificationEvent) {
+ publish_call_notification(&self.event_broker, event);
+ }
+
/// Authorize an explicit (`teamShareAccessLevel`) or legacy (`shareWithTeam`)
/// canonical team-share change on an archived call against the persisted
/// creator.
@@ -344,6 +376,14 @@ impl<
channel_thread: archived.channel_thread,
},
));
+ self.publish_call_notification(CallNotificationEvent::Ended(
+ CallNotificationMetadata::new(archived.call_id, archived.channel_id),
+ ));
+ if archived.has_recording {
+ self.publish_call_notification(CallNotificationEvent::RecordingReady(
+ CallNotificationMetadata::new(archived.call_id, None),
+ ));
+ }
}
/// Send a call event to all channel members (best-effort).
@@ -438,6 +478,10 @@ impl<
call_id: &Uuid,
user_id: MacroUserIdStr<'_>,
) {
+ let mut metadata = CallNotificationMetadata::new(*call_id, *channel_id);
+ metadata.user_id = Some(user_id.to_string());
+ metadata.recipient_user_id = Some(user_id.to_string());
+ self.publish_call_notification(CallNotificationEvent::Answered(metadata));
let _ = self
.connection_service
.send_channel_message(
@@ -464,6 +508,10 @@ impl<
call_id: &Uuid,
user_id: MacroUserIdStr<'_>,
) {
+ let mut metadata = CallNotificationMetadata::new(*call_id, *channel_id);
+ metadata.user_id = Some(user_id.to_string());
+ metadata.recipient_user_id = Some(user_id.to_string());
+ self.publish_call_notification(CallNotificationEvent::Declined(metadata));
let _ = self
.connection_service
.send_channel_message(
@@ -676,6 +724,13 @@ impl<
B: MacroEventBroker + Clone,
> CallService for CallServiceImpl<R, C, Cn, E, N, S, Sm, V, Vr, B>
{
+ async fn programmatic_calls_enabled(&self, caller: MacroUserIdStr<'_>) -> bool {
+ match &self.programmatic_call_gate {
+ Some(gate) => gate.enabled_for(caller).await,
+ None => false,
+ }
+ }
+
async fn prepare_meeting(
&self,
actor: MacroUserIdStr<'_>,
@@ -776,7 +831,35 @@ impl<
token: MeetingToken,
actor: MacroUserIdStr<'_>,
) -> Result<CallTokenResponse, CallError> {
- self.join_invitation(token, actor).await
+ self.join_invitation(
+ token,
+ actor,
+ JoinCallRequest {
+ on_other_call: OnOtherCall::Switch,
+ replace: true,
+ ..Default::default()
+ },
+ false,
+ false,
+ )
+ .await
+ }
+ async fn join_meeting_with_options(
+ &self,
+ token: MeetingToken,
+ actor: MacroUserIdStr<'_>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ agent_attributed: bool,
+ ) -> Result<CallTokenResponse, CallError> {
+ self.join_invitation(
+ token,
+ actor,
+ request,
+ credential_is_program,
+ agent_attributed,
+ )
+ .await
}
async fn join_meeting_guest(
&self,
@@ -861,13 +944,13 @@ impl<
channel_id: &Uuid,
user_id: MacroUserIdStr<'_>,
) -> Result<CallTokenResponse, CallError> {
- let call = match self
+ let (call, started) = match self
.repo
.get_call_by_channel_id(channel_id)
.await
.map_err(|e| CallError::Internal(e.into()))?
{
- Some(existing) => existing,
+ Some(existing) => (existing, false),
None => {
let call_id = Uuid::now_v7();
// Room grants must expire with this session, even in a channel.
@@ -926,6 +1009,12 @@ impl<
recording_enabled: self.egress_s3_config.is_some(),
},
));
+ let mut metadata =
+ CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.created_by = Some(call.created_by.clone());
+ self.publish_call_notification(CallNotificationEvent::Started(
+ metadata,
+ ));
}
Err(error) => {
tracing::error!(
@@ -949,6 +1038,7 @@ impl<
server_url: self.server_url.clone(),
ring_status_base_url: self.ring_status_base_url.clone(),
egress_s3_config: self.egress_s3_config.clone(),
+ event_broker: self.event_broker.clone(),
}
.spawn(
call.clone(),
@@ -956,7 +1046,7 @@ impl<
user_id.clone().into_owned(),
);
- call
+ (call, true)
}
None => {
// A concurrent request owns the active session. Our empty
@@ -964,11 +1054,14 @@ impl<
self.rtc_client.delete_room(&room_name).await
.inspect_err(|error| tracing::error!(error=?error, "failed to remove unused channel call room")).ok();
// Another request created the call — read the existing one.
- self.repo
- .get_call_by_channel_id(channel_id)
- .await
- .map_err(|e| CallError::Internal(e.into()))?
- .ok_or_else(|| CallError::NotFound(channel_id.to_string()))?
+ (
+ self.repo
+ .get_call_by_channel_id(channel_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .ok_or_else(|| CallError::NotFound(channel_id.to_string()))?,
+ false,
+ )
}
}
}
@@ -1001,6 +1094,13 @@ impl<
}
}
+ // A person may rejoin a row a program of theirs marked. Reset it, or the
+ // program-only rule could end the call while they're in it.
+ self.repo
+ .set_participant_client(&call.id, user_id.as_ref(), "person")
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+
// Tell the user's other devices the call was answered here so they
// can stop showing the incoming-call UI (best-effort).
self.send_call_answered_event(&Some(*channel_id), &call.id, user_id.copied())
@@ -1014,6 +1114,7 @@ impl<
.map_err(CallError::Internal)?;
Ok(CallTokenResponse {
+ started,
call_id: call.id,
channel_id: Some(*channel_id),
participant_id: user_id.to_string(),
@@ -1024,6 +1125,405 @@ impl<
})
}
+ #[tracing::instrument(name = "call.start", err, skip(self, user_id, request), fields(call.id, principal.kind, call.client, outcome))]
+ async fn start_call(
+ &self,
+ channel_id: &Uuid,
+ user_id: MacroUserIdStr<'_>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ ) -> Result<CallTokenResponse, CallError> {
+ tracing::Span::current().record(
+ "call.client",
+ if credential_is_program {
+ "api_key"
+ } else {
+ "person"
+ },
+ );
+ tracing::Span::current().record(
+ "principal.kind",
+ if credential_is_program {
+ "program"
+ } else {
+ "user"
+ },
+ );
+ if let Some(call) = self
+ .repo
+ .get_call_by_channel_id(channel_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ {
+ let result = self
+ .join_call(&call.id, user_id, request, credential_is_program)
+ .await;
+ tracing::Span::current().record("call.id", call.id.to_string());
+ tracing::Span::current()
+ .record("outcome", if result.is_ok() { "joined" } else { "failed" });
+ return result;
+ }
+ if matches!(request.on_other_call, OnOtherCall::Fail)
+ && self
+ .repo
+ .find_active_call_for_user(user_id.copied())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .is_some()
+ {
+ tracing::Span::current().record("outcome", "in_other_call");
+ return Err(CallError::InOtherCall);
+ }
+ if let Some(limiter) = &self.start_limiter {
+ limiter.check(user_id.as_ref()).await?;
+ }
+ let mut response = self
+ .get_or_create_call(channel_id, user_id.copied())
+ .await
+ .map_err(|error| match error {
+ CallError::AlreadyInCall(_) => CallError::InOtherCall,
+ other => other,
+ })?;
+ let agent = self
+ .repo
+ .is_agent_account(user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ if credential_is_program || agent {
+ let program = if agent { "agent" } else { "api_key" };
+ self.repo
+ .set_participant_client(&response.call_id, user_id.as_ref(), program)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ response.token = self
+ .rtc_client
+ .generate_program_token(&response.room_name, user_id, program, request.name.clone())
+ .await
+ .map_err(CallError::Internal)?;
+ } else if let Some(name) = request.name.as_deref() {
+ response.token = self
+ .rtc_client
+ .generate_named_token(&response.room_name, user_id, name)
+ .await
+ .map_err(CallError::Internal)?;
+ }
+ tracing::Span::current().record("call.id", response.call_id.to_string());
+ tracing::Span::current().record(
+ "call.client",
+ if agent {
+ "agent"
+ } else if credential_is_program {
+ "api_key"
+ } else {
+ "person"
+ },
+ );
+ tracing::Span::current().record("outcome", "joined");
+ Ok(response)
+ }
+
+ #[tracing::instrument(name = "call.join", err, skip(self, user_id, request), fields(call.id = %call_id, principal.kind, call.client, outcome))]
+ async fn join_call(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'_>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ ) -> Result<CallTokenResponse, CallError> {
+ tracing::Span::current().record(
+ "call.client",
+ if credential_is_program {
+ "api_key"
+ } else {
+ "person"
+ },
+ );
+ tracing::Span::current().record(
+ "principal.kind",
+ if credential_is_program {
+ "program"
+ } else {
+ "user"
+ },
+ );
+ let call = self
+ .repo
+ .get_call_by_id(call_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .ok_or_else(|| {
+ tracing::Span::current().record("outcome", "ended");
+ CallError::Ended
+ })?;
+ if !self
+ .repo
+ .can_join_call(call_id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ {
+ return Err(CallError::Forbidden(
+ "not a call participant or invitee".to_string(),
+ ));
+ }
+ if let Some((other_id, _)) = self
+ .repo
+ .find_active_call_for_user(user_id.copied())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ && other_id != *call_id
+ {
+ if matches!(request.on_other_call, OnOtherCall::Fail) {
+ tracing::Span::current().record("outcome", "in_other_call");
+ return Err(CallError::InOtherCall);
+ }
+ self.leave_other_active_call(user_id.copied(), *call_id)
+ .await?;
+ }
+ let connected = self
+ .rtc_client
+ .list_participant_identities(&call.room_name)
+ .await
+ .map_err(CallError::Internal)?
+ .unwrap_or_default();
+ if !request.replace
+ && connected
+ .iter()
+ .any(|identity| identity == user_id.as_ref())
+ {
+ tracing::Span::current().record("outcome", "already_connected");
+ return Err(CallError::AlreadyConnected);
+ }
+ let add = if call.channel_id.is_some() {
+ self.repo.add_participant(call_id, user_id.copied()).await
+ } else {
+ self.repo
+ .add_meeting_participant(call_id, user_id.copied())
+ .await
+ };
+ match add {
+ Ok(_) => {}
+ Err(AddParticipantError::UserAlreadyActive) => return Err(CallError::InOtherCall),
+ Err(AddParticipantError::Repository(error)) => return Err(CallError::Internal(error)),
+ }
+ let agent = self
+ .repo
+ .is_agent_account(user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let client = if agent {
+ "agent"
+ } else if credential_is_program {
+ "api_key"
+ } else {
+ "person"
+ };
+ self.repo
+ .set_participant_client(call_id, user_id.as_ref(), client)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let token = if agent || credential_is_program {
+ let program = if agent { "agent" } else { "api_key" };
+ self.rtc_client
+ .generate_program_token(
+ &call.room_name,
+ user_id.copied(),
+ program,
+ request.name.clone(),
+ )
+ .await
+ } else if let Some(name) = request.name.as_deref() {
+ self.rtc_client
+ .generate_named_token(&call.room_name, user_id.copied(), name)
+ .await
+ } else {
+ self.rtc_client
+ .generate_token(&call.room_name, user_id.copied())
+ .await
+ }
+ .map_err(CallError::Internal)?;
+ tracing::Span::current().record(
+ "call.client",
+ if agent {
+ "agent"
+ } else if credential_is_program {
+ "api_key"
+ } else {
+ "person"
+ },
+ );
+ tracing::Span::current().record("outcome", "joined");
+ let share_token = self
+ .repo
+ .get_meeting_for_call(call_id, false)
+ .await?
+ .map(|meeting| meeting.share_token.into());
+ self.send_call_answered_event(&call.channel_id, call_id, user_id.copied())
+ .await;
+ Ok(CallTokenResponse {
+ started: false,
+ call_id: *call_id,
+ channel_id: call.channel_id,
+ participant_id: user_id.to_string(),
+ share_token,
+ token,
+ room_name: call.room_name,
+ server_url: self.server_url.clone(),
+ })
+ }
+
+ #[tracing::instrument(err, skip(self, user_id))]
+ async fn leave_call(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'_>,
+ ) -> Result<LeaveCallResponse, CallError> {
+ let call = self
+ .repo
+ .get_call_by_id(call_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .ok_or_else(|| CallError::NotFound(call_id.to_string()))?;
+ self.repo
+ .remove_participant(call_id, user_id.copied())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ if self.finish_empty_call(&call).await? {
+ return Ok(LeaveCallResponse { call_ended: true });
+ }
+ self.rtc_client
+ .remove_participant(&call.room_name, user_id)
+ .await
+ .map_err(CallError::Internal)?;
+ Ok(LeaveCallResponse { call_ended: false })
+ }
+
+ async fn get_call_ring_state(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'_>,
+ ) -> Result<RingStatusResponse, CallError> {
+ let call = self
+ .repo
+ .get_call_by_id(call_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let (is_participant, has_declined) = if call.is_some() {
+ let joined = self
+ .repo
+ .is_participant(call_id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let declined = self
+ .repo
+ .has_declined(call_id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ (joined, declined)
+ } else {
+ (false, false)
+ };
+ Ok(RingStatusResponse {
+ status: resolve_ring_status(call.as_ref(), call_id, is_participant, has_declined),
+ })
+ }
+
+ #[tracing::instrument(err, skip(self, user_id))]
+ async fn get_live_calls(
+ &self,
+ user_id: MacroUserIdStr<'_>,
+ ) -> Result<LiveCallsResponse, CallError> {
+ let calls = self
+ .repo
+ .list_joinable_calls(user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let mut summaries = Vec::with_capacity(calls.len());
+ for call in calls {
+ let meeting = self.repo.get_meeting_for_call(&call.id, false).await?;
+ let participant_count = self
+ .repo
+ .get_participant_count(&call.id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let joined = self
+ .repo
+ .is_participant(&call.id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let declined = self
+ .repo
+ .has_declined(&call.id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ let ringing = matches!(
+ resolve_ring_status(Some(&call), &call.id, joined, declined),
+ RingStatus::Ringing
+ );
+ summaries.push(LiveCallSummary {
+ call_id: call.id,
+ kind: if call.channel_id.is_some() {
+ LiveCallKind::Channel
+ } else {
+ LiveCallKind::Standalone
+ },
+ channel_id: call.channel_id,
+ meeting_id: meeting.as_ref().map(|meeting| meeting.id),
+ share_token: meeting
+ .as_ref()
+ .map(|meeting| meeting.share_token.as_str().to_string()),
+ title: meeting.map(|meeting| meeting.title),
+ created_by: call.created_by,
+ created_at: call.created_at,
+ participant_count,
+ ringing,
+ });
+ }
+ Ok(LiveCallsResponse { calls: summaries })
+ }
+
+ #[tracing::instrument(err, skip(self, user_id), fields(call.id = %call_id))]
+ async fn get_call_participants(
+ &self,
+ call_id: &Uuid,
+ user_id: MacroUserIdStr<'_>,
+ ) -> Result<LiveCallParticipantsResponse, CallError> {
+ let call = self
+ .repo
+ .get_call_by_id(call_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .ok_or_else(|| CallError::NotFound(call_id.to_string()))?;
+ if !self
+ .repo
+ .can_join_call(call_id, user_id.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ {
+ return Err(CallError::Forbidden(
+ "not a call participant or invitee".to_string(),
+ ));
+ }
+ let mut participants = self
+ .rtc_client
+ .list_live_participants(&call.room_name)
+ .await
+ .map_err(CallError::Internal)?
+ .unwrap_or_default();
+ for participant in &mut participants {
+ if let Some(identity) = &participant.user_id {
+ let user = MacroUserIdStr::parse_from_str(identity)
+ .map_err(|e| CallError::Internal(e.into()))?;
+ participant.display_name = self
+ .repo
+ .get_user_display_name(user)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .unwrap_or_else(|| "Macro user".to_string());
+ }
+ }
+ Ok(LiveCallParticipantsResponse { participants })
+ }
+
#[tracing::instrument(err, skip(self))]
async fn leave_or_end_call(
&self,
@@ -1046,6 +1546,10 @@ impl<
.remove_participant(&call.id, user_id.copied())
.await
.map_err(|e| CallError::Internal(e.into()))?;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(user_id.to_string());
+ metadata.user_id = Some(user_id.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(metadata));
// Kick from LiveKit. The resulting participant_left webhook
// handles archival and room deletion.
@@ -1149,12 +1653,16 @@ impl<
.await?;
}
- // Identities are `macro|<email>`: log which kind of participant this
- // is, never who.
- let participant_kind = match (&event.participant_identity, &event.guest_identity) {
- (Some(_), _) => "user",
- (None, Some(_)) => "guest",
- (None, None) => "none",
+ // Log the participant kind without exposing its identity.
+ let participant_kind = match (
+ &event.participant_identity,
+ &event.guest_identity,
+ &event.bot_identity,
+ ) {
+ (Some(_), _, _) => "user",
+ (None, Some(_), _) => "guest",
+ (None, None, Some(_)) => "bot",
+ (None, None, None) => "none",
};
tracing::info!(
event_type = %event.event,
@@ -1199,6 +1707,22 @@ impl<
}
}
"participant_joined" => {
+ if let (Some(room), Some(identity)) = (&event.room_name, event.bot_identity) {
+ if self
+ .repo
+ .get_call_by_room_name(room)
+ .await
+ .map_err(|error| CallError::Internal(error.into()))?
+ .is_none()
+ {
+ self.evict_from_untracked_room(
+ room,
+ orphan_rooms::RoomParticipant::Bot(identity),
+ )
+ .await?;
+ }
+ return Ok(());
+ }
if let (Some(room), Some(identity)) = (&event.room_name, &event.guest_identity) {
match self
.repo
@@ -1208,6 +1732,12 @@ impl<
{
Some(call) => {
self.repo.reconcile_guest(&call.id, *identity, true).await?;
+ let mut metadata =
+ CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(identity.to_string());
+ self.publish_call_notification(
+ CallNotificationEvent::ParticipantJoined(metadata),
+ );
}
None => {
self.evict_from_untracked_room(
@@ -1268,6 +1798,12 @@ impl<
participant_identity.copied(),
)
.await;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(participant_identity.to_string());
+ metadata.user_id = Some(participant_identity.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantJoined(
+ metadata,
+ ));
}
Err(AddParticipantError::UserAlreadyActive) => {
tracing::warn!(
@@ -1282,6 +1818,9 @@ impl<
}
}
"participant_left" => {
+ if event.bot_identity.is_some() {
+ return Ok(());
+ }
let Some(room_name) = &event.room_name else {
return Ok(());
};
@@ -1304,10 +1843,21 @@ impl<
.remove_participant(&call.id, participant_identity.copied())
.await
.map_err(|e| CallError::Internal(e.into()))?;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(participant_identity.to_string());
+ metadata.user_id = Some(participant_identity.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(
+ metadata,
+ ));
} else if let Some(identity) = &event.guest_identity {
self.repo
.reconcile_guest(&call.id, *identity, false)
.await?;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(identity.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(
+ metadata,
+ ));
}
self.finish_empty_call(&call).await?;
@@ -1371,6 +1921,9 @@ impl<
channel_id,
},
));
+ self.publish_call_notification(CallNotificationEvent::RecordingReady(
+ CallNotificationMetadata::new(call_id, None),
+ ));
} else {
// Call not yet archived — store on the active call so
// archive_call can carry it forward.
@@ -1439,6 +1992,23 @@ impl<
Ok(record)
}
+ #[tracing::instrument(err, skip(self, receipt), fields(call.id = %receipt.entity().entity_id))]
+ async fn get_call_recording(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<RecordingDownload, CallError> {
+ let record = authorized_call_record(&self.repo, &receipt).await?;
+ let key = record
+ .recording_key
+ .ok_or_else(|| CallError::NotFound(record.call_id.to_string()))?;
+
+ self.recording_storage
+ .open_recording(&key)
+ .await
+ .map_err(CallError::Internal)?
+ .ok_or_else(|| CallError::NotFound(record.call_id.to_string()))
+ }
+
#[tracing::instrument(err, skip(self))]
async fn delete_call_record(
&self,
@@ -1870,6 +2440,9 @@ impl<
ai_name_generated,
},
));
+ self.publish_call_notification(CallNotificationEvent::Summarized(
+ CallNotificationMetadata::new(*call_id, None),
+ ));
}
Ok(())
@@ -1998,6 +2571,10 @@ impl<
ai_name_generated,
}),
);
+ publish_call_notification(
+ &event_broker,
+ CallNotificationEvent::Summarized(CallNotificationMetadata::new(call_id, None)),
+ );
}
});
}
@@ -2024,6 +2601,19 @@ pub(crate) fn publish_call_event<B: MacroEventBroker>(event_broker: &B, event: &
}));
}
+pub(crate) fn publish_call_notification<B: MacroEventBroker>(
+ event_broker: &B,
+ event: CallNotificationEvent,
+) {
+ drop(
+ event_broker
+ .send_event(&CallNotificationMacroEvent::new(event))
+ .inspect_err(|error| {
+ tracing::error!(error = ?error, "failed to schedule call notification");
+ }),
+ );
+}
+
/// Replace guest speaker ids with their display names for the summarizer's
/// input only; the stored transcript keeps the opaque ids.
fn summary_transcript(
diff --git a/crates/call/src/domain/service/channel_startup.rs b/crates/call/src/domain/service/channel_startup.rs
index a6f208379b..124e22079b 100644
--- a/crates/call/src/domain/service/channel_startup.rs
+++ b/crates/call/src/domain/service/channel_startup.rs
@@ -3,7 +3,7 @@
use super::*;
use tracing::Instrument;
-pub(super) struct ChannelCallStartup<R, C, Cn, E, N, V> {
+pub(super) struct ChannelCallStartup<R, C, Cn, E, N, V, B> {
pub repo: R,
pub rtc_client: Arc<C>,
pub connection_service: Arc<Cn>,
@@ -13,6 +13,7 @@ pub(super) struct ChannelCallStartup<R, C, Cn, E, N, V> {
pub server_url: String,
pub ring_status_base_url: Option<String>,
pub egress_s3_config: Option<EgressS3Config>,
+ pub event_broker: B,
}
impl<
@@ -22,7 +23,8 @@ impl<
E: EntityAccessService,
N: NotificationIngress,
V: VoipPushSender,
-> ChannelCallStartup<R, C, Cn, E, N, V>
+ B: MacroEventBroker,
+> ChannelCallStartup<R, C, Cn, E, N, V, B>
{
pub fn spawn(
self,
@@ -73,6 +75,12 @@ impl<
{
return Ok(());
}
+ for recipient in &recipient_ids {
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.created_by = Some(user_id.to_string());
+ metadata.recipient_user_id = Some(recipient.to_string());
+ publish_call_notification(&self.event_broker, CallNotificationEvent::Ringing(metadata));
+ }
let users: Vec<_> = recipient_ids.iter().map(CowLike::copied).collect();
self.connection_service
.send_channel_message(
diff --git a/crates/call/src/domain/service/meeting_invites.rs b/crates/call/src/domain/service/meeting_invites.rs
index 30709e3240..5bb44d1ca1 100644
--- a/crates/call/src/domain/service/meeting_invites.rs
+++ b/crates/call/src/domain/service/meeting_invites.rs
@@ -91,6 +91,14 @@ where
.add_meeting_invitees(&meeting.id, &call_id, &recipients)
.await?;
+ for recipient in &recipients {
+ let mut metadata = CallNotificationMetadata::new(call_id, None);
+ metadata.meeting_id = Some(meeting.id);
+ metadata.invited_by = Some(actor.to_string());
+ metadata.recipient_user_id = Some(recipient.to_string());
+ self.publish_call_notification(CallNotificationEvent::Invited(metadata));
+ }
+
let invited_at = Utc::now();
self.connection_service
.send_channel_message(
@@ -113,8 +121,13 @@ where
pub(super) async fn send_meeting_answered_event(
&self,
meeting_id: Uuid,
+ call_id: Uuid,
actor: MacroUserIdStr<'_>,
) {
+ let mut metadata = CallNotificationMetadata::new(call_id, None);
+ metadata.user_id = Some(actor.to_string());
+ metadata.recipient_user_id = Some(actor.to_string());
+ self.publish_call_notification(CallNotificationEvent::Answered(metadata));
self.connection_service
.send_channel_message(
&[actor.copied()],
diff --git a/crates/call/src/domain/service/meetings.rs b/crates/call/src/domain/service/meetings.rs
index 2754f39de8..6bd061f74a 100644
--- a/crates/call/src/domain/service/meetings.rs
+++ b/crates/call/src/domain/service/meetings.rs
@@ -298,7 +298,10 @@ impl<
}
#[tracing::instrument(err, skip_all)]
- pub(super) async fn prepare_meeting_call(&self, meeting: &Meeting) -> Result<Call, CallError> {
+ pub(super) async fn prepare_meeting_call(
+ &self,
+ meeting: &Meeting,
+ ) -> Result<(Call, bool), CallError> {
if let Some(call_id) = meeting.call_id
&& let Some(call) = self
.repo
@@ -306,7 +309,7 @@ impl<
.await
.map_err(|e| CallError::Internal(e.into()))?
{
- return Ok(call);
+ return Ok((call, false));
}
let preparation = self.repo.get_meeting_preparation(&meeting.id).await?;
let candidate_id = preparation
@@ -344,6 +347,9 @@ impl<
created_at: call.created_at,
recording_enabled: self.egress_s3_config.is_some(),
}));
+ let mut metadata = CallNotificationMetadata::new(call.id, None);
+ metadata.created_by = Some(call.created_by.clone());
+ self.publish_call_notification(CallNotificationEvent::Started(metadata));
// Token issuance needs a room, not a running recorder or agent.
// Only the allocation winner schedules these best-effort services.
let rtc = self.rtc_client.clone();
@@ -360,7 +366,7 @@ impl<
tokio::join!(transcription, recording);
}.instrument(tracing::info_span!("start_meeting_media", call_id = %call_id)));
}
- Ok(call)
+ Ok((call, created))
}
#[tracing::instrument(err, skip_all)]
@@ -368,16 +374,62 @@ impl<
&self,
token: MeetingToken,
actor: MacroUserIdStr<'_>,
+ request: JoinCallRequest,
+ credential_is_program: bool,
+ agent_attributed: bool,
) -> Result<CallTokenResponse, CallError> {
let meeting = self.resolve_invitation(&token).await?;
- let call = self.prepare_meeting_call(&meeting).await?;
- self.leave_other_active_call(actor.copied(), call.id)
- .await?;
- let rtc_token = self
- .rtc_client
- .generate_token(&call.room_name, actor.copied())
+ if matches!(request.on_other_call, OnOtherCall::Fail)
+ && let Some((other_id, _)) = self
+ .repo
+ .find_active_call_for_user(actor.copied())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ && meeting.call_id != Some(other_id)
+ {
+ return Err(CallError::InOtherCall);
+ }
+ if agent_attributed {
+ let active = match meeting.call_id {
+ Some(call_id) => self
+ .repo
+ .get_call_by_id(&call_id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ .is_some(),
+ None => false,
+ };
+ if !active {
+ return Err(CallError::Forbidden(
+ "an agent-attributed start requires approval".to_string(),
+ ));
+ }
+ }
+ let (call, started) = self.prepare_meeting_call(&meeting).await?;
+ if let Some((other_id, _)) = self
+ .repo
+ .find_active_call_for_user(actor.copied())
.await
- .map_err(CallError::Internal)?;
+ .map_err(|e| CallError::Internal(e.into()))?
+ && other_id != call.id
+ {
+ if matches!(request.on_other_call, OnOtherCall::Fail) {
+ return Err(CallError::InOtherCall);
+ }
+ self.leave_other_active_call(actor.copied(), call.id)
+ .await?;
+ }
+ if !request.replace {
+ let connected = self
+ .rtc_client
+ .list_participant_identities(&call.room_name)
+ .await
+ .map_err(CallError::Internal)?
+ .unwrap_or_default();
+ if connected.iter().any(|identity| identity == actor.as_ref()) {
+ return Err(CallError::AlreadyConnected);
+ }
+ }
match self
.repo
.add_meeting_participant(&call.id, actor.copied())
@@ -385,13 +437,57 @@ impl<
{
Ok(_) => {}
Err(AddParticipantError::UserAlreadyActive) => {
- return Err(CallError::AlreadyInCall("another call".to_string()));
+ return Err(CallError::InOtherCall);
}
Err(AddParticipantError::Repository(error)) => return Err(CallError::Internal(error)),
}
- self.send_meeting_answered_event(meeting.id, actor.copied())
+ let agent = if credential_is_program {
+ self.repo
+ .is_agent_account(actor.as_ref())
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ } else {
+ false
+ };
+ let rtc_token = if agent || credential_is_program {
+ let client = if agent { "agent" } else { "api_key" };
+ self.repo
+ .set_participant_client(&call.id, actor.as_ref(), client)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ self.rtc_client
+ .generate_program_token(
+ &call.room_name,
+ actor.copied(),
+ client,
+ request.name.clone(),
+ )
+ .await
+ } else {
+ // A person may rejoin a row a program of theirs marked. Reset it, or
+ // the program-only rule could end the call while they're in it.
+ self.repo
+ .set_participant_client(&call.id, actor.as_ref(), "person")
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?;
+ match request.name.as_deref() {
+ Some(name) => {
+ self.rtc_client
+ .generate_named_token(&call.room_name, actor.copied(), name)
+ .await
+ }
+ None => {
+ self.rtc_client
+ .generate_token(&call.room_name, actor.copied())
+ .await
+ }
+ }
+ }
+ .map_err(CallError::Internal)?;
+ self.send_meeting_answered_event(meeting.id, call.id, actor.copied())
.await;
Ok(CallTokenResponse {
+ started,
call_id: call.id,
channel_id: call.channel_id,
token: rtc_token,
@@ -416,7 +512,7 @@ impl<
"Sign in to join this call".to_string(),
));
}
- let call = self.prepare_meeting_call(&meeting).await?;
+ let (call, started) = self.prepare_meeting_call(&meeting).await?;
let guest_id = GuestId::generate();
// Lock and persist before minting so a join racing archival fails here.
self.repo.add_guest(&call.id, guest_id, &name).await?;
@@ -437,6 +533,7 @@ impl<
}
};
Ok(CallTokenResponse {
+ started,
call_id: call.id,
channel_id: call.channel_id,
token: rtc_token,
@@ -475,6 +572,10 @@ impl<
.remove_participant(&other.id, user_id.copied())
.await
.map_err(|e| CallError::Internal(e.into()))?;
+ let mut metadata = CallNotificationMetadata::new(other.id, other.channel_id);
+ metadata.identity = Some(user_id.to_string());
+ metadata.user_id = Some(user_id.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(metadata));
// Archiving closes this room to future joins. Its whole-room teardown
// can then run independently without kicking a later rejoin.
if self.finish_empty_call(&other).await? {
@@ -498,10 +599,12 @@ impl<
.get_participant_count(&call.id)
.await
.map_err(|e| CallError::Internal(e.into()))?;
- if remaining != 0 {
- return Ok(false);
- }
- let archived = match self.repo.archive_call_if_empty(&call.id).await {
+ let archive = if remaining == 0 {
+ self.repo.archive_call_if_empty(&call.id).await
+ } else {
+ self.repo.archive_call_if_program_only(&call.id).await
+ };
+ let archived = match archive {
Ok(Some(archived)) => archived,
Ok(None) => return Ok(false),
Err(CallError::NotFound(_)) => return Ok(true),
@@ -574,6 +677,9 @@ impl<
}
if let Some(guest_id) = GuestId::parse_rtc_identity(&verified.identity) {
self.repo.reconcile_guest(&call.id, guest_id, false).await?;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(guest_id.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(metadata));
if self.finish_empty_call(&call).await? {
return Ok(LeaveCallResponse { call_ended: true });
}
@@ -588,6 +694,10 @@ impl<
.remove_participant(&call.id, identity.copied())
.await
.map_err(|e| CallError::Internal(e.into()))?;
+ let mut metadata = CallNotificationMetadata::new(call.id, call.channel_id);
+ metadata.identity = Some(identity.to_string());
+ metadata.user_id = Some(identity.to_string());
+ self.publish_call_notification(CallNotificationEvent::ParticipantLeft(metadata));
if self.finish_empty_call(&call).await? {
return Ok(LeaveCallResponse { call_ended: true });
}
diff --git a/crates/call/src/domain/service/orphan_rooms.rs b/crates/call/src/domain/service/orphan_rooms.rs
index 983e5ab95b..304dbc60de 100644
--- a/crates/call/src/domain/service/orphan_rooms.rs
+++ b/crates/call/src/domain/service/orphan_rooms.rs
@@ -25,6 +25,8 @@ pub(super) enum RoomParticipant<'a> {
User(MacroUserIdStr<'a>),
/// A non-account meeting guest.
Guest(GuestId),
+ /// An authenticated bot.
+ Bot(bot_id::BotId),
}
impl RoomParticipant<'_> {
@@ -33,6 +35,7 @@ impl RoomParticipant<'_> {
match self {
Self::User(_) => "user",
Self::Guest(_) => "guest",
+ Self::Bot(_) => "bot",
}
}
}
@@ -90,6 +93,7 @@ where
RoomParticipant::Guest(guest_id) => {
self.rtc_client.remove_guest(room_name, guest_id).await
}
+ RoomParticipant::Bot(bot_id) => self.rtc_client.remove_bot(room_name, bot_id).await,
};
removed
.inspect_err(|error| {
diff --git a/crates/call/src/domain/service/reconcile.rs b/crates/call/src/domain/service/reconcile.rs
index 3b56698c7e..df091323ad 100644
--- a/crates/call/src/domain/service/reconcile.rs
+++ b/crates/call/src/domain/service/reconcile.rs
@@ -81,6 +81,16 @@ where
// A call created moments ago may not have anyone connected yet.
if settled(call.created_at) {
self.finish_empty_call(call).await?;
+ } else if now - call.created_at >= TimeDelta::seconds(60) {
+ let has_participants = self
+ .repo
+ .get_participant_count(&call.id)
+ .await
+ .map_err(|e| CallError::Internal(e.into()))?
+ > 0;
+ if has_participants {
+ self.finish_empty_call(call).await?;
+ }
}
Ok(())
}
diff --git a/crates/call/src/domain/service/test.rs b/crates/call/src/domain/service/test.rs
index 19d9e1cc30..4ca97b0424 100644
--- a/crates/call/src/domain/service/test.rs
+++ b/crates/call/src/domain/service/test.rs
@@ -28,10 +28,12 @@ mod access;
mod active_meetings;
mod channel_startup;
mod guest_chat;
+mod join;
mod meeting_invites;
mod meeting_participants;
mod meeting_startup;
mod orphan_rooms;
+mod recording;
use crate::domain::meetings::GuestId;
use crate::domain::models::{
@@ -116,6 +118,10 @@ impl CallRtcClient for MockRtcClient {
Ok(())
}
+ async fn remove_bot(&self, _room: &str, _bot_id: bot_id::BotId) -> anyhow::Result<()> {
+ Ok(())
+ }
+
async fn create_room(&self, _room_name: &str) -> anyhow::Result<()> {
Ok(())
}
@@ -144,6 +150,34 @@ impl CallRtcClient for MockRtcClient {
.unwrap_or_else(|| Ok(format!("default-token-{key}")))
}
+ async fn generate_named_token(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'_>,
+ _name: &str,
+ ) -> anyhow::Result<String> {
+ self.generate_token(room_name, participant_identity).await
+ }
+
+ async fn generate_program_token(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'_>,
+ _program: &str,
+ _name: Option<String>,
+ ) -> anyhow::Result<String> {
+ self.generate_token(room_name, participant_identity).await
+ }
+
+ async fn generate_bot_token(
+ &self,
+ _room_name: &str,
+ bot_id: bot_id::BotId,
+ _name: Option<String>,
+ ) -> anyhow::Result<String> {
+ Ok(format!("bot-token:{bot_id:?}"))
+ }
+
async fn build_voip_push_payloads<'a>(
&self,
request: VoipPushPayloadRequest<'a>,
@@ -194,6 +228,13 @@ impl CallRtcClient for MockRtcClient {
Ok(None)
}
+ async fn list_live_participants(
+ &self,
+ _room_name: &str,
+ ) -> anyhow::Result<Option<Vec<crate::domain::models::LiveCallParticipant>>> {
+ Ok(None)
+ }
+
async fn list_participant_identities(
&self,
room_name: &str,
@@ -288,7 +329,23 @@ impl RecordingEventBroker {
}
fn events(&self) -> Vec<PublishedCallEvent> {
- self.events.lock().unwrap().clone()
+ self.events
+ .lock()
+ .unwrap()
+ .iter()
+ .filter(|event| event.topic == "macro.calls")
+ .cloned()
+ .collect()
+ }
+
+ fn notifications(&self) -> Vec<PublishedCallEvent> {
+ self.events
+ .lock()
+ .unwrap()
+ .iter()
+ .filter(|event| event.topic == "macro.call_notifications")
+ .cloned()
+ .collect()
}
fn attempts(&self) -> usize {
@@ -403,6 +460,13 @@ impl NotificationIngress for StubNotificationIngress {
struct StubRecordingStorage;
impl crate::domain::ports::RecordingStorage for StubRecordingStorage {
+ async fn open_recording(
+ &self,
+ _recording_key: &str,
+ ) -> anyhow::Result<Option<crate::domain::ports::RecordingDownload>> {
+ unreachable!("recording download is not exercised by get_or_create_call tests")
+ }
+
async fn presign_recording_url(&self, _recording_key: &str) -> anyhow::Result<String> {
unreachable!("recording reads are not exercised by get_or_create_call tests")
}
@@ -499,6 +563,10 @@ fn mock_get_or_create_repo_storing(
repo.expect_find_active_call_for_user()
.times(1)
.returning(|_| Box::pin(async { Ok(None) }));
+ repo.expect_set_participant_client()
+ .times(1)
+ .withf(|_, _, client| client == "person")
+ .returning(|_, _, _| Box::pin(async { Ok(()) }));
repo.expect_add_participant()
.times(1)
.returning(|call_id, user_id| {
@@ -527,11 +595,13 @@ type BaseGetOrCreateCallService<Cn, B = macro_event_broker::NoopMacroEventBroker
>;
fn build_get_or_create_service<B: MacroEventBroker + Clone, Cn: ConnectionService>(
- repo: MockCallRepository,
+ mut repo: MockCallRepository,
connection_service: Cn,
event_broker: B,
recording_enabled: bool,
) -> BaseGetOrCreateCallService<Cn, B> {
+ repo.expect_archive_call_if_program_only()
+ .returning(|_| Box::pin(async { Ok(None) }));
let service: BaseGetOrCreateCallService<Cn> = CallServiceImpl::new(
repo,
MockRtcClient::new(),
@@ -688,6 +758,8 @@ async fn get_or_create_call_publishes_started_event() {
.await
.expect("call creation succeeds");
+ assert!(response.started);
+
assert_eq!(response.call_id, STARTED_EVENT_CALL_ID);
let events = broker.events();
let [published] = events.as_slice() else {
@@ -721,13 +793,24 @@ async fn get_or_create_call_publishes_started_event() {
},
})
);
+ // The joining creator also produces call.answered for their own devices.
+ let notifications = broker.notifications();
+ let started: Vec<_> = notifications
+ .iter()
+ .filter(|event| event.envelope["event_type"] == "call.started")
+ .collect();
+ assert_eq!(started.len(), 1);
+ assert_eq!(
+ started[0].envelope["metadata"]["call_id"],
+ json!(STARTED_EVENT_CALL_ID)
+ );
}
#[tokio::test]
async fn get_or_create_call_race_loser_does_not_publish_started_event() {
let broker = RecordingEventBroker::default();
- get_or_create_call(
+ let response = get_or_create_call(
GetOrCreateScenario::RaceLoses,
STARTED_EVENT_CREATOR,
broker.clone(),
@@ -736,6 +819,7 @@ async fn get_or_create_call_race_loser_does_not_publish_started_event() {
.await
.expect("race loser joins the winning call");
+ assert!(!response.started);
assert!(broker.events().is_empty());
}
@@ -743,7 +827,7 @@ async fn get_or_create_call_race_loser_does_not_publish_started_event() {
async fn get_or_create_call_existing_call_does_not_publish_started_event() {
let broker = RecordingEventBroker::default();
- get_or_create_call(
+ let response = get_or_create_call(
GetOrCreateScenario::ExistingCall,
STARTED_EVENT_CREATOR,
broker.clone(),
@@ -752,6 +836,7 @@ async fn get_or_create_call_existing_call_does_not_publish_started_event() {
.await
.expect("existing call can be joined");
+ assert!(!response.started);
assert!(broker.events().is_empty());
}
@@ -861,6 +946,8 @@ fn switching_repo(remaining: i64) -> MockCallRepository {
.withf(|call_id| *call_id == SWITCHED_FROM_CALL_ID)
.times(1)
.returning(move |_| Box::pin(async move { Ok(remaining) }));
+ repo.expect_set_participant_client()
+ .returning(|_, _, _| Box::pin(async { Ok(()) }));
repo.expect_add_participant()
.withf(|call_id, _| *call_id == STARTED_EVENT_CALL_ID)
.times(1)
@@ -876,11 +963,13 @@ fn switching_repo(remaining: i64) -> MockCallRepository {
}
async fn join_while_in_other_call(
- repo: MockCallRepository,
+ mut repo: MockCallRepository,
) -> (
crate::domain::models::CallTokenResponse,
Vec<(String, String)>,
) {
+ repo.expect_archive_call_if_program_only()
+ .returning(|_| Box::pin(async { Ok(None) }));
let rtc_client = MockRtcClient::new();
let removed = rtc_client.removed.clone();
let service: BaseGetOrCreateCallService<StubConnectionService> = CallServiceImpl::new(
@@ -967,7 +1056,9 @@ fn reconcile_repo(joined: DateTime<Utc>) -> MockCallRepository {
repo
}
-async fn reconcile(repo: MockCallRepository, rtc_client: MockRtcClient) {
+async fn reconcile(mut repo: MockCallRepository, rtc_client: MockRtcClient) {
+ repo.expect_archive_call_if_program_only()
+ .returning(|_| Box::pin(async { Ok(None) }));
let service: BaseGetOrCreateCallService<StubConnectionService> = CallServiceImpl::new(
repo,
rtc_client,
@@ -1105,6 +1196,7 @@ fn egress_ended_rtc_client(egress_id: Option<&str>, file_url: Option<&str>) -> M
id: "egress-ended-event-id".to_string(),
room_name: None,
participant_identity: None,
+ bot_identity: None,
egress_id: egress_id.map(str::to_string),
file_url: file_url.map(str::to_string),
created_at: 1_775_000_000,
@@ -1131,6 +1223,7 @@ fn webhook_rtc_client(
id: format!("{event_type}-event-id"),
room_name: Some(ARCHIVED_EVENT_ROOM_NAME.to_string()),
participant_identity: participant_identity.map(|email| user(email).into_owned()),
+ bot_identity: None,
egress_id: None,
file_url: None,
created_at: 1_775_000_000,
@@ -1166,11 +1259,13 @@ fn build_webhook_service(
}
fn build_webhook_service_with_connection<Cn: ConnectionService>(
- repo: MockCallRepository,
+ mut repo: MockCallRepository,
rtc_client: MockCallRtcClient,
connection_service: Cn,
event_broker: RecordingEventBroker,
) -> impl CallService + messages::domain::service::guest_chat::GuestCallAuthorizer {
+ repo.expect_archive_call_if_program_only()
+ .returning(|_| Box::pin(async { Ok(None) }));
let service: BaseWebhookCallService<Cn> = CallServiceImpl::new(
repo,
rtc_client,
@@ -1398,6 +1493,8 @@ async fn participant_joined_webhook_sends_call_answered_to_answering_user() {
assert_eq!(room_name, ARCHIVED_EVENT_ROOM_NAME);
Box::pin(async move { Ok(Some(active_call)) })
});
+ repo.expect_set_participant_client()
+ .returning(|_, _, _| Box::pin(async { Ok(()) }));
repo.expect_add_participant()
.times(1)
.returning(|call_id, participant_identity| {
@@ -1454,6 +1551,8 @@ async fn participant_joined_webhook_skips_call_answered_on_state_drift() {
repo.expect_get_call_by_room_name()
.times(1)
.return_once(move |_| Box::pin(async move { Ok(Some(active_call)) }));
+ repo.expect_set_participant_client()
+ .returning(|_, _, _| Box::pin(async { Ok(()) }));
repo.expect_add_participant()
.times(1)
.returning(|_, _| Box::pin(async { Err(AddParticipantError::UserAlreadyActive) }));
@@ -1505,6 +1604,16 @@ fn assert_recording_ready_event(event_broker: &RecordingEventBroker) {
})
);
assert!(!published.envelope.to_string().contains(RECORDING_READY_KEY));
+ let notifications = event_broker.notifications();
+ assert_eq!(notifications.len(), 1);
+ assert_eq!(
+ notifications[0].envelope["event_type"],
+ "call.recording_ready"
+ );
+ assert_eq!(
+ notifications[0].envelope["metadata"],
+ json!({ "call_id": ARCHIVED_EVENT_CALL_ID })
+ );
}
#[tokio::test]
@@ -3045,7 +3154,7 @@ async fn summarize_call_publishes_record_summarized_event() {
failing_broker,
)
.await;
- assert_eq!(observed_failing_broker.attempts(), 1);
+ assert_eq!(observed_failing_broker.attempts(), 2);
assert!(observed_failing_broker.events().is_empty());
}
@@ -3083,7 +3192,7 @@ async fn spawned_summarization_publishes_record_summarized_event() {
);
service.spawn_summarize_call(SUMMARIZED_EVENT_CALL_ID);
- wait_for_spawned_work(|| failing_broker.attempts() == 1).await;
+ wait_for_spawned_work(|| failing_broker.attempts() == 2).await;
assert!(failing_broker.events().is_empty());
}
@@ -4179,6 +4288,7 @@ async fn guest_webhook_events_reconcile_join_and_leave() {
id: "evt".to_string(),
room_name: Some(ARCHIVED_EVENT_ROOM_NAME.to_string()),
participant_identity: None,
+ bot_identity: None,
guest_identity: Some(guest_id),
egress_id: None,
file_url: None,
@@ -4239,6 +4349,7 @@ async fn mixed_call_archives_only_after_both_users_and_guests_leave() {
id: "evt-user".to_string(),
room_name: Some(ARCHIVED_EVENT_ROOM_NAME.to_string()),
participant_identity: Some(user(ARCHIVED_EVENT_CREATOR).into_owned()),
+ bot_identity: None,
guest_identity: None,
egress_id: None,
file_url: None,
@@ -4247,6 +4358,7 @@ async fn mixed_call_archives_only_after_both_users_and_guests_leave() {
let guest_left = CallWebhookEvent {
guest_identity: Some(guest_id),
participant_identity: None,
+ bot_identity: None,
id: "evt-guest".to_string(),
..user_left.clone()
};
diff --git a/crates/call/src/domain/service/test/channel_startup.rs b/crates/call/src/domain/service/test/channel_startup.rs
index 862c8bfb37..835c26cb45 100644
--- a/crates/call/src/domain/service/test/channel_startup.rs
+++ b/crates/call/src/domain/service/test/channel_startup.rs
@@ -217,6 +217,28 @@ async fn existing_and_race_losing_joins_do_not_start_background_services() {
}
}
+#[tokio::test]
+async fn a_person_rejoining_resets_program_attendance() {
+ let repo = mock_get_or_create_repo(
+ GetOrCreateScenario::ExistingCall,
+ started_event_call(STARTED_EVENT_CREATOR),
+ );
+ let service: BaseGetOrCreateCallService<StubConnectionService> = CallServiceImpl::new(
+ repo,
+ MockRtcClient::new(),
+ StubConnectionService,
+ NoOpEntityAccessService,
+ StubNotificationIngress,
+ StubRecordingStorage,
+ "wss://example.com",
+ );
+
+ service
+ .get_or_create_call(&STARTED_EVENT_CHANNEL_ID, user("[email protected]"))
+ .await
+ .unwrap();
+}
+
#[tokio::test]
async fn ended_call_does_not_ring_recipients() {
let mut repo = MockCallRepository::new();
@@ -242,6 +264,7 @@ async fn ended_call_does_not_ring_recipients() {
server_url: "wss://example.com".into(),
ring_status_base_url: None,
egress_s3_config: None,
+ event_broker: macro_event_broker::NoopMacroEventBroker,
};
startup
.spawn(
diff --git a/crates/call/src/domain/service/test/join.rs b/crates/call/src/domain/service/test/join.rs
new file mode 100644
index 0000000000..a1fdb4e35a
--- /dev/null
+++ b/crates/call/src/domain/service/test/join.rs
@@ -0,0 +1,173 @@
+use super::*;
+use crate::domain::models::JoinCallRequest;
+use crate::domain::ports::ProgrammaticCallGate;
+
+struct DisabledProgrammaticCalls;
+
+#[async_trait::async_trait]
+impl ProgrammaticCallGate for DisabledProgrammaticCalls {
+ async fn enabled_for(&self, _caller: MacroUserIdStr<'_>) -> bool {
+ false
+ }
+}
+
+#[tokio::test]
+async fn programmatic_call_gate_is_read_for_the_caller() {
+ let service = join_service(MockCallRepository::new(), MockRtcClient::new())
+ .with_programmatic_call_gate(DisabledProgrammaticCalls);
+
+ assert!(
+ !service
+ .programmatic_calls_enabled(user("[email protected]"))
+ .await
+ );
+}
+
+fn join_service(
+ repo: MockCallRepository,
+ rtc: MockRtcClient,
+) -> BaseGetOrCreateCallService<StubConnectionService> {
+ CallServiceImpl::new(
+ repo,
+ rtc,
+ StubConnectionService,
+ NoOpEntityAccessService,
+ StubNotificationIngress,
+ StubRecordingStorage,
+ "wss://livekit.example.com",
+ )
+}
+
+#[tokio::test]
+async fn join_rejects_an_ended_call_without_creating_one() {
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_call_by_id()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(None) }));
+ repo.expect_create_call().never();
+ let service = join_service(repo, MockRtcClient::new());
+
+ assert!(matches!(
+ service
+ .join_call(
+ &STARTED_EVENT_CALL_ID,
+ JoinCallRequest::default(),
+ true
+ )
+ .await,
+ Err(CallError::Ended)
+ ));
+}
+
+#[tokio::test]
+async fn join_refuses_viewers_without_participant_access() {
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_call_by_id()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(Some(started_event_call(STARTED_EVENT_CREATOR))) }));
+ repo.expect_can_join_call()
+ .times(1)
+ .returning(|_, _| Box::pin(async { Ok(false) }));
+ repo.expect_add_participant().never();
+ let service = join_service(repo, MockRtcClient::new());
+
+ assert!(matches!(
+ service
+ .join_call(
+ &STARTED_EVENT_CALL_ID,
+ JoinCallRequest::default(),
+ true
+ )
+ .await,
+ Err(CallError::Forbidden(_))
+ ));
+}
+
+#[tokio::test]
+async fn join_preserves_another_call_by_default() {
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_call_by_id()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(Some(started_event_call(STARTED_EVENT_CREATOR))) }));
+ repo.expect_can_join_call()
+ .times(1)
+ .returning(|_, _| Box::pin(async { Ok(true) }));
+ repo.expect_find_active_call_for_user()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(Some((SWITCHED_FROM_CALL_ID, None))) }));
+ repo.expect_remove_participant().never();
+ let service = join_service(repo, MockRtcClient::new());
+
+ assert!(matches!(
+ service
+ .join_call(
+ &STARTED_EVENT_CALL_ID,
+ JoinCallRequest::default(),
+ true
+ )
+ .await,
+ Err(CallError::InOtherCall)
+ ));
+}
+
+#[tokio::test]
+async fn join_refuses_to_replace_an_existing_connection_by_default() {
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_call_by_id()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(Some(started_event_call(STARTED_EVENT_CREATOR))) }));
+ repo.expect_can_join_call()
+ .times(1)
+ .returning(|_, _| Box::pin(async { Ok(true) }));
+ repo.expect_find_active_call_for_user()
+ .times(1)
+ .returning(|_| {
+ Box::pin(async {
+ Ok(Some((
+ STARTED_EVENT_CALL_ID,
+ Some(STARTED_EVENT_CHANNEL_ID),
+ )))
+ })
+ });
+ repo.expect_add_participant().never();
+ let rtc = MockRtcClient::new().with_room(
+ &STARTED_EVENT_CHANNEL_ID.to_string(),
+ &[user("[email protected]").as_ref()],
+ );
+ let service = join_service(repo, rtc);
+
+ assert!(matches!(
+ service
+ .join_call(
+ &STARTED_EVENT_CALL_ID,
+ JoinCallRequest::default(),
+ true
+ )
+ .await,
+ Err(CallError::AlreadyConnected)
+ ));
+}
+
+#[tokio::test]
+async fn occupied_call_checks_program_only_expiry_before_staying_open() {
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_participant_count()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(1) }));
+ repo.expect_archive_call_if_program_only()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(None) }));
+ repo.expect_archive_call_if_empty().never();
+ let service = join_service(repo, MockRtcClient::new());
+
+ assert!(
+ !service
+ .finish_empty_call(&started_event_call(STARTED_EVENT_CREATOR))
+ .await
+ .unwrap()
+ );
+}
diff --git a/crates/call/src/domain/service/test/meeting_invites.rs b/crates/call/src/domain/service/test/meeting_invites.rs
index 9f71f55c54..5016d7fac8 100644
--- a/crates/call/src/domain/service/test/meeting_invites.rs
+++ b/crates/call/src/domain/service/test/meeting_invites.rs
@@ -365,6 +365,8 @@ async fn successful_join_resolves_only_the_answering_users_meeting_ring() {
.return_once(move |_| Box::pin(async move { Ok(Some(call)) }));
repo.expect_find_active_call_for_user()
.returning(|_| Box::pin(async { Ok(None) }));
+ repo.expect_set_participant_client()
+ .returning(|_, _, _| Box::pin(async { Ok(()) }));
repo.expect_add_meeting_participant()
.returning(move |call_id, actor| {
let participant = CallParticipant {
diff --git a/crates/call/src/domain/service/test/meeting_startup.rs b/crates/call/src/domain/service/test/meeting_startup.rs
index 79cbbcbcd3..a72234f670 100644
--- a/crates/call/src/domain/service/test/meeting_startup.rs
+++ b/crates/call/src/domain/service/test/meeting_startup.rs
@@ -1,9 +1,11 @@
use super::*;
fn service(
- repo: MockCallRepository,
+ mut repo: MockCallRepository,
rtc: MockCallRtcClient,
) -> BaseWebhookCallService<StubConnectionService> {
+ repo.expect_archive_call_if_program_only()
+ .returning(|_| Box::pin(async { Ok(None) }));
CallServiceImpl::new(
repo,
rtc,
@@ -121,6 +123,7 @@ async fn prepared_room_skips_external_creation_and_a_concurrent_join_does_not_de
.prepare_meeting_call(&meeting)
.await
.unwrap()
+ .0
.id,
call_id
);
@@ -273,7 +276,7 @@ async fn meeting_allocation_does_not_wait_for_recording_or_transcription() {
.await
.expect("room allocation must not wait for media services")
.unwrap();
- assert_eq!(prepared.id, call_id);
+ assert_eq!(prepared.0.id, call_id);
// The recording progresses even though transcription is still blocked.
release_recorder.send(()).unwrap();
tokio::time::timeout(Duration::from_secs(2), attachment)
diff --git a/crates/call/src/domain/service/test/orphan_rooms.rs b/crates/call/src/domain/service/test/orphan_rooms.rs
index d0753b6d1a..9d489488bf 100644
--- a/crates/call/src/domain/service/test/orphan_rooms.rs
+++ b/crates/call/src/domain/service/test/orphan_rooms.rs
@@ -27,6 +27,7 @@ fn joined_webhook(
id: "participant-joined-event-id".to_string(),
room_name: Some(room_name.to_string()),
participant_identity: participant_identity.map(|email| user(email).into_owned()),
+ bot_identity: None,
egress_id: None,
file_url: None,
created_at: 1_775_000_000,
@@ -107,6 +108,39 @@ async fn guest_joining_an_archived_call_room_is_removed_and_the_room_deleted() {
process_join(repo, rtc_client).await;
}
+#[tokio::test]
+async fn bot_joining_an_archived_call_room_is_removed_without_attendance() {
+ let room_name = ORPHAN_CALL_ID.to_string();
+ let bot_id = bot_id::BotId::new_from_uuid(ORPHAN_GUEST_ID);
+ let event = CallWebhookEvent {
+ event: "participant_joined".to_string(),
+ id: "bot-joined".to_string(),
+ room_name: Some(room_name.clone()),
+ participant_identity: None,
+ guest_identity: None,
+ bot_identity: Some(bot_id),
+ egress_id: None,
+ file_url: None,
+ created_at: 1_775_000_000,
+ };
+ let mut rtc_client = MockCallRtcClient::new();
+ rtc_client
+ .expect_receive_webhook()
+ .times(1)
+ .return_once(move |_, _| Ok(event));
+ rtc_client
+ .expect_remove_bot()
+ .times(1)
+ .returning(|_, _| Box::pin(async { Ok(()) }));
+ rtc_client
+ .expect_delete_room()
+ .times(1)
+ .returning(|_| Box::pin(async { Ok(()) }));
+ let mut repo = untracked_room_repo(Some(archived_record(ORPHAN_CALL_ID)));
+ repo.expect_add_participant().never();
+ process_join(repo, rtc_client).await;
+}
+
#[tokio::test]
async fn joins_to_rooms_without_an_archived_call_are_left_alone() {
let mut active = archived_record(ORPHAN_CALL_ID);
diff --git a/crates/call/src/domain/service/test/recording.rs b/crates/call/src/domain/service/test/recording.rs
new file mode 100644
index 0000000000..ae1673e3d4
--- /dev/null
+++ b/crates/call/src/domain/service/test/recording.rs
@@ -0,0 +1,99 @@
+use super::*;
+use crate::domain::ports::{RecordingDownload, RecordingStorage};
+use futures::StreamExt;
+
+struct FakeRecordingStorage {
+ chunks: Option<Vec<Vec<u8>>>,
+}
+
+impl RecordingStorage for FakeRecordingStorage {
+ async fn open_recording(
+ &self,
+ recording_key: &str,
+ ) -> anyhow::Result<Option<RecordingDownload>> {
+ assert_eq!(recording_key, "recording.mp4");
+ Ok(self.chunks.as_ref().map(|chunks| RecordingDownload {
+ content_type: "video/mp4".to_string(),
+ content_length: chunks.iter().map(|chunk| chunk.len() as u64).sum(),
+ chunks: Box::pin(futures::stream::iter(chunks.clone().into_iter().map(Ok))),
+ }))
+ }
+
+ async fn presign_recording_url(&self, _: &str) -> anyhow::Result<String> {
+ unreachable!()
+ }
+
+ async fn presign_recording_preview_url(&self, _: &str) -> anyhow::Result<String> {
+ unreachable!()
+ }
+
+ async fn delete_recording(&self, _: &str) -> anyhow::Result<()> {
+ unreachable!()
+ }
+
+ async fn delete_recording_preview(&self, _: &str) -> anyhow::Result<()> {
+ unreachable!()
+ }
+}
+
+fn recording_service(key: Option<&str>, chunks: Option<Vec<Vec<u8>>>) -> impl CallService {
+ let mut record = call_record_for_mutation();
+ record.channel_id = None;
+ record.recording_key = key.map(str::to_string);
+
+ let mut repo = MockCallRepository::new();
+ repo.expect_get_call_record_by_call_id()
+ .times(1)
+ .return_once(move |call_id| {
+ assert_eq!(*call_id, MUTATED_EVENT_CALL_ID);
+ Box::pin(async move { Ok(Some(record)) })
+ });
+
+ let service: CallServiceImpl<_, _, _, _, _, _, NoopCallSummarizer> = CallServiceImpl::new(
+ repo,
+ MockRtcClient::new(),
+ StubConnectionService,
+ NoOpEntityAccessService,
+ StubNotificationIngress,
+ FakeRecordingStorage { chunks },
+ "wss://example.com",
+ );
+ service
+}
+
+#[tokio::test]
+async fn download_streams_recording_chunks() {
+ let recording = recording_service(Some("recording.mp4"), Some(vec![vec![1, 2], vec![3, 4, 5]]))
+ .get_call_recording(reader_receipt())
+ .await
+ .unwrap();
+
+ assert_eq!(recording.content_type, "video/mp4");
+ assert_eq!(recording.content_length, 5);
+ assert_eq!(
+ recording
+ .chunks
+ .collect::<Vec<_>>()
+ .await
+ .into_iter()
+ .collect::<anyhow::Result<Vec<_>>>()
+ .unwrap(),
+ vec![vec![1, 2], vec![3, 4, 5]]
+ );
+}
+
+#[tokio::test]
+async fn download_returns_not_found_without_recording() {
+ let result = recording_service(None, None)
+ .get_call_recording(reader_receipt())
+ .await;
+ assert!(matches!(result, Err(CallError::NotFound(_))));
+}
+
+#[tokio::test]
+async fn download_returns_not_found_when_object_is_missing() {
+ let result = recording_service(Some("recording.mp4"), None)
+ .get_call_recording(reader_receipt())
+ .await;
+ assert!(matches!(result, Err(CallError::NotFound(_))));
+}
diff --git a/crates/call/src/inbound/axum_router.rs b/crates/call/src/inbound/axum_router.rs
index c5136b42fd..90885cde8d 100644
--- a/crates/call/src/inbound/axum_router.rs
+++ b/crates/call/src/inbound/axum_router.rs
@@ -14,12 +14,15 @@ mod test;
pub mod meetings;
use std::borrow::Cow;
+use std::future::Future;
+use std::pin::Pin;
use std::sync::Arc;
+use std::time::Duration;
use axum::{
Json, Router,
extract::{FromRef, FromRequestParts, State},
- http::{StatusCode, request::Parts},
+ http::{HeaderMap, StatusCode, header, request::Parts},
response::IntoResponse,
routing::{get, patch, post},
};
@@ -34,18 +37,21 @@ use entity_access::{
},
};
use macro_authorization::{
- MacroAuthorizationExtractor, MacroAuthorizationService, MacroAuthorizationState, UserOrInternal,
+ CODE_EXECUTION_HEADER, CredentialOrigin, MacroAuthorizationExtractor,
+ MacroAuthorizationService, MacroAuthorizationState, UserOrInternal, is_agent_run,
};
use model_error_response::ErrorResponse;
+use rate_limit::{RateLimitConfig, RateLimitKey, RateLimitService};
use uuid::Uuid;
use crate::domain::models::{
ActiveCallsResponse, CallActiveResponse, CallError, CallRecord, CallTokenResponse,
EditCallRecordRequest, EditCallTranscriptRequest, GetBatchCallRecordPreviewRequest,
- GetBatchCallRecordPreviewResponse, LeaveCallResponse, MAX_BATCH_CALL_IDS, RingStatusResponse,
+ GetBatchCallRecordPreviewResponse, JoinCallRequest, LeaveCallResponse,
+ LiveCallParticipantsResponse, LiveCallsResponse, MAX_BATCH_CALL_IDS, RingStatusResponse,
TranscriptSegmentRequest,
};
-use crate::domain::ports::CallService;
+use crate::domain::ports::{CallService, CallStartLimiter};
// ---------------------------------------------------------------------------
// Call router (authenticated)
@@ -58,6 +64,33 @@ pub struct CallRouterState<S, Svc, Auth> {
authorization_state: MacroAuthorizationState<Auth>,
}
+/// Adapter around the shared rate limit service.
+pub struct RateLimitedCallStarts<R>(pub R);
+
+impl<R: RateLimitService> CallStartLimiter for RateLimitedCallStarts<R> {
+ fn check<'a>(
+ &'a self,
+ user_id: &'a str,
+ ) -> Pin<Box<dyn Future<Output = Result<(), CallError>> + Send + 'a>> {
+ Box::pin(async move {
+ let key = RateLimitKey::builder(&"call-start")
+ .append(&user_id)
+ .finish();
+ match self
+ .0
+ .check_rate_limit(key, RateLimitConfig::new(20, Duration::from_secs(3600)))
+ .await
+ {
+ Ok(Ok(_)) => Ok(()),
+ Ok(Err(_)) => Err(CallError::RateLimited),
+ Err(error) => Err(CallError::Internal(anyhow::anyhow!(
+ "call start rate limit failed: {error:?}"
+ ))),
+ }
+ })
+ }
+}
+
impl<S, Svc, Auth> Clone for CallRouterState<S, Svc, Auth> {
fn clone(&self) -> Self {
Self {
@@ -159,6 +192,7 @@ where
.route(
"/{channel_id}",
get(get_or_create_call_handler::<S, Svc, Auth>)
+ .post(start_call_handler::<S, Svc, Auth>)
.delete(leave_or_end_call_handler::<S, Svc, Auth>),
)
.route(
@@ -166,6 +200,23 @@ where
get(check_active_call_handler::<S, Svc, Auth>),
)
.route("/active", get(get_active_calls_handler::<S, Svc, Auth>))
+ .route("/active/all", get(get_live_calls_handler::<S, Svc, Auth>))
+ .route(
+ "/record/{call_id}/join",
+ post(join_call_handler::<S, Svc, Auth>),
+ )
+ .route(
+ "/record/{call_id}/leave",
+ post(leave_call_handler::<S, Svc, Auth>),
+ )
+ .route(
+ "/record/{call_id}/ring",
+ get(get_call_ring_state_handler::<S, Svc, Auth>),
+ )
+ .route(
+ "/record/{call_id}/participants",
+ get(get_call_participants_handler::<S, Svc, Auth>),
+ )
.route(
"/record/preview",
post(get_batch_call_record_preview_handler::<S, Svc, Auth>),
@@ -174,6 +225,10 @@ where
"/record/{call_id}/decline",
post(decline_call_handler::<S, Svc, Auth>),
)
+ .route(
+ "/record/{call_id}/recording",
+ get(get_call_recording_handler::<S, Svc, Auth>),
+ )
.route(
"/record/{call_id}",
get(get_call_record_handler::<S, Svc, Auth>)
@@ -373,18 +428,222 @@ pub async fn get_or_create_call_handler<
State(state): State<CallRouterState<S, Svc, Auth>>,
access: ChannelAccessLevelExtractor<MemberParticipantRole, Svc, Auth>,
user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+ headers: HeaderMap,
) -> Result<Json<CallTokenResponse>, CallError> {
+ refuse_code_execution_token(&headers)?;
+ if is_agent_run(user.authorization.user.agent_id.is_some(), &headers) {
+ return Err(CallError::Forbidden(
+ "an agent-attributed start requires approval".to_string(),
+ ));
+ }
let channel_id = Uuid::parse_str(&access.entity_access_receipt.entity().entity_id)
.map_err(|_| CallError::Internal(anyhow::anyhow!("invalid channel_id")))?;
let response = state
.service
- .get_or_create_call(&channel_id, user.authorization.user.macro_user_id.clone())
+ .start_call(
+ &channel_id,
+ user.authorization.user.macro_user_id.clone(),
+ JoinCallRequest {
+ on_other_call: crate::domain::models::OnOtherCall::Switch,
+ replace: true,
+ ..Default::default()
+ },
+ credential_is_program(&user.authorization.user.origin),
+ )
.await?;
Ok(Json(response))
}
+pub(super) fn refuse_code_execution_token(headers: &HeaderMap) -> Result<(), CallError> {
+ if headers.contains_key(CODE_EXECUTION_HEADER) {
+ return Err(CallError::Forbidden(
+ "call tokens are unavailable in code execution".to_string(),
+ ));
+ }
+ Ok(())
+}
+
+fn credential_is_program(origin: &CredentialOrigin) -> bool {
+ matches!(
+ origin,
+ CredentialOrigin::UserApiKey | CredentialOrigin::MacroApiJwt
+ )
+}
+
+/// Start or join a channel call explicitly.
+#[utoipa::path(post, operation_id = "start_call", path = "/call/{channel_id}",
+ params(("channel_id" = Uuid, Path)), request_body = JoinCallRequest,
+ responses((status = 200, body = CallTokenResponse), (status = 403, body = ErrorResponse), (status = 409)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn start_call_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ access: ChannelAccessLevelExtractor<MemberParticipantRole, Svc, Auth>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+ headers: HeaderMap,
+ request: Option<Json<JoinCallRequest>>,
+) -> Result<Json<CallTokenResponse>, CallError> {
+ refuse_code_execution_token(&headers)?;
+ if !state
+ .service
+ .programmatic_calls_enabled(user.authorization.user.macro_user_id.clone())
+ .await
+ {
+ return Err(CallError::NotFound("call".to_string()));
+ }
+ if is_agent_run(user.authorization.user.agent_id.is_some(), &headers) {
+ return Err(CallError::Forbidden(
+ "an agent-attributed start requires approval".to_string(),
+ ));
+ }
+ let channel_id = Uuid::parse_str(&access.entity_access_receipt.entity().entity_id)
+ .map_err(|_| CallError::Internal(anyhow::anyhow!("invalid channel_id")))?;
+ Ok(Json(
+ state
+ .service
+ .start_call(
+ &channel_id,
+ user.authorization.user.macro_user_id.clone(),
+ request.map_or_else(JoinCallRequest::default, |body| body.0),
+ credential_is_program(&user.authorization.user.origin),
+ )
+ .await?,
+ ))
+}
+
+/// Join a live call by its session id.
+#[utoipa::path(post, operation_id = "join_call", path = "/call/record/{call_id}/join",
+ params(("call_id" = Uuid, Path)), request_body = JoinCallRequest,
+ responses((status = 200, body = CallTokenResponse), (status = 403, body = ErrorResponse), (status = 409), (status = 410)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn join_call_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ axum::extract::Path(call_id): axum::extract::Path<Uuid>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+ headers: HeaderMap,
+ request: Option<Json<JoinCallRequest>>,
+) -> Result<Json<CallTokenResponse>, CallError> {
+ refuse_code_execution_token(&headers)?;
+ if !state
+ .service
+ .programmatic_calls_enabled(user.authorization.user.macro_user_id.clone())
+ .await
+ {
+ return Err(CallError::NotFound("call".to_string()));
+ }
+ Ok(Json(
+ state
+ .service
+ .join_call(
+ &call_id,
+ user.authorization.user.macro_user_id.clone(),
+ request.map_or_else(JoinCallRequest::default, |body| body.0),
+ credential_is_program(&user.authorization.user.origin),
+ )
+ .await?,
+ ))
+}
+
+/// Leave a specific live call.
+#[utoipa::path(post, operation_id = "leave_call", path = "/call/record/{call_id}/leave",
+ params(("call_id" = Uuid, Path)),
+ responses((status = 200, body = LeaveCallResponse), (status = 404, body = ErrorResponse)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn leave_call_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ axum::extract::Path(call_id): axum::extract::Path<Uuid>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+) -> Result<Json<LeaveCallResponse>, CallError> {
+ if !state
+ .service
+ .programmatic_calls_enabled(user.authorization.user.macro_user_id.clone())
+ .await
+ {
+ return Err(CallError::NotFound("call".to_string()));
+ }
+ Ok(Json(
+ state
+ .service
+ .leave_call(&call_id, user.authorization.user.macro_user_id.clone())
+ .await?,
+ ))
+}
+
+/// Read this account's ring state for a call.
+#[utoipa::path(get, operation_id = "get_call_ring_state", path = "/call/record/{call_id}/ring",
+ params(("call_id" = Uuid, Path)), responses((status = 200, body = RingStatusResponse)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn get_call_ring_state_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ axum::extract::Path(call_id): axum::extract::Path<Uuid>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+) -> Result<Json<RingStatusResponse>, CallError> {
+ Ok(Json(
+ state
+ .service
+ .get_call_ring_state(&call_id, user.authorization.user.macro_user_id.clone())
+ .await?,
+ ))
+}
+
+/// List all channel and standalone calls this account can join.
+#[utoipa::path(get, operation_id = "get_live_calls", path = "/call/active/all",
+ responses((status = 200, body = LiveCallsResponse)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn get_live_calls_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+) -> Result<Json<LiveCallsResponse>, CallError> {
+ Ok(Json(
+ state
+ .service
+ .get_live_calls(user.authorization.user.macro_user_id.clone())
+ .await?,
+ ))
+}
+
+/// Read live participants and track state for a joinable call.
+#[utoipa::path(get, operation_id = "get_call_participants", path = "/call/record/{call_id}/participants",
+ params(("call_id" = Uuid, Path)), responses((status = 200, body = LiveCallParticipantsResponse), (status = 403), (status = 404)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn get_call_participants_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ axum::extract::Path(call_id): axum::extract::Path<Uuid>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+) -> Result<Json<LiveCallParticipantsResponse>, CallError> {
+ Ok(Json(
+ state
+ .service
+ .get_call_participants(&call_id, user.authorization.user.macro_user_id.clone())
+ .await?,
+ ))
+}
+
/// Handler for `GET /call/{channel_id}/active`.
///
/// Returns 200 with call info if an active call exists, or 204 No Content if not.
@@ -486,6 +745,52 @@ pub async fn get_call_record_handler<
Ok(Json(record))
}
+/// OpenAPI representation of streamed recording bytes.
+#[derive(utoipa::ToSchema)]
+#[schema(value_type = String, format = Binary)]
+pub struct RecordingBytes(
+ /// Raw video bytes.
+ pub Vec<u8>,
+);
+
+/// Stream the recording bytes for a call record the caller may view.
+#[utoipa::path(
+ get,
+ operation_id = "get_call_recording",
+ path = "/call/record/{call_id}/recording",
+ params(("call_id" = Uuid, Path, description = "Call ID")),
+ responses(
+ (status = 200, content_type = "video/mp4", body = RecordingBytes),
+ (status = 403, body = ErrorResponse),
+ (status = 404, body = ErrorResponse),
+ (status = 500, body = ErrorResponse),
+ )
+)]
+#[tracing::instrument(err, skip_all)]
+pub async fn get_call_recording_handler<
+ S: CallService,
+ Svc: EntityAccessService,
+ Auth: MacroAuthorizationService,
+>(
+ State(state): State<CallRouterState<S, Svc, Auth>>,
+ access: CallAccessLevelExtractor<ViewAccessLevel, Svc, Auth>,
+) -> Result<axum::response::Response, CallError> {
+ let recording = state
+ .service
+ .get_call_recording(access.entity_access_receipt)
+ .await?;
+ let content_length = recording.content_length.to_string();
+
+ Ok((
+ [
+ (header::CONTENT_TYPE, recording.content_type),
+ (header::CONTENT_LENGTH, content_length),
+ ],
+ axum::body::Body::from_stream(recording.chunks),
+ )
+ .into_response())
+}
+
/// Handler for `DELETE /call/record/{call_id}`.
///
/// Deletes a call record (and its participants/transcripts via cascade).
@@ -914,6 +1219,9 @@ impl IntoResponse for CallError {
fn into_response(self) -> axum::response::Response {
let status_code = match &self {
CallError::NotFound(_) => StatusCode::NOT_FOUND,
+ CallError::Ended => StatusCode::GONE,
+ CallError::RateLimited => StatusCode::TOO_MANY_REQUESTS,
+ CallError::InOtherCall | CallError::AlreadyConnected => StatusCode::CONFLICT,
CallError::NotInCall => StatusCode::BAD_REQUEST,
CallError::AlreadyInCall(_) => StatusCode::CONFLICT,
CallError::Auth => StatusCode::UNAUTHORIZED,
@@ -930,11 +1238,14 @@ impl IntoResponse for CallError {
CallError::Internal(_) => "internal server error".to_string(),
other => other.to_string(),
};
+ let code = match &self {
+ CallError::InOtherCall => Some("in_other_call"),
+ CallError::AlreadyConnected => Some("already_connected"),
+ _ => None,
+ };
(
status_code,
- Json(ErrorResponse {
- message: message.into(),
- }),
+ Json(serde_json::json!({ "message": message, "code": code })),
)
.into_response()
}
diff --git a/crates/call/src/inbound/axum_router/meetings.rs b/crates/call/src/inbound/axum_router/meetings.rs
index bcd37d3235..8ae19b3ec3 100644
--- a/crates/call/src/inbound/axum_router/meetings.rs
+++ b/crates/call/src/inbound/axum_router/meetings.rs
@@ -274,13 +274,36 @@ pub async fn join<S: CallService, Svc: EntityAccessService, Auth: MacroAuthoriza
State(state): State<CallRouterState<S, Svc, Auth>>,
Path(token): Path<String>,
actor: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+ headers: HeaderMap,
+ request: Option<Json<JoinCallRequest>>,
) -> Result<Json<CallTokenResponse>, CallError> {
+ refuse_code_execution_token(&headers)?;
+ // Only SDK callers send options. The app and shipped native builds send no
+ // body and keep today's behavior: they switch calls, reclaim their identity
+ // after a reconnect, and are never treated as programs.
+ let (request, is_program) = match request {
+ Some(body)
+ if state
+ .service
+ .programmatic_calls_enabled(actor.authorization.user.macro_user_id.clone())
+ .await =>
+ {
+ (
+ body.0,
+ credential_is_program(&actor.authorization.user.origin),
+ )
+ }
+ _ => (JoinCallRequest::for_app(), false),
+ };
Ok(Json(
state
.service
- .join_meeting(
+ .join_meeting_with_options(
MeetingToken::try_from(token)?,
actor.authorization.user.macro_user_id.clone(),
+ request,
+ is_program,
+ actor.authorization.user.agent_id.is_some(),
)
.await?,
))
@@ -312,8 +335,10 @@ pub async fn lookup<S: CallService>(
pub async fn guest_join<S: CallService>(
State(state): State<WebhookRouterState<S>>,
Path(token): Path<String>,
+ headers: HeaderMap,
Json(request): Json<GuestJoinRequest>,
) -> Result<Json<CallTokenResponse>, CallError> {
+ refuse_code_execution_token(&headers)?;
Ok(Json(
state
.service
diff --git a/crates/call/src/inbound/axum_router/test.rs b/crates/call/src/inbound/axum_router/test.rs
index 6a2f1da37e..67098ad0ad 100644
--- a/crates/call/src/inbound/axum_router/test.rs
+++ b/crates/call/src/inbound/axum_router/test.rs
@@ -14,6 +14,10 @@ fn maps_domain_errors_to_status_codes() {
StatusCode::NOT_FOUND,
),
(CallError::NotInCall, StatusCode::BAD_REQUEST),
+ (CallError::Ended, StatusCode::GONE),
+ (CallError::InOtherCall, StatusCode::CONFLICT),
+ (CallError::AlreadyConnected, StatusCode::CONFLICT),
+ (CallError::RateLimited, StatusCode::TOO_MANY_REQUESTS),
(
CallError::AlreadyInCall("channel".to_string()),
StatusCode::CONFLICT,
@@ -45,6 +49,19 @@ fn maps_domain_errors_to_status_codes() {
}
}
+#[test]
+fn token_routes_refuse_code_execution_header() {
+ let mut headers = axum::http::HeaderMap::new();
+ headers.insert(
+ macro_authorization::CODE_EXECUTION_HEADER,
+ "1".parse().unwrap(),
+ );
+ assert!(matches!(
+ super::refuse_code_execution_token(&headers),
+ Err(CallError::Forbidden(_))
+ ));
+}
+
/// The entity-access service resolves a call to an access level, never a
/// channel role, so the decline route must accept a plain viewer.
#[test]
@@ -194,3 +211,196 @@ mod public_routes {
assert_eq!(response.status(), StatusCode::UNAUTHORIZED);
}
}
+
+#[cfg(test)]
+mod authenticated_join_routes {
+ use std::sync::Arc;
+
+ use axum::{
+ body::Body,
+ http::{Request, StatusCode},
+ };
+ use entity_access::domain::ports::NoOpEntityAccessService;
+ use macro_authorization::{
+ CredentialOrigin, InternalIdentityClaims, MacroAuthorizationError,
+ MacroAuthorizationService, MacroAuthorizationState, ValidatedCredential,
+ };
+ use model_user::UserContext;
+ use rootcause::Report;
+ use tower::ServiceExt;
+ use uuid::Uuid;
+
+ use crate::domain::{
+ models::{CallError, CallTokenResponse},
+ ports::MockCallService,
+ };
+ use crate::inbound::axum_router::{CallRouterState, call_router};
+
+ #[derive(Clone)]
+ struct Auth;
+
+ impl MacroAuthorizationService for Auth {
+ async fn authorize(
+ &self,
+ jwt: &str,
+ ) -> Result<UserContext, Report<MacroAuthorizationError>> {
+ let user_id = match jwt {
+ "member" => "macro|[email protected]",
+ "program" => "macro|[email protected]",
+ "viewer" => "macro|[email protected]",
+ _ => return Err(Report::new(MacroAuthorizationError::InvalidCredentials)),
+ };
+ Ok(UserContext {
+ user_id: user_id.to_string(),
+ fusion_user_id: "00000000-0000-0000-0000-000000000001".to_string(),
+ permissions: None,
+ organization_id: None,
+ })
+ }
+
+ async fn authorize_identity(
+ &self,
+ jwt: &str,
+ ) -> Result<ValidatedCredential, Report<MacroAuthorizationError>> {
+ self.authorize(jwt).await.map(|context| {
+ let mut credential = ValidatedCredential::session(context);
+ if jwt == "program" {
+ credential.origin = CredentialOrigin::UserApiKey;
+ }
+ credential
+ })
+ }
+
+ async fn authorize_internal(
+ &self,
+ _key: &str,
+ _claims: InternalIdentityClaims,
+ ) -> Result<Option<UserContext>, Report<MacroAuthorizationError>> {
+ Err(Report::new(MacroAuthorizationError::InvalidCredentials))
+ }
+ }
+
+ fn router_with_flag(mut service: MockCallService, enabled: bool) -> axum::Router {
+ service
+ .expect_programmatic_calls_enabled()
+ .returning(move |_| Box::pin(async move { enabled }));
+ call_router(CallRouterState::new(
+ Arc::new(service),
+ Arc::new(NoOpEntityAccessService),
+ MacroAuthorizationState::new(Arc::new(Auth)),
+ ))
+ }
+
+ fn router(service: MockCallService) -> axum::Router {
+ router_with_flag(service, true)
+ }
+
+ fn join(call_id: Uuid, actor: &str) -> Request<Body> {
+ Request::post(format!("/record/{call_id}/join"))
+ .header("authorization", format!("Bearer {actor}"))
+ .header("content-type", "application/json")
+ .body(Body::from("{}"))
+ .unwrap()
+ }
+
+ #[tokio::test]
+ async fn join_route_is_absent_when_programmatic_calls_are_disabled() {
+ let call_id = Uuid::now_v7();
+ let mut service = MockCallService::new();
+ service.expect_join_call().never();
+
+ let response = router_with_flag(service, false)
+ .oneshot(join(call_id, "member"))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::NOT_FOUND);
+ }
+
+ #[tokio::test]
+ async fn join_route_returns_forbidden_for_view_only_access() {
+ let call_id = Uuid::now_v7();
+ let mut service = MockCallService::new();
+ service.expect_join_call().times(1).returning(|_, _, _, _| {
+ Box::pin(async {
+ Err(CallError::Forbidden(
+ "view access does not admit a participant".to_string(),
+ ))
+ })
+ });
+
+ let response = router(service)
+ .oneshot(join(call_id, "viewer"))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::FORBIDDEN);
+ }
+
+ #[tokio::test]
+ async fn join_route_returns_a_token_for_joinable_access() {
+ let call_id = Uuid::now_v7();
+ let mut service = MockCallService::new();
+ service
+ .expect_join_call()
+ .times(1)
+ .returning(move |_, _, _, _| {
+ Box::pin(async move {
+ Ok(CallTokenResponse {
+ started: false,
+ participant_id: "macro|[email protected]".to_string(),
+ share_token: None,
+ call_id,
+ channel_id: None,
+ token: "test-token".to_string(),
+ room_name: call_id.to_string(),
+ server_url: "wss://example.com".to_string(),
+ })
+ })
+ });
+
+ let response = router(service)
+ .oneshot(join(call_id, "member"))
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ }
+
+ #[tokio::test]
+ async fn meeting_join_without_body_uses_app_options_and_person_client() {
+ let call_id = Uuid::now_v7();
+ let mut service = MockCallService::new();
+ service
+ .expect_join_meeting_with_options()
+ .times(1)
+ .returning(move |_, _, request, is_program, _| {
+ assert!(matches!(
+ request.on_other_call,
+ crate::domain::models::OnOtherCall::Switch
+ ));
+ assert!(request.replace);
+ assert!(!is_program);
+ Box::pin(async move {
+ Ok(CallTokenResponse {
+ started: false,
+ participant_id: "macro|[email protected]".to_string(),
+ share_token: None,
+ call_id,
+ channel_id: None,
+ token: "test-token".to_string(),
+ room_name: call_id.to_string(),
+ server_url: "wss://example.com".to_string(),
+ })
+ })
+ });
+
+ let response = router(service)
+ .oneshot(
+ Request::post(format!("/meetings/join/{}", "a".repeat(64)))
+ .header("authorization", "Bearer program")
+ .body(Body::empty())
+ .unwrap(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status(), StatusCode::OK);
+ }
+}
diff --git a/crates/call/src/outbound/livekit_rtc_client.rs b/crates/call/src/outbound/livekit_rtc_client.rs
index c13fce0a62..3535eecc03 100644
--- a/crates/call/src/outbound/livekit_rtc_client.rs
+++ b/crates/call/src/outbound/livekit_rtc_client.rs
@@ -6,6 +6,7 @@
#[cfg(test)]
mod test;
+use bot_id::{BotId, BotIdStr};
use chrono::DateTime;
use futures::future;
use livekit_api::access_token::{AccessToken, TokenVerifier, VideoGrants};
@@ -16,7 +17,7 @@ use livekit_api::services::{ServiceError, TwirpError, TwirpErrorCode};
use livekit_api::webhooks::WebhookReceiver;
use livekit_protocol::{
AudioCodec, CreateAgentDispatchRequest, EncodedFileOutput, EncodedFileType, S3Upload,
- VideoCodec, encoded_file_output,
+ TrackSource, VideoCodec, encoded_file_output, participant_info,
};
use macro_user_id::cowlike::CowLike;
use macro_user_id::user_id::MacroUserIdStr;
@@ -24,7 +25,8 @@ use notification::domain::models::apple::VoipPushPayload;
use crate::domain::meetings::GuestId;
use crate::domain::models::{
- CallError, CallWebhookEvent, EgressS3Config, RtcRoom, VerifiedRingToken, VoipPushPayloadRequest,
+ CallError, CallWebhookEvent, EgressS3Config, LiveCallParticipant, LiveCallTrack,
+ LiveParticipantKind, LiveTrackSource, RtcRoom, VerifiedRingToken, VoipPushPayloadRequest,
};
use crate::domain::ports::CallRtcClient;
@@ -202,6 +204,80 @@ impl CallRtcClient for LivekitRtcClient {
Ok(token)
}
+ #[tracing::instrument(err, skip(self))]
+ async fn generate_program_token(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'_>,
+ program: &str,
+ name: Option<String>,
+ ) -> anyhow::Result<String> {
+ let mut token = AccessToken::with_api_key(&self.api_key, &self.api_secret)
+ .with_identity(participant_identity.as_ref())
+ .with_attributes([("macro.program", program)])
+ .with_ttl(std::time::Duration::from_secs(6 * 3600))
+ .with_grants(VideoGrants {
+ room_join: true,
+ room: room_name.to_string(),
+ can_publish: true,
+ can_subscribe: true,
+ can_publish_data: true,
+ ..Default::default()
+ });
+ if let Some(name) = name {
+ token = token.with_name(&name);
+ }
+ token.to_jwt().map_err(Into::into)
+ }
+
+ async fn generate_bot_token(
+ &self,
+ room_name: &str,
+ bot_id: BotId,
+ name: Option<String>,
+ ) -> anyhow::Result<String> {
+ let identity = bot_id.into_storage_id();
+ let mut token = AccessToken::with_api_key(&self.api_key, &self.api_secret)
+ .with_identity(identity.as_ref())
+ .with_attributes([("macro.program", "bot")])
+ .with_ttl(std::time::Duration::from_secs(6 * 3600))
+ .with_grants(VideoGrants {
+ room_join: true,
+ room: room_name.to_string(),
+ can_publish: true,
+ can_subscribe: true,
+ can_publish_data: true,
+ ..Default::default()
+ });
+ if let Some(name) = name {
+ token = token.with_name(&name);
+ }
+ token.to_jwt().map_err(Into::into)
+ }
+
+ #[tracing::instrument(err, skip(self))]
+ async fn generate_named_token(
+ &self,
+ room_name: &str,
+ participant_identity: MacroUserIdStr<'_>,
+ name: &str,
+ ) -> anyhow::Result<String> {
+ AccessToken::with_api_key(&self.api_key, &self.api_secret)
+ .with_identity(participant_identity.as_ref())
+ .with_name(name)
+ .with_ttl(std::time::Duration::from_secs(6 * 3600))
+ .with_grants(VideoGrants {
+ room_join: true,
+ room: room_name.to_string(),
+ can_publish: true,
+ can_subscribe: true,
+ can_publish_data: true,
+ ..Default::default()
+ })
+ .to_jwt()
+ .map_err(Into::into)
+ }
+
#[tracing::instrument(err, skip(self))]
async fn generate_guest_token(
&self,
@@ -233,6 +309,14 @@ impl CallRtcClient for LivekitRtcClient {
)
}
+ async fn remove_bot(&self, room_name: &str, bot_id: BotId) -> anyhow::Result<()> {
+ ignore_not_found(
+ self.room_client
+ .remove_participant(room_name, bot_id.into_storage_id().as_ref())
+ .await,
+ )
+ }
+
#[tracing::instrument(
skip(self, request),
fields(
@@ -325,6 +409,63 @@ impl CallRtcClient for LivekitRtcClient {
}
}
+ #[tracing::instrument(err, skip(self))]
+ async fn list_live_participants(
+ &self,
+ room_name: &str,
+ ) -> anyhow::Result<Option<Vec<LiveCallParticipant>>> {
+ let participants = match self.room_client.list_participants(room_name).await {
+ Ok(participants) => participants,
+ Err(error) if is_not_found(&error) => return Ok(None),
+ Err(error) => return Err(error.into()),
+ };
+ Ok(Some(
+ participants
+ .into_iter()
+ .filter(|participant| participant.kind != participant_info::Kind::Agent as i32)
+ .map(|participant| {
+ let user_id = MacroUserIdStr::parse_from_str(&participant.identity)
+ .ok()
+ .map(|_| participant.identity.clone());
+ let kind = if user_id.is_some() {
+ LiveParticipantKind::User
+ } else if GuestId::parse_rtc_identity(&participant.identity).is_some() {
+ LiveParticipantKind::Guest
+ } else if BotIdStr::parse_from_str(&participant.identity).is_ok() {
+ LiveParticipantKind::Bot
+ } else {
+ LiveParticipantKind::Guest
+ };
+ let tracks = participant
+ .tracks
+ .into_iter()
+ .map(|track| LiveCallTrack {
+ source: match TrackSource::try_from(track.source)
+ .unwrap_or(TrackSource::Unknown)
+ {
+ TrackSource::Microphone => LiveTrackSource::Microphone,
+ TrackSource::Camera => LiveTrackSource::Camera,
+ TrackSource::ScreenShare => LiveTrackSource::ScreenShare,
+ TrackSource::ScreenShareAudio => LiveTrackSource::ScreenShareAudio,
+ TrackSource::Unknown => LiveTrackSource::Unknown,
+ },
+ muted: track.muted,
+ })
+ .collect();
+ LiveCallParticipant {
+ identity: participant.identity,
+ display_name: participant.name,
+ kind,
+ user_id,
+ is_program: participant.attributes.contains_key("macro.program"),
+ joined_at: DateTime::from_timestamp(participant.joined_at, 0),
+ tracks,
+ }
+ })
+ .collect(),
+ ))
+ }
+
#[tracing::instrument(err, skip(self))]
async fn list_participant_identities(
&self,
@@ -422,6 +563,11 @@ impl CallRtcClient for LivekitRtcClient {
.as_ref()
.filter(|p| MacroUserIdStr::parse_from_str(&p.identity).is_err())
.and_then(|p| GuestId::parse_rtc_identity(&p.identity));
+ let bot_identity = event
+ .participant
+ .as_ref()
+ .and_then(|p| BotIdStr::parse_from_str(&p.identity).ok())
+ .map(|id| id.bot_id());
Ok(CallWebhookEvent {
guest_identity,
@@ -440,6 +586,7 @@ impl CallRtcClient for LivekitRtcClient {
}
}
}),
+ bot_identity,
egress_id,
file_url,
created_at: event.created_at,
diff --git a/crates/call/src/outbound/livekit_rtc_client/test.rs b/crates/call/src/outbound/livekit_rtc_client/test.rs
index b56add9b7d..bce448e64a 100644
--- a/crates/call/src/outbound/livekit_rtc_client/test.rs
+++ b/crates/call/src/outbound/livekit_rtc_client/test.rs
@@ -161,6 +161,17 @@ fn receive_webhook_parses_macro_user_participant_identity() {
);
}
+#[test]
+fn receive_webhook_parses_bot_without_user_attendance() {
+ let bot_id = bot_id::BotId::new_from_uuid(uuid::Uuid::from_u128(0xB07A));
+ let event = receive_participant_joined(&client(), bot_id.into_storage_id().as_ref())
+ .expect("bot join must parse identity");
+
+ assert_eq!(event.bot_identity, Some(bot_id));
+ assert!(event.participant_identity.is_none());
+ assert!(event.guest_identity.is_none());
+}
+
#[test]
fn receive_webhook_skips_configured_transcription_agent_name() {
let event = receive_participant_joined(
diff --git a/crates/call/src/outbound/mod.rs b/crates/call/src/outbound/mod.rs
index f49736b253..5e8e406362 100644
--- a/crates/call/src/outbound/mod.rs
+++ b/crates/call/src/outbound/mod.rs
@@ -10,5 +10,7 @@ pub mod pg_call_repo;
pub mod pg_imported_call_repo;
/// Postgres-backed repository implementing [`VoiceRepository`](crate::domain::ports::VoiceRepository).
pub mod pg_voice_repo;
+/// Per-caller remote flag for explicit programmatic call routes.
+pub mod programmatic_calls;
/// S3-backed recording storage implementing [`RecordingStorage`](crate::domain::ports::RecordingStorage).
pub mod s3_recording_storage;
diff --git a/crates/call/src/outbound/pg_call_repo.rs b/crates/call/src/outbound/pg_call_repo.rs
index 4e49807a95..1ba7467fc0 100644
--- a/crates/call/src/outbound/pg_call_repo.rs
+++ b/crates/call/src/outbound/pg_call_repo.rs
@@ -256,6 +256,95 @@ impl PgCallRepo {
impl CallRepository for PgCallRepo {
type Err = sqlx::Error;
+ async fn can_join_call(&self, call_id: &Uuid, user_id: &str) -> Result<bool, Self::Err> {
+ sqlx::query_scalar!(
+ r#"SELECT (
+ EXISTS (
+ SELECT 1 FROM calls c
+ JOIN comms_channel_participants p ON p.channel_id = c.channel_id
+ WHERE c.id = $1 AND p.user_id = $2 AND p.left_at IS NULL
+ ) OR EXISTS (
+ SELECT 1 FROM calls c
+ JOIN call_meetings m ON m.id = c.meeting_id
+ WHERE c.id = $1 AND c.channel_id IS NULL AND m.cancelled_at IS NULL
+ AND (m.user_id = $2 OR EXISTS (
+ SELECT 1 FROM call_participants p
+ WHERE p.call_id = c.id AND p.user_id = $2
+ ) OR EXISTS (
+ SELECT 1 FROM call_invitees i
+ WHERE i.call_id = c.id AND i.user_id = $2
+ ))
+ )
+ ) AS "allowed!""#,
+ call_id,
+ user_id,
+ )
+ .fetch_one(&self.pool)
+ .await
+ }
+
+ async fn list_joinable_calls(&self, user_id: &str) -> Result<Vec<Call>, Self::Err> {
+ sqlx::query_as!(
+ Call,
+ r#"
+ SELECT c.id, c.channel_id, c.room_name, c.created_by, c.created_at, c.egress_id
+ FROM calls c
+ WHERE EXISTS (
+ SELECT 1 FROM comms_channel_participants p
+ WHERE p.channel_id = c.channel_id AND p.user_id = $1 AND p.left_at IS NULL
+ ) OR (c.channel_id IS NULL AND EXISTS (
+ SELECT 1 FROM call_meetings m
+ WHERE m.id = c.meeting_id AND m.cancelled_at IS NULL
+ AND (m.user_id = $1 OR EXISTS (
+ SELECT 1 FROM call_participants p WHERE p.call_id = c.id AND p.user_id = $1
+ ) OR EXISTS (
+ SELECT 1 FROM call_invitees i WHERE i.call_id = c.id AND i.user_id = $1
+ ))
+ ))
+ ORDER BY c.created_at DESC
+ "#,
+ user_id
+ )
+ .fetch_all(&self.pool)
+ .await
+ }
+
+ async fn is_agent_account(&self, user_id: &str) -> Result<bool, Self::Err> {
+ Ok(
+ sqlx::query_scalar!(r#"SELECT "isAgent" FROM "User" WHERE id = $1"#, user_id)
+ .fetch_optional(&self.pool)
+ .await?
+ .unwrap_or(false),
+ )
+ }
+
+ async fn set_participant_client(
+ &self,
+ call_id: &Uuid,
+ user_id: &str,
+ client: &str,
+ ) -> Result<(), Self::Err> {
+ sqlx::query!(
+ "UPDATE call_participants SET client = $3 WHERE call_id = $1 AND user_id = $2 AND left_at IS NULL",
+ call_id, user_id, client,
+ )
+ .execute(&self.pool)
+ .await?;
+ Ok(())
+ }
+
+ async fn archive_call_if_program_only(
+ &self,
+ call_id: &Uuid,
+ ) -> Result<Option<ArchivedCall>, CallError> {
+ self.archive_session(
+ call_id,
+ false,
+ Some(Utc::now() - chrono::TimeDelta::seconds(60)),
+ )
+ .await
+ }
+
async fn insert_meeting_preparation(
&self,
actor: &str,
@@ -1043,7 +1132,7 @@ impl CallRepository for PgCallRepo {
}
async fn archive_call(&self, call_id: &Uuid) -> Result<ArchivedCall, CallError> {
- self.archive_session(call_id, false)
+ self.archive_session(call_id, false, None)
.await?
.ok_or_else(|| CallError::NotFound(call_id.to_string()))
}
@@ -1051,7 +1140,7 @@ impl CallRepository for PgCallRepo {
&self,
call_id: &Uuid,
) -> Result<Option<ArchivedCall>, CallError> {
- self.archive_session(call_id, true).await
+ self.archive_session(call_id, true, None).await
}
#[tracing::instrument(err, skip(self))]
diff --git a/crates/call/src/outbound/pg_call_repo/lifecycle.rs b/crates/call/src/outbound/pg_call_repo/lifecycle.rs
index da2f7c60cf..86a1deb144 100644
--- a/crates/call/src/outbound/pg_call_repo/lifecycle.rs
+++ b/crates/call/src/outbound/pg_call_repo/lifecycle.rs
@@ -8,6 +8,7 @@ impl PgCallRepo {
&self,
call_id: &Uuid,
require_empty: bool,
+ program_only_before: Option<DateTime<Utc>>,
) -> Result<Option<ArchivedCall>, CallError> {
let mut tx = self.pool.begin().await?;
// The live share-with-team intent is translated into canonical team
@@ -43,6 +44,26 @@ impl PgCallRepo {
return Ok(None);
}
+ if let Some(before) = program_only_before {
+ let eligible = sqlx::query_scalar!(
+ r#"SELECT (
+ EXISTS (SELECT 1 FROM call_participants WHERE call_id = $1 AND left_at IS NULL AND client <> 'person')
+ AND NOT EXISTS (SELECT 1 FROM call_participants WHERE call_id = $1 AND left_at IS NULL AND client = 'person')
+ AND NOT EXISTS (SELECT 1 FROM call_guests WHERE call_id = $1 AND left_at IS NULL)
+ AND COALESCE((SELECT MAX(left_at) FROM call_participants WHERE call_id = $1 AND client = 'person'), $2) <= $3
+ AND COALESCE((SELECT MAX(left_at) FROM call_guests WHERE call_id = $1), $2) <= $3
+ ) AS "eligible!""#,
+ call_id,
+ call.created_at,
+ before,
+ )
+ .fetch_one(tx.as_mut())
+ .await?;
+ if !eligible {
+ return Ok(None);
+ }
+ }
+
let ended_at = Utc::now().trunc_subsecs(6);
let duration_ms = ended_at
.signed_duration_since(call.created_at)
diff --git a/crates/call/src/outbound/pg_call_repo/test.rs b/crates/call/src/outbound/pg_call_repo/test.rs
index 39587306f7..559d289c69 100644
--- a/crates/call/src/outbound/pg_call_repo/test.rs
+++ b/crates/call/src/outbound/pg_call_repo/test.rs
@@ -3385,6 +3385,62 @@ fn standalone_meeting() -> crate::domain::meetings::Meeting {
}
}
+#[sqlx::test(
+ fixtures(path = "../../../fixtures", scripts("call_repo")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn live_call_join_access_requires_membership_or_invitation(
+ pool: Pool<Postgres>,
+) -> anyhow::Result<()> {
+ insert_user_mapping(&pool, USER_B.deref(), MACRO_USER_B).await?;
+ insert_user_mapping(&pool, USER_C.deref(), MACRO_USER_C).await?;
+ insert_user_mapping(&pool, USER_D.deref(), Uuid::now_v7()).await?;
+ let repo = repo(pool);
+
+ assert!(repo.can_join_call(&CALL1, USER_A.as_ref()).await?);
+ assert!(repo.can_join_call(&CALL1, USER_C.as_ref()).await?);
+ assert!(!repo.can_join_call(&CALL1, USER_D.as_ref()).await?);
+
+ let meeting = repo.create_meeting(standalone_meeting()).await?;
+ let (call, _) = repo
+ .get_or_create_meeting_call(&meeting.id, &Uuid::now_v7())
+ .await?;
+ assert!(repo.can_join_call(&call.id, USER_B.as_ref()).await?);
+ assert!(!repo.can_join_call(&call.id, USER_C.as_ref()).await?);
+ repo.add_meeting_participant(&call.id, USER_C.clone())
+ .await?;
+ repo.add_meeting_invitees(&meeting.id, &call.id, &[USER_D.clone()])
+ .await?;
+ assert!(repo.can_join_call(&call.id, USER_C.as_ref()).await?);
+ assert!(repo.can_join_call(&call.id, USER_D.as_ref()).await?);
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../fixtures", scripts("call_repo")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn program_only_call_waits_for_last_person_departure(
+ pool: Pool<Postgres>,
+) -> anyhow::Result<()> {
+ let repo = repo(pool.clone());
+ repo.set_participant_client(&CALL1, USER_B.as_ref(), "agent")
+ .await?;
+ assert!(repo.archive_call_if_program_only(&CALL1).await?.is_none());
+
+ repo.remove_participant(&CALL1, USER_A.clone()).await?;
+ assert!(repo.archive_call_if_program_only(&CALL1).await?.is_none());
+
+ sqlx::query!(
+ "UPDATE call_participants SET left_at = now() - interval '2 minutes' WHERE call_id = $1 AND user_id = $2",
+ CALL1, USER_A.as_ref(),
+ )
+ .execute(&pool)
+ .await?;
+ assert!(repo.archive_call_if_program_only(&CALL1).await?.is_some());
+ Ok(())
+}
+
#[sqlx::test(
fixtures(path = "../../../fixtures", scripts("call_repo")),
migrator = "MACRO_DB_MIGRATIONS"
diff --git a/crates/call/src/outbound/programmatic_calls.rs b/crates/call/src/outbound/programmatic_calls.rs
new file mode 100644
index 0000000000..c02376c147
--- /dev/null
+++ b/crates/call/src/outbound/programmatic_calls.rs
@@ -0,0 +1,22 @@
+use feature_flags::FeatureFlags;
+use macro_user_id::user_id::MacroUserIdStr;
+
+use crate::domain::ports::ProgrammaticCallGate;
+
+const ENABLE_PROGRAMMATIC_CALLS: &str = "enable-programmatic-calls";
+
+/// Evaluates the server-side call switch for each authenticated account.
+pub struct FlaggedProgrammaticCalls<F>(pub F);
+
+#[async_trait::async_trait]
+impl<F: FeatureFlags + Send + Sync + 'static> ProgrammaticCallGate for FlaggedProgrammaticCalls<F> {
+ async fn enabled_for(&self, caller: MacroUserIdStr<'_>) -> bool {
+ match self.0.load(&caller).await {
+ Ok(flags) => flags.is_enabled(ENABLE_PROGRAMMATIC_CALLS),
+ Err(error) => {
+ tracing::warn!(error = ?error, "failed to load programmatic call flag");
+ false
+ }
+ }
+ }
+}
diff --git a/crates/call/src/outbound/s3_recording_storage.rs b/crates/call/src/outbound/s3_recording_storage.rs
index c5cf4d332b..189dc3c13e 100644
--- a/crates/call/src/outbound/s3_recording_storage.rs
+++ b/crates/call/src/outbound/s3_recording_storage.rs
@@ -4,7 +4,7 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH};
use cloudfront_sign::{SignedOptions, get_signed_url};
-use crate::domain::ports::RecordingStorage;
+use crate::domain::ports::{RecordingDownload, RecordingStorage};
/// CloudFront settings used to sign recording GET URLs.
pub struct RecordingCloudFrontConfig {
@@ -108,6 +108,51 @@ fn cloudfront_signed_url(
}
impl RecordingStorage for S3RecordingStorage {
+ async fn open_recording(
+ &self,
+ recording_key: &str,
+ ) -> anyhow::Result<Option<RecordingDownload>> {
+ let response = match self
+ .client
+ .get_object()
+ .bucket(&self.bucket)
+ .key(recording_object_key(recording_key))
+ .send()
+ .await
+ {
+ Ok(response) => response,
+ Err(error)
+ if error
+ .as_service_error()
+ .is_some_and(|error| error.is_no_such_key()) =>
+ {
+ return Ok(None);
+ }
+ Err(error) => return Err(error.into()),
+ };
+
+ let content_length = response
+ .content_length()
+ .and_then(|length| u64::try_from(length).ok())
+ .ok_or_else(|| anyhow::anyhow!("recording has no valid content length"))?;
+ let content_type = response.content_type().unwrap_or("video/mp4").to_owned();
+ let chunks = futures::stream::unfold(response.body, |mut body| async move {
+ body.next().await.map(|part| {
+ (
+ part.map(|bytes| bytes.to_vec())
+ .map_err(anyhow::Error::from),
+ body,
+ )
+ })
+ });
+
+ Ok(Some(RecordingDownload {
+ content_type,
+ content_length,
+ chunks: Box::pin(chunks),
+ }))
+ }
+
async fn presign_recording_url(&self, recording_key: &str) -> anyhow::Result<String> {
let object_key = recording_object_key(recording_key);
if macro_aws_config::is_local_aws() {
diff --git a/crates/macro_db_client/AGENTS.md b/crates/macro_db_client/AGENTS.md
index 8715166b2b..e8ce704e46 100644
--- a/crates/macro_db_client/AGENTS.md
+++ b/crates/macro_db_client/AGENTS.md
@@ -79,6 +79,8 @@ unreferenced replicas. These additive tables do not change agent-session claims.
- Migrations deploy before service code: never drop a column/table in the
same PR that removes its last usage (see `docs/development/database.md`).
+- `call_participants.client` defaults to `person` for older call writers;
+ programmatic joins set `agent` or `api_key` after recording attendance.
- Never hand-edit `.sqlx/query-*.json` or invent a migration timestamp.
- Keep concurrent index migrations to one statement with `-- no-transaction`;
build replacement indexes before dropping old constraints, and validate large
diff --git a/crates/macro_db_client/migrations/20261106013302_add_call_participant_client.sql b/crates/macro_db_client/migrations/20261106013302_add_call_participant_client.sql
new file mode 100644
index 0000000000..106355e2d4
--- /dev/null
+++ b/crates/macro_db_client/migrations/20261106013302_add_call_participant_client.sql
@@ -0,0 +1,4 @@
+SET LOCAL lock_timeout = '5s';
+
+ALTER TABLE call_participants
+ ADD COLUMN client TEXT NOT NULL DEFAULT 'person';
diff --git a/crates/macro_event_topics/src/lib.rs b/crates/macro_event_topics/src/lib.rs
index 679296d5b0..5b1860925e 100644
--- a/crates/macro_event_topics/src/lib.rs
+++ b/crates/macro_event_topics/src/lib.rs
@@ -51,6 +51,8 @@ topics! {
MacroBotsTopic => "macro.bots",
/// Call lifecycle and recording events.
MacroCallsTopic => "macro.calls",
+ /// Public call notifications for webhooks and event streams.
+ MacroCallNotificationsTopic => "macro.call_notifications",
/// Document lifecycle events (created / updated / deleted / copied).
MacroDocumentsTopic => "macro.documents",
/// Committed GitHub pull request updates.
diff --git a/crates/macro_event_topics/src/test.rs b/crates/macro_event_topics/src/test.rs
index e70adb10a6..37794c0e8b 100644
--- a/crates/macro_event_topics/src/test.rs
+++ b/crates/macro_event_topics/src/test.rs
@@ -28,6 +28,7 @@ fn all_topic_names_includes_declared_topics() {
assert!(all_topic_names().contains(&MacroMessagesTopic::TOPIC_STR));
assert!(all_topic_names().contains(&MacroBotsTopic::TOPIC_STR));
assert!(all_topic_names().contains(&MacroCallsTopic::TOPIC_STR));
+ assert!(all_topic_names().contains(&MacroCallNotificationsTopic::TOPIC_STR));
assert!(all_topic_names().contains(&MacroWebhooksTopic::TOPIC_STR));
assert!(all_topic_names().contains(&MacroMentionsTopic::TOPIC_STR));
assert!(all_topic_names().contains(&MacroNotificationsTopic::TOPIC_STR));
diff --git a/crates/webhook/AGENTS.md b/crates/webhook/AGENTS.md
index d1236df5be..b24311764d 100644
--- a/crates/webhook/AGENTS.md
+++ b/crates/webhook/AGENTS.md
@@ -14,7 +14,8 @@ before changing ingestion or delivery behavior.
- `src/domain/delivery.rs`: the delivery state machine and retry policy.
- `src/inbound/kafka_consumer.rs` / `kafka_stream_consumer.rs`: ingestion
consumers for `macro.documents`, `macro.channels`, `macro.messages`,
- `macro.webhooks`, `macro.agent_sessions`, `macro.agent_session_lifecycle`.
+ `macro.webhooks`, `macro.agent_sessions`, `macro.agent_session_lifecycle`,
+ and `macro.call_notifications`.
- `src/inbound/worker.rs`: the SQS delivery worker.
- `src/outbound/http_delivery.rs`: signed HTTPS POST to the webhook endpoint.
@@ -33,7 +34,9 @@ before changing ingestion or delivery behavior.
## Recipes
- Add a new ingestible event: `src/domain/ingestion.rs` (match rule) →
- `src/inbound/kafka_consumer.rs` (subscribe/decode) → README's event table.
+ `src/inbound/kafka_consumer.rs` and `kafka_stream_consumer.rs`
+ (subscribe/decode) → README's event table. Private call notifications
+ match only the named user's personal workspace and stream.
- Change delivery retry behavior: `src/domain/delivery.rs` → README's retry
schedule table (keep them in sync).
diff --git a/crates/webhook/Cargo.toml b/crates/webhook/Cargo.toml
index a185a27337..6d757e34d6 100644
--- a/crates/webhook/Cargo.toml
+++ b/crates/webhook/Cargo.toml
@@ -26,6 +26,7 @@ inbound = [
"dep:serde_json",
"dep:utoipa",
"agent_session/schema",
+ "call/inbound",
"channels/schema",
"documents/schema",
"messages/schema",
@@ -36,6 +37,7 @@ ingestion = [
"dep:agent_session",
"dep:agent_trigger",
"dep:channels",
+ "dep:call",
"dep:documents",
"dep:entity_access",
"dep:futures",
@@ -71,6 +73,7 @@ axum = { workspace = true, optional = true }
axum-extra = { workspace = true, optional = true }
agent_session = { path = "../agent_session", default-features = false, optional = true }
agent_trigger = { path = "../agent_trigger", optional = true }
+call = { path = "../call", default-features = false, optional = true }
channels = { path = "../channels", default-features = false, optional = true }
chrono = { workspace = true }
documents = { path = "../documents", default-features = false, optional = true }
diff --git a/crates/webhook/README.md b/crates/webhook/README.md
index f973939a6a..03ff61ce53 100644
--- a/crates/webhook/README.md
+++ b/crates/webhook/README.md
@@ -97,6 +97,16 @@ and `macro.agent_session_lifecycle`. It supports these event names:
`agent_session.waiting_for_input`, `agent_session.input_received`,
`agent_session.stopped`, `agent_session.renamed`, and
`agent_session.deleted`.
+- Calls: `call.started`, `call.ended`, `call.participant_joined`,
+ `call.participant_left`, `call.recording_ready`, `call.summarized`,
+ `call.ringing`, `call.answered`, `call.declined`, and `call.invited`.
+
+Call events use `entity_type = "call"` and the call ID as the entity and
+ordering key. Public events resolve the call's current accessor set before
+matching personal and team webhooks or streaming to a subscriber. Ringing,
+answered, declined, and invited events address one user: only that user's
+personal webhook workspace and personal event stream may receive them. The
+broker's recipient routing field is removed from delivered metadata.
For document, channel, and message events, ingestion asks `EntityAccessService`
for the people who currently have access to the entity; a message's entity is
diff --git a/crates/webhook/src/domain/events.rs b/crates/webhook/src/domain/events.rs
index aa506ed7c3..ce136e6a5b 100644
--- a/crates/webhook/src/domain/events.rs
+++ b/crates/webhook/src/domain/events.rs
@@ -198,6 +198,8 @@ pub enum WebhookEvent {
Document(documents::domain::events::DocumentTopicEvent),
/// Channel lifecycle events from the `macro.channels` topic.
Channel(channels::domain::broker_events::ChannelTopicEvent),
+ /// Access-checked call notifications from `macro.call_notifications`.
+ Call(call::domain::notification_events::CallNotificationEvent),
/// Message facts for channels and documents from the `macro.messages` topic.
Message(messages::outbound::broker::MessageTopicEvent),
/// Agent session lifecycle events from the `macro.agent_session_lifecycle`
diff --git a/crates/webhook/src/domain/ingestion.rs b/crates/webhook/src/domain/ingestion.rs
index 569735db6b..246c373df9 100644
--- a/crates/webhook/src/domain/ingestion.rs
+++ b/crates/webhook/src/domain/ingestion.rs
@@ -17,6 +17,7 @@ use crate::domain::{
};
use agent_session::domain::events::{AgentSessionLifecycleEvent, AgentSessionLifecycleEventName};
use agent_trigger::domain::broker_events::AgentTriggerTopicEvent;
+use call::domain::notification_events::CallNotificationEvent;
use channels::domain::broker_events::ChannelTopicEvent;
use chrono::Utc;
use documents::domain::events::DocumentTopicEvent;
@@ -34,6 +35,7 @@ use uuid::Uuid;
const DOCUMENT_ENTITY_TYPE: &str = "document";
const CHANNEL_ENTITY_TYPE: &str = "channel";
+const CALL_ENTITY_TYPE: &str = "call";
const WEBHOOK_ENTITY_TYPE: &str = "webhook";
const AGENT_SESSION_ENTITY_TYPE: &str = "agent_session";
@@ -51,6 +53,9 @@ pub enum WebhookEventIngestionError {
/// Invalid entity identifier.
entity_id: String,
},
+ /// A private call notification has no explicit recipient.
+ #[error("private call notification has no recipient")]
+ MissingCallRecipient,
/// The broker envelope could not be represented by the queue contract.
#[error("failed to serialize broker envelope: {0}")]
Serialization(#[from] serde_json::Error),
@@ -101,6 +106,12 @@ pub trait WebhookEventIngestionService: Clone + Send + Sync + 'static {
event: Event<ChannelTopicEvent>,
) -> impl Future<Output = Result<(), WebhookEventIngestionError>> + Send;
+ /// Ingest one access-checked call notification.
+ fn ingest_call_notification_event(
+ &self,
+ event: Event<CallNotificationEvent>,
+ ) -> impl Future<Output = Result<(), WebhookEventIngestionError>> + Send;
+
/// Ingest one `macro.messages` event envelope.
fn ingest_message_event(
&self,
@@ -287,6 +298,45 @@ pub(crate) fn normalized_document_event(
)))
}
+/// Normalize a call event and remove its private routing field before delivery.
+pub(crate) fn normalized_call_notification_event(
+ event: &Event<CallNotificationEvent>,
+) -> Result<(NormalizedWebhookEvent, Option<String>), WebhookEventIngestionError> {
+ let metadata = event.event.metadata();
+ let recipient = match &event.event {
+ CallNotificationEvent::Ringing(_)
+ | CallNotificationEvent::Answered(_)
+ | CallNotificationEvent::Declined(_)
+ | CallNotificationEvent::Invited(_) => Some(
+ metadata
+ .recipient_user_id
+ .clone()
+ .filter(|id| !id.is_empty())
+ .ok_or(WebhookEventIngestionError::MissingCallRecipient)?,
+ ),
+ _ => None,
+ };
+ let mut broker_envelope = serde_json::to_value(event)?;
+ if let Some(metadata) = broker_envelope
+ .get_mut("metadata")
+ .and_then(serde_json::Value::as_object_mut)
+ {
+ metadata.remove("recipient_user_id");
+ }
+ let call_id = metadata.call_id.to_string();
+ Ok((
+ normalized_event(
+ event.event_id,
+ event.schema_version,
+ event.event.name(),
+ CALL_ENTITY_TYPE,
+ &call_id,
+ broker_envelope,
+ ),
+ recipient,
+ ))
+}
+
pub(crate) fn normalized_channel_event(
event: &Event<ChannelTopicEvent>,
) -> Result<NormalizedWebhookEvent, WebhookEventIngestionError> {
@@ -605,6 +655,34 @@ where
.await
}
+ #[tracing::instrument(skip(self, event), fields(event_id = %event.event_id), err)]
+ async fn ingest_call_notification_event(
+ &self,
+ event: Event<CallNotificationEvent>,
+ ) -> Result<(), WebhookEventIngestionError> {
+ let (normalized, recipient) = normalized_call_notification_event(&event)?;
+ match recipient {
+ Some(recipient) => {
+ // The recipient is the grant for a private notification.
+ // In particular, an invitation precedes call entity access.
+ self.match_and_enqueue(normalized, vec![recipient]).await
+ }
+ None => {
+ let accessors = self
+ .users_with_access(&normalized.entity_id, EntityType::Call)
+ .await?;
+ let workspace_ids = self
+ .repository
+ .resolve_workspace_ids(accessors)
+ .await
+ .map_err(|error| {
+ WebhookEventIngestionError::WorkspaceResolution(error.into())
+ })?;
+ self.match_and_enqueue(normalized, workspace_ids).await
+ }
+ }
+ }
+
#[tracing::instrument(skip(self, event), fields(event_id = %event.event_id), err)]
async fn ingest_message_event(
&self,
diff --git a/crates/webhook/src/domain/ingestion/stream.rs b/crates/webhook/src/domain/ingestion/stream.rs
index da630ecc6e..f1b2f5a14b 100644
--- a/crates/webhook/src/domain/ingestion/stream.rs
+++ b/crates/webhook/src/domain/ingestion/stream.rs
@@ -3,8 +3,8 @@
use super::{
LifecycleAudience, TriggerAudience, WebhookEventIngestionError, lifecycle_audience,
normalized_agent_session_lifecycle_event, normalized_agent_trigger_event,
- normalized_channel_event, normalized_document_event, normalized_message_event,
- normalized_webhook_event,
+ normalized_call_notification_event, normalized_channel_event, normalized_document_event,
+ normalized_message_event, normalized_webhook_event,
};
use crate::domain::{
events::WebhookTopicEvent,
@@ -12,6 +12,7 @@ use crate::domain::{
};
use agent_session::domain::events::AgentSessionLifecycleEvent;
use agent_trigger::domain::broker_events::AgentTriggerTopicEvent;
+use call::domain::notification_events::CallNotificationEvent;
use channels::domain::broker_events::ChannelTopicEvent;
use documents::domain::events::DocumentTopicEvent;
use entity_access::domain::models::EntityType;
@@ -45,6 +46,23 @@ pub(crate) fn channel_stream_candidate(
})
}
+pub(crate) fn call_stream_candidate(
+ event: &Event<CallNotificationEvent>,
+) -> Result<StreamCandidateEvent, WebhookEventIngestionError> {
+ let (normalized, recipient) = normalized_call_notification_event(event)?;
+ let audience = match recipient {
+ Some(user_id) => StreamAudience::User { user_id },
+ None => StreamAudience::Entity {
+ entity_id: normalized.entity_id.clone(),
+ entity_type: EntityType::Call,
+ },
+ };
+ Ok(StreamCandidateEvent {
+ event: normalized,
+ audience,
+ })
+}
+
pub(crate) fn message_stream_candidate(
event: &Event<MessageTopicEvent>,
) -> Result<StreamCandidateEvent, WebhookEventIngestionError> {
diff --git a/crates/webhook/src/domain/ingestion/test.rs b/crates/webhook/src/domain/ingestion/test.rs
index 24a0466b3a..77c366b733 100644
--- a/crates/webhook/src/domain/ingestion/test.rs
+++ b/crates/webhook/src/domain/ingestion/test.rs
@@ -10,6 +10,7 @@ use crate::domain::{
},
ports::{WebhookEventEnqueuer, WebhookRepo, WebhookWorkspaceResolver},
};
+use call::domain::notification_events::{CallNotificationEvent, CallNotificationMetadata};
use channel_sender::ChannelSender;
use channels::domain::{
broker_events::{
@@ -47,6 +48,98 @@ const COPIED_DOCUMENT_ID: &str = "22222222-2222-2222-2222-222222222222";
const PERSONAL_WORKSPACE_ID: &str = "macro|[email protected]";
const BOT_PRINCIPAL_ID: &str = "bot|66666666-6666-6666-6666-666666666666";
const TEAM_WORKSPACE_ID: &str = "33333333-3333-3333-3333-333333333333";
+const CALL_ID: &str = "0198a1b2-c3d4-7e5f-8061-728394a5b6c7";
+
+#[tokio::test]
+async fn private_call_invitation_reaches_only_the_recipient_workspace() {
+ let call_id = Uuid::parse_str(CALL_ID).unwrap();
+ let mut metadata = CallNotificationMetadata::new(call_id, None);
+ metadata.recipient_user_id = Some(PERSONAL_WORKSPACE_ID.to_string());
+ metadata.invited_by = Some("macro|[email protected]".to_string());
+ let event = Event::new(CallNotificationEvent::Invited(metadata));
+ let access = MockAccessService::with_users(Vec::new());
+ let repository = MockRepository::new(
+ vec![TEAM_WORKSPACE_ID.to_string()],
+ vec![webhook("wh_recipient", PERSONAL_WORKSPACE_ID)],
+ );
+ let enqueuer = MockEnqueuer::default();
+
+ service(access.clone(), repository.clone(), enqueuer.clone())
+ .ingest_call_notification_event(event)
+ .await
+ .unwrap();
+
+ assert!(lock(&access.calls).is_empty());
+ let state = lock(&repository.state);
+ assert!(state.workspace_calls.is_empty());
+ assert_eq!(
+ state.match_calls[0].workspace_ids,
+ vec![PERSONAL_WORKSPACE_ID.to_string()]
+ );
+ drop(state);
+ let messages = lock(&enqueuer.state);
+ let delivered = &messages.attempted_messages[0].event;
+ assert_eq!(delivered.event_name, "call.invited");
+ assert_eq!(delivered.entity_id, CALL_ID);
+ assert!(
+ delivered.broker_envelope["metadata"]
+ .get("recipient_user_id")
+ .is_none()
+ );
+}
+
+#[tokio::test]
+async fn private_call_event_without_recipient_is_never_fanned_out() {
+ let call_id = Uuid::parse_str(CALL_ID).unwrap();
+ let event = Event::new(CallNotificationEvent::Invited(
+ CallNotificationMetadata::new(call_id, None),
+ ));
+ let access = MockAccessService::with_users(vec![user_id(PERSONAL_WORKSPACE_ID)]);
+ let repository = MockRepository::new(
+ vec![PERSONAL_WORKSPACE_ID.to_string()],
+ vec![webhook("wh_member", PERSONAL_WORKSPACE_ID)],
+ );
+ let enqueuer = MockEnqueuer::default();
+
+ let result = service(access, repository.clone(), enqueuer.clone())
+ .ingest_call_notification_event(event)
+ .await;
+
+ assert!(matches!(
+ result,
+ Err(WebhookEventIngestionError::MissingCallRecipient)
+ ));
+ assert!(lock(&repository.state).match_calls.is_empty());
+ assert!(lock(&enqueuer.state).attempted_messages.is_empty());
+}
+
+#[tokio::test]
+async fn public_call_event_resolves_current_call_accessors() {
+ let call_id = Uuid::parse_str(CALL_ID).unwrap();
+ let event = Event::new(CallNotificationEvent::Ended(CallNotificationMetadata::new(
+ call_id, None,
+ )));
+ let access = MockAccessService::with_users(vec![user_id(PERSONAL_WORKSPACE_ID)]);
+ let repository = MockRepository::new(
+ vec![
+ PERSONAL_WORKSPACE_ID.to_string(),
+ TEAM_WORKSPACE_ID.to_string(),
+ ],
+ vec![webhook("wh_member", PERSONAL_WORKSPACE_ID)],
+ );
+ let enqueuer = MockEnqueuer::default();
+
+ service(access.clone(), repository.clone(), enqueuer)
+ .ingest_call_notification_event(event)
+ .await
+ .unwrap();
+
+ assert_eq!(
+ lock(&access.calls).as_slice(),
+ &[(CALL_ID.to_string(), EntityType::Call)]
+ );
+ assert_eq!(lock(&repository.state).workspace_calls.len(), 1);
+}
fn lock<T>(mutex: &Mutex<T>) -> MutexGuard<'_, T> {
mutex.lock().expect("test mutex is not poisoned")
diff --git a/crates/webhook/src/domain/stream.rs b/crates/webhook/src/domain/stream.rs
index 8724b22205..04ba076e8c 100644
--- a/crates/webhook/src/domain/stream.rs
+++ b/crates/webhook/src/domain/stream.rs
@@ -41,6 +41,11 @@ pub enum StreamAudience {
/// Access entity type of `entity_id`.
entity_type: EntityType,
},
+ /// The intended recipient of a private notification.
+ User {
+ /// Intended recipient.
+ user_id: String,
+ },
/// Anyone whose personal or team webhook workspace is this workspace.
Workspace {
/// Owning workspace id.
@@ -165,6 +170,9 @@ where
audience: &StreamAudience,
) -> Result<bool, rootcause::Report> {
match audience {
+ StreamAudience::User { user_id } => Ok(
+ self.scope == WebhookScope::User && self.subscriber.as_ref() == user_id.as_str()
+ ),
StreamAudience::Any(audiences) => {
for audience in audiences {
if Box::pin(self.subscriber_in_audience(audience)).await? {
diff --git a/crates/webhook/src/domain/stream/test.rs b/crates/webhook/src/domain/stream/test.rs
index 21191d256e..9784602dba 100644
--- a/crates/webhook/src/domain/stream/test.rs
+++ b/crates/webhook/src/domain/stream/test.rs
@@ -52,6 +52,35 @@ fn workspace_candidate(event_name: &str, workspace_id: &str) -> StreamCandidateE
candidate
}
+#[tokio::test]
+async fn private_call_event_streams_only_to_the_recipient() {
+ let (service, sender) = service(FakeAccessService::allowing(&[]));
+ let stream = service
+ .open_stream(subscriber(), WebhookScope::User, filter(&["call.invited"]))
+ .await
+ .unwrap();
+ sender
+ .send(StreamCandidateEvent {
+ event: normalized("call.invited", DOCUMENT_ID),
+ audience: StreamAudience::User {
+ user_id: "macro|[email protected]".to_string(),
+ },
+ })
+ .unwrap();
+ sender
+ .send(StreamCandidateEvent {
+ event: normalized("call.invited", DOCUMENT_ID),
+ audience: StreamAudience::User {
+ user_id: SUBSCRIBER_ID.to_string(),
+ },
+ })
+ .unwrap();
+
+ let delivered: Vec<_> = stream.take(1).collect().await;
+ assert_eq!(delivered.len(), 1);
+ assert_eq!(delivered[0].event_name, "call.invited");
+}
+
fn filter(events: &[&str]) -> WebhookFilters {
vec![WebhookFilter {
events: events.iter().map(|event| event.to_string()).collect(),
diff --git a/crates/webhook/src/inbound/kafka_consumer.rs b/crates/webhook/src/inbound/kafka_consumer.rs
index 87552c636d..8f643db7b2 100644
--- a/crates/webhook/src/inbound/kafka_consumer.rs
+++ b/crates/webhook/src/inbound/kafka_consumer.rs
@@ -108,6 +108,11 @@ async fn ingest_with_retry<S: WebhookEventIngestionService>(
DeclaredMacroEvent::ChannelMacroEvent(event) => {
service.ingest_channel_event(event.event().clone()).await
}
+ DeclaredMacroEvent::CallNotificationMacroEvent(event) => {
+ service
+ .ingest_call_notification_event(event.event().clone())
+ .await
+ }
DeclaredMacroEvent::MessageMacroEvent(event) => {
service.ingest_message_event(event.event().clone()).await
}
diff --git a/crates/webhook/src/inbound/kafka_consumer/test.rs b/crates/webhook/src/inbound/kafka_consumer/test.rs
index 0a5a784757..e2bc9db87b 100644
--- a/crates/webhook/src/inbound/kafka_consumer/test.rs
+++ b/crates/webhook/src/inbound/kafka_consumer/test.rs
@@ -3,6 +3,7 @@ use crate::domain::{
events::{WebhookDeletedMetadata, WebhookMacroEvent, WebhookTopicEvent},
ingestion::WebhookEventIngestionError,
};
+use call::domain::notification_events::{CallNotificationEvent, CallNotificationMetadata};
use channel_sender::ChannelSender;
use channels::domain::broker_events::{ChannelDeletedMetadata, ChannelTopicEvent};
use documents::domain::events::{DocumentDeletedMetadata, DocumentTopicEvent};
@@ -68,6 +69,7 @@ fn subscribes_to_all_ingestion_topics() {
[
"macro.documents",
"macro.channels",
+ "macro.call_notifications",
"macro.messages",
"macro.webhooks",
"macro.agent_sessions",
@@ -76,6 +78,23 @@ fn subscribes_to_all_ingestion_topics() {
);
}
+#[test]
+fn decodes_call_notifications() {
+ let event = Event::new(CallNotificationEvent::Ended(CallNotificationMetadata::new(
+ Uuid::nil(),
+ None,
+ )));
+ let payload = serde_json::to_vec(&event).expect("serializable");
+
+ let decoded = decode_message("macro.call_notifications", &payload).expect("decodable");
+ match decoded {
+ DeclaredMacroEvent::CallNotificationMacroEvent(decoded) => {
+ assert_eq!(decoded.event(), &event);
+ }
+ _ => panic!("decoded into the wrong topic variant"),
+ }
+}
+
#[test]
fn decodes_document_events() {
let event = document_event();
@@ -166,6 +185,12 @@ impl FlakyIngestionService {
}
impl WebhookEventIngestionService for FlakyIngestionService {
+ async fn ingest_call_notification_event(
+ &self,
+ _event: macro_event_broker::Event<call::domain::notification_events::CallNotificationEvent>,
+ ) -> Result<(), WebhookEventIngestionError> {
+ self.ingest()
+ }
async fn ingest_document_event(
&self,
_event: Event<DocumentTopicEvent>,
diff --git a/crates/webhook/src/inbound/kafka_stream_consumer.rs b/crates/webhook/src/inbound/kafka_stream_consumer.rs
index e052d19652..76a93a1db2 100644
--- a/crates/webhook/src/inbound/kafka_stream_consumer.rs
+++ b/crates/webhook/src/inbound/kafka_stream_consumer.rs
@@ -4,8 +4,8 @@ use crate::domain::ingestion::{
WebhookEventIngestionError,
stream::{
agent_session_lifecycle_stream_candidate, agent_trigger_stream_candidate,
- channel_stream_candidate, document_stream_candidate, message_stream_candidate,
- webhook_stream_candidate,
+ call_stream_candidate, channel_stream_candidate, document_stream_candidate,
+ message_stream_candidate, webhook_stream_candidate,
},
};
use crate::domain::stream::StreamCandidateEvent;
@@ -68,6 +68,9 @@ fn candidate_from(
DeclaredMacroEvent::ChannelMacroEvent(event) => {
channel_stream_candidate(event.event()).map(Some)
}
+ DeclaredMacroEvent::CallNotificationMacroEvent(event) => {
+ call_stream_candidate(event.event()).map(Some)
+ }
DeclaredMacroEvent::MessageMacroEvent(event) => {
message_stream_candidate(event.event()).map(Some)
}
diff --git a/crates/webhook/src/topics.rs b/crates/webhook/src/topics.rs
index 4d5adc8a11..0ede8bcd79 100644
--- a/crates/webhook/src/topics.rs
+++ b/crates/webhook/src/topics.rs
@@ -8,6 +8,7 @@
use crate::domain::events::WebhookMacroEvent;
use agent_session::domain::events::AgentSessionLifecycleMacroEvent;
use agent_trigger::domain::broker_events::AgentSessionMacroEvent;
+use call::domain::notification_events::CallNotificationMacroEvent;
use channels::domain::broker_events::ChannelMacroEvent;
use documents::domain::events::DocumentMacroEvent;
use messages::outbound::broker::MessageMacroEvent;
@@ -15,6 +16,7 @@ use messages::outbound::broker::MessageMacroEvent;
macro_event_broker::declare_topics!(
DeclaredMacroEvent: DocumentMacroEvent,
ChannelMacroEvent,
+ CallNotificationMacroEvent,
MessageMacroEvent,
WebhookMacroEvent,
AgentSessionMacroEvent,
diff --git a/docs/agent-guide/calls.md b/docs/agent-guide/calls.md
index 60697e1cb6..97f13c7948 100644
--- a/docs/agent-guide/calls.md
+++ b/docs/agent-guide/calls.md
@@ -232,6 +232,10 @@ profile pictures; initials are the fallback when no photo is available.
In-call participant tiles fill their grid cell but are never wider than 16:9,
so a wide window centers them instead of cropping cameras; check a single remote
participant in a wide window and at phone width.
+Participants with the LiveKit `macro.program` attribute show an **Agent** badge
+beside their name on video tiles, screen shares, and in the Participants list,
+including on phones.
+
The join screen has microphone, camera, and background effects buttons over the
preview, with pill selectors below for microphone, speaker, camera, and
backgrounds. The background button over the preview toggles the selected effect
@@ -350,6 +354,14 @@ or failed capture shows its reason under the call controls. Browsers
and older desktop builds keep the browser's own picker. Verify on a Mac by
sharing a display and a window, stopping, and cancelling the picker.
+### Programs in calls
+
+An agent account joins with its own API key through the SDK. Starting a channel
+call uses `POST /call/{channel_id}`; joining an existing call uses
+`POST /call/record/{call_id}/join`, which never starts one. Meeting joins use
+`POST /call/meetings/join/{token}`. When only programs have remained in a call
+for 60 seconds, the call ends automatically.
+
### Work in a call
Behind `enable-agent-work`, the call panel gains a **Work** tab, after Chat and
diff --git a/docs/design/sdk-calls.md b/docs/design/sdk-calls.md
new file mode 100644
index 0000000000..4a7628eac6
--- /dev/null
+++ b/docs/design/sdk-calls.md
@@ -0,0 +1,310 @@
+# Programmatic calls
+
+Status: phases 1 to 4 are built, except as listed below. Phase 5 (companions) is not.
+
+Not built yet:
+
+- Bot joins. Identities, attendance and orphan-room handling are in place, but the routes
+ still refuse bot tokens: the `enable-programmatic-calls` flag is keyed on a user, and a
+ team-scoped bot token has no acting user.
+- Approved starts. An agent-attributed start is always refused; approval through
+ `execution.reviews` is not wired.
+- Reading other participants' registered work: it has no REST route.
+
+Screen share has not been run end to end.
+
+Goal: one supported way for a program to be a participant in a Macro call, able to do
+everything a person can do there.
+
+## The model
+
+**Macro decides who may be in which call. LiveKit runs what happens in the room.**
+
+The SDK does the Macro half and hands over a LiveKit connection. It does not wrap
+LiveKit. LiveKit's own clients already cover audio, video, screen share, data and
+subscriptions, and voice agents already build on them through `AgentSession`. A Macro
+wrapper would have to chase all of that, and would get in the way of those tools.
+
+```ts
+import { Macro } from '@macro-inc/sdk';
+
+const macro = new Macro();
+const call = await macro.channels.byId(id).activeCall();
+const connection = await call.join();
+// connection.url, connection.token: use them with any LiveKit client
+```
+
+```ts
+import { connectRoom } from '@macro-inc/sdk-calls/node';
+
+const { room, connection } = await connectRoom(call); // a real @livekit/rtc-node Room
+await session.start({ agent, room }); // LiveKit AgentSession, unchanged
+// ...
+await connection.leave();
+```
+
+So there are two levels, and a program can use either:
+
+| Level | Package | Returns | Runs in |
+| --- | --- | --- | --- |
+| Token | `@macro-inc/sdk` | `CallConnection`: URL, token, identity, room name | Anywhere except code mode |
+| Room | `@macro-inc/sdk-calls`, exports `/node` and `/browser` | A LiveKit `Room`, already connected and with Macro's defaults | Node, Bun or a browser |
+
+A `Room` cannot come from the core SDK: that would put a native media library in every
+SDK install and in the code-mode bundle.
+
+## Why the current path isn't good enough
+
+A voice agent built outside this repo already joins and talks in calls, using a Macro
+user account, an API key and `@livekit/rtc-node` under Bun. It proves the approach, and
+shows what is missing:
+
+| What it has to do today | Why | What replaces it |
+| --- | --- | --- |
+| Cast into the SDK's private `client.storage` to reach routes listed as app-only | The SDK wraps none of them | `call.join()`, `channel.startCall()` |
+| Check for a live call before every join | `GET /call/{channel_id}` starts a call and rings the channel if the last one just ended | `call.join()` can never create a call |
+| Hold a local lock around every token request | A token request silently removes the user from their other call | `onOtherCall: 'fail'`, the default for SDK joins |
+| Poll active calls and meetings every 3 seconds | Programs get no call events | Events, plus `macro.calls.active()` to reconcile |
+| Merge calls and meetings into one list itself | Two routes, two shapes | `macro.calls.active()` |
+| Run its own timers to leave an empty call | Nothing ends a call that only programs remain in | A server rule (below) |
+| Call `getRingStatus`, which accepts only the LiveKit token from a VoIP push, with an API key | No other way to ask "is this ringing for me" | `call.ringState()` |
+| Hold a separate room connection for the roster | Roster reads need a meeting token and exclude channel calls | `call.participants()` |
+
+## Who a program is
+
+| Principal | Identity in the room | Use | Phase |
+| --- | --- | --- | --- |
+| **Agent account** (`team.invite(..., { agent: true })`, `User.isAgent()`) with an API key | Its own user id | The recommended path: a long-lived program with its own name | 1 |
+| A person's API key | That person's user id | Scripts acting as me while I'm not in the call | 1 |
+| Meeting guest | A guest UUID | Standalone links, no account | 4 |
+| Bot token | New `bot\|<uuid>` handling | Bots granted a channel. Refused today by `UserOrInternal` | 4 |
+| Companion of a person | New `conn:<uuid>` | Sharing into a call while my own app stays in it | 5 |
+| Code-mode program | None | Control methods only. It has a 30 second deadline and reaches only Macro hosts, so it can never hold media | - |
+
+Agent accounts go first because they need no changes to attendance, access or identity
+handling: to the backend they are already users. Programs must not use LiveKit's
+`agent` participant kind, because the app's call view hides those participants,
+including any screen share they publish.
+
+A person's key has one trap: LiveKit allows one connection per identity, so joining
+with my key disconnects my app. `join()` therefore returns `already_connected` when the
+identity is in the room, unless the caller passes `replace: true`. Companions (phase 5)
+are the real answer for that case.
+
+## SDK surface
+
+Follows the [SDK rule](../../.agents/rules/sdk.md): handles in and out, no raw ids.
+`CallRecord` stays the one noun for a call.
+
+```ts
+// Find
+macro.calls.active(): Promise<CallRecord[]> // every live call I can see, either kind
+channel.activeCall(): Promise<CallRecord | undefined>
+call.kind // 'channel' | 'standalone'
+call.ringState(): Promise<'ringing' | 'answered' | 'declined' | 'ended'>
+call.participants(): Promise<CallParticipant[]> // live, with track state
+
+// Enter
+channel.startCall(opts?): Promise<CallConnection> // joins if one is running; else rings and records
+meeting.join(opts?): Promise<CallConnection> // starts the room on first join
+call.join(opts?): Promise<CallConnection> // never creates; fails if the call ended
+call.decline(): Promise<void>
+
+interface JoinOptions {
+ onOtherCall?: 'fail' | 'switch'; // default 'fail'; the app's behavior is 'switch'
+ replace?: boolean; // take over this identity's existing connection
+ name?: string; // display name in the room
+}
+
+interface CallConnection {
+ readonly call: CallRecord;
+ readonly url: string;
+ readonly token: string; // omitted from toJSON
+ readonly identity: string;
+ readonly roomName: string;
+ readonly started: boolean; // whether this request created the call
+ leave(): Promise<{ callEnded: boolean }>;
+}
+```
+
+The room package adds only what a program would otherwise get wrong:
+
+```ts
+connectRoom(target, opts?): Promise<{ room: Room; connection: CallConnection }>
+publishScreen(room, source, opts?): Promise<ScreenShare> // screen-share source and encoding
+```
+
+`connectRoom` turns off Opus DTX the way the app does (`LivekitJsCallController.ts`: it
+clips quiet speech after noise suppression), and calls `leave()` when the room closes.
+`publishScreen` takes frames in Node (`VideoSource.captureFrame`) or a `MediaStream` in a
+browser, with the browser picker as its default. Capture itself is up to the caller:
+`rtc-node` has no capture engine, so a page screencast or `ffmpeg` output goes in as
+frames.
+
+## Parity: everything a person can do
+
+Status: **Exists** in the SDK; **Wrap**, the route exists; **New**, needs backend work;
+**LiveKit**, use the room directly; **Client**, app-side behavior with no shared state.
+
+| A person can | A program uses | Status |
+| --- | --- | --- |
+| See live calls | `macro.calls.active()` | Wrap |
+| Be rung, and see it stop | `call.ringing`, `call.answered`, `call.declined` events, `call.ringState()` | New |
+| Decline | `call.decline()` | Wrap |
+| Start a channel call | `channel.startCall()` | New (`POST`) |
+| Start an instant call | `macro.meetings.create()`, `meeting.join()` | Exists, Wrap |
+| Schedule a call | `macro.calendar` | Exists |
+| Join by link | `macro.meetings.lookup(token)`, `meeting.join()` | Exists, Wrap |
+| Join as a guest | `meeting.joinAsGuest(name)` | Wrap, phase 4 |
+| Leave | `connection.leave()` | New |
+| Speak, mute, pick a microphone | `room.localParticipant`, `AudioSource` | LiveKit |
+| Show video, pick a camera | `room.localParticipant`, `VideoSource` | LiveKit |
+| Share a screen, with audio | `publishScreen()` | LiveKit plus helper |
+| Hear and see others | Room subscriptions | LiveKit |
+| See who is speaking, muted or on camera | Room events | LiveKit |
+| See the roster without joining | `call.participants()` | New |
+| Noise suppression, backgrounds | Same LiveKit processors in `/browser`; in Node, process your own frames | Client |
+| Focus a tile, maximize a share | Not applicable | Client |
+| Read and post in call chat | `call.timelinePage()` and `CallMessage` exist; add `call.discussion()` for the root post and channel-thread calls | Wrap |
+| Rename | `call.rename()` | Exists |
+| Set team sharing | `call.setTeamShare()` | Exists |
+| Get a link | `call.meeting()`, `meeting.webUrl()` | Exists |
+| Invite teammates to a standalone call | `meeting.inviteUsers()` | Exists |
+| List and revoke links | `macro.meetings.list()`, `meeting.cancel()` | Exists |
+| Register work, see others' work | `session.registerAsWork()`; add a read of others' work (GraphQL in the app) | Exists, New |
+| Read the transcript and summary | `call.transcript`, `call.summary` | Exists |
+| Download the recording | `call.recording.bytes()`, since code mode cannot reach the presigned URL | New |
+
+No moderation: people have no mute-others, remove or end-for-everyone controls in a call
+today, and programs should not get power people lack. If those arrive, they arrive in the
+app and SDK together.
+
+## Backend changes
+
+All in `crates/call`, in its hexagonal layout.
+
+**Routes**
+
+| Route | Purpose |
+| --- | --- |
+| `POST /call/{channel_id}` | The explicit start: the same get-or-create as the `GET`, but as a write, so code mode's dry run treats it as one. The `GET` stays for shipped clients; the SDK never calls it |
+| `POST /call/record/{call_id}/join` | Join a live call, never create. Allowed for anyone who sees it in `active()`: channel members, and a standalone call's owner, attendees and invitees. View access alone is not enough, because team-shared viewers must not join. Returns `410` when ended, `409 in_other_call`, `409 already_connected` |
+| `POST /call/record/{call_id}/leave` | Leave by call id, for one call only, so a stale program can't leave a newer call in the same channel. `decline` is bound to call id for the same reason |
+| `GET /call/active/all` | Channel and standalone calls in one shape, each with its kind and whether it is ringing for the caller |
+| `GET /call/record/{call_id}/ring` | Ring state for an authenticated user, reusing `get_ring_status`'s logic. The push-token route stays for native clients |
+| `GET /call/record/{call_id}/participants` | Live roster from `list_participants`, with track state and whether each is a program. Same access as join |
+| `GET /call/record/{call_id}/recording` | Recording bytes through a Macro host |
+
+**Refuse tokens in code mode.** All token routes return `403` when the request carries
+`x-macro-code-execution`. The sandbox cannot use a token, and it would land in the model's
+context and the transcript. Tokens live 6 hours and cannot be revoked. `toJSON` on
+`CallConnection` also omits the token, and it is never logged or put on a span.
+
+**Mark programs in the room.** At join, the credential already says who is asking
+(`CredentialOrigin`: `UserApiKey` and `MacroApiJwt` versus `Session`), and `is_agent` says
+what the account is. Mint with a `macro.program` attribute (`with_attributes` exists in
+the `livekit-api` crate) and store `client` on `call_participants`, with a default of
+`person` per CS-70.
+
+**A program must not hold a call open.** Today a call ends when its last participant
+leaves, so a stuck program could keep a room and its recording running indefinitely. New
+rule: when only programs have been in the call for 60 seconds, the existing
+`finish_empty_call` path ends it. That covers people leaving, and a call a program started
+that nobody answered within the 30 second ring. `stale_call_sweeper` is the backstop.
+
+**Limit starts.** `channel.startCall()` rings people, so it takes a per-caller rate limit
+through the existing `rate_limit` crate. An agent-attributed credential acting as a person
+(`is_agent_run`) is refused unless approved through `execution.reviews`, as `email.send`
+is. An agent account's own API key acts as itself, and is only rate limited.
+
+**Events.** Add these to `WebhookEvent`, with access checks in fan-out and an SDK hydrator
+(`src/events/hydrate/call.ts`), so `macro.events.on()` and `listen()` receive them:
+
+- For everyone who can see the call: `call.started`, `call.ended`,
+ `call.participant_joined`, `call.participant_left`, `call.recording_ready`,
+ `call.summarized`.
+- For one user: `call.ringing`, `call.answered`, `call.declined`, `call.invited`.
+
+Today the per-user ones are hand-written JSON on the app's websocket and the others are an
+internal broker topic. A program reconciles with `macro.calls.active()` when its stream
+reconnects, so a missed event costs a delay and not a missed call.
+
+## Client changes
+
+Show an "Agent" badge on any participant with `macro.program` set, in the tile and in
+Participants. People should know when a program is listening. Clients that haven't updated
+show it as an ordinary participant, as they already do for these accounts today, so nothing
+has to ship first. Being a participant, a program is recorded and transcribed like anyone
+else, under the existing call notice.
+
+The web app and native plugins do not move onto the new package. They share the routes and
+the contract, not code.
+
+## Observability
+
+- Backend: `call.join` and `call.start` with `call.id`, principal kind, `call.client`, and
+ outcome (`in_other_call`, `already_connected`, `ended`).
+- `@macro-inc/sdk-calls`: `call.sdk.connect`, `call.sdk.publish_screen` (source kind,
+ resolution, fps, outcome), `call.sdk.disconnected` (reason), sent through the SDK's
+ existing observer, searchable by `call.id`.
+- Never: tokens, display names, share links.
+
+## Testing
+
+- **SDK:** mocked tests for each method; `bun run coverage` with wrapped endpoints removed
+ from `skipped.ts`; `bun run test` in `../sdk-docs` and `../code-mode-sdk`. Add
+ `getBatchCallRecordPreview` to `postReads` if wrapped.
+- **Rust:** service tests with port fakes for the join errors, the program-only end rule,
+ and refusal in code mode; router tests for the access matrix, including team-shared
+ viewers refused.
+- **Dry run:** the operation catalog marks `POST /call/{channel_id}` as a write, and no SDK
+ method calls the `GET`.
+- **End to end:** on a local stack, a program joins with `connectRoom`, a second program
+ speaks known audio, and each hears the other. For screen share, a Node program publishes
+ known-color frames and a headless browser in the call asserts the pixels in its share
+ tile. Then the last person leaves and the program's room closes.
+
+## Delivery
+
+| Phase | Ships | Result |
+| --- | --- | --- |
+| 1. Join | Routes above, `CallConnection`, `active()`, `ringState()`, `participants()`, `connectRoom` for Node, program marking and badge, the end rule | The existing voice agent drops its cast, its lock and its ring workaround. Calls and talking are supported |
+| 2. Screen share | Spike, then `publishScreen` for Node and browser, `/browser` export | A program can share into a call |
+| 3. Events | `call.*` events and hydrator | Polling goes away |
+| 4. Remaining parity | `call.discussion()`, recording bytes, others' work, guests, bots | The parity table is complete |
+| 5. Companions | `conn:` identities, so I can share from a script while my app stays in the call | Only if phase 2 shows people need it from their own identity |
+
+The phase 2 spike comes first because video is the one unproven piece. `rtc-node` is proven
+for audio under Bun, including its native-library needs on NixOS. Its docs show
+`VideoSource` and `TrackSource.SOURCE_SCREENSHARE` but no complete screen-share example,
+and we need to confirm the app renders one and whether Node has the screen-content mode
+Python has (`is_screencast`), which affects text legibility.
+
+Each phase updates `docs/agent-guide/calls.md`, `crates/call/AGENTS.md` and
+`packages/sdk/AGENTS.md`, adds a `@routing` sentence and `@agent` rules to the call
+namespace, and releases through `release-sdk`. `@macro-inc/sdk-calls` gets its own
+`AGENTS.md`. Connections sit behind a server flag so they can be turned off without an SDK
+release.
+
+## Decisions needed
+
+1. **First principal.** Recommended: agent accounts, with a person's own key also working.
+ Bots follow in phase 4. They add a new identity type to attendance, which is real work
+ for little gain while agent accounts exist.
+2. **Default when already in another call.** Recommended: `fail`, because a program that is
+ silently moved out of a call is the bug programs hit today. The app keeps `switch`.
+3. **Programs can't hold a call open.** Recommended: yes, with a 60 second total. The cost:
+ two programs can't hold a call with each other. If that is wanted, make it an explicit
+ option on the start.
+4. **Agent badge.** Recommended: always shown. A program in a call can hear everything, so
+ people should be able to tell.
+5. **Screen share in code mode.** Recommended: not offered. An agent that needs it runs on
+ a paired machine in a real process. A hosted share worker is a new service with its own
+ cost and abuse surface, and should wait for a real need.
+
+## Out of scope
+
+- Moderation and recording controls, until the app has them.
+- Mobile or native SDKs.
+- Moving the web app or native plugins onto the new package.
+- SIP or phone dial-in.
diff --git a/packages/sdk-calls/AGENTS.md b/packages/sdk-calls/AGENTS.md
new file mode 100644
index 0000000000..b1308776bf
--- /dev/null
+++ b/packages/sdk-calls/AGENTS.md
@@ -0,0 +1,40 @@
+# SDK call rooms
+
+## What it is
+
+This package turns a core SDK call connection into a LiveKit room and provides
+screen-share publishing for Node and browsers.
+
+## Start here
+
+- `src/common.ts`: structural contract derived from the core SDK `CallConnection`, connection lifecycle, and one-time leave.
+- `src/node.ts`: rtc-node connection and frame-based screen publishing.
+- `src/browser.ts`: browser connection and MediaStream screen publishing.
+
+## Scope
+
+- Owns: room connection defaults, screen publication, and cleanup.
+- Not here: Macro call authorization and token issuance → `packages/sdk`.
+
+## Boundaries
+
+- Depends on: `@macro-inc/sdk` as a peer, one optional LiveKit runtime peer,
+ and `@opentelemetry/api`. Spans are no-ops without a host tracer provider.
+- Used by: programs that participate in calls outside the app.
+
+## Checks
+
+- `bun test` and `bun run check` from this directory; `just check` covers format and lint.
+
+## Gotchas
+
+- Never log, attach to spans, or serialize the room token.
+- rtc-node has no room-wide publish defaults or publish hook, so the local
+ participant's `publishTrack` is wrapped to set `dtx` false for audio.
+- Unpublish Node tracks by their publication SID; browser unpublish takes the
+ `MediaStreamTrack` itself.
+- Frame capture is supplied by the caller; rtc-node has no capture engine.
+
+## Related
+
+- Design: `docs/design/sdk-calls.md`.
diff --git a/packages/sdk-calls/CLAUDE.md b/packages/sdk-calls/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/packages/sdk-calls/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/packages/sdk-calls/README.md b/packages/sdk-calls/README.md
new file mode 100644
index 0000000000..55b1485036
--- /dev/null
+++ b/packages/sdk-calls/README.md
@@ -0,0 +1,59 @@
+# Macro call rooms
+
+`@macro-inc/sdk-calls` connects SDK call handles to a real LiveKit room. Install
+`@macro-inc/sdk` and one runtime peer: `@livekit/rtc-node` for Node or Bun, or
+`livekit-client` for browsers. The core SDK grants access and issues the room
+token as `CallConnection` (import it from `@macro-inc/sdk`); this package does not store or log it.
+
+The package uses `@opentelemetry/api` for `call.sdk.*` spans. Tracing is a
+no-op until the host installs an OpenTelemetry tracer provider.
+
+## Voice agent (Node or Bun)
+
+```ts
+import { Macro } from '@macro-inc/sdk';
+import { connectRoom } from '@macro-inc/sdk-calls/node';
+
+const macro = new Macro();
+const call = await macro.channels.byId(channelId).activeCall();
+if (!call) throw new Error('No active call');
+
+const { room, connection } = await connectRoom(call);
+await session.start({ agent, room });
+
+// When the room disconnects, the helper calls connection.leave() once.
+// To finish explicitly:
+await room.disconnect();
+```
+
+`connectRoom` also accepts a channel (`startCall`) or meeting (`join`) and
+forwards `JoinOptions`. Use an agent account's own API key for a dedicated
+program identity. Audio publications use Opus DTX disabled, matching the app's
+quiet speech behavior. In Node, `rtc-node` has no room-wide publish default,
+so `connectRoom` wraps the local participant's `publishTrack` to apply it.
+
+## Screen share
+
+Node capture is supplied by your program as an async stream of fixed-size
+I420 or RGBA frames. The helper publishes them as a screen share and closes
+the track when the stream ends or `stop()` is called.
+
+```ts
+import { publishScreen } from '@macro-inc/sdk-calls/node';
+
+const share = await publishScreen(room, frames, { fps: 15 });
+// frames: AsyncIterable<{ data: Uint8Array; width: number; height: number;
+// format: 'I420' | 'RGBA' }>
+await share.stop();
+await share.stopped;
+```
+
+In a browser, pass a `MediaStream` or omit it to open the browser's display
+picker. Its audio track, when present, is published as screen-share audio.
+
+```ts
+import { publishScreen } from '@macro-inc/sdk-calls/browser';
+
+const share = await publishScreen(room);
+await share.stopped; // resolves after the picker track ends or stop() completes
+```
diff --git a/packages/sdk-calls/package.json b/packages/sdk-calls/package.json
new file mode 100644
index 0000000000..af7d5cd374
--- /dev/null
+++ b/packages/sdk-calls/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@macro-inc/sdk-calls",
+ "version": "0.1.0",
+ "type": "module",
+ "description": "LiveKit room helpers for Macro calls",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/macro-inc/macro.git",
+ "directory": "packages/sdk-calls"
+ },
+ "sideEffects": false,
+ "exports": {
+ "./node": { "types": "./dist/node.d.ts", "import": "./dist/node.js" },
+ "./browser": { "types": "./dist/browser.d.ts", "import": "./dist/browser.js" }
+ },
+ "files": ["dist"],
+ "publishConfig": { "access": "public" },
+ "scripts": {
+ "build": "tsc -p tsconfig.build.json",
+ "check": "tsc --noEmit",
+ "test": "bun test"
+ },
+ "peerDependencies": {
+ "@macro-inc/sdk": "^0.3.0",
+ "@livekit/rtc-node": "^1.2.1",
+ "livekit-client": "^2.18.0"
+ },
+ "peerDependenciesMeta": {
+ "@livekit/rtc-node": { "optional": true },
+ "livekit-client": { "optional": true }
+ },
+ "dependencies": {
+ "@opentelemetry/api": "^1.9.1"
+ },
+ "devDependencies": {
+ "@types/bun": "^1.3.5",
+ "typescript": "^5.9.2"
+ }
+}
diff --git a/packages/sdk-calls/src/browser.ts b/packages/sdk-calls/src/browser.ts
new file mode 100644
index 0000000000..cef7464aa5
--- /dev/null
+++ b/packages/sdk-calls/src/browser.ts
@@ -0,0 +1,112 @@
+import { Room, RoomEvent, Track } from 'livekit-client';
+import {
+ type CallTarget,
+ callIdForRoom,
+ connectRoomWith,
+ type JoinOptions,
+} from './common';
+import { reportError, withSpan } from './telemetry';
+
+export type { CallConnection, CallTarget, JoinOptions } from './common';
+
+export type ScreenShare = {
+ stop(): Promise<void>;
+ stopped: Promise<void>;
+};
+
+export type ScreenOptions = DisplayMediaStreamOptions;
+
+export function connectRoom(target: CallTarget, options?: JoinOptions) {
+ const room = new Room({ publishDefaults: { dtx: false } });
+ return connectRoomWith(
+ target,
+ options,
+ room,
+ (room, connection) => room.connect(connection.url, connection.token),
+ (room, callback) => room.on(RoomEvent.Disconnected, callback)
+ );
+}
+
+/** Publish a MediaStream, or open the browser's screen picker. */
+export async function publishScreen(
+ room: Room,
+ source?: MediaStream,
+ options: ScreenOptions = {}
+): Promise<ScreenShare> {
+ return withSpan('call.sdk.publish_screen', async (span) => {
+ const callId = callIdForRoom(room);
+ if (callId) span.setAttribute('call.id', callId);
+ span.setAttribute('call.sdk.source_kind', source ? 'stream' : 'picker');
+ const owned = !source;
+ const stream =
+ source ??
+ (await navigator.mediaDevices.getDisplayMedia({
+ video: true,
+ audio: true,
+ ...options,
+ }));
+ const video = stream.getVideoTracks()[0];
+ if (!video) {
+ if (owned) stream.getTracks().forEach((track) => track.stop());
+ throw new Error('Screen stream has no video track');
+ }
+ const audio = stream.getAudioTracks()[0];
+ const settings = video.getSettings();
+ if (settings.width) span.setAttribute('call.sdk.width', settings.width);
+ if (settings.height) span.setAttribute('call.sdk.height', settings.height);
+ if (settings.frameRate)
+ span.setAttribute('call.sdk.fps', settings.frameRate);
+
+ let stopping: Promise<void> | undefined;
+ let resolveStopped: () => void = () => {};
+ const stoppedPromise = new Promise<void>((resolve) => {
+ resolveStopped = resolve;
+ });
+ const published: MediaStreamTrack[] = [];
+ const stop = () =>
+ (stopping ??= (async () => {
+ try {
+ for (const track of published) {
+ await room.localParticipant.unpublishTrack(track, false);
+ }
+ } finally {
+ if (owned) stream.getTracks().forEach((track) => track.stop());
+ resolveStopped();
+ }
+ })());
+ video.addEventListener(
+ 'ended',
+ () => {
+ stop().catch((error: unknown) =>
+ reportError('call.sdk.publish_screen', error, callId)
+ );
+ },
+ { once: true }
+ );
+ room.on(RoomEvent.Disconnected, () => {
+ stop().catch((error: unknown) =>
+ reportError('call.sdk.publish_screen', error, callId)
+ );
+ });
+
+ try {
+ await room.localParticipant.publishTrack(video, {
+ source: Track.Source.ScreenShare,
+ });
+ published.push(video);
+ if (audio) {
+ await room.localParticipant.publishTrack(audio, {
+ source: Track.Source.ScreenShareAudio,
+ dtx: false,
+ });
+ published.push(audio);
+ }
+ span.setAttribute('call.sdk.outcome', 'published');
+ } catch (error) {
+ await stop();
+ throw error;
+ }
+
+ return { stop, stopped: stoppedPromise };
+ });
+}
diff --git a/packages/sdk-calls/src/common.ts b/packages/sdk-calls/src/common.ts
new file mode 100644
index 0000000000..abf8ddf608
--- /dev/null
+++ b/packages/sdk-calls/src/common.ts
@@ -0,0 +1,75 @@
+import type {
+ CallConnection as CoreCallConnection,
+ JoinOptions as CoreJoinOptions,
+} from '@macro-inc/sdk';
+
+export type JoinOptions = CoreJoinOptions;
+/** Structural connection accepted from the core SDK. */
+export type CallConnection = Omit<
+ Pick<
+ CoreCallConnection,
+ 'call' | 'url' | 'token' | 'identity' | 'roomName' | 'started' | 'leave'
+ >,
+ 'call'
+> & { readonly call: { readonly id: string } };
+
+import { reportError, startSpan, withSpan } from './telemetry';
+
+export type CallTarget =
+ | { join(options?: JoinOptions): Promise<CallConnection> }
+ | { startCall(options?: JoinOptions): Promise<CallConnection> };
+
+const callIds = new WeakMap<object, string>();
+
+export function callIdForRoom(room: object): string | undefined {
+ return callIds.get(room);
+}
+
+export async function connectRoomWith<Room extends object>(
+ target: CallTarget,
+ options: JoinOptions | undefined,
+ room: Room,
+ connect: (room: Room, connection: CallConnection) => Promise<void>,
+ onDisconnect: (room: Room, callback: (reason?: unknown) => void) => void
+): Promise<{ room: Room; connection: CallConnection }> {
+ return withSpan('call.sdk.connect', async (span) => {
+ let connection: CallConnection | undefined;
+ let leavePromise: Promise<void> | undefined;
+
+ const leaveOnce = () => {
+ if (!connection) return Promise.resolve();
+ if (!leavePromise) leavePromise = connection.leave().then(() => {});
+ return leavePromise;
+ };
+
+ try {
+ connection =
+ 'startCall' in target
+ ? await target.startCall(options)
+ : await target.join(options);
+ span.setAttribute('call.id', connection.call.id);
+ callIds.set(room, connection.call.id);
+ onDisconnect(room, (reason) => {
+ const disconnected = startSpan('call.sdk.disconnected');
+ disconnected.setAttribute('call.id', connection?.call.id ?? '');
+ disconnected.setAttribute(
+ 'call.sdk.reason',
+ String(reason ?? 'unknown')
+ );
+ disconnected.end();
+ leaveOnce().catch((error: unknown) => {
+ reportError('call.sdk.disconnected', error, connection?.call.id);
+ });
+ });
+ await connect(room, connection);
+ span.setAttribute('call.sdk.outcome', 'connected');
+ return { room, connection };
+ } catch (error) {
+ span.setAttribute('call.sdk.outcome', 'failed');
+ await leaveOnce().catch((leaveError: unknown) => {
+ reportError('call.sdk.disconnected', leaveError, connection?.call.id);
+ });
+ throw error;
+ }
+ });
+}
diff --git a/packages/sdk-calls/src/node.ts b/packages/sdk-calls/src/node.ts
new file mode 100644
index 0000000000..afba33d2e6
--- /dev/null
+++ b/packages/sdk-calls/src/node.ts
@@ -0,0 +1,183 @@
+import {
+ LocalVideoTrack,
+ Room,
+ RoomEvent,
+ TrackKind,
+ TrackPublishOptions,
+ TrackSource,
+ VideoBufferType,
+ VideoFrame,
+ VideoSource,
+} from '@livekit/rtc-node';
+import {
+ type CallTarget,
+ callIdForRoom,
+ connectRoomWith,
+ type JoinOptions,
+} from './common';
+import { reportError, withSpan } from './telemetry';
+
+export type { CallConnection, CallTarget, JoinOptions } from './common';
+
+export type ScreenFrame = {
+ data: Uint8Array;
+ width: number;
+ height: number;
+ format: 'I420' | 'RGBA';
+};
+
+export type ScreenShare = {
+ stop(): Promise<void>;
+ stopped: Promise<void>;
+};
+
+export type ScreenOptions = {
+ fps?: number;
+ maxBitrate?: number;
+ name?: string;
+};
+
+export function connectRoom(target: CallTarget, options?: JoinOptions) {
+ const room = new Room();
+ return connectRoomWith(
+ target,
+ options,
+ room,
+ async (room, connection) => {
+ await room.connect(connection.url, connection.token, {
+ autoSubscribe: true,
+ dynacast: false,
+ });
+ const participant = room.localParticipant;
+ if (!participant)
+ throw new Error('Room connected without a local participant');
+
+ // rtc-node has no room-wide publish defaults or publish hook. Wrapping
+ // publishTrack is the only way to set DTX for caller-published audio.
+ const publish = participant.publishTrack.bind(participant);
+ participant.publishTrack = (track, publishOptions) => {
+ if (track.kind === TrackKind.KIND_AUDIO) publishOptions.dtx = false;
+ return publish(track, publishOptions);
+ };
+ },
+ (room, callback) => room.on(RoomEvent.Disconnected, callback)
+ );
+}
+
+/** Publish caller-supplied I420 or RGBA frames as a screen share. */
+export async function publishScreen(
+ room: Room,
+ frames: AsyncIterable<ScreenFrame>,
+ options: ScreenOptions = {}
+): Promise<ScreenShare> {
+ return withSpan('call.sdk.publish_screen', async (span) => {
+ const callId = callIdForRoom(room);
+ if (callId) span.setAttribute('call.id', callId);
+ span.setAttribute('call.sdk.source_kind', 'frames');
+ const iterator = frames[Symbol.asyncIterator]();
+ const first = await iterator.next();
+ if (first.done) throw new Error('Screen source produced no frames');
+
+ const { width, height } = first.value;
+ if (
+ !Number.isInteger(width) ||
+ !Number.isInteger(height) ||
+ width < 1 ||
+ height < 1
+ ) {
+ throw new Error('Screen frames require positive integer dimensions');
+ }
+ span.setAttribute('call.sdk.width', width);
+ span.setAttribute('call.sdk.height', height);
+ span.setAttribute('call.sdk.fps', options.fps ?? 15);
+
+ const source = new VideoSource(width, height);
+ const track = LocalVideoTrack.createVideoTrack(
+ options.name ?? 'screen',
+ source
+ );
+ const publishOptions = new TrackPublishOptions({
+ source: TrackSource.SOURCE_SCREENSHARE,
+ simulcast: false,
+ videoEncoding: {
+ maxBitrate: BigInt(options.maxBitrate ?? 2_500_000),
+ maxFramerate: options.fps ?? 15,
+ },
+ });
+
+ let stopped = false;
+ let stopping: Promise<void> | undefined;
+ let publicationSid: string | undefined;
+ let resolveStopped: () => void = () => {};
+ const stoppedPromise = new Promise<void>((resolve) => {
+ resolveStopped = resolve;
+ });
+ const stop = () =>
+ (stopping ??= (async () => {
+ stopped = true;
+ try {
+ await iterator.return?.();
+ } finally {
+ try {
+ if (publicationSid)
+ await room.localParticipant?.unpublishTrack(
+ publicationSid,
+ false
+ );
+ } finally {
+ try {
+ await track.close();
+ } finally {
+ resolveStopped();
+ }
+ }
+ }
+ })());
+
+ try {
+ const participant = room.localParticipant;
+ if (!participant) throw new Error('Room is not connected');
+ const publication = await participant.publishTrack(track, publishOptions);
+ publicationSid = publication.sid;
+ span.setAttribute('call.sdk.outcome', 'published');
+ } catch (error) {
+ await stop();
+ throw error;
+ }
+
+ const pump = async () => {
+ try {
+ let frame: IteratorResult<ScreenFrame> = first;
+ while (!stopped && !frame.done) {
+ const value = frame.value;
+ if (value.width !== width || value.height !== height) {
+ throw new Error('Screen frame dimensions changed');
+ }
+ source.captureFrame(
+ new VideoFrame(
+ value.data,
+ width,
+ height,
+ value.format === 'I420'
+ ? VideoBufferType.I420
+ : VideoBufferType.RGBA
+ )
+ );
+ frame = await iterator.next();
+ }
+ } finally {
+ await stop();
+ }
+ };
+ pump().catch((error: unknown) =>
+ reportError('call.sdk.publish_screen', error, callId)
+ );
+ room.on(RoomEvent.Disconnected, () => {
+ stop().catch((error: unknown) =>
+ reportError('call.sdk.publish_screen', error, callId)
+ );
+ });
+
+ return { stop, stopped: stoppedPromise };
+ });
+}
diff --git a/packages/sdk-calls/src/telemetry.ts b/packages/sdk-calls/src/telemetry.ts
new file mode 100644
index 0000000000..089e978298
--- /dev/null
+++ b/packages/sdk-calls/src/telemetry.ts
@@ -0,0 +1,40 @@
+import { type Span, SpanStatusCode, trace } from '@opentelemetry/api';
+
+const tracer = trace.getTracer('@macro-inc/sdk-calls');
+
+export function recordError(span: Span, error: unknown): void {
+ span.recordException(error instanceof Error ? error : String(error));
+ span.setStatus({ code: SpanStatusCode.ERROR });
+}
+
+export function withSpan<T>(
+ name: string,
+ action: (span: Span) => Promise<T>
+): Promise<T> {
+ return tracer.startActiveSpan(name, async (span) => {
+ try {
+ return await action(span);
+ } catch (error) {
+ span.setAttribute('call.sdk.outcome', 'failed');
+ recordError(span, error);
+ throw error;
+ } finally {
+ span.end();
+ }
+ });
+}
+
+export function reportError(
+ name: string,
+ error: unknown,
+ callId?: string
+): void {
+ const span = startSpan(name);
+ if (callId) span.setAttribute('call.id', callId);
+ recordError(span, error);
+ span.end();
+}
+
+export function startSpan(name: string): Span {
+ return tracer.startSpan(name);
+}
diff --git a/packages/sdk-calls/tests/browser.test.ts b/packages/sdk-calls/tests/browser.test.ts
new file mode 100644
index 0000000000..7aafd1b6b4
--- /dev/null
+++ b/packages/sdk-calls/tests/browser.test.ts
@@ -0,0 +1,69 @@
+import { describe, expect, mock, test } from 'bun:test';
+
+const published: Array<{
+ track: MediaStreamTrack;
+ options: { source: string; dtx?: boolean };
+}> = [];
+const unpublished: MediaStreamTrack[] = [];
+
+mock.module('livekit-client', () => ({
+ RoomEvent: { Disconnected: 'disconnected' },
+ Track: {
+ Source: {
+ ScreenShare: 'screen_share',
+ ScreenShareAudio: 'screen_share_audio',
+ },
+ },
+ Room: class {
+ localParticipant = {
+ publishTrack: async (
+ track: MediaStreamTrack,
+ options: { source: string; dtx?: boolean }
+ ) => {
+ published.push({ track, options });
+ },
+ unpublishTrack: async (track: MediaStreamTrack) => {
+ unpublished.push(track);
+ },
+ };
+ on(_event: string, _callback: () => void) {}
+ async connect() {}
+ },
+}));
+
+const { connectRoom, publishScreen } = await import('../src/browser');
+
+describe('browser screen share', () => {
+ test('publishes video and audio with screen sources and stops both', async () => {
+ const video = {
+ getSettings: () => ({ width: 1280, height: 720 }),
+ addEventListener: () => {},
+ stop: () => {},
+ };
+ const audio = { stop: () => {} };
+ const stream = {
+ getVideoTracks: () => [video],
+ getAudioTracks: () => [audio],
+ getTracks: () => [video, audio],
+ };
+ const connection = {
+ call: { id: 'call-1' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-1',
+ roomName: 'room-1',
+ started: false,
+ leave: async () => ({ callEnded: false }),
+ };
+ const { room } = await connectRoom({ join: async () => connection });
+ const share = await Reflect.apply(publishScreen, undefined, [room, stream]);
+ await share.stop();
+
+ expect(published.map(({ options }) => options.source)).toEqual([
+ 'screen_share',
+ 'screen_share_audio',
+ ]);
+ expect(published[1]?.options.dtx).toBe(false);
+ expect(unpublished).toHaveLength(2);
+ });
+});
diff --git a/packages/sdk-calls/tests/common.test.ts b/packages/sdk-calls/tests/common.test.ts
new file mode 100644
index 0000000000..0d65982840
--- /dev/null
+++ b/packages/sdk-calls/tests/common.test.ts
@@ -0,0 +1,94 @@
+import { describe, expect, mock, test } from 'bun:test';
+
+const { connectRoomWith } = await import('../src/common');
+
+describe('connectRoomWith', () => {
+ test('starts a channel, connects, and leaves once on repeated disconnects', async () => {
+ const leave = mock(async () => ({ callEnded: false }));
+ const connection = {
+ call: { id: 'call-1' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-1',
+ roomName: 'room-1',
+ started: true,
+ leave,
+ };
+ const startCall = mock(async () => connection);
+ const connect = mock(async () => {});
+ let disconnect = () => {};
+ const room = {};
+
+ const result = await connectRoomWith(
+ { startCall },
+ { onOtherCall: 'fail' },
+ room,
+ connect,
+ (_room, callback) => {
+ disconnect = callback;
+ }
+ );
+
+ expect(result).toEqual({ room, connection });
+ expect(startCall).toHaveBeenCalledWith({ onOtherCall: 'fail' });
+ expect(connect).toHaveBeenCalledWith(room, connection);
+ disconnect();
+ disconnect();
+ expect(leave).toHaveBeenCalledTimes(1);
+ });
+
+ test('leaves after a room connection failure', async () => {
+ const leave = mock(async () => ({ callEnded: false }));
+ const connection = {
+ call: { id: 'call-2' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-2',
+ roomName: 'room-2',
+ started: false,
+ leave,
+ };
+ const join = mock(async () => connection);
+
+ await expect(
+ connectRoomWith(
+ { join },
+ undefined,
+ {},
+ async () => {
+ throw new Error('connect failed');
+ },
+ () => {}
+ )
+ ).rejects.toThrow('connect failed');
+ expect(leave).toHaveBeenCalledTimes(1);
+ });
+
+ test('preserves the connection error when leaving also fails', async () => {
+ const leave = mock(async () => {
+ throw new Error('leave failed');
+ });
+ const connection = {
+ call: { id: 'call-3' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-3',
+ roomName: 'room-3',
+ started: false,
+ leave,
+ };
+
+ await expect(
+ connectRoomWith(
+ { join: async () => connection },
+ undefined,
+ {},
+ async () => {
+ throw new Error('connect failed');
+ },
+ () => {}
+ )
+ ).rejects.toThrow('connect failed');
+ expect(leave).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/packages/sdk-calls/tests/node.test.ts b/packages/sdk-calls/tests/node.test.ts
new file mode 100644
index 0000000000..a40859f505
--- /dev/null
+++ b/packages/sdk-calls/tests/node.test.ts
@@ -0,0 +1,115 @@
+import { describe, expect, mock, test } from 'bun:test';
+
+const published: Array<{
+ kind: number;
+ options: {
+ dtx?: boolean;
+ source?: number;
+ videoEncoding?: { maxBitrate?: bigint };
+ };
+}> = [];
+const captured: Array<{ width: number; height: number; type: number }> = [];
+const unpublished: string[] = [];
+
+mock.module('@livekit/rtc-node', () => ({
+ TrackKind: { KIND_AUDIO: 1 },
+ TrackSource: { SOURCE_SCREENSHARE: 3 },
+ VideoBufferType: { RGBA: 0, I420: 5 },
+ RoomEvent: { Disconnected: 'disconnected' },
+ TrackPublishOptions: class {
+ source?: number;
+ videoEncoding?: { maxBitrate?: bigint };
+ constructor(data: object = {}) {
+ Object.assign(this, data);
+ }
+ },
+ VideoFrame: class {
+ constructor(
+ _data: Uint8Array,
+ public width: number,
+ public height: number,
+ public type: number
+ ) {}
+ },
+ VideoSource: class {
+ captureFrame(frame: { width: number; height: number; type: number }) {
+ captured.push(frame);
+ }
+ async close() {}
+ },
+ LocalVideoTrack: {
+ createVideoTrack: () => ({
+ kind: 2,
+ sid: 'track-1',
+ close: async () => {},
+ }),
+ },
+ Room: class {
+ localParticipant = {
+ publishTrack: async (
+ track: { kind: number },
+ options: { dtx?: boolean; source?: number }
+ ) => {
+ published.push({ kind: track.kind, options });
+ return { sid: 'publication-1' };
+ },
+ unpublishTrack: async (sid: string) => {
+ unpublished.push(sid);
+ },
+ };
+ on(_event: string, _callback: () => void) {}
+ async connect() {}
+ },
+}));
+
+const { connectRoom, publishScreen } = await import('../src/node');
+
+describe('Node room helpers', () => {
+ test('disables DTX for published audio', async () => {
+ const connection = {
+ call: { id: 'call-1' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-1',
+ roomName: 'room-1',
+ started: false,
+ leave: async () => ({ callEnded: false }),
+ };
+ const { room } = await connectRoom({ join: async () => connection });
+ await Reflect.apply(
+ room.localParticipant!.publishTrack,
+ room.localParticipant,
+ [{ kind: 1 }, { dtx: true }]
+ );
+ expect(published.at(-1)?.options.dtx).toBe(false);
+ });
+
+ test('publishes RGBA frames with a screen source and encoding', async () => {
+ async function* frames() {
+ yield {
+ data: new Uint8Array(16),
+ width: 2,
+ height: 2,
+ format: 'RGBA' as const,
+ };
+ }
+ const connection = {
+ call: { id: 'call-2' },
+ url: 'wss://example.invalid',
+ token: 'secret',
+ identity: 'account-2',
+ roomName: 'room-2',
+ started: false,
+ leave: async () => ({ callEnded: false }),
+ };
+ const { room } = await connectRoom({ join: async () => connection });
+ const share = await publishScreen(room, frames());
+ await share.stopped;
+ expect(published.at(-1)?.options.source).toBe(3);
+ expect(published.at(-1)?.options.videoEncoding?.maxBitrate).toBe(
+ 2_500_000n
+ );
+ expect(captured.at(-1)).toMatchObject({ width: 2, height: 2, type: 0 });
+ expect(unpublished.at(-1)).toBe('publication-1');
+ });
+});
diff --git a/packages/sdk-calls/tsconfig.build.json b/packages/sdk-calls/tsconfig.build.json
new file mode 100644
index 0000000000..91fcd6fd0b
--- /dev/null
+++ b/packages/sdk-calls/tsconfig.build.json
@@ -0,0 +1,10 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "noEmit": false,
+ "declaration": true,
+ "outDir": "dist",
+ "rootDir": "src"
+ },
+ "include": ["src/**/*.ts"]
+}
diff --git a/packages/sdk-calls/tsconfig.json b/packages/sdk-calls/tsconfig.json
new file mode 100644
index 0000000000..b039ae4a5b
--- /dev/null
+++ b/packages/sdk-calls/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "strict": true,
+ "esModuleInterop": true,
+ "isolatedModules": true,
+ "skipLibCheck": true,
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "include": ["src/**/*.ts", "tests/**/*.ts"],
+ "exclude": ["node_modules", "dist"]
+}
diff --git a/packages/sdk/AGENTS.md b/packages/sdk/AGENTS.md
index 5003ec61bb..ae39b9f7fa 100644
--- a/packages/sdk/AGENTS.md
+++ b/packages/sdk/AGENTS.md
@@ -62,11 +62,14 @@ enforced by the ordinary backend APIs.
bot-management tools in its favour; `IssueBotCredential` stays, because its
chat card mints a token the model never reads.
- `services.ts`, `openapi-ts.config.ts`: generated service contract inputs.
+- `../sdk-calls/`: optional Node and browser LiveKit room helpers for call handles.
+- `src/entities/calls/`: live and recorded call handles; token-bearing `CallConnection` never serializes its token.
## Boundaries
- Keep handwritten behavior in `src/`; never edit `generated/` or `specs/`.
- Keep WhatsApp pairing, passkeys, connection setup/disconnect and rollout configuration out of the handwritten public SDK; operate on accounts linked in the app, with personal bearer sessions for account/access controls. External chat sends/uploads accept the connection owner's session or own API token; bots never send.
+- Use POST to start channel calls and call-id scoped joins/leaves; the legacy GET starts a call as a side effect.
- Keep notification mute, unmute, and snooze endpoints, including bulk item preferences, in the app-only coverage exclusions.
- Keep `external-chat/` provider-neutral; provider-specific reads (WhatsApp community chats) branch on `provider` with an exhaustive match.
- Use existing entity handles for reads and mutations. Follow the
diff --git a/packages/sdk/README.md b/packages/sdk/README.md
index de8c46ed88..df64ca7f90 100644
--- a/packages/sdk/README.md
+++ b/packages/sdk/README.md
@@ -556,6 +556,30 @@ when mutations invalidate metadata. `update`, `cancel`, `invite(email)`,
`call.meeting()` creates or reads its shareable meeting; calls also expose
`editTranscript(assignments)` and `toggleTeamShare()`.
+### Programmatic calls
+
+Use `macro.calls.active()` to find joinable live calls and reconcile missed
+`call.*` events. `macro.calls.summaries(calls)` previews live or archived call
+handles in one request. `channel.activeCall()` checks without starting a call; use
+`channel.startCall()` only when intending to ring channel members. A live
+`call.join()` never creates a replacement call. `meeting.join()` enters with
+an account and `meeting.joinAsGuest(name)` uses the invitation link.
+
+Each entry returns a `CallConnection` with the LiveKit URL, token, identity,
+room name, call handle, and `started` flag. Pass the token directly to a
+LiveKit client; it is omitted from JSON and console inspection. Call
+`connection.leave()` when finished. Joins default to `onOtherCall: 'fail'`;
+pass `{ onOtherCall: 'switch' }` to move intentionally, or `{ replace: true }`
+to take over an existing connection for the same identity. Branch on
+`InOtherCallError`, `AlreadyConnectedError`, and `CallEndedError`.
+
+`call.ringState()` reads this account's ring state, `call.participants()` reads
+the live roster with user handles, `call.decline()` declines its ring,
+`call.discussion()` returns the call chat or its channel thread, and
+`call.recording.bytes()` downloads through the Macro host. Historical
+participants remain available as `call.historicParticipants()`.
+
+
`calendar.occurrences(viewport)` auto-paginates and seeds event handles.
`calendar.teamPage(viewport)` includes the roster and an optional next cursor;
`teamOutOfOffice(viewport)` reports `hasMore` when its bounded results are truncated.
diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.ts
index c47e6b7bd5..bb0050f4d9 100644
--- a/packages/sdk/generated/storage/index.ts
+++ b/packages/sdk/generated/storage/index.ts
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { type Options, Sdk } from './sdk.gen';
-export type { AccentColor, AccessiblePipeline, AccessLevel, AccessRequest, AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponse, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponse, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponse, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponse, AccessRequestsSubmitResponses, AccessRequestState, AccountManagerDecision, AccountManagerGrant, AccountManagerGrantStatus, AccountManagerRole, AccountManagersList, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddChannelBotData, AddChannelBotError, AddChannelBotErrors, AddChannelBotRequest, AddChannelBotResponse, AddChannelBotResponses, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionArchiveCause, AgentSessionFilters, AgentSessionLifecycleEvent, AgentSessionSource, AgentSessionVisibility, AgentTyping, AgentTypingPhase, AiAdmissionErrorBody, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentCommentReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, AppliedOps, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponse, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsError, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponse, ApplyDatabaseOpsResponses, ApplyOpsRequest, ApplyOpsResponse, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AttachmentChange, AttendeeResponseStatus, Audience, Awareness, AwarenessRelay, BasicDocument, BasicDocumentSubType, BlockCrmDomainData, BlockCrmDomainError, BlockCrmDomainErrors, BlockCrmDomainResponse, BlockCrmDomainResponses, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarJoinRequest, CalendarJoinRequestApiError, CalendarJoinRequestErrorCode, CalendarJoinRequestsResponse, CalendarJoinRequestStatus, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarMentionViewerCopy, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallDiscussion, CallEntryStatus, CallFilters, CallProvider, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordSource, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestError, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelAccessDecision, ChannelAccessRequest, ChannelAccessRequestedMetadata, ChannelAccessRequestState, ChannelAccessRequestStatus, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelScopeSelection, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimAccountManagerTokenData, ClaimAccountManagerTokenError, ClaimAccountManagerTokenErrors, ClaimAccountManagerTokenResponse, ClaimAccountManagerTokenResponses, ClaimedAccountManagerToken, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, ColumnId, ColumnKind, ColumnProtection, ColumnResult, CommandFailure, CommandRejectedMetadata, CommittedChange, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponse, CompleteSlackImportUploadsResponses, CompleteUploads, ConferenceProvider, Conjunction, ConversationId, ConversationKind, ConversationMetadata, ConversationProgress, ConversationSeal, ConversationStatus, ConvertDatabaseColumnData, ConvertDatabaseColumnError, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponse, ConvertDatabaseColumnResponses, ConvertedCell, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotData, CreateBotError, CreateBotErrors, CreateBotRequest, CreateBotResponse, CreateBotResponses, CreateBotTokenData, CreateBotTokenError, CreateBotTokenErrors, CreateBotTokenRequest, CreateBotTokenResponse, CreateBotTokenResponse2, CreateBotTokenResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateCanvasDocumentRequest, CreateCanvasDocumentResponse, CreateCanvasHandlerData, CreateCanvasHandlerError, CreateCanvasHandlerErrors, CreateCanvasHandlerResponse, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponse, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactError, CreateCrmTeamContactErrors, CreateCrmTeamContactRequest, CreateCrmTeamContactResponse, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseError, CreateDatabaseErrors, CreateDatabaseRequest, CreateDatabaseResponse, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookError, CreateDatabaseWebhookErrors, CreateDatabaseWebhookRequest, CreateDatabaseWebhookResponse, CreateDatabaseWebhookResponses, CreatedDatabaseWebhookResponse, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateForm, CreateFormData, CreateFormError, CreateFormErrors, CreateFormResponse, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateImport, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreatePipeline, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponse, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateToken, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmAssociation, CrmBlockedDomainResponse, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseId, DatabaseOp, DatabaseQueryRequest, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DateRange, DateRangeOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteBotData, DeleteBotError, DeleteBotErrors, DeleteBotResponse, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookError, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponse, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookError, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponse, DeliverDatabaseWebhookResponses, DirectAccess, DocumentAiEdited, DocumentAiEditFailed, DocumentAiEditFailedCode, DocumentAiEditRefused, DocumentAiEditRefusedCode, DocumentAiEditRequest, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTextContent, DocumentTopicEvent, DocumentUpdatedMetadata, DuplicateDatabaseData, DuplicateDatabaseError, DuplicateDatabaseErrors, DuplicateDatabaseRequest, DuplicateDatabaseResponse, DuplicateDatabaseResponses, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditDocumentWithAiData, EditDocumentWithAiError, EditDocumentWithAiErrors, EditDocumentWithAiResponse, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseError, EditMyFormResponseErrors, EditMyFormResponseResponse, EditMyFormResponseResponses, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmailReminderPage, EmailReminderSummary, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponse, EnsureStarterHandlerResponses, EntityFilters, EntityKind, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityRef, EntityReference, EntityType, ErrorResponse, EventIcsData, EventIcsErrors, EventIcsResponse, EventIcsResponses, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, ExternalChatAdd, ExternalChatAddData, ExternalChatAdded, ExternalChatAddResponse, ExternalChatAddResponses, ExternalChatAttachment, ExternalChatAttachmentState, ExternalChatBackfill, ExternalChatBackfillState, ExternalChatCall, ExternalChatCallOutcome, ExternalChatCapabilities, ExternalChatCommunity, ExternalChatContactCard, ExternalChatContacts, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponse, ExternalChatDeliveryResponses, ExternalChatDeliveryState, ExternalChatDetail, ExternalChatEvent, ExternalChatKind, ExternalChatLocation, ExternalChatMediaKind, ExternalChatMediaPresentation, ExternalChatMembers, ExternalChatMention, ExternalChatMessage, ExternalChatMessageAttachments, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponse, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageKind, ExternalChatMessageResponse, ExternalChatMessageResponses, ExternalChatMessages, ExternalChatMessagesData, ExternalChatMessagesResponse, ExternalChatMessagesResponses, ExternalChatMutation, ExternalChatParticipant, ExternalChatPermissionsData, ExternalChatPermissionsResponse, ExternalChatPermissionsResponses, ExternalChatPersonRef, ExternalChatPoll, ExternalChatPollOption, ExternalChatProvider, ExternalChatReaction, ExternalChatReadData, ExternalChatReadResponse, ExternalChatReadResponses, ExternalChatReference, ExternalChatRemoveData, ExternalChatRemoveResponse, ExternalChatRemoveResponses, ExternalChatReplyBlock, ExternalChatReplyContent, ExternalChatResponse, ExternalChatResponses, ExternalChatRichContent, ExternalChatsData, ExternalChatSendData, ExternalChatSender, ExternalChatSendErrors, ExternalChatSendProgress, ExternalChatSendReply, ExternalChatSendResponse, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponse, ExternalChatSendsResponses, ExternalChatsResponse, ExternalChatsResponses, ExternalChatSummary, ExternalChatSystemAction, ExternalChatSystemLine, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponse, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadedAttachment, ExternalChatUploadRequest, ExternalChatUploadResponse, ExternalChatUploadResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormBranding, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetAccountManagerGrantData, GetAccountManagerGrantError, GetAccountManagerGrantErrors, GetAccountManagerGrantResponse, GetAccountManagerGrantResponses, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotData, GetBotError, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetBotResponse, GetBotResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAccessRequestData, GetChannelAccessRequestError, GetChannelAccessRequestErrors, GetChannelAccessRequestResponse, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponse, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponse, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponse, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponse, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponse, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseError, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsError, GetDatabasePermissionsErrors, GetDatabasePermissionsResponse, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryError, GetDatabaseQueryErrors, GetDatabaseQueryResponse, GetDatabaseQueryResponses, GetDatabaseResponse, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryError, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponse, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesError, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponse, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsError, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponse, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponse, GetDocumentTextContentResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetFormData, GetFormError, GetFormErrors, GetFormPermissionsData, GetFormPermissionsError, GetFormPermissionsErrors, GetFormPermissionsResponse, GetFormPermissionsResponses, GetFormResponse, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryError, GetFormResponseSummaryErrors, GetFormResponseSummaryResponse, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyError, GetFormTallyErrors, GetFormTallyResponse, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesError, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchError, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponse, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponse, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestError, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsError, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponse, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponse, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksError, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponse, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestError, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponse, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseError, GetMyFormResponseErrors, GetMyFormResponseResponse, GetMyFormResponseResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionError, GetSkillDescriptionErrors, GetSkillDescriptionResponse, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponse, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubLabelFacet, GithubPullRequest, GithubPullRequestChangesPatchResponse, GithubPullRequestChangesResponse, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestFacets, GithubPullRequestLabel, GithubPullRequestReview, GithubPullRequestReviewDecision, GithubPullRequestReviewState, GithubPullRequestsResponse, GithubPullRequestTasks, GithubPullRequestTasksRequest, GithubPullRequestTasksResponse, GithubPullRequestUser, GithubRepositoryFacet, GithubUserFacet, GitRefDto, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponse, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponse, GuestCallChatReadResponses, GuestChatMessage, GuestChatPage, GuestChatPost, GuestId, GuestJoinRequest, GuestPolicy, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportCounters, ImportDatabaseTableData, ImportDatabaseTableError, ImportDatabaseTableErrors, ImportDatabaseTableResponse, ImportDatabaseTableResponses, ImportedAuthor, ImportError, ImportLimits, ImportPage, ImportProgress, ImportTable, ImportWarning, InferColumnTypeOutcome, InferColumnTypeRequest, InferDatabaseColumnTypeData, InferDatabaseColumnTypeError, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponse, InferDatabaseColumnTypeResponses, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InvalidDatabaseWebhookPayloadResponse, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobId, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JobStatus, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, KeySegment, Lane, LaneKey, LatestMessage, LayoutProblem, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAccessibleFormsData, ListAccessibleFormsError, ListAccessibleFormsErrors, ListAccessibleFormsResponse, ListAccessibleFormsResponses, ListAccountManagersData, ListAccountManagersError, ListAccountManagersErrors, ListAccountManagersResponse, ListAccountManagersResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListBotsData, ListBotsError, ListBotsErrors, ListBotsResponse, ListBotsResponses, ListBotTokensData, ListBotTokensError, ListBotTokensErrors, ListBotTokensResponse, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsError, ListChannelBotsErrors, ListChannelBotsResponse, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsError, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponse, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponse, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsError, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponse, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesError, ListDatabasesErrors, ListDatabasesResponse, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksError, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponse, ListDatabaseWebhooksResponse2, ListDatabaseWebhooksResponses, ListedDatabase, ListedForm, ListEmailRemindersData, ListEmailRemindersError, ListEmailRemindersErrors, ListEmailRemindersResponse, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListFormsData, ListFormsError, ListFormsErrors, ListFormsResponse, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsError, ListJoinRequestsErrors, ListJoinRequestsResponse, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponse, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponse, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, MarkRead, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageKind, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponse, MessageTimelineEntriesResponses, MessageTimelineEntry, MessageTimelinePage, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, MyResponse, NewAttachment, NewColumn, NewOption, NewThreadAnchor, NewView, NotificationFilters, NotificationState, NumberOperator, OpBatch, Operator, OpRefusalResponse, OpResult, OptionId, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotData, PatchBotError, PatchBotErrors, PatchBotRequest, PatchBotResponse, PatchBotResponses, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchHarnessData, PatchHarnessError, PatchHarnessErrors, PatchHarnessRequest, PatchHarnessResponse, PatchHarnessResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, Pipeline, PipelineRecordType, PipelineSharing, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresenceOperator, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyBucketing, PropertyDateFilterRange, PropertyDateRange, PropertyDateRanges, PropertyDefinition, PropertyDefinitionWithOptions, PropertyFilter, PropertyInput, PropertyOption, PropertyOptionValue, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutError, PutFormLayoutErrors, PutFormLayoutResponse, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponse, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesError, QueryDatabasesErrors, QueryDatabasesResponse, QueryDatabasesResponses, QueryDefinition, QuestionLayout, QuestionOption, QuestionTally, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponse, RegisterSlackImportUploadsResponses, RegisterUploads, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponse, RenameCrmPipelineResponses, RenamePipeline, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestAccess, RequestAccountManagerBody, RequestAccountManagerData, RequestAccountManagerError, RequestAccountManagerErrors, RequestAccountManagerResponse, RequestAccountManagerResponses, RequestChannelAccessData, RequestChannelAccessError, RequestChannelAccessErrors, RequestChannelAccessResponse, RequestChannelAccessResponses, RequestedLayout, RequestStatus, RequestToJoinData, RequestToJoinError, RequestToJoinErrors, RequestToJoinResponse, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelAccessRequest, ResolveChannelAccessRequestData, ResolveChannelAccessRequestError, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponse, ResolveChannelAccessRequestResponses, ResolveRequest, RespondToAccountManagerRequestBody, RespondToAccountManagerRequestData, RespondToAccountManagerRequestError, RespondToAccountManagerRequestErrors, RespondToAccountManagerRequestResponse, RespondToAccountManagerRequestResponses, ResponseStatus, ResponseSummary, ResultColumn, ResultSet, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RevokeAccountManagerGrantData, RevokeAccountManagerGrantError, RevokeAccountManagerGrantErrors, RevokeAccountManagerGrantResponse, RevokeAccountManagerGrantResponses, RevokeBotTokenData, RevokeBotTokenError, RevokeBotTokenErrors, RevokeBotTokenResponse, RevokeBotTokenResponses, RingStatus, RingStatusResponse, RowChange, RowChangeKind, RowChanges, RowHistoryEntry, RowHistoryResponse, RowId, RowsChange, RowsResult, S3ObjectInfo, SaveBomPart, SaveDatabaseQueryData, SaveDatabaseQueryError, SaveDatabaseQueryErrors, SaveDatabaseQueryResponse, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SavedQuery, SaveQueryRequest, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SearchState, SectionCount, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionSource, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponse, SetCrmPipelineStageRequirementResponses, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, SetSkillDescriptionData, SetSkillDescriptionError, SetSkillDescriptionErrors, SetSkillDescriptionRequest, SetSkillDescriptionResponse, SetSkillDescriptionResponses, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, SharedExternalChatReference, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SkillDescriptionBody, SkippedCell, SlackCompleteRequest, SlackCreateRequest, SlackRegisterRequest, SlackTimestamp, SlackUserId, SmartTagChannelMatch, SmartTagPreview, SortDirection, SortKey, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmContactSoupPropertiesField, SoupCrmDomain, SoupDatabaseRowSoupPropertiesField, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, SourceBinding, SourceId, SourceIdentity, SqlCell, SqlEntityKind, SqlOutcome, SqlOutcomeKind, SqlSelectOption, SqlStatement, StageRequirement, StarterDatabase, StarterDocumentsResponse, StorageRow, StorageRows, StorageRowsQuery, StoredGithubPullRequest, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, Submission, SubmissionOutcome, SubmitFormResponseData, SubmitFormResponseError, SubmitFormResponseErrors, SubmitFormResponseResponse, SubmitFormResponseResponses, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, Table, TableChange, TableChanged, TableChanges, TableDetail, TableId, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, TaskSimilarityResult, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerError, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponse, TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchRequest, TaskSimilaritySearchResponse, TeamCalendarContent, TeamCalendarCoverage, TeamCalendarDetails, TeamCalendarItem, TeamCalendarMember, TeamCalendarPage, TeamCalendarSharing, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, TextOperator, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, TimelineActivity, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TouchedColumn, TouchedRow, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TrashCrmPipelineData, TrashCrmPipelineResponse, TrashCrmPipelineResponses, TrashPipeline, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnblockCrmDomainData, UnblockCrmDomainError, UnblockCrmDomainErrors, UnblockCrmDomainResponse, UnblockCrmDomainResponses, UndoChangeResponse, UndoDatabaseChangeData, UndoDatabaseChangeError, UndoDatabaseChangeErrors, UndoDatabaseChangeResponse, UndoDatabaseChangeResponses, UndoOutcome, UndoRefusal, UnlockedBooking, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponse, UpdateCrmPipelinePermissionsResponses, UpdateCrmTeamSettingsRequest, UpdateDatabasePermissionsData, UpdateDatabasePermissionsError, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponse, UpdateDatabasePermissionsResponses, UpdateForm, UpdateFormData, UpdateFormError, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsError, UpdateFormPermissionsErrors, UpdateFormPermissionsResponse, UpdateFormPermissionsResponses, UpdateFormResponse, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDescriptor, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFileData, UploadFileError, UploadFileErrors, UploadFileResponse, UploadFileResponse2, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UploadGrant, UploadId, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, VersionedTable, View, ViewChange, ViewColumn, ViewerCapabilities, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WhatsAppAccount, WhatsappAccountData, WhatsappAccountResponse, WhatsappAccountResponses, WhatsAppAccountState, WhatsAppAccountView, WhatsappCancelPairingData, WhatsappCancelPairingResponse, WhatsappCancelPairingResponses, WhatsAppCannotAdd, WhatsAppChat, WhatsAppChats, WhatsappChatsData, WhatsappChatsResponse, WhatsappChatsResponses, WhatsAppConnect, WhatsappConnectData, WhatsappConnectResponse, WhatsappConnectResponses, WhatsAppDisconnect, WhatsappDisconnectData, WhatsAppDisconnectRequest, WhatsappDisconnectResponse, WhatsappDisconnectResponses, WhatsAppHistoryImport, WhatsappImportHistoryData, WhatsappImportHistoryResponse, WhatsappImportHistoryResponses, WhatsAppLookup, WhatsappLookupData, WhatsAppLookupRequest, WhatsappLookupResponse, WhatsappLookupResponses, WhatsAppLookupState, WhatsAppPairing, WhatsappPairingData, WhatsappPairingResponse, WhatsappPairingResponses, WhatsAppPairingState, WhatsAppPairState, WhatsappPasskeyData, WhatsappPasskeyResponse, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponse, WhatsappStartLookupResponses, Widget, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
+export type { AccentColor, AccessiblePipeline, AccessLevel, AccessRequest, AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponse, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponse, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponse, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponse, AccessRequestsSubmitResponses, AccessRequestState, AccountManagerDecision, AccountManagerGrant, AccountManagerGrantStatus, AccountManagerRole, AccountManagersList, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddChannelBotData, AddChannelBotError, AddChannelBotErrors, AddChannelBotRequest, AddChannelBotResponse, AddChannelBotResponses, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionArchiveCause, AgentSessionFilters, AgentSessionLifecycleEvent, AgentSessionSource, AgentSessionVisibility, AgentTyping, AgentTypingPhase, AiAdmissionErrorBody, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentCommentReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, AppliedOps, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponse, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsError, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponse, ApplyDatabaseOpsResponses, ApplyOpsRequest, ApplyOpsResponse, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AttachmentChange, AttendeeResponseStatus, Audience, Awareness, AwarenessRelay, BasicDocument, BasicDocumentSubType, BlockCrmDomainData, BlockCrmDomainError, BlockCrmDomainErrors, BlockCrmDomainResponse, BlockCrmDomainResponses, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarJoinRequest, CalendarJoinRequestApiError, CalendarJoinRequestErrorCode, CalendarJoinRequestsResponse, CalendarJoinRequestStatus, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarMentionViewerCopy, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallDiscussion, CallEntryStatus, CallFilters, CallNotificationEvent, CallNotificationMetadata, CallProvider, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordSource, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestError, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelAccessDecision, ChannelAccessRequest, ChannelAccessRequestedMetadata, ChannelAccessRequestState, ChannelAccessRequestStatus, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelScopeSelection, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimAccountManagerTokenData, ClaimAccountManagerTokenError, ClaimAccountManagerTokenErrors, ClaimAccountManagerTokenResponse, ClaimAccountManagerTokenResponses, ClaimedAccountManagerToken, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, ColumnId, ColumnKind, ColumnProtection, ColumnResult, CommandFailure, CommandRejectedMetadata, CommittedChange, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponse, CompleteSlackImportUploadsResponses, CompleteUploads, ConferenceProvider, Conjunction, ConversationId, ConversationKind, ConversationMetadata, ConversationProgress, ConversationSeal, ConversationStatus, ConvertDatabaseColumnData, ConvertDatabaseColumnError, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponse, ConvertDatabaseColumnResponses, ConvertedCell, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotData, CreateBotError, CreateBotErrors, CreateBotRequest, CreateBotResponse, CreateBotResponses, CreateBotTokenData, CreateBotTokenError, CreateBotTokenErrors, CreateBotTokenRequest, CreateBotTokenResponse, CreateBotTokenResponse2, CreateBotTokenResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateCanvasDocumentRequest, CreateCanvasDocumentResponse, CreateCanvasHandlerData, CreateCanvasHandlerError, CreateCanvasHandlerErrors, CreateCanvasHandlerResponse, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponse, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactError, CreateCrmTeamContactErrors, CreateCrmTeamContactRequest, CreateCrmTeamContactResponse, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseError, CreateDatabaseErrors, CreateDatabaseRequest, CreateDatabaseResponse, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookError, CreateDatabaseWebhookErrors, CreateDatabaseWebhookRequest, CreateDatabaseWebhookResponse, CreateDatabaseWebhookResponses, CreatedDatabaseWebhookResponse, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateForm, CreateFormData, CreateFormError, CreateFormErrors, CreateFormResponse, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateImport, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreatePipeline, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponse, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateToken, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmAssociation, CrmBlockedDomainResponse, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseId, DatabaseOp, DatabaseQueryRequest, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DateRange, DateRangeOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteBotData, DeleteBotError, DeleteBotErrors, DeleteBotResponse, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookError, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponse, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookError, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponse, DeliverDatabaseWebhookResponses, DirectAccess, DocumentAiEdited, DocumentAiEditFailed, DocumentAiEditFailedCode, DocumentAiEditRefused, DocumentAiEditRefusedCode, DocumentAiEditRequest, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTextContent, DocumentTopicEvent, DocumentUpdatedMetadata, DuplicateDatabaseData, DuplicateDatabaseError, DuplicateDatabaseErrors, DuplicateDatabaseRequest, DuplicateDatabaseResponse, DuplicateDatabaseResponses, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditDocumentWithAiData, EditDocumentWithAiError, EditDocumentWithAiErrors, EditDocumentWithAiResponse, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseError, EditMyFormResponseErrors, EditMyFormResponseResponse, EditMyFormResponseResponses, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmailReminderPage, EmailReminderSummary, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponse, EnsureStarterHandlerResponses, EntityFilters, EntityKind, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityRef, EntityReference, EntityType, ErrorResponse, EventIcsData, EventIcsErrors, EventIcsResponse, EventIcsResponses, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, ExternalChatAdd, ExternalChatAddData, ExternalChatAdded, ExternalChatAddResponse, ExternalChatAddResponses, ExternalChatAttachment, ExternalChatAttachmentState, ExternalChatBackfill, ExternalChatBackfillState, ExternalChatCall, ExternalChatCallOutcome, ExternalChatCapabilities, ExternalChatCommunity, ExternalChatContactCard, ExternalChatContacts, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponse, ExternalChatDeliveryResponses, ExternalChatDeliveryState, ExternalChatDetail, ExternalChatEvent, ExternalChatKind, ExternalChatLocation, ExternalChatMediaKind, ExternalChatMediaPresentation, ExternalChatMembers, ExternalChatMention, ExternalChatMessage, ExternalChatMessageAttachments, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponse, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageKind, ExternalChatMessageResponse, ExternalChatMessageResponses, ExternalChatMessages, ExternalChatMessagesData, ExternalChatMessagesResponse, ExternalChatMessagesResponses, ExternalChatMutation, ExternalChatParticipant, ExternalChatPermissionsData, ExternalChatPermissionsResponse, ExternalChatPermissionsResponses, ExternalChatPersonRef, ExternalChatPoll, ExternalChatPollOption, ExternalChatProvider, ExternalChatReaction, ExternalChatReadData, ExternalChatReadResponse, ExternalChatReadResponses, ExternalChatReference, ExternalChatRemoveData, ExternalChatRemoveResponse, ExternalChatRemoveResponses, ExternalChatReplyBlock, ExternalChatReplyContent, ExternalChatResponse, ExternalChatResponses, ExternalChatRichContent, ExternalChatsData, ExternalChatSendData, ExternalChatSender, ExternalChatSendErrors, ExternalChatSendProgress, ExternalChatSendReply, ExternalChatSendResponse, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponse, ExternalChatSendsResponses, ExternalChatsResponse, ExternalChatsResponses, ExternalChatSummary, ExternalChatSystemAction, ExternalChatSystemLine, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponse, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadedAttachment, ExternalChatUploadRequest, ExternalChatUploadResponse, ExternalChatUploadResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormBranding, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetAccountManagerGrantData, GetAccountManagerGrantError, GetAccountManagerGrantErrors, GetAccountManagerGrantResponse, GetAccountManagerGrantResponses, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotData, GetBotError, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetBotResponse, GetBotResponses, GetCallParticipantsData, GetCallParticipantsErrors, GetCallParticipantsResponse, GetCallParticipantsResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordingData, GetCallRecordingError, GetCallRecordingErrors, GetCallRecordingResponse, GetCallRecordingResponses, GetCallRecordResponse, GetCallRecordResponses, GetCallRingStateData, GetCallRingStateResponse, GetCallRingStateResponses, GetChannelAccessRequestData, GetChannelAccessRequestError, GetChannelAccessRequestErrors, GetChannelAccessRequestResponse, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponse, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponse, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponse, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponse, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponse, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseError, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsError, GetDatabasePermissionsErrors, GetDatabasePermissionsResponse, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryError, GetDatabaseQueryErrors, GetDatabaseQueryResponse, GetDatabaseQueryResponses, GetDatabaseResponse, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryError, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponse, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesError, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponse, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsError, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponse, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponse, GetDocumentTextContentResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetFormData, GetFormError, GetFormErrors, GetFormPermissionsData, GetFormPermissionsError, GetFormPermissionsErrors, GetFormPermissionsResponse, GetFormPermissionsResponses, GetFormResponse, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryError, GetFormResponseSummaryErrors, GetFormResponseSummaryResponse, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyError, GetFormTallyErrors, GetFormTallyResponse, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesError, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchError, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponse, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponse, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestError, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsError, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponse, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponse, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksError, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponse, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLiveCallsData, GetLiveCallsResponse, GetLiveCallsResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestError, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponse, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseError, GetMyFormResponseErrors, GetMyFormResponseResponse, GetMyFormResponseResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionError, GetSkillDescriptionErrors, GetSkillDescriptionResponse, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponse, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubLabelFacet, GithubPullRequest, GithubPullRequestChangesPatchResponse, GithubPullRequestChangesResponse, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestFacets, GithubPullRequestLabel, GithubPullRequestReview, GithubPullRequestReviewDecision, GithubPullRequestReviewState, GithubPullRequestsResponse, GithubPullRequestTasks, GithubPullRequestTasksRequest, GithubPullRequestTasksResponse, GithubPullRequestUser, GithubRepositoryFacet, GithubUserFacet, GitRefDto, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponse, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponse, GuestCallChatReadResponses, GuestChatMessage, GuestChatPage, GuestChatPost, GuestId, GuestJoinRequest, GuestPolicy, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportCounters, ImportDatabaseTableData, ImportDatabaseTableError, ImportDatabaseTableErrors, ImportDatabaseTableResponse, ImportDatabaseTableResponses, ImportedAuthor, ImportError, ImportLimits, ImportPage, ImportProgress, ImportTable, ImportWarning, InferColumnTypeOutcome, InferColumnTypeRequest, InferDatabaseColumnTypeData, InferDatabaseColumnTypeError, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponse, InferDatabaseColumnTypeResponses, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InvalidDatabaseWebhookPayloadResponse, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobId, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JobStatus, JoinCallData, JoinCallError, JoinCallErrors, JoinCallRequest, JoinCallResponse, JoinCallResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, KeySegment, Lane, LaneKey, LatestMessage, LayoutProblem, LeaveCallData, LeaveCallError, LeaveCallErrors, LeaveCallResponse, LeaveCallResponse2, LeaveCallResponses, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAccessibleFormsData, ListAccessibleFormsError, ListAccessibleFormsErrors, ListAccessibleFormsResponse, ListAccessibleFormsResponses, ListAccountManagersData, ListAccountManagersError, ListAccountManagersErrors, ListAccountManagersResponse, ListAccountManagersResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListBotsData, ListBotsError, ListBotsErrors, ListBotsResponse, ListBotsResponses, ListBotTokensData, ListBotTokensError, ListBotTokensErrors, ListBotTokensResponse, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsError, ListChannelBotsErrors, ListChannelBotsResponse, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsError, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponse, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponse, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsError, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponse, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesError, ListDatabasesErrors, ListDatabasesResponse, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksError, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponse, ListDatabaseWebhooksResponse2, ListDatabaseWebhooksResponses, ListedDatabase, ListedForm, ListEmailRemindersData, ListEmailRemindersError, ListEmailRemindersErrors, ListEmailRemindersResponse, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListFormsData, ListFormsError, ListFormsErrors, ListFormsResponse, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsError, ListJoinRequestsErrors, ListJoinRequestsResponse, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponse, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponse, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LiveCallKind, LiveCallParticipant, LiveCallParticipantsResponse, LiveCallsResponse, LiveCallSummary, LiveCallTrack, LiveParticipantKind, LiveTrackSource, LocationResponseData, LocationResponseV3, MacroUserIdStr, MarkRead, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageKind, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponse, MessageTimelineEntriesResponses, MessageTimelineEntry, MessageTimelinePage, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, MyResponse, NewAttachment, NewColumn, NewOption, NewThreadAnchor, NewView, NotificationFilters, NotificationState, NumberOperator, OnOtherCall, OpBatch, Operator, OpRefusalResponse, OpResult, OptionId, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotData, PatchBotError, PatchBotErrors, PatchBotRequest, PatchBotResponse, PatchBotResponses, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchHarnessData, PatchHarnessError, PatchHarnessErrors, PatchHarnessRequest, PatchHarnessResponse, PatchHarnessResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, Pipeline, PipelineRecordType, PipelineSharing, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresenceOperator, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyBucketing, PropertyDateFilterRange, PropertyDateRange, PropertyDateRanges, PropertyDefinition, PropertyDefinitionWithOptions, PropertyFilter, PropertyInput, PropertyOption, PropertyOptionValue, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutError, PutFormLayoutErrors, PutFormLayoutResponse, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponse, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesError, QueryDatabasesErrors, QueryDatabasesResponse, QueryDatabasesResponses, QueryDefinition, QuestionLayout, QuestionOption, QuestionTally, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RecordingBytes, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponse, RegisterSlackImportUploadsResponses, RegisterUploads, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponse, RenameCrmPipelineResponses, RenamePipeline, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestAccess, RequestAccountManagerBody, RequestAccountManagerData, RequestAccountManagerError, RequestAccountManagerErrors, RequestAccountManagerResponse, RequestAccountManagerResponses, RequestChannelAccessData, RequestChannelAccessError, RequestChannelAccessErrors, RequestChannelAccessResponse, RequestChannelAccessResponses, RequestedLayout, RequestStatus, RequestToJoinData, RequestToJoinError, RequestToJoinErrors, RequestToJoinResponse, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelAccessRequest, ResolveChannelAccessRequestData, ResolveChannelAccessRequestError, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponse, ResolveChannelAccessRequestResponses, ResolveRequest, RespondToAccountManagerRequestBody, RespondToAccountManagerRequestData, RespondToAccountManagerRequestError, RespondToAccountManagerRequestErrors, RespondToAccountManagerRequestResponse, RespondToAccountManagerRequestResponses, ResponseStatus, ResponseSummary, ResultColumn, ResultSet, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RevokeAccountManagerGrantData, RevokeAccountManagerGrantError, RevokeAccountManagerGrantErrors, RevokeAccountManagerGrantResponse, RevokeAccountManagerGrantResponses, RevokeBotTokenData, RevokeBotTokenError, RevokeBotTokenErrors, RevokeBotTokenResponse, RevokeBotTokenResponses, RingStatus, RingStatusResponse, RowChange, RowChangeKind, RowChanges, RowHistoryEntry, RowHistoryResponse, RowId, RowsChange, RowsResult, S3ObjectInfo, SaveBomPart, SaveDatabaseQueryData, SaveDatabaseQueryError, SaveDatabaseQueryErrors, SaveDatabaseQueryResponse, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SavedQuery, SaveQueryRequest, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SearchState, SectionCount, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionSource, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponse, SetCrmPipelineStageRequirementResponses, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, SetSkillDescriptionData, SetSkillDescriptionError, SetSkillDescriptionErrors, SetSkillDescriptionRequest, SetSkillDescriptionResponse, SetSkillDescriptionResponses, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, SharedExternalChatReference, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SkillDescriptionBody, SkippedCell, SlackCompleteRequest, SlackCreateRequest, SlackRegisterRequest, SlackTimestamp, SlackUserId, SmartTagChannelMatch, SmartTagPreview, SortDirection, SortKey, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmContactSoupPropertiesField, SoupCrmDomain, SoupDatabaseRowSoupPropertiesField, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, SourceBinding, SourceId, SourceIdentity, SqlCell, SqlEntityKind, SqlOutcome, SqlOutcomeKind, SqlSelectOption, SqlStatement, StageRequirement, StartCallData, StartCallError, StartCallErrors, StartCallResponse, StartCallResponses, StarterDatabase, StarterDocumentsResponse, StorageRow, StorageRows, StorageRowsQuery, StoredGithubPullRequest, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, Submission, SubmissionOutcome, SubmitFormResponseData, SubmitFormResponseError, SubmitFormResponseErrors, SubmitFormResponseResponse, SubmitFormResponseResponses, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, Table, TableChange, TableChanged, TableChanges, TableDetail, TableId, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, TaskSimilarityResult, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerError, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponse, TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchRequest, TaskSimilaritySearchResponse, TeamCalendarContent, TeamCalendarCoverage, TeamCalendarDetails, TeamCalendarItem, TeamCalendarMember, TeamCalendarPage, TeamCalendarSharing, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, TextOperator, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, TimelineActivity, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TouchedColumn, TouchedRow, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TrashCrmPipelineData, TrashCrmPipelineResponse, TrashCrmPipelineResponses, TrashPipeline, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnblockCrmDomainData, UnblockCrmDomainError, UnblockCrmDomainErrors, UnblockCrmDomainResponse, UnblockCrmDomainResponses, UndoChangeResponse, UndoDatabaseChangeData, UndoDatabaseChangeError, UndoDatabaseChangeErrors, UndoDatabaseChangeResponse, UndoDatabaseChangeResponses, UndoOutcome, UndoRefusal, UnlockedBooking, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponse, UpdateCrmPipelinePermissionsResponses, UpdateCrmTeamSettingsRequest, UpdateDatabasePermissionsData, UpdateDatabasePermissionsError, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponse, UpdateDatabasePermissionsResponses, UpdateForm, UpdateFormData, UpdateFormError, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsError, UpdateFormPermissionsErrors, UpdateFormPermissionsResponse, UpdateFormPermissionsResponses, UpdateFormResponse, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDescriptor, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFileData, UploadFileError, UploadFileErrors, UploadFileResponse, UploadFileResponse2, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UploadGrant, UploadId, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, VersionedTable, View, ViewChange, ViewColumn, ViewerCapabilities, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WhatsAppAccount, WhatsappAccountData, WhatsappAccountResponse, WhatsappAccountResponses, WhatsAppAccountState, WhatsAppAccountView, WhatsappCancelPairingData, WhatsappCancelPairingResponse, WhatsappCancelPairingResponses, WhatsAppCannotAdd, WhatsAppChat, WhatsAppChats, WhatsappChatsData, WhatsappChatsResponse, WhatsappChatsResponses, WhatsAppConnect, WhatsappConnectData, WhatsappConnectResponse, WhatsappConnectResponses, WhatsAppDisconnect, WhatsappDisconnectData, WhatsAppDisconnectRequest, WhatsappDisconnectResponse, WhatsappDisconnectResponses, WhatsAppHistoryImport, WhatsappImportHistoryData, WhatsappImportHistoryResponse, WhatsappImportHistoryResponses, WhatsAppLookup, WhatsappLookupData, WhatsAppLookupRequest, WhatsappLookupResponse, WhatsappLookupResponses, WhatsAppLookupState, WhatsAppPairing, WhatsappPairingData, WhatsappPairingResponse, WhatsappPairingResponses, WhatsAppPairingState, WhatsAppPairState, WhatsappPasskeyData, WhatsappPasskeyResponse, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponse, WhatsappStartLookupResponses, Widget, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
diff --git a/packages/sdk/generated/storage/sdk.gen.ts b/packages/sdk/generated/storage/sdk.gen.ts
index 550db9e0e2..4cad53ced0 100644
--- a/packages/sdk/generated/storage/sdk.gen.ts
+++ b/packages/sdk/generated/storage/sdk.gen.ts
@@ -2,7 +2,7 @@
import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type ServerSentEventsResult, type TDataShape } from './client';
import { client } from './client.gen';
-import type { AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponses, AddChannelBotData, AddChannelBotErrors, AddChannelBotResponses, AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, BlockCrmDomainData, BlockCrmDomainErrors, BlockCrmDomainResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimAccountManagerTokenData, ClaimAccountManagerTokenErrors, ClaimAccountManagerTokenResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CollaborateFormData, CollaborateFormErrors, CollaborateFormResponses, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponses, ConvertDatabaseColumnData, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateBotData, CreateBotErrors, CreateBotResponses, CreateBotTokenData, CreateBotTokenErrors, CreateBotTokenResponses, CreateCanvasHandlerData, CreateCanvasHandlerErrors, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactErrors, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseErrors, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookErrors, CreateDatabaseWebhookResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateFormData, CreateFormErrors, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingErrors, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeErrors, CreateInitiativeResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateSkillHandlerData, CreateSkillHandlerErrors, CreateSkillHandlerResponses, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeclineCallData, DeclineCallErrors, DeclineCallResponses, DeclineRingData, DeclineRingErrors, DeclineRingResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteBotData, DeleteBotErrors, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelErrors, DeleteChannelLabelResponses, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessErrors, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeErrors, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessErrors, DeleteSelfHarnessResponses, DeleteUserApiKeyData, DeleteUserApiKeyErrors, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponses, DuplicateDatabaseData, DuplicateDatabaseErrors, DuplicateDatabaseResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditDocumentWithAiData, EditDocumentWithAiErrors, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseErrors, EditMyFormResponseResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, EnsureCollabSurfaceData, EnsureCollabSurfaceErrors, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponses, EntityMessageCreateData, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponses, EventIcsData, EventIcsErrors, EventIcsResponses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, ExternalChatAddData, ExternalChatAddResponses, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponses, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageResponses, ExternalChatMessagesData, ExternalChatMessagesResponses, ExternalChatPermissionsData, ExternalChatPermissionsResponses, ExternalChatReadData, ExternalChatReadResponses, ExternalChatRemoveData, ExternalChatRemoveResponses, ExternalChatResponses, ExternalChatsData, ExternalChatSendData, ExternalChatSendErrors, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponses, ExternalChatsResponses, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadResponses, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponses, GetAccountManagerGrantData, GetAccountManagerGrantErrors, GetAccountManagerGrantResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotData, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetBotResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, GetChannelAccessRequestData, GetChannelAccessRequestErrors, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceErrors, GetCollabSurfaceResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactByEmailData, GetContactByEmailErrors, GetContactByEmailResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsErrors, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryErrors, GetDatabaseQueryResponses, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupErrors, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetFormData, GetFormErrors, GetFormPermissionsData, GetFormPermissionsErrors, GetFormPermissionsResponses, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryErrors, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyErrors, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingErrors, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeErrors, GetInitiativeResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseErrors, GetMyFormResponseResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetSelfBotData, GetSelfBotErrors, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessErrors, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionErrors, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, ImportDatabaseTableData, ImportDatabaseTableErrors, ImportDatabaseTableResponses, InferDatabaseColumnTypeData, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, InstallSyncErrors, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListAccessibleFormsData, ListAccessibleFormsErrors, ListAccessibleFormsResponses, ListAccountManagersData, ListAccountManagersErrors, ListAccountManagersResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListBotsData, ListBotsErrors, ListBotsResponses, ListBotTokensData, ListBotTokensErrors, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsErrors, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesErrors, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponses, ListEmailRemindersData, ListEmailRemindersErrors, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListFormsData, ListFormsErrors, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsErrors, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesErrors, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsErrors, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesErrors, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsErrors, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, MeetingCancelData, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationErrors, MeetingCancelPreparationResponses, MeetingCancelResponses, MeetingCreateData, MeetingCreateErrors, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinErrors, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteErrors, MeetingInvitePermissionsData, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponses, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersErrors, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinErrors, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveErrors, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveErrors, MeetingListActiveResponses, MeetingListData, MeetingListErrors, MeetingListResponses, MeetingLookupData, MeetingLookupErrors, MeetingLookupResponses, MeetingParticipantsData, MeetingParticipantsErrors, MeetingParticipantsResponses, MeetingPrepareData, MeetingPrepareErrors, MeetingPrepareResponses, MeetingShareData, MeetingShareErrors, MeetingShareResponses, MeetingUpdateData, MeetingUpdateErrors, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponses, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponses, MessageTimelineResponses, PatchBotData, PatchBotErrors, PatchBotResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchHarnessData, PatchHarnessErrors, PatchHarnessResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PreviewSmartTagData, PreviewSmartTagErrors, PreviewSmartTagResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesErrors, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutErrors, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesErrors, QueryDatabasesResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelErrors, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, RequestAccountManagerData, RequestAccountManagerErrors, RequestAccountManagerResponses, RequestChannelAccessData, RequestChannelAccessErrors, RequestChannelAccessResponses, RequestToJoinData, RequestToJoinErrors, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, ResolveChannelAccessRequestData, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponses, RespondToAccountManagerRequestData, RespondToAccountManagerRequestErrors, RespondToAccountManagerRequestResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, RevokeAccountManagerGrantData, RevokeAccountManagerGrantErrors, RevokeAccountManagerGrantResponses, RevokeBotTokenData, RevokeBotTokenErrors, RevokeBotTokenResponses, SaveDatabaseQueryData, SaveDatabaseQueryErrors, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SearchContactsData, SearchContactsErrors, SearchContactsResponses, SetChannelLabelData, SetChannelLabelErrors, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureErrors, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SetSkillDescriptionData, SetSkillDescriptionErrors, SetSkillDescriptionResponses, ShareCrmPipelineData, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, SubmitFormResponseData, SubmitFormResponseErrors, SubmitFormResponseResponses, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, TrashCrmPipelineData, TrashCrmPipelineResponses, UnblockCrmDomainData, UnblockCrmDomainErrors, UnblockCrmDomainResponses, UndoDatabaseChangeData, UndoDatabaseChangeErrors, UndoDatabaseChangeResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponses, UpdateDatabasePermissionsData, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponses, UpdateFormData, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsErrors, UpdateFormPermissionsResponses, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFileData, UploadFileErrors, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses, WhatsappAccountData, WhatsappAccountResponses, WhatsappCancelPairingData, WhatsappCancelPairingResponses, WhatsappChatsData, WhatsappChatsResponses, WhatsappConnectData, WhatsappConnectResponses, WhatsappDisconnectData, WhatsappDisconnectResponses, WhatsappImportHistoryData, WhatsappImportHistoryResponses, WhatsappLookupData, WhatsappLookupResponses, WhatsappPairingData, WhatsappPairingResponses, WhatsappPasskeyData, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponses } from './types.gen';
+import type { AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponses, AddChannelBotData, AddChannelBotErrors, AddChannelBotResponses, AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, BlockCrmDomainData, BlockCrmDomainErrors, BlockCrmDomainResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimAccountManagerTokenData, ClaimAccountManagerTokenErrors, ClaimAccountManagerTokenResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CollaborateFormData, CollaborateFormErrors, CollaborateFormResponses, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponses, ConvertDatabaseColumnData, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateBotData, CreateBotErrors, CreateBotResponses, CreateBotTokenData, CreateBotTokenErrors, CreateBotTokenResponses, CreateCanvasHandlerData, CreateCanvasHandlerErrors, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactErrors, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseErrors, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookErrors, CreateDatabaseWebhookResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateFormData, CreateFormErrors, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingErrors, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeErrors, CreateInitiativeResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateSkillHandlerData, CreateSkillHandlerErrors, CreateSkillHandlerResponses, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeclineCallData, DeclineCallErrors, DeclineCallResponses, DeclineRingData, DeclineRingErrors, DeclineRingResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteBotData, DeleteBotErrors, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelErrors, DeleteChannelLabelResponses, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessErrors, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeErrors, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessErrors, DeleteSelfHarnessResponses, DeleteUserApiKeyData, DeleteUserApiKeyErrors, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponses, DuplicateDatabaseData, DuplicateDatabaseErrors, DuplicateDatabaseResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditDocumentWithAiData, EditDocumentWithAiErrors, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseErrors, EditMyFormResponseResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, EnsureCollabSurfaceData, EnsureCollabSurfaceErrors, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponses, EntityMessageCreateData, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponses, EventIcsData, EventIcsErrors, EventIcsResponses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, ExternalChatAddData, ExternalChatAddResponses, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponses, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageResponses, ExternalChatMessagesData, ExternalChatMessagesResponses, ExternalChatPermissionsData, ExternalChatPermissionsResponses, ExternalChatReadData, ExternalChatReadResponses, ExternalChatRemoveData, ExternalChatRemoveResponses, ExternalChatResponses, ExternalChatsData, ExternalChatSendData, ExternalChatSendErrors, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponses, ExternalChatsResponses, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadResponses, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponses, GetAccountManagerGrantData, GetAccountManagerGrantErrors, GetAccountManagerGrantResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotData, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetBotResponses, GetCallParticipantsData, GetCallParticipantsErrors, GetCallParticipantsResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordingData, GetCallRecordingErrors, GetCallRecordingResponses, GetCallRecordResponses, GetCallRingStateData, GetCallRingStateResponses, GetChannelAccessRequestData, GetChannelAccessRequestErrors, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceErrors, GetCollabSurfaceResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactByEmailData, GetContactByEmailErrors, GetContactByEmailResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsErrors, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryErrors, GetDatabaseQueryResponses, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupErrors, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetFormData, GetFormErrors, GetFormPermissionsData, GetFormPermissionsErrors, GetFormPermissionsResponses, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryErrors, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyErrors, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingErrors, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeErrors, GetInitiativeResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLiveCallsData, GetLiveCallsResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseErrors, GetMyFormResponseResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetSelfBotData, GetSelfBotErrors, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessErrors, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionErrors, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, ImportDatabaseTableData, ImportDatabaseTableErrors, ImportDatabaseTableResponses, InferDatabaseColumnTypeData, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, InstallSyncErrors, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinCallData, JoinCallErrors, JoinCallResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveCallData, LeaveCallErrors, LeaveCallResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListAccessibleFormsData, ListAccessibleFormsErrors, ListAccessibleFormsResponses, ListAccountManagersData, ListAccountManagersErrors, ListAccountManagersResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListBotsData, ListBotsErrors, ListBotsResponses, ListBotTokensData, ListBotTokensErrors, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsErrors, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesErrors, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponses, ListEmailRemindersData, ListEmailRemindersErrors, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListFormsData, ListFormsErrors, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsErrors, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesErrors, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsErrors, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesErrors, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsErrors, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, MeetingCancelData, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationErrors, MeetingCancelPreparationResponses, MeetingCancelResponses, MeetingCreateData, MeetingCreateErrors, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinErrors, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteErrors, MeetingInvitePermissionsData, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponses, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersErrors, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinErrors, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveErrors, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveErrors, MeetingListActiveResponses, MeetingListData, MeetingListErrors, MeetingListResponses, MeetingLookupData, MeetingLookupErrors, MeetingLookupResponses, MeetingParticipantsData, MeetingParticipantsErrors, MeetingParticipantsResponses, MeetingPrepareData, MeetingPrepareErrors, MeetingPrepareResponses, MeetingShareData, MeetingShareErrors, MeetingShareResponses, MeetingUpdateData, MeetingUpdateErrors, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponses, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponses, MessageTimelineResponses, PatchBotData, PatchBotErrors, PatchBotResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchHarnessData, PatchHarnessErrors, PatchHarnessResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PreviewSmartTagData, PreviewSmartTagErrors, PreviewSmartTagResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesErrors, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutErrors, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesErrors, QueryDatabasesResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelErrors, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, RequestAccountManagerData, RequestAccountManagerErrors, RequestAccountManagerResponses, RequestChannelAccessData, RequestChannelAccessErrors, RequestChannelAccessResponses, RequestToJoinData, RequestToJoinErrors, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, ResolveChannelAccessRequestData, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponses, RespondToAccountManagerRequestData, RespondToAccountManagerRequestErrors, RespondToAccountManagerRequestResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, RevokeAccountManagerGrantData, RevokeAccountManagerGrantErrors, RevokeAccountManagerGrantResponses, RevokeBotTokenData, RevokeBotTokenErrors, RevokeBotTokenResponses, SaveDatabaseQueryData, SaveDatabaseQueryErrors, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SearchContactsData, SearchContactsErrors, SearchContactsResponses, SetChannelLabelData, SetChannelLabelErrors, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureErrors, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SetSkillDescriptionData, SetSkillDescriptionErrors, SetSkillDescriptionResponses, ShareCrmPipelineData, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StartCallData, StartCallErrors, StartCallResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, SubmitFormResponseData, SubmitFormResponseErrors, SubmitFormResponseResponses, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, TrashCrmPipelineData, TrashCrmPipelineResponses, UnblockCrmDomainData, UnblockCrmDomainErrors, UnblockCrmDomainResponses, UndoDatabaseChangeData, UndoDatabaseChangeErrors, UndoDatabaseChangeResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponses, UpdateDatabasePermissionsData, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponses, UpdateFormData, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsErrors, UpdateFormPermissionsResponses, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFileData, UploadFileErrors, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses, WhatsappAccountData, WhatsappAccountResponses, WhatsappCancelPairingData, WhatsappCancelPairingResponses, WhatsappChatsData, WhatsappChatsResponses, WhatsappConnectData, WhatsappConnectResponses, WhatsappDisconnectData, WhatsappDisconnectResponses, WhatsappImportHistoryData, WhatsappImportHistoryResponses, WhatsappLookupData, WhatsappLookupResponses, WhatsappPairingData, WhatsappPairingResponses, WhatsappPasskeyData, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponses } from './types.gen';
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
/**
@@ -379,6 +379,13 @@ export class Sdk extends HeyApiClient {
return (options?.client ?? this.client).get<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError>({ url: '/call/active', ...options });
}
+ /**
+ * List all channel and standalone calls this account can join.
+ */
+ public getLiveCalls<ThrowOnError extends boolean = false>(options?: Options<GetLiveCallsData, ThrowOnError>): RequestResult<GetLiveCallsResponses, unknown, ThrowOnError> {
+ return (options?.client ?? this.client).get<GetLiveCallsResponses, unknown, ThrowOnError>({ url: '/call/active/all', ...options });
+ }
+
/**
* Read the live call discussion as a verified guest.
*/
@@ -502,7 +509,14 @@ export class Sdk extends HeyApiClient {
* Handle `POST /call/meetings/join/{token}` through the call domain service.
*/
public meetingJoin<ThrowOnError extends boolean = false>(options: Options<MeetingJoinData, ThrowOnError>): RequestResult<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError> {
- return (options.client ?? this.client).post<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError>({ url: '/call/meetings/join/{token}', ...options });
+ return (options.client ?? this.client).post<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError>({
+ url: '/call/meetings/join/{token}',
+ ...options,
+ headers: {
+ 'Content-Type': 'application/json',
+ ...options.headers
+ }
+ });
}
/**
@@ -619,6 +633,27 @@ export class Sdk extends HeyApiClient {
return (options.client ?? this.client).post<DeclineCallResponses, DeclineCallErrors, ThrowOnError>({ url: '/call/record/{call_id}/decline', ...options });
}
+ /**
+ * Join a live call by its session id.
+ */
+ public joinCall<ThrowOnError extends boolean = false>(options: Options<JoinCallData, ThrowOnError>): RequestResult<JoinCallResponses, JoinCallErrors, ThrowOnError> {
+ return (options.client ?? this.client).post<JoinCallResponses, JoinCallErrors, ThrowOnError>({
+ url: '/call/record/{call_id}/join',
+ ...options,
+ headers: {
+ 'Content-Type': 'application/json',
+ ...options.headers
+ }
+ });
+ }
+
+ /**
+ * Leave a specific live call.
+ */
+ public leaveCall<ThrowOnError extends boolean = false>(options: Options<LeaveCallData, ThrowOnError>): RequestResult<LeaveCallResponses, LeaveCallErrors, ThrowOnError> {
+ return (options.client ?? this.client).post<LeaveCallResponses, LeaveCallErrors, ThrowOnError>({ url: '/call/record/{call_id}/leave', ...options });
+ }
+
/**
* Handle `POST /call/record/{call_id}/link` through the call domain service.
*/
@@ -626,6 +661,27 @@ export class Sdk extends HeyApiClient {
return (options.client ?? this.client).post<MeetingShareResponses, MeetingShareErrors, ThrowOnError>({ url: '/call/record/{call_id}/link', ...options });
}
+ /**
+ * Read live participants and track state for a joinable call.
+ */
+ public getCallParticipants<ThrowOnError extends boolean = false>(options: Options<GetCallParticipantsData, ThrowOnError>): RequestResult<GetCallParticipantsResponses, GetCallParticipantsErrors, ThrowOnError> {
+ return (options.client ?? this.client).get<GetCallParticipantsResponses, GetCallParticipantsErrors, ThrowOnError>({ url: '/call/record/{call_id}/participants', ...options });
+ }
+
+ /**
+ * Stream the recording bytes for a call record the caller may view.
+ */
+ public getCallRecording<ThrowOnError extends boolean = false>(options: Options<GetCallRecordingData, ThrowOnError>): RequestResult<GetCallRecordingResponses, GetCallRecordingErrors, ThrowOnError> {
+ return (options.client ?? this.client).get<GetCallRecordingResponses, GetCallRecordingErrors, ThrowOnError>({ url: '/call/record/{call_id}/recording', ...options });
+ }
+
+ /**
+ * Read this account's ring state for a call.
+ */
+ public getCallRingState<ThrowOnError extends boolean = false>(options: Options<GetCallRingStateData, ThrowOnError>): RequestResult<GetCallRingStateResponses, unknown, ThrowOnError> {
+ return (options.client ?? this.client).get<GetCallRingStateResponses, unknown, ThrowOnError>({ url: '/call/record/{call_id}/ring', ...options });
+ }
+
/**
* Handler for `POST /call/record/{call_id}/share-with-team/toggle`.
*
@@ -712,6 +768,20 @@ export class Sdk extends HeyApiClient {
return (options.client ?? this.client).get<GetOrCreateCallResponses, GetOrCreateCallErrors, ThrowOnError>({ url: '/call/{channel_id}', ...options });
}
+ /**
+ * Start or join a channel call explicitly.
+ */
+ public startCall<ThrowOnError extends boolean = false>(options: Options<StartCallData, ThrowOnError>): RequestResult<StartCallResponses, StartCallErrors, ThrowOnError> {
+ return (options.client ?? this.client).post<StartCallResponses, StartCallErrors, ThrowOnError>({
+ url: '/call/{channel_id}',
+ ...options,
+ headers: {
+ 'Content-Type': 'application/json',
+ ...options.headers
+ }
+ });
+ }
+
/**
* Handler for `GET /call/{channel_id}/active`.
*
diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.ts
index 6a9ff6ee83..59d189fed5 100644
--- a/packages/sdk/generated/storage/types.gen.ts
+++ b/packages/sdk/generated/storage/types.gen.ts
@@ -2254,6 +2254,106 @@ export type CallFilters = {
status?: null | CallStatus;
};
+/**
+ * Public call events. Private variants carry a recipient on the broker only.
+ */
+export type CallNotificationEvent = {
+ event_type: 'call.started';
+ /**
+ * A call started.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.ended';
+ /**
+ * A call ended.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.participant_joined';
+ /**
+ * A participant entered the RTC room.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.participant_left';
+ /**
+ * A participant left the RTC room.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.recording_ready';
+ /**
+ * A recording became available.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.summarized';
+ /**
+ * A summary became available.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.ringing';
+ /**
+ * The recipient is being rung.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.answered';
+ /**
+ * The recipient answered.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.declined';
+ /**
+ * The recipient declined.
+ */
+ metadata: CallNotificationMetadata;
+} | {
+ event_type: 'call.invited';
+ /**
+ * The recipient was invited.
+ */
+ metadata: CallNotificationMetadata;
+};
+
+/**
+ * Identifiers and actors for a public call notification. Optional fields are
+ * absent when they do not apply to the event.
+ */
+export type CallNotificationMetadata = {
+ /**
+ * Call identifier.
+ */
+ call_id: string;
+ /**
+ * Channel containing the call, if any.
+ */
+ channel_id?: string | null;
+ /**
+ * User who created the call.
+ */
+ created_by?: string | null;
+ /**
+ * Room identity of the joining or departing participant.
+ */
+ identity?: string | null;
+ /**
+ * User who sent an invitation.
+ */
+ invited_by?: string | null;
+ /**
+ * Meeting associated with an invitation.
+ */
+ meeting_id?: string | null;
+ /**
+ * Account identifier of the participant or answering user.
+ */
+ user_id?: string | null;
+};
+
/**
* Supported call and transcript providers. Add variants as integrations grow.
*/
@@ -2536,6 +2636,10 @@ export type CallTokenResponse = {
* Meeting link capability, when joined using a link.
*/
shareToken?: string | null;
+ /**
+ * Whether this request allocated the call.
+ */
+ started: boolean;
/**
* The RTC token for connecting to the room.
*/
@@ -10141,6 +10245,24 @@ export type JobId = string;
*/
export type JobStatus = 'uploading' | 'processing' | 'completed' | 'completed_with_errors' | 'failed' | 'cancelling' | 'cancelled';
+/**
+ * Options for an authenticated call join.
+ */
+export type JoinCallRequest = {
+ /**
+ * Optional display name in the RTC room.
+ */
+ name?: string | null;
+ /**
+ * What to do when this account is participating in another call.
+ */
+ onOtherCall?: OnOtherCall;
+ /**
+ * Disconnect an existing RTC connection for this identity.
+ */
+ replace?: boolean;
+};
+
/**
* Single safe source folder/key segment; never a path or authorization proof.
*/
@@ -10320,6 +10442,135 @@ export type ListedForm = {
form: Form;
};
+/**
+ * Whether a live call is associated with a channel.
+ */
+export type LiveCallKind = 'channel' | 'standalone';
+
+/**
+ * A connected participant in an RTC room.
+ */
+export type LiveCallParticipant = {
+ /**
+ * Name displayed to room members.
+ */
+ displayName: string;
+ /**
+ * RTC identity.
+ */
+ identity: string;
+ /**
+ * Whether the caller is a program.
+ */
+ isProgram: boolean;
+ /**
+ * RTC connection time.
+ */
+ joinedAt?: string | null;
+ /**
+ * User or guest.
+ */
+ kind: LiveParticipantKind;
+ /**
+ * Published media tracks.
+ */
+ tracks: Array<LiveCallTrack>;
+ /**
+ * Macro account identifier, if this is a user.
+ */
+ userId?: string | null;
+};
+
+/**
+ * A live RTC room roster.
+ */
+export type LiveCallParticipantsResponse = {
+ /**
+ * Connected participants.
+ */
+ participants: Array<LiveCallParticipant>;
+};
+
+/**
+ * A live call visible to an account that can join it.
+ */
+export type LiveCallSummary = {
+ /**
+ * Session identifier.
+ */
+ callId: string;
+ /**
+ * Channel identifier, if present.
+ */
+ channelId?: string | null;
+ /**
+ * When the session was created.
+ */
+ createdAt: string;
+ /**
+ * Caller identifier.
+ */
+ createdBy: string;
+ /**
+ * Channel or standalone call.
+ */
+ kind: LiveCallKind;
+ /**
+ * Invitation identifier, if present.
+ */
+ meetingId?: string | null;
+ /**
+ * Number of active people and guests.
+ */
+ participantCount: number;
+ /**
+ * Whether this account is currently being rung.
+ */
+ ringing: boolean;
+ /**
+ * Invitation capability, if present.
+ */
+ shareToken?: string | null;
+ /**
+ * Invitation title, if present.
+ */
+ title?: string | null;
+};
+
+/**
+ * A live media track.
+ */
+export type LiveCallTrack = {
+ /**
+ * Whether the track is muted.
+ */
+ muted: boolean;
+ /**
+ * Microphone, camera, or screen source.
+ */
+ source: LiveTrackSource;
+};
+
+/**
+ * Response containing every live call this account may join.
+ */
+export type LiveCallsResponse = {
+ /**
+ * Joinable live calls.
+ */
+ calls: Array<LiveCallSummary>;
+};
+
+/**
+ * Participant kind in the live room.
+ */
+export type LiveParticipantKind = 'user' | 'guest' | 'bot';
+
+/**
+ * A live media track.
+ */
+export type LiveTrackSource = 'microphone' | 'camera' | 'screen_share' | 'screen_share_audio' | 'unknown';
+
export type LocationResponseData = {
/**
* The presigned url of the document if it is not a docx
@@ -11423,6 +11674,11 @@ export type NotificationState = 'unseen' | 'seen' | 'done';
*/
export type NumberOperator = 'is' | 'isNot' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual';
+/**
+ * Policy for another active call.
+ */
+export type OnOtherCall = 'fail' | 'switch';
+
/**
* A batch of ops for one database and the versions its tables must be at.
*/
@@ -12465,6 +12721,11 @@ export type RecentlyDeletedResponseData = {
items: Array<Item>;
};
+/**
+ * OpenAPI representation of streamed recording bytes.
+ */
+export type RecordingBytes = Blob | File;
+
/**
* Batched registration, also used to renew an unchanged descriptor's grant.
*/
@@ -17131,7 +17392,7 @@ export type Webhook = {
* with the event payload. Endpoint validation additionally sends a
* `WebhookValidationTestEvent`, which is not part of this union.
*/
-export type WebhookEvent = DocumentTopicEvent | ChannelTopicEvent | MessageTopicEvent | AgentSessionLifecycleEvent;
+export type WebhookEvent = DocumentTopicEvent | ChannelTopicEvent | CallNotificationEvent | MessageTopicEvent | AgentSessionLifecycleEvent;
/**
* Event and optional entity-id constraints used to match webhook deliveries.
@@ -18384,6 +18645,19 @@ export type GetActiveCallsResponses = {
export type GetActiveCallsResponse = GetActiveCallsResponses[keyof GetActiveCallsResponses];
+export type GetLiveCallsData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/call/active/all';
+};
+
+export type GetLiveCallsResponses = {
+ 200: LiveCallsResponse;
+};
+
+export type GetLiveCallsResponse = GetLiveCallsResponses[keyof GetLiveCallsResponses];
+
export type GuestCallChatReadData = {
body?: never;
path: {
@@ -18648,7 +18922,7 @@ export type MeetingInviteUsersResponses = {
export type MeetingInviteUsersResponse = MeetingInviteUsersResponses[keyof MeetingInviteUsersResponses];
export type MeetingJoinData = {
- body?: never;
+ body?: JoinCallRequest;
path: {
token: string;
};
@@ -18930,6 +19204,50 @@ export type DeclineCallResponses = {
export type DeclineCallResponse = DeclineCallResponses[keyof DeclineCallResponses];
+export type JoinCallData = {
+ body: JoinCallRequest;
+ path: {
+ call_id: string;
+ };
+ query?: never;
+ url: '/call/record/{call_id}/join';
+};
+
+export type JoinCallErrors = {
+ 403: ErrorResponse;
+ 409: unknown;
+ 410: unknown;
+};
+
+export type JoinCallError = JoinCallErrors[keyof JoinCallErrors];
+
+export type JoinCallResponses = {
+ 200: CallTokenResponse;
+};
+
+export type JoinCallResponse = JoinCallResponses[keyof JoinCallResponses];
+
+export type LeaveCallData = {
+ body?: never;
+ path: {
+ call_id: string;
+ };
+ query?: never;
+ url: '/call/record/{call_id}/leave';
+};
+
+export type LeaveCallErrors = {
+ 404: ErrorResponse;
+};
+
+export type LeaveCallError = LeaveCallErrors[keyof LeaveCallErrors];
+
+export type LeaveCallResponses = {
+ 200: LeaveCallResponse;
+};
+
+export type LeaveCallResponse2 = LeaveCallResponses[keyof LeaveCallResponses];
+
export type MeetingShareData = {
body?: never;
path: {
@@ -18954,6 +19272,67 @@ export type MeetingShareResponses = {
export type MeetingShareResponse = MeetingShareResponses[keyof MeetingShareResponses];
+export type GetCallParticipantsData = {
+ body?: never;
+ path: {
+ call_id: string;
+ };
+ query?: never;
+ url: '/call/record/{call_id}/participants';
+};
+
+export type GetCallParticipantsErrors = {
+ 403: unknown;
+ 404: unknown;
+};
+
+export type GetCallParticipantsResponses = {
+ 200: LiveCallParticipantsResponse;
+};
+
+export type GetCallParticipantsResponse = GetCallParticipantsResponses[keyof GetCallParticipantsResponses];
+
+export type GetCallRecordingData = {
+ body?: never;
+ path: {
+ /**
+ * Call ID
+ */
+ call_id: string;
+ };
+ query?: never;
+ url: '/call/record/{call_id}/recording';
+};
+
+export type GetCallRecordingErrors = {
+ 403: ErrorResponse;
+ 404: ErrorResponse;
+ 500: ErrorResponse;
+};
+
+export type GetCallRecordingError = GetCallRecordingErrors[keyof GetCallRecordingErrors];
+
+export type GetCallRecordingResponses = {
+ 200: RecordingBytes;
+};
+
+export type GetCallRecordingResponse = GetCallRecordingResponses[keyof GetCallRecordingResponses];
+
+export type GetCallRingStateData = {
+ body?: never;
+ path: {
+ call_id: string;
+ };
+ query?: never;
+ url: '/call/record/{call_id}/ring';
+};
+
+export type GetCallRingStateResponses = {
+ 200: RingStatusResponse;
+};
+
+export type GetCallRingStateResponse = GetCallRingStateResponses[keyof GetCallRingStateResponses];
+
export type ToggleShareWithTeamData = {
body?: never;
path: {
@@ -19158,6 +19537,28 @@ export type GetOrCreateCallResponses = {
export type GetOrCreateCallResponse = GetOrCreateCallResponses[keyof GetOrCreateCallResponses];
+export type StartCallData = {
+ body: JoinCallRequest;
+ path: {
+ channel_id: string;
+ };
+ query?: never;
+ url: '/call/{channel_id}';
+};
+
+export type StartCallErrors = {
+ 403: ErrorResponse;
+ 409: unknown;
+};
+
+export type StartCallError = StartCallErrors[keyof StartCallErrors];
+
+export type StartCallResponses = {
+ 200: CallTokenResponse;
+};
+
+export type StartCallResponse = StartCallResponses[keyof StartCallResponses];
+
export type CheckActiveCallData = {
body?: never;
path: {
diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.json
index 2d4972c597..cb6e4cc7c6 100644
--- a/packages/sdk/specs/storage.json
+++ b/packages/sdk/specs/storage.json
@@ -2085,6 +2085,25 @@
}
}
},
+ "/call/active/all": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "List all channel and standalone calls this account can join.",
+ "operationId": "get_live_calls",
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LiveCallsResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/guest-chat/{call_id}": {
"get": {
"tags": ["messages::inbound::guest_chat"],
@@ -2764,6 +2783,15 @@
}
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
@@ -3363,6 +3391,102 @@
}
}
},
+ "/call/record/{call_id}/join": {
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Join a live call by its session id.",
+ "operationId": "join_call",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CallTokenResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": ""
+ },
+ "410": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/leave": {
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Leave a specific live call.",
+ "operationId": "leave_call",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LeaveCallResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/record/{call_id}/link": {
"post": {
"tags": ["call::inbound::axum_router::meetings"],
@@ -3433,6 +3557,133 @@
}
}
},
+ "/call/record/{call_id}/participants": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Read live participants and track state for a joinable call.",
+ "operationId": "get_call_participants",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LiveCallParticipantsResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/recording": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Stream the recording bytes for a call record the caller may view.",
+ "operationId": "get_call_recording",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "description": "Call ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "video/mp4": {
+ "schema": {
+ "$ref": "#/components/schemas/RecordingBytes"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/call/record/{call_id}/ring": {
+ "get": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Read this account's ring state for a call.",
+ "operationId": "get_call_ring_state",
+ "parameters": [
+ {
+ "name": "call_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RingStatusResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/call/record/{call_id}/share-with-team/toggle": {
"post": {
"tags": ["call::inbound::axum_router"],
@@ -3764,6 +4015,57 @@
}
}
},
+ "post": {
+ "tags": ["call::inbound::axum_router"],
+ "summary": "Start or join a channel call explicitly.",
+ "operationId": "start_call",
+ "parameters": [
+ {
+ "name": "channel_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JoinCallRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CallTokenResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": ""
+ }
+ }
+ },
"delete": {
"tags": ["call::inbound::axum_router"],
"summary": "Handler for `DELETE /call/{channel_id}`.",
@@ -25221,6 +25523,199 @@
}
}
},
+ "CallNotificationEvent": {
+ "oneOf": [
+ {
+ "type": "object",
+ "description": "A call started.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.started"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A call started."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A call ended.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.ended"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A call ended."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A participant entered the RTC room.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.participant_joined"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A participant entered the RTC room."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A participant left the RTC room.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.participant_left"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A participant left the RTC room."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A recording became available.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.recording_ready"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A recording became available."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "A summary became available.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.summarized"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "A summary became available."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient is being rung.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.ringing"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient is being rung."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient answered.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.answered"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient answered."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient declined.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.declined"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient declined."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "description": "The recipient was invited.",
+ "required": ["metadata", "event_type"],
+ "properties": {
+ "event_type": {
+ "type": "string",
+ "enum": ["call.invited"]
+ },
+ "metadata": {
+ "$ref": "#/components/schemas/CallNotificationMetadata",
+ "description": "The recipient was invited."
+ }
+ }
+ }
+ ],
+ "description": "Public call events. Private variants carry a recipient on the broker only."
+ },
+ "CallNotificationMetadata": {
+ "type": "object",
+ "description": "Identifiers and actors for a public call notification. Optional fields are\nabsent when they do not apply to the event.",
+ "required": ["call_id"],
+ "properties": {
+ "call_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Call identifier."
+ },
+ "channel_id": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Channel containing the call, if any."
+ },
+ "created_by": {
+ "type": ["string", "null"],
+ "description": "User who created the call."
+ },
+ "identity": {
+ "type": ["string", "null"],
+ "description": "Room identity of the joining or departing participant."
+ },
+ "invited_by": {
+ "type": ["string", "null"],
+ "description": "User who sent an invitation."
+ },
+ "meeting_id": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Meeting associated with an invitation."
+ },
+ "user_id": {
+ "type": ["string", "null"],
+ "description": "Account identifier of the participant or answering user."
+ }
+ }
+ },
"CallProvider": {
"type": "string",
"description": "Supported call and transcript providers. Add variants as integrations grow.",
@@ -25583,6 +26078,7 @@
"type": "object",
"description": "Response returned when creating or joining a call.",
"required": [
+ "started",
"participantId",
"callId",
"token",
@@ -25616,6 +26112,10 @@
"type": ["string", "null"],
"description": "Meeting link capability, when joined using a link."
},
+ "started": {
+ "type": "boolean",
+ "description": "Whether this request allocated the call."
+ },
"token": {
"type": "string",
"description": "The RTC token for connecting to the room."
@@ -37459,6 +37959,24 @@
"cancelled"
]
},
+ "JoinCallRequest": {
+ "type": "object",
+ "description": "Options for an authenticated call join.",
+ "properties": {
+ "name": {
+ "type": ["string", "null"],
+ "description": "Optional display name in the RTC room."
+ },
+ "onOtherCall": {
+ "$ref": "#/components/schemas/OnOtherCall",
+ "description": "What to do when this account is participating in another call."
+ },
+ "replace": {
+ "type": "boolean",
+ "description": "Disconnect an existing RTC connection for this identity."
+ }
+ }
+ },
"KeySegment": {
"type": "string",
"description": "Single safe source folder/key segment; never a path or authorization proof."
@@ -37792,6 +38310,168 @@
}
}
},
+ "LiveCallKind": {
+ "type": "string",
+ "description": "Whether a live call is associated with a channel.",
+ "enum": ["channel", "standalone"]
+ },
+ "LiveCallParticipant": {
+ "type": "object",
+ "description": "A connected participant in an RTC room.",
+ "required": ["identity", "displayName", "kind", "isProgram", "tracks"],
+ "properties": {
+ "displayName": {
+ "type": "string",
+ "description": "Name displayed to room members."
+ },
+ "identity": {
+ "type": "string",
+ "description": "RTC identity."
+ },
+ "isProgram": {
+ "type": "boolean",
+ "description": "Whether the caller is a program."
+ },
+ "joinedAt": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "RTC connection time."
+ },
+ "kind": {
+ "$ref": "#/components/schemas/LiveParticipantKind",
+ "description": "User or guest."
+ },
+ "tracks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallTrack"
+ },
+ "description": "Published media tracks."
+ },
+ "userId": {
+ "type": ["string", "null"],
+ "description": "Macro account identifier, if this is a user."
+ }
+ }
+ },
+ "LiveCallParticipantsResponse": {
+ "type": "object",
+ "description": "A live RTC room roster.",
+ "required": ["participants"],
+ "properties": {
+ "participants": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallParticipant"
+ },
+ "description": "Connected participants."
+ }
+ }
+ },
+ "LiveCallSummary": {
+ "type": "object",
+ "description": "A live call visible to an account that can join it.",
+ "required": [
+ "callId",
+ "kind",
+ "createdBy",
+ "createdAt",
+ "participantCount",
+ "ringing"
+ ],
+ "properties": {
+ "callId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Session identifier."
+ },
+ "channelId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Channel identifier, if present."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the session was created."
+ },
+ "createdBy": {
+ "type": "string",
+ "description": "Caller identifier."
+ },
+ "kind": {
+ "$ref": "#/components/schemas/LiveCallKind",
+ "description": "Channel or standalone call."
+ },
+ "meetingId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Invitation identifier, if present."
+ },
+ "participantCount": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of active people and guests."
+ },
+ "ringing": {
+ "type": "boolean",
+ "description": "Whether this account is currently being rung."
+ },
+ "shareToken": {
+ "type": ["string", "null"],
+ "description": "Invitation capability, if present."
+ },
+ "title": {
+ "type": ["string", "null"],
+ "description": "Invitation title, if present."
+ }
+ }
+ },
+ "LiveCallTrack": {
+ "type": "object",
+ "description": "A live media track.",
+ "required": ["source", "muted"],
+ "properties": {
+ "muted": {
+ "type": "boolean",
+ "description": "Whether the track is muted."
+ },
+ "source": {
+ "$ref": "#/components/schemas/LiveTrackSource",
+ "description": "Microphone, camera, or screen source."
+ }
+ }
+ },
+ "LiveCallsResponse": {
+ "type": "object",
+ "description": "Response containing every live call this account may join.",
+ "required": ["calls"],
+ "properties": {
+ "calls": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LiveCallSummary"
+ },
+ "description": "Joinable live calls."
+ }
+ }
+ },
+ "LiveParticipantKind": {
+ "type": "string",
+ "description": "Participant kind in the live room.",
+ "enum": ["user", "guest", "bot"]
+ },
+ "LiveTrackSource": {
+ "type": "string",
+ "description": "A live media track.",
+ "enum": [
+ "microphone",
+ "camera",
+ "screen_share",
+ "screen_share_audio",
+ "unknown"
+ ]
+ },
"LocationResponseData": {
"oneOf": [
{
@@ -39527,6 +40207,11 @@
"lessThanOrEqual"
]
},
+ "OnOtherCall": {
+ "type": "string",
+ "description": "Policy for another active call.",
+ "enum": ["fail", "switch"]
+ },
"OpBatch": {
"type": "object",
"description": "A batch of ops for one database and the versions its tables must be at.",
@@ -41497,6 +42182,11 @@
}
}
},
+ "RecordingBytes": {
+ "type": "string",
+ "format": "binary",
+ "description": "OpenAPI representation of streamed recording bytes."
+ },
"RegisterUploads": {
"type": "object",
"description": "Batched registration, also used to renew an unchanged descriptor's grant.",
@@ -48685,6 +49375,10 @@
"$ref": "#/components/schemas/ChannelTopicEvent",
"description": "Channel lifecycle events from the `macro.channels` topic."
},
+ {
+ "$ref": "#/components/schemas/CallNotificationEvent",
+ "description": "Access-checked call notifications from `macro.call_notifications`."
+ },
{
"$ref": "#/components/schemas/MessageTopicEvent",
"description": "Message facts for channels and documents from the `macro.messages` topic."
diff --git a/packages/sdk/src/coverage/skipped.ts b/packages/sdk/src/coverage/skipped.ts
index fa9f001ef3..21698795d8 100644
--- a/packages/sdk/src/coverage/skipped.ts
+++ b/packages/sdk/src/coverage/skipped.ts
@@ -322,13 +322,10 @@ export const storageExcluded = [
'registerSlackImportUploads',
'bulkWakeupSyncServiceDocuments',
'callWebhook',
- 'checkActiveCall',
'createChannelScopedBot',
'createCollabSurfaceToken',
'createInstructionsHandler',
'createViewHandler',
- // Declining a ringing call is a live-device session flow, like leaving.
- 'declineCall',
'declineRing',
'deleteCollabSurface',
'ensureCollabSurface',
@@ -344,7 +341,6 @@ export const storageExcluded = [
'entityMessageLegacy',
'excludeDefaultViewHandler',
'getAttachmentReferences',
- 'getBatchCallRecordPreview',
'getBatchChannelPreview',
'getActiveCalls',
'getBatchProjectPreview',
@@ -362,6 +358,7 @@ export const storageExcluded = [
'getInstructionsHandler',
'getItemsSoup',
'getLocationHandler',
+ // Legacy GET can start and ring a call; SDK starts use POST.
'getOrCreateCall',
'getPendingProjectsHandler',
'getProjectsHandler',
@@ -378,14 +375,13 @@ export const storageExcluded = [
'installSync',
'jobProcessingResultHandler',
'joinChannelByCode',
+ // Legacy channel-scoped leave could leave a newer call; SDK leaves by call id.
'leaveOrEndCall',
- // Live meeting admission and participant previews are app session flows.
- 'meetingGuestJoin',
+ // Live participant previews and browser session cleanup remain app flows.
// Browser setup reserves an empty RTC room before creating a meeting.
'meetingPrepare',
'meetingCancelPreparation',
'meetingGuestParticipants',
- 'meetingJoin',
'meetingLeave',
'meetingParticipants',
'mentionPreviews',
diff --git a/packages/sdk/src/entities/calls/call-record.ts b/packages/sdk/src/entities/calls/call-record.ts
index 9def39a044..9a1c37db26 100644
--- a/packages/sdk/src/entities/calls/call-record.ts
+++ b/packages/sdk/src/entities/calls/call-record.ts
@@ -1,10 +1,13 @@
import type {
EditCallTranscriptRequest,
GetCallRecordResponses,
+ LiveCallSummary,
+ RingStatus,
} from '../../../generated/storage/types.gen';
import { unwrap } from '../../utils';
import type { MacroClient } from '../../utils/client';
import { Channel } from '../channels/channel';
+import { Thread } from '../channels/thread';
import { FavoritableEntity } from '../entity';
import { Meeting } from '../meetings/meeting';
import {
@@ -15,12 +18,101 @@ import {
import { entitySearch } from '../search/options';
import { EntityAccess } from '../sharing/access';
import { User } from '../users/user';
+import { CallConnection, type JoinOptions } from './connection';
+import { callAdmissionError } from './errors';
import { CallMessage } from './message';
+import { CallParticipant } from './participant';
type CallRecordDetail = GetCallRecordResponses[200];
/** A Macro call record (an archived or still active call). */
export class CallRecord extends FavoritableEntity<CallRecordDetail> {
+ /** Kind is available immediately on handles returned by the live list. */
+ readonly kind?: LiveCallSummary['kind'];
+
+ private constructor(
+ client: MacroClient,
+ id: string,
+ kind?: LiveCallSummary['kind'],
+ ) {
+ super(client, id);
+ this.kind = kind;
+ }
+
+ /** Build a live call handle without fetching its archived detail. */
+ static fromLive(client: MacroClient, summary: LiveCallSummary): CallRecord {
+ return new CallRecord(client, summary.callId, summary.kind);
+ }
+
+ /** Join only while this call is live; never start a replacement call. */
+ async join(opts: JoinOptions = {}): Promise<CallConnection> {
+ try {
+ const response = unwrap(
+ await this.client.storage.joinCall({
+ path: { call_id: this.id },
+ body: opts,
+ }),
+ );
+ return new CallConnection(this.client, response);
+ } catch (error) {
+ return callAdmissionError(error);
+ }
+ }
+
+ /** Read the current ring state for this account. */
+ async ringState(): Promise<RingStatus> {
+ return unwrap(
+ await this.client.storage.getCallRingState({
+ path: { call_id: this.id },
+ }),
+ ).status;
+ }
+
+ /** Read the connected room roster without joining. */
+ async participants(): Promise<CallParticipant[]> {
+ const response = unwrap(
+ await this.client.storage.getCallParticipants({
+ path: { call_id: this.id },
+ }),
+ );
+ return response.participants.map(
+ (record) => new CallParticipant(this.client, record),
+ );
+ }
+
+ /** Decline this call's ring for the current account. */
+ async decline(): Promise<void> {
+ unwrap(
+ await this.client.storage.declineCall({ path: { call_id: this.id } }),
+ );
+ }
+
+ /** Read the persistent discussion, which may be a channel thread. */
+ async discussion(): Promise<MessageThread | Thread> {
+ const discussion = (await this.detail.get()).discussion;
+ if (discussion.kind === 'channel_thread') {
+ return new Thread(this.client, discussion.channel_id, discussion.root_id);
+ }
+ return MessageThread.byId(
+ this.client,
+ { type: 'call', entity: this },
+ discussion.call_id,
+ );
+ }
+
+ /** Download recording bytes through the Macro host. */
+ readonly recording = {
+ bytes: async (): Promise<Uint8Array> => {
+ const blob = unwrap(
+ await this.client.storage.getCallRecording({
+ path: { call_id: this.id },
+ parseAs: 'blob',
+ }),
+ );
+ return new Uint8Array(await blob.arrayBuffer());
+ },
+ };
+
/** A shared message thread scoped to this resource. */
messageThreadById(id: string): MessageThread {
return MessageThread.byId(this.client, { type: 'call', entity: this }, id);
@@ -138,7 +230,7 @@ export class CallRecord extends FavoritableEntity<CallRecordDetail> {
readonly transcript = this.field('transcript');
/** Macro-account participants, both active and historic. */
- readonly participants = this.field('participants');
+ readonly historicParticipants = this.field('participants');
/** Current and past guests; each id matches its transcript speaker id. */
readonly guests = this.field('guests');
diff --git a/packages/sdk/src/entities/calls/connection.ts b/packages/sdk/src/entities/calls/connection.ts
new file mode 100644
index 0000000000..3eb9b3ba42
--- /dev/null
+++ b/packages/sdk/src/entities/calls/connection.ts
@@ -0,0 +1,69 @@
+import type {
+ CallTokenResponse,
+ JoinCallRequest,
+} from '../../../generated/storage/types.gen';
+import { unwrap } from '../../utils';
+import type { MacroClient } from '../../utils/client';
+import { CallRecord } from './call-record';
+
+const inspectSymbol: unique symbol = Symbol.for('nodejs.util.inspect.custom');
+
+/** Options for entering a call. The default is to fail if already in another call. */
+export type JoinOptions = JoinCallRequest;
+
+/** A room credential. Keep `token` out of logs and serialized values. */
+export class CallConnection {
+ /** The call this credential enters. */
+ readonly call: CallRecord;
+
+ /** LiveKit server URL. */
+ readonly url: string;
+
+ /** Short-lived LiveKit token; never serialize or log it. */
+ readonly token: string;
+
+ /** RTC participant identity. */
+ readonly identity: string;
+
+ /** RTC room name. */
+ readonly roomName: string;
+
+ /** Whether this request created the call. */
+ readonly started: boolean;
+
+ /** Construct a connection from the server's admission response. */
+ constructor(
+ private readonly client: MacroClient,
+ response: CallTokenResponse,
+ ) {
+ this.call = CallRecord.byId(client, response.callId);
+ this.url = response.serverUrl;
+ this.token = response.token;
+ this.identity = response.participantId;
+ this.roomName = response.roomName;
+ this.started = response.started;
+ }
+
+ /** Leave this exact call; safe to invoke after another call has started. */
+ async leave(): Promise<{ callEnded: boolean }> {
+ return unwrap(
+ await this.client.storage.leaveCall({ path: { call_id: this.call.id } }),
+ );
+ }
+
+ /** Serialize connection metadata without the room credential. */
+ toJSON() {
+ return {
+ call: this.call.toJSON(),
+ url: this.url,
+ identity: this.identity,
+ roomName: this.roomName,
+ started: this.started,
+ };
+ }
+
+ /** Keep the credential out of Node's console inspection. */
+ [inspectSymbol]() {
+ return this.toJSON();
+ }
+}
diff --git a/packages/sdk/src/entities/calls/errors.ts b/packages/sdk/src/entities/calls/errors.ts
new file mode 100644
index 0000000000..a69ea39609
--- /dev/null
+++ b/packages/sdk/src/entities/calls/errors.ts
@@ -0,0 +1,44 @@
+import { MacroApiError } from '../../utils/unwrap';
+
+/** The account is participating in another call. */
+export class InOtherCallError extends MacroApiError {
+ constructor(data: unknown) {
+ super(409, data);
+ this.name = 'InOtherCallError';
+ }
+}
+
+/** This identity already has a room connection. */
+export class AlreadyConnectedError extends MacroApiError {
+ constructor(data: unknown) {
+ super(409, data);
+ this.name = 'AlreadyConnectedError';
+ }
+}
+
+/** The call ended before this join completed. */
+export class CallEndedError extends MacroApiError {
+ constructor(data: unknown) {
+ super(410, data);
+ this.name = 'CallEndedError';
+ }
+}
+
+/** Preserve the server's branchable call admission codes. */
+export function callAdmissionError(error: unknown): never {
+ if (error instanceof MacroApiError) {
+ if (error.status === 410) throw new CallEndedError(error.data);
+ if (
+ error.status === 409 &&
+ error.data &&
+ typeof error.data === 'object' &&
+ 'code' in error.data
+ ) {
+ if (error.data.code === 'in_other_call')
+ throw new InOtherCallError(error.data);
+ if (error.data.code === 'already_connected')
+ throw new AlreadyConnectedError(error.data);
+ }
+ }
+ throw error;
+}
diff --git a/packages/sdk/src/entities/calls/namespace.ts b/packages/sdk/src/entities/calls/namespace.ts
index 801b84d9e8..211fbd5e89 100644
--- a/packages/sdk/src/entities/calls/namespace.ts
+++ b/packages/sdk/src/entities/calls/namespace.ts
@@ -1,18 +1,73 @@
+import { unwrap } from '../../utils';
import type { MacroClient } from '../../utils/client';
+import { Channel } from '../channels/channel';
import type { SearchOpts } from '../search/options';
import { CallRecord } from './call-record';
+/** A lightweight preview of an existing call record. */
+export type CallSummary = {
+ call: CallRecord;
+ channel?: Channel;
+ channelName?: string;
+ customName?: string;
+ startedAt: string;
+ endedAt?: string;
+};
+
/**
- * @routing Use when the request names a recorded call or its transcript, such as what was said on yesterday's call; not email, messages, tables or scheduling.
+ * @routing Use when finding live or recorded calls, entering a room, reading a transcript, or downloading a recording; not email, messages, tables or scheduling.
+ * @agent A program uses an agent account's own API key to enter a call. Use active() to reconcile missed events. Join an existing call with call.join(); start a channel call only when intending to ring its members. Calls with only programs end after the server timeout. Keep room tokens private and connect with a LiveKit client outside code mode.
*/
export class CallRecordNamespace {
constructor(private readonly client: MacroClient) {}
+ /** Get a lazy call handle; joining it never creates a call. */
byId(id: string): CallRecord {
return CallRecord.byId(this.client, id);
}
+ /** Search archived calls by name and transcript, not the live room roster. */
search(query: string, opts?: SearchOpts): AsyncGenerator<CallRecord> {
return CallRecord.search(this.client, query, opts);
}
+
+ /** List joinable live calls; use after an event stream reconnects. */
+ async active(): Promise<CallRecord[]> {
+ const response = unwrap(await this.client.storage.getLiveCalls());
+ return response.calls.map((summary) =>
+ CallRecord.fromLive(this.client, summary),
+ );
+ }
+
+ /** Preview these calls in input order; missing records are omitted. */
+ async summaries(calls: CallRecord[]): Promise<CallSummary[]> {
+ if (calls.length === 0) return [];
+
+ const { previews } = unwrap(
+ await this.client.storage.getBatchCallRecordPreview({
+ body: { callIds: calls.map((call) => call.id) },
+ }),
+ );
+ const found = new Map(
+ previews.flatMap((preview) =>
+ preview.type === 'exists' ? [[preview.callId, preview]] : [],
+ ),
+ );
+ return calls.flatMap((call) => {
+ const preview = found.get(call.id);
+ if (!preview) return [];
+ return [
+ {
+ call,
+ channel: preview.channelId
+ ? Channel.byId(this.client, preview.channelId)
+ : undefined,
+ channelName: preview.channelName ?? undefined,
+ customName: preview.customName ?? undefined,
+ startedAt: preview.startedAt,
+ endedAt: preview.endedAt ?? undefined,
+ },
+ ];
+ });
+ }
}
diff --git a/packages/sdk/src/entities/calls/participant.ts b/packages/sdk/src/entities/calls/participant.ts
new file mode 100644
index 0000000000..a40ea558da
--- /dev/null
+++ b/packages/sdk/src/entities/calls/participant.ts
@@ -0,0 +1,38 @@
+import type { LiveCallParticipant } from '../../../generated/storage/types.gen';
+import type { MacroClient } from '../../utils/client';
+import { User } from '../users/user';
+
+/** A connected participant and their published track state. */
+export class CallParticipant {
+ /** RTC participant identity. */
+ readonly identity: string;
+
+ /** Display name in the room. */
+ readonly displayName: string;
+
+ /** Account, guest, or bot participant. */
+ readonly kind: LiveCallParticipant['kind'];
+
+ /** Whether this participant is a program. */
+ readonly isProgram: boolean;
+
+ /** When this RTC connection began. */
+ readonly joinedAt?: string;
+
+ /** Published tracks and mute state. */
+ readonly tracks: LiveCallParticipant['tracks'];
+
+ /** Macro account handle, when one is present. */
+ readonly user?: User;
+
+ /** Build a roster handle from a live participant record. */
+ constructor(client: MacroClient, record: LiveCallParticipant) {
+ this.identity = record.identity;
+ this.displayName = record.displayName;
+ this.kind = record.kind;
+ this.isProgram = record.isProgram;
+ this.joinedAt = record.joinedAt ?? undefined;
+ this.tracks = record.tracks;
+ this.user = record.userId ? User.byId(client, record.userId) : undefined;
+ }
+}
diff --git a/packages/sdk/src/entities/channels/channel.ts b/packages/sdk/src/entities/channels/channel.ts
index 2fc9559b99..e3bfd77a44 100644
--- a/packages/sdk/src/entities/channels/channel.ts
+++ b/packages/sdk/src/entities/channels/channel.ts
@@ -12,6 +12,9 @@ import { paginate, unwrap } from '../../utils';
import type { MacroClient } from '../../utils/client';
import { AgentConversation } from '../agent-sessions/conversation';
import { Bot } from '../bots/bot';
+import { CallRecord } from '../calls/call-record';
+import { CallConnection, type JoinOptions } from '../calls/connection';
+import { callAdmissionError } from '../calls/errors';
import type { Document } from '../documents/document';
import { PropertiedEntity } from '../entity';
import type { StaticImage } from '../images/image';
@@ -43,6 +46,33 @@ export type ChannelAttachment =
* A channel.
*/
export class Channel extends PropertiedEntity<ChannelDetail> {
+ /** Start or join this channel's call, ringing members if a new call starts. */
+ async startCall(opts: JoinOptions = {}): Promise<CallConnection> {
+ try {
+ const response = unwrap(
+ await this.client.storage.startCall({
+ path: { channel_id: this.id },
+ body: opts,
+ }),
+ );
+ return new CallConnection(this.client, response);
+ } catch (error) {
+ return callAdmissionError(error);
+ }
+ }
+
+ /** Check the current call without creating one; undefined means no call. */
+ async activeCall(): Promise<CallRecord | undefined> {
+ const result = await this.client.storage.checkActiveCall({
+ path: { channel_id: this.id },
+ });
+ if (result.response?.status === 204) return undefined;
+
+ const response = unwrap(result);
+ if (!response) return undefined;
+ return CallRecord.byId(this.client, response.callId);
+ }
+
/** Record a view or interaction in this channel. */
async recordActivity(type: ActivityType): Promise<ChannelActivity> {
return new ChannelActivity(
diff --git a/packages/sdk/src/entities/meetings/meeting.ts b/packages/sdk/src/entities/meetings/meeting.ts
index ccd949168a..d9f0b26eca 100644
--- a/packages/sdk/src/entities/meetings/meeting.ts
+++ b/packages/sdk/src/entities/meetings/meeting.ts
@@ -5,12 +5,40 @@ import type {
import { MacroNotFoundError, unwrap } from '../../utils';
import type { MacroClient } from '../../utils/client';
import { CallRecord } from '../calls/call-record';
+import { CallConnection, type JoinOptions } from '../calls/connection';
+import { callAdmissionError } from '../calls/errors';
import { Channel } from '../channels/channel';
import { MacroEntity } from '../entity';
import type { User } from '../users/user';
/** A meeting's schedule and invitation link. */
export class Meeting extends MacroEntity<MeetingRecord> {
+ /** Join this meeting as the current account; always send a program join body. */
+ async join(opts: JoinOptions = {}): Promise<CallConnection> {
+ try {
+ const response = unwrap(
+ await this.client.storage.meetingJoin({
+ path: { token: (await this.detail.get()).shareToken },
+ body: opts,
+ }),
+ );
+ return new CallConnection(this.client, response);
+ } catch (error) {
+ return callAdmissionError(error);
+ }
+ }
+
+ /** Join the link as a named guest. */
+ async joinAsGuest(name: string): Promise<CallConnection> {
+ const response = unwrap(
+ await this.client.storage.meetingGuestJoin({
+ path: { token: (await this.detail.get()).shareToken },
+ body: { displayName: name },
+ }),
+ );
+ return new CallConnection(this.client, response);
+ }
+
private lookupToken?: string;
private constructor(client: MacroClient, id: string, record?: MeetingRecord) {
diff --git a/packages/sdk/src/events/hydrate/call.ts b/packages/sdk/src/events/hydrate/call.ts
new file mode 100644
index 0000000000..9f7976121a
--- /dev/null
+++ b/packages/sdk/src/events/hydrate/call.ts
@@ -0,0 +1,85 @@
+import { match } from 'ts-pattern';
+import { CallRecord } from '../../entities/calls/call-record';
+import { Channel } from '../../entities/channels/channel';
+import { Meeting } from '../../entities/meetings/meeting';
+import { User } from '../../entities/users/user';
+import type { MacroClient } from '../../utils/client';
+import type { MacroEvent } from '../types';
+
+export type CallEvent = Extract<MacroEvent, { event_type: `call.${string}` }>;
+
+/** Attach call, channel, meeting, and actor handles to call notifications. */
+export function hydrateCallEvent(client: MacroClient, event: CallEvent) {
+ const handles = (metadata: CallEvent['metadata']) => ({
+ call: CallRecord.byId(client, metadata.call_id),
+ channel: metadata.channel_id
+ ? Channel.byId(client, metadata.channel_id)
+ : undefined,
+ meeting: metadata.meeting_id
+ ? Meeting.byId(client, metadata.meeting_id)
+ : undefined,
+ creator: metadata.created_by
+ ? User.byId(client, metadata.created_by)
+ : undefined,
+ user: metadata.user_id ? User.byId(client, metadata.user_id) : undefined,
+ inviter: metadata.invited_by
+ ? User.byId(client, metadata.invited_by)
+ : undefined,
+ });
+
+ return match(event)
+ .with({ event_type: 'call.started' }, ({ metadata }) => ({
+ event_type: 'call.started' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.ended' }, ({ metadata }) => ({
+ event_type: 'call.ended' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.participant_joined' }, ({ metadata }) => ({
+ event_type: 'call.participant_joined' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.participant_left' }, ({ metadata }) => ({
+ event_type: 'call.participant_left' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.recording_ready' }, ({ metadata }) => ({
+ event_type: 'call.recording_ready' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.summarized' }, ({ metadata }) => ({
+ event_type: 'call.summarized' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.ringing' }, ({ metadata }) => ({
+ event_type: 'call.ringing' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.answered' }, ({ metadata }) => ({
+ event_type: 'call.answered' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.declined' }, ({ metadata }) => ({
+ event_type: 'call.declined' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .with({ event_type: 'call.invited' }, ({ metadata }) => ({
+ event_type: 'call.invited' as const,
+ metadata,
+ ...handles(metadata),
+ }))
+ .exhaustive((unknown) => {
+ console.warn('macro sdk: unknown call event', unknown);
+ return undefined;
+ });
+}
diff --git a/packages/sdk/src/events/receiver.ts b/packages/sdk/src/events/receiver.ts
index 6babed8812..816e2ed686 100644
--- a/packages/sdk/src/events/receiver.ts
+++ b/packages/sdk/src/events/receiver.ts
@@ -6,6 +6,7 @@ import type {
import { MacroError } from '../utils';
import type { MacroClient } from '../utils/client';
import { hydrateAgentSessionEvent } from './hydrate/agentSession';
+import { hydrateCallEvent } from './hydrate/call';
import { hydrateChannelEvent } from './hydrate/channel';
import { hydrateDocumentEvent } from './hydrate/document';
import { hydrateMessageEvent } from './hydrate/message';
@@ -49,6 +50,9 @@ function hydrate(
.with({ event_type: P.string.startsWith('document.') }, (documentEvent) =>
hydrateDocumentEvent(client, documentEvent),
)
+ .with({ event_type: P.string.startsWith('call.') }, (callEvent) =>
+ hydrateCallEvent(client, callEvent),
+ )
.with({ event_type: P.string.startsWith('channel.') }, (channelEvent) =>
hydrateChannelEvent(client, channelEvent),
)
diff --git a/packages/sdk/src/events/types.ts b/packages/sdk/src/events/types.ts
index 3479e25bbb..8e5ec60e56 100644
--- a/packages/sdk/src/events/types.ts
+++ b/packages/sdk/src/events/types.ts
@@ -5,6 +5,7 @@
import type { WebhookEvent } from '../../generated/storage/types.gen';
import type { hydrateAgentSessionEvent } from './hydrate/agentSession';
+import type { hydrateCallEvent } from './hydrate/call';
import type { hydrateChannelEvent } from './hydrate/channel';
import type { hydrateDocumentEvent } from './hydrate/document';
import type { hydrateMessageEvent } from './hydrate/message';
@@ -31,6 +32,7 @@ export type EventPayload<E extends EventName> = Extract<
type HydratedEvent =
| ReturnType<typeof hydrateAgentSessionEvent>
| ReturnType<typeof hydrateChannelEvent>
+ | ReturnType<typeof hydrateCallEvent>
| ReturnType<typeof hydrateDocumentEvent>
| ReturnType<typeof hydrateMessageEvent>;
diff --git a/packages/sdk/src/macro.ts b/packages/sdk/src/macro.ts
index 619e724a9a..f84e4eef5f 100644
--- a/packages/sdk/src/macro.ts
+++ b/packages/sdk/src/macro.ts
@@ -52,7 +52,16 @@ export type {
StructuredCompletionRequest,
StructuredCompletionResponse,
} from './entities/ai/namespace';
+export { CallRecord } from './entities/calls/call-record';
+export { CallConnection, type JoinOptions } from './entities/calls/connection';
+export {
+ AlreadyConnectedError,
+ CallEndedError,
+ InOtherCallError,
+} from './entities/calls/errors';
export type { CallMessage } from './entities/calls/message';
+export type { CallSummary } from './entities/calls/namespace';
+export { CallParticipant } from './entities/calls/participant';
export {
ConnectedApp,
ConnectedTool,
diff --git a/packages/sdk/tests/calls.test.ts b/packages/sdk/tests/calls.test.ts
new file mode 100644
index 0000000000..f0239e46d1
--- /dev/null
+++ b/packages/sdk/tests/calls.test.ts
@@ -0,0 +1,238 @@
+import { afterEach, expect, test } from 'bun:test';
+import { inspect } from 'node:util';
+import {
+ AlreadyConnectedError,
+ CallEndedError,
+ InOtherCallError,
+ Macro,
+} from '../src/macro';
+import { MacroClient } from '../src/utils/client';
+
+const originalFetch = globalThis.fetch;
+afterEach(() => {
+ globalThis.fetch = originalFetch;
+});
+
+type Route = (request: Request) => Response | Promise<Response>;
+
+function serve(routes: Record<string, Route>): Request[] {
+ const requests: Request[] = [];
+ globalThis.fetch = Object.assign(
+ async (input: RequestInfo | URL, init?: RequestInit) => {
+ const request =
+ input instanceof Request ? input : new Request(input, init);
+ requests.push(request.clone());
+ const key = `${request.method} ${new URL(request.url).pathname}`;
+ const route = routes[key];
+ if (!route) throw new Error(`Unexpected route ${key}`);
+ return route(request);
+ },
+ { preconnect: originalFetch.preconnect },
+ );
+ return requests;
+}
+
+function macro() {
+ return new Macro({
+ auth: { type: 'user', apiKey: 'test_key' },
+ hosts: { storage: 'https://storage.test' },
+ });
+}
+
+const credential = {
+ callId: 'call-1',
+ participantId: 'user-1',
+ roomName: 'room-1',
+ serverUrl: 'wss://room.test',
+ token: 'private-room-token',
+ started: false,
+};
+
+test('channel checks active without creating and starts with a body', async () => {
+ const requests = serve({
+ 'GET /call/channel-1/active': () => new Response(null, { status: 204 }),
+ 'POST /call/channel-1': () =>
+ Response.json({ ...credential, started: true }),
+ 'POST /call/record/call-1/leave': () => Response.json({ callEnded: false }),
+ });
+ const channel = macro().channels.byId('channel-1');
+ expect(await channel.activeCall()).toBeUndefined();
+ const connection = await channel.startCall({ onOtherCall: 'fail' });
+ expect(connection.started).toBe(true);
+ expect(await requests[1]?.json()).toEqual({ onOtherCall: 'fail' });
+ expect(await connection.leave()).toEqual({ callEnded: false });
+ expect(requests.map((request) => request.method)).toEqual([
+ 'GET',
+ 'POST',
+ 'POST',
+ ]);
+ expect(JSON.stringify(connection)).not.toContain(credential.token);
+ expect(inspect(connection)).not.toContain(credential.token);
+});
+
+test('call joins by record id and maps admission failures', async () => {
+ const call = macro().calls.byId('call-1');
+ serve({
+ 'POST /call/record/call-1/join': () => Response.json(credential),
+ });
+ expect((await call.join({ replace: true })).identity).toBe('user-1');
+
+ for (const [status, body, expected] of [
+ [409, { code: 'in_other_call', message: 'busy' }, InOtherCallError],
+ [
+ 409,
+ { code: 'already_connected', message: 'connected' },
+ AlreadyConnectedError,
+ ],
+ [410, { message: 'ended' }, CallEndedError],
+ ] as const) {
+ serve({
+ 'POST /call/record/call-1/join': () => Response.json(body, { status }),
+ });
+ await expect(call.join()).rejects.toBeInstanceOf(expected);
+ }
+});
+
+test('live list, ring, roster, decline and recording use call-id routes', async () => {
+ serve({
+ 'GET /call/active/all': () =>
+ Response.json({
+ calls: [
+ {
+ callId: 'call-1',
+ kind: 'channel',
+ channelId: 'channel-1',
+ createdAt: '2026-01-01T00:00:00Z',
+ createdBy: 'user-1',
+ participantCount: 1,
+ ringing: true,
+ },
+ ],
+ }),
+ 'POST /call/record/preview': () =>
+ Response.json({
+ previews: [
+ {
+ type: 'exists',
+ callId: 'call-1',
+ channelId: 'channel-1',
+ customName: 'Call',
+ startedAt: '2026-01-01T00:00:00Z',
+ },
+ ],
+ }),
+ 'GET /call/record/call-1/ring': () => Response.json({ status: 'ringing' }),
+ 'GET /call/record/call-1/participants': () =>
+ Response.json({
+ participants: [
+ {
+ identity: 'user-1',
+ displayName: 'Program',
+ kind: 'user',
+ userId: 'user-1',
+ isProgram: true,
+ tracks: [{ source: 'microphone', muted: false }],
+ },
+ ],
+ }),
+ 'POST /call/record/call-1/decline': () =>
+ new Response(null, { status: 204 }),
+ 'GET /call/record/call-1/recording': () =>
+ new Response(new Uint8Array([1, 2, 3]), {
+ headers: { 'content-type': 'video/mp4' },
+ }),
+ });
+ const sdk = macro();
+ const [call] = await sdk.calls.active();
+ if (!call) throw new Error('expected a live call');
+ expect(call.kind).toBe('channel');
+ expect((await sdk.calls.summaries([call]))[0]?.customName).toBe('Call');
+ expect(await call.ringState()).toBe('ringing');
+ const [participant] = await call.participants();
+ expect(participant?.user?.id).toBe('user-1');
+ expect(participant?.tracks[0]?.source).toBe('microphone');
+ await call.decline();
+ expect(await call.recording.bytes()).toEqual(new Uint8Array([1, 2, 3]));
+});
+
+test('meeting account and guest joins use the invitation link', async () => {
+ const requests = serve({
+ 'GET /call/meetings': () =>
+ Response.json({ meetings: [{ id: 'meeting-1', shareToken: 'share-1' }] }),
+ 'POST /call/meetings/join/share-1': () => Response.json(credential),
+ 'POST /call/join/share-1': () => Response.json(credential),
+ });
+ const meeting = macro().meetings.byId('meeting-1');
+ await meeting.join();
+ await meeting.joinAsGuest('Guest');
+ expect(await requests[1]?.json()).toEqual({});
+ expect(await requests[2]?.json()).toEqual({ displayName: 'Guest' });
+});
+
+test('discussion follows the record location', async () => {
+ serve({
+ 'GET /call/record/call-1': () =>
+ Response.json({
+ discussion: {
+ kind: 'channel_thread',
+ channel_id: 'channel-1',
+ root_id: 'message-1',
+ },
+ }),
+ });
+ const thread = await macro().calls.byId('call-1').discussion();
+ expect(thread.toJSON()).toEqual({
+ channelId: 'channel-1',
+ rootId: 'message-1',
+ });
+});
+
+test('call notifications hydrate entity handles', async () => {
+ const { hydrateCallEvent } = await import('../src/events/hydrate/call');
+ const client = new MacroClient({
+ auth: { type: 'user', apiKey: 'test_key' },
+ hosts: { storage: 'https://storage.test' },
+ });
+ const event = hydrateCallEvent(client, {
+ event_type: 'call.invited',
+ metadata: {
+ call_id: 'call-1',
+ meeting_id: 'meeting-1',
+ invited_by: 'user-1',
+ },
+ });
+ expect(event?.call.id).toBe('call-1');
+ expect(event?.meeting?.id).toBe('meeting-1');
+ expect(event?.inviter?.id).toBe('user-1');
+});
+
+test('call previews preserve input order and omit missing records', async () => {
+ const requests = serve({
+ 'POST /call/record/preview': () =>
+ Response.json({
+ previews: [
+ {
+ type: 'exists',
+ callId: 'call-2',
+ startedAt: '2026-01-02T00:00:00Z',
+ },
+ { type: 'does_not_exist', callId: 'call-3' },
+ {
+ type: 'exists',
+ callId: 'call-1',
+ startedAt: '2026-01-01T00:00:00Z',
+ },
+ ],
+ }),
+ });
+ const sdk = macro();
+ const summaries = await sdk.calls.summaries([
+ sdk.calls.byId('call-1'),
+ sdk.calls.byId('call-2'),
+ sdk.calls.byId('call-3'),
+ ]);
+ expect(summaries.map(({ call }) => call.id)).toEqual(['call-1', 'call-2']);
+ expect(await requests[0]?.json()).toEqual({
+ callIds: ['call-1', 'call-2', 'call-3'],
+ });
+});
diff --git a/services/document_storage_service/AGENTS.md b/services/document_storage_service/AGENTS.md
index 35c800f106..86001f26a2 100644
--- a/services/document_storage_service/AGENTS.md
+++ b/services/document_storage_service/AGENTS.md
@@ -36,6 +36,9 @@ threads, pins, recents, notifications, folders, activity.
No backend switch: the web flag `enable-whatsapp-linked` gates rollout.
- Guest call chat is mounted outside account auth at `/call/guest-chat/{call_id}`;
`call` verifies the RTC session and `messages` owns the shared discussion.
+- Authenticated call routes are composed from `crates/call` under `/call`;
+ `src/api/swagger.rs` lists their OpenAPI paths and schemas, while
+ `src/server.rs` supplies the per-caller start limiter.
- `src/service/entity_mutation.rs`: generic entity-mutation plumbing used
across item types. Folder duplication runs on its own task and copies
documents and chats through `entity_mutation/project_contents.rs`, the
@@ -88,6 +91,8 @@ threads, pins, recents, notifications, folders, activity.
- Provision required `POSTHOG_API_KEY` before startup; `enable-call-channel-thread`
evaluation has a 300 ms timeout and keeps the call's own chat on failure.
+- The same flag client evaluates `enable-programmatic-calls` per caller for the
+ explicit call start, join, and leave routes; failures disable those routes.
- Compose Soup without a separate property-definition reader; REST and GraphQL validate DATE range inputs before calling the service.
diff --git a/services/document_storage_service/src/api/swagger.rs b/services/document_storage_service/src/api/swagger.rs
index a701f91765..1c6e4e2155 100644
--- a/services/document_storage_service/src/api/swagger.rs
+++ b/services/document_storage_service/src/api/swagger.rs
@@ -406,11 +406,18 @@ use utoipa::OpenApi;
call::inbound::axum_router::meetings::guest_join,
call::inbound::axum_router::meetings::leave,
call::inbound::axum_router::get_or_create_call_handler,
+ call::inbound::axum_router::start_call_handler,
+ call::inbound::axum_router::join_call_handler,
+ call::inbound::axum_router::leave_call_handler,
+ call::inbound::axum_router::get_live_calls_handler,
+ call::inbound::axum_router::get_call_ring_state_handler,
+ call::inbound::axum_router::get_call_participants_handler,
call::inbound::axum_router::check_active_call_handler,
call::inbound::axum_router::get_active_calls_handler,
call::inbound::axum_router::leave_or_end_call_handler,
call::inbound::axum_router::decline_call_handler,
call::inbound::axum_router::get_call_record_handler,
+ call::inbound::axum_router::get_call_recording_handler,
call::inbound::axum_router::edit_call_record_handler,
call::inbound::axum_router::edit_call_transcript_handler,
call::inbound::axum_router::delete_call_record_handler,
@@ -1008,6 +1015,16 @@ use utoipa::OpenApi;
// Calls
call::domain::models::CallTokenResponse,
+ call::domain::models::JoinCallRequest,
+ call::domain::models::OnOtherCall,
+ call::domain::models::LiveCallSummary,
+ call::domain::models::LiveCallKind,
+ call::domain::models::LiveCallsResponse,
+ call::domain::models::LiveCallTrack,
+ call::domain::models::LiveTrackSource,
+ call::domain::models::LiveCallParticipant,
+ call::domain::models::LiveParticipantKind,
+ call::domain::models::LiveCallParticipantsResponse,
call::domain::models::CallActiveResponse,
call::domain::models::ActiveCallSummary,
call::domain::models::ActiveCallsResponse,
@@ -1031,6 +1048,8 @@ use utoipa::OpenApi;
// Webhooks
webhook::domain::events::WebhookEvent,
+ call::domain::notification_events::CallNotificationEvent,
+ call::domain::notification_events::CallNotificationMetadata,
webhook::domain::models::CreateWebhookRequest,
webhook::domain::models::CreateWebhookResponse,
webhook::domain::models::ListWebhooksResponse,
diff --git a/services/document_storage_service/src/server.rs b/services/document_storage_service/src/server.rs
index 27c8f4d652..6334ede2e6 100644
--- a/services/document_storage_service/src/server.rs
+++ b/services/document_storage_service/src/server.rs
@@ -897,11 +897,21 @@ async fn run_server() -> anyhow::Result<()> {
.map_err(|error| anyhow::anyhow!("invalid feature flag configuration: {error}"))?;
let call_service_builder = call_service_builder.with_channel_threads(Arc::new(
call::outbound::channel_threads::FlaggedChannelThreads::new(
- flags,
+ flags.clone(),
call_root_poster.clone(),
),
));
- let call_service = Arc::new(call_service_builder);
+ let call_service_builder = call_service_builder.with_programmatic_call_gate(
+ call::outbound::programmatic_calls::FlaggedProgrammaticCalls(flags),
+ );
+ let call_public_rate_limiter = RateLimitServiceImpl {
+ repo: RedisRateLimitAdapter {
+ redis: redis_client.clone(),
+ },
+ };
+ let call_service = Arc::new(call_service_builder.with_start_limiter(
+ call::inbound::axum_router::RateLimitedCallStarts(call_public_rate_limiter.clone()),
+ ));
consumer_tracker.spawn({
let service = call_service.clone();
@@ -922,11 +932,6 @@ async fn run_server() -> anyhow::Result<()> {
authorization_state.clone(),
);
let call_webhook_state = WebhookRouterState::new(call_service.clone());
- let call_public_rate_limiter = RateLimitServiceImpl {
- repo: RedisRateLimitAdapter {
- redis: redis_client.clone(),
- },
- };
let webhook_repository = webhook::outbound::PgRepository::new(db.clone());
let webhook_endpoint_scheme_policy = if matches!(env, Environment::Local) {