Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(calls): enable guest chat in quick and scheduled calls (#8295)
Eric Hayes2083068980a7
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.jsonindex 78ea12f0bc..d38205aa2f 100644--- a/.github/workspace-dep-closures.json+++ b/.github/workspace-dep-closures.json@@ -2342,6 +2342,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -3138,6 +3139,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -3760,6 +3762,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -3836,6 +3839,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -6578,6 +6582,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/macro_auth",@@ -7392,6 +7397,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -8745,6 +8751,7 @@"crates/image_generation","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -9064,6 +9071,7 @@"crates/initiative","crates/initiative_description","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -9316,6 +9324,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -9380,6 +9389,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -9525,6 +9535,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/macro_auth",@@ -10183,6 +10194,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/macro_auth",@@ -10619,6 +10631,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -12386,6 +12399,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/item_filters","crates/kafka_util","crates/last_online_tracker",@@ -13601,6 +13615,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/lexical_client",@@ -14011,6 +14026,7 @@"crates/harness_token","crates/initiative","crates/invite_email",+ "crates/ip_extractor","crates/kafka_util","crates/last_online_tracker","crates/macro_auth",diff --git a/.sqlx/query-7cd6a4226fe26b78cdedf29763afb19a0c6a3248ae9783d88705e96cfc6f06a2.json b/.sqlx/query-e154aa110e27cd6530da2cd4e351297414734882c695aa323c7c8a6e46333711.jsonsimilarity index 62%rename from .sqlx/query-7cd6a4226fe26b78cdedf29763afb19a0c6a3248ae9783d88705e96cfc6f06a2.jsonrename to .sqlx/query-e154aa110e27cd6530da2cd4e351297414734882c695aa323c7c8a6e46333711.jsonindex 5156fcaffd..549798adbb 100644--- a/.sqlx/query-7cd6a4226fe26b78cdedf29763afb19a0c6a3248ae9783d88705e96cfc6f06a2.json+++ b/.sqlx/query-e154aa110e27cd6530da2cd4e351297414734882c695aa323c7c8a6e46333711.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,\n sender_id, triggered_by_user_id, content, client_message_id)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8)",+ "query": "INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,\n sender_id, triggered_by_user_id, content, client_message_id, guest_name)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)","describe": {"columns": [],"parameters": {@@ -12,10 +12,11 @@"Text","Text","Text",- "Uuid"+ "Uuid",+ "Text"]},"nullable": []},- "hash": "7cd6a4226fe26b78cdedf29763afb19a0c6a3248ae9783d88705e96cfc6f06a2"+ "hash": "e154aa110e27cd6530da2cd4e351297414734882c695aa323c7c8a6e46333711"}diff --git a/Cargo.lock b/Cargo.lockindex 3dc0176f79..656fe54ba8 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3813,6 +3813,7 @@ dependencies = ["macro_event_topics","macro_user_id","macro_uuid",+ "messages","mockall","model-entity","model-error-response",@@ -4061,7 +4062,6 @@ name = "channel_sender"version = "0.1.0"dependencies = ["bot_id",- "either","macro_user_id","serde","serde_json",@@ -12645,6 +12645,7 @@ dependencies = ["entity_access","futures","initiative",+ "ip_extractor","macro_authorization","macro_db_migrator","macro_event_broker",@@ -12660,6 +12661,7 @@ dependencies = ["models_properties","notification","properties",+ "rate_limit","rootcause","schemars 1.2.1","serde",diff --git a/apps/web/src/features/channel/Call/CallOverlay.tsx b/apps/web/src/features/channel/Call/CallOverlay.tsxindex ce2c14113a..5274eaf2a6 100644--- a/apps/web/src/features/channel/Call/CallOverlay.tsx+++ b/apps/web/src/features/channel/Call/CallOverlay.tsx@@ -27,6 +27,7 @@ import { TrackView } from './TrackView';import { useActiveCallTeamShare } from './use-toggle-share-with-team';const CallChat = lazy(() => import('./chat/CallChat'));+const GuestCallChat = lazy(() => import('./chat/GuestCallChat'));function VideoTag(props: {children: JSXElement;@@ -224,8 +225,10 @@ export function CallOverlay(props: {showTeamSharing?: boolean;sharedWithTeam?: boolean;localName?: string;- /** Shared messages require an authenticated Macro participant. */+ /** The host may hide chat until account or guest session credentials are ready. */showChat?: boolean;+ /** Narrow RTC credential for a guest; never an account bearer. */+ guestChatSession?: { token: string; participantId: string };}) {const callCtx = useCallContext();const currentUserId = useUserId();@@ -388,12 +391,28 @@ export function CallOverlay(props: {<Show when={callCtx.activeCallId()} keyed>{(callId) => (<Suspense>- <CallChat- callId={callId}- id={chatId}- open={chatOpen()}- onClose={closeChat}- />+ <Show+ when={props.guestChatSession}+ keyed+ fallback={+ <CallChat+ callId={callId}+ id={chatId}+ open={chatOpen()}+ onClose={closeChat}+ />+ }+ >+ {(session) => (+ <GuestCallChat+ callId={callId}+ session={session}+ id={chatId}+ open={chatOpen()}+ onClose={closeChat}+ />+ )}+ </Show></Suspense>)}</Show>diff --git a/apps/web/src/features/channel/Call/chat/GuestCallChat.test.tsx b/apps/web/src/features/channel/Call/chat/GuestCallChat.test.tsxnew file mode 100644index 0000000000..994c71a469--- /dev/null+++ b/apps/web/src/features/channel/Call/chat/GuestCallChat.test.tsx@@ -0,0 +1,126 @@+/** @vitest-environment jsdom */+import {+ cleanup,+ fireEvent,+ render,+ screen,+ waitFor,+} from '@solidjs/testing-library';+import { createSignal, type JSX } from 'solid-js';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import GuestCallChat from './GuestCallChat';++const mocks = vi.hoisted(() => ({+ send: vi.fn(),+ refresh: vi.fn(),+ nextId: vi.fn(),+ touch: vi.fn(),+}));+vi.mock('@core/mobile/isTouchDevice', () => ({ isTouchDevice: mocks.touch }));+vi.mock('uuid', () => ({ v7: mocks.nextId }));+vi.mock('./queries/use-guest-call-chat', () => ({+ useGuestCallChat: () => ({+ messages: () => [+ {+ id: 'member-message',+ name: 'Member',+ guest: false,+ is_you: false,+ content: 'Welcome',+ },+ ],+ ready: () => true,+ loading: () => false,+ failed: () => false,+ denied: () => false,+ sending: () => false,+ send: mocks.send,+ refresh: mocks.refresh,+ }),+}));+vi.mock('./components/CallChatPanel', () => ({+ CallChatPanel: (props: {+ open: boolean;+ children: JSX.Element;+ composer: JSX.Element;+ }) => (+ <aside hidden={!props.open}>+ {props.children}+ {props.composer}+ </aside>+ ),+}));+beforeEach(() => {+ vi.resetAllMocks();+ mocks.nextId.mockReturnValue('new-id');+ mocks.send.mockResolvedValue(undefined);+});+afterEach(cleanup);++it('reads member messages, keeps drafts on close, and retries the same submission id', async () => {+ const [open, setOpen] = createSignal(true);+ render(() => (+ <GuestCallChat+ callId="call"+ session={{ token: 'token', participantId: 'guest' }}+ id="chat"+ open={open()}+ onClose={() => setOpen(false)}+ />+ ));+ expect(screen.getByText('Welcome')).toBeTruthy();+ const input = screen.getByRole('textbox') as HTMLTextAreaElement;+ fireEvent.input(input, { target: { value: 'Hello from guest' } });+ setOpen(false);+ setOpen(true);+ expect(input.value).toBe('Hello from guest');+ mocks.send.mockRejectedValueOnce(new Error('network'));+ fireEvent.keyDown(input, { key: 'Enter' });+ await waitFor(() => expect(screen.getByRole('alert')).toBeTruthy());+ expect(input.value).toBe('Hello from guest');+ fireEvent.click(screen.getByRole('button', { name: 'Send' }));+ await waitFor(() => expect(input.value).toBe(''));+ expect(mocks.nextId).toHaveBeenCalledOnce();+ expect(mocks.send.mock.calls).toEqual([+ [{ id: 'new-id', content: 'Hello from guest' }],+ [{ id: 'new-id', content: 'Hello from guest' }],+ ]);+ expect(mocks.refresh).toHaveBeenCalledOnce();+});++it('does not submit Shift+Enter or composition Enter', () => {+ render(() => (+ <GuestCallChat+ callId="call"+ session={{ token: 'token', participantId: 'guest' }}+ id="chat"+ open+ onClose={() => {}}+ />+ ));+ const input = screen.getByRole('textbox');+ fireEvent.input(input, { target: { value: 'Hello' } });+ fireEvent.keyDown(input, { key: 'Enter', shiftKey: true });+ fireEvent.keyDown(input, { key: 'Enter', isComposing: true });+ expect(mocks.send).not.toHaveBeenCalled();+});++it('keeps Enter for newlines on touch and sends with the button', async () => {+ mocks.touch.mockReturnValue(true);+ render(() => (+ <GuestCallChat+ callId="call"+ session={{ token: 'token', participantId: 'guest' }}+ id="chat"+ open+ onClose={() => {}}+ />+ ));+ const input = screen.getByRole('textbox');+ expect(document.activeElement).not.toBe(input);+ fireEvent.input(input, { target: { value: 'Hello' } });+ fireEvent.keyDown(input, { key: 'Enter' });+ expect(mocks.send).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Send' }));+ await waitFor(() => expect(mocks.send).toHaveBeenCalledOnce());+});diff --git a/apps/web/src/features/channel/Call/chat/GuestCallChat.tsx b/apps/web/src/features/channel/Call/chat/GuestCallChat.tsxnew file mode 100644index 0000000000..3d5cc919b2--- /dev/null+++ b/apps/web/src/features/channel/Call/chat/GuestCallChat.tsx@@ -0,0 +1,145 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { fireAndForget } from '@core/util/fireAndForget';+import { Button, TextField } from '@ui';+import { createEffect, createSignal, For, on, Show, Suspense } from 'solid-js';+import { v7 as newMessageId } from 'uuid';+import { CallChatPanel } from './components/CallChatPanel';+import { useGuestCallChat } from './queries/use-guest-call-chat';++type GuestCallChatProps = {+ callId: string;+ session: { token: string; participantId: string };+ id: string;+ open: boolean;+ onClose: () => void;+};++export default function GuestCallChat(props: GuestCallChatProps) {+ return (+ <Suspense>+ <GuestCallChatContent {...props} />+ </Suspense>+ );+}++function GuestCallChatContent(props: GuestCallChatProps) {+ const chat = useGuestCallChat(+ () => props.callId,+ () => props.session,+ () => props.open+ );+ const [content, setContent] = createSignal('');+ const [error, setError] = createSignal(false);+ let pending: { id: string; content: string } | undefined;+ let input!: HTMLTextAreaElement;+ createEffect(+ on([() => props.open, chat.ready], ([open, ready]) => {+ if (open && ready && !isTouchDevice()) input?.focus();+ })+ );++ async function send() {+ if (!content().trim() || !chat.ready() || chat.sending()) return;+ if (pending?.content !== content())+ pending = { id: newMessageId(), content: content() };+ setError(false);+ try {+ await chat.send(pending);+ pending = undefined;+ setContent('');+ fireAndForget(chat.refresh(), 'meetings');+ if (!isTouchDevice()) input.focus();+ } catch {+ setError(true);+ }+ }++ return (+ <CallChatPanel+ {...props}+ composer={+ <form+ onSubmit={(event) => {+ event.preventDefault();+ fireAndForget(send(), 'meetings');+ }}+ >+ <Show when={error()}>+ <p role="alert" class="mb-2 text-sm text-failure">+ Message could not be sent. Try again.+ </p>+ </Show>+ <TextField+ value={content()}+ onChange={setContent}+ disabled={!chat.ready() || chat.sending()}+ >+ <TextField.TextArea+ ref={input}+ aria-label="Message this call"+ placeholder="Message this call…"+ maxLength={16000}+ rows={3}+ onKeyDown={(event: KeyboardEvent) => {+ if (+ event.key === 'Enter' &&+ !isTouchDevice() &&+ !event.shiftKey &&+ !event.isComposing+ ) {+ event.preventDefault();+ fireAndForget(send(), 'meetings');+ }+ }}+ />+ </TextField>+ <Button+ type="submit"+ class="mt-2"+ disabled={!chat.ready() || chat.sending() || !content().trim()}+ >+ Send+ </Button>+ </form>+ }+ >+ <Show when={chat.loading()}>+ <p role="status" class="text-sm text-ink-muted">+ Loading chat…+ </p>+ </Show>+ <Show when={chat.failed()}>+ <p role="alert" class="text-sm text-ink-muted">+ {chat.denied()+ ? 'Chat is available while you are in this call.'+ : 'Could not load chat.'}+ </p>+ <Button+ type="button"+ onClick={() => fireAndForget(chat.refresh(), 'meetings')}+ >+ Retry+ </Button>+ </Show>+ <Show when={chat.ready() && chat.messages().length === 0}>+ <p class="text-sm text-ink-muted">+ Start the conversation. Messages stay with this call.+ </p>+ </Show>+ <For each={chat.messages()}>+ {(message) => (+ <div class="mb-4">+ <p class="text-sm font-medium">+ {message.name}+ {message.guest ? ' (Guest)' : ''}+ {message.is_you ? ' · You' : ''}+ </p>+ <p class="whitespace-pre-wrap break-words text-sm">+ {message.content}+ </p>+ </div>+ )}+ </For>+ </CallChatPanel>+ );+}diff --git a/apps/web/src/features/channel/Call/chat/queries/keys.ts b/apps/web/src/features/channel/Call/chat/queries/keys.tsindex 045a08fb9f..47baa6fe86 100644--- a/apps/web/src/features/channel/Call/chat/queries/keys.ts+++ b/apps/web/src/features/channel/Call/chat/queries/keys.ts@@ -1,2 +1,11 @@// Call chat shares the canonical message thread cache with every messaging surface.+import { createQueryKeys } from '@lukemorales/query-key-factory';+export { messageKeys as callChatKeys } from '@queries/messages/keys';++const guestCallChatKeys = createQueryKeys('guest-call-chat', {+ messages: (callId: string, participantId: string) => [callId, participantId],+});++export const guestCallChatKey = (callId: string, participantId: string) =>+ guestCallChatKeys.messages(callId, participantId).queryKey;diff --git a/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.test.tsx b/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.test.tsxnew file mode 100644index 0000000000..1dc2c9e0d0--- /dev/null+++ b/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.test.tsx@@ -0,0 +1,104 @@+/** @vitest-environment jsdom */+import { cleanup, render, waitFor } from '@solidjs/testing-library';+import { QueryClient, QueryClientProvider } from '@tanstack/solid-query';+import { err, ok } from 'neverthrow';+import { createSignal } from 'solid-js';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { useGuestCallChat } from './use-guest-call-chat';++let client: QueryClient;+const mocks = vi.hoisted(() => ({+ getGuestChat: vi.fn(),+ postGuestChat: vi.fn(),+}));+vi.mock('@service-call/client', () => ({ callServiceClient: mocks }));+vi.mock('@queries/client', () => ({+ get queryClient() {+ return client;+ },+}));+const message = {+ id: 'message',+ name: 'Visitor',+ guest: true,+ is_you: true,+ content: 'Hello',+ created_at: '2026-10-01T00:00:00Z',+};+beforeEach(() => {+ client = new QueryClient({ defaultOptions: { queries: { retry: false } } });+ vi.resetAllMocks();+ mocks.getGuestChat.mockResolvedValue(ok({ messages: [message] }));+ mocks.postGuestChat.mockResolvedValue(ok(message));+});+afterEach(() => {+ cleanup();+ client.clear();+});++function mount(initialOpen = true) {+ let source!: ReturnType<typeof useGuestCallChat>;+ const [open, setOpen] = createSignal(initialOpen);+ function Harness() {+ source = useGuestCallChat(+ () => 'call',+ () => ({ token: 'secret', participantId: 'guest' }),+ open+ );+ return <span>{source.ready() ? source.messages().length : 'pending'}</span>;+ }+ const rendered = render(() => (+ <QueryClientProvider client={client}>+ <Harness />+ </QueryClientProvider>+ ));+ return { source, setOpen, unmount: rendered.unmount };+}++it('fetches only when open, keeps tokens out of cache keys, and clears session history on unmount', async () => {+ const { source, setOpen, unmount } = mount(false);+ await waitFor(() => expect(source.loading()).toBe(true));+ expect(mocks.getGuestChat).not.toHaveBeenCalled();+ setOpen(true);+ await waitFor(() => expect(source.ready()).toBe(true));+ expect(mocks.getGuestChat).toHaveBeenCalledWith('call', 'secret');+ expect(+ JSON.stringify(+ client+ .getQueryCache()+ .getAll()+ .map((query) => query.queryKey)+ )+ ).not.toContain('secret');+ expect(source.messages()).toEqual([message]);+ unmount();+ expect(client.getQueryCache().getAll()).toHaveLength(0);+});++it('hides cached messages and disables sending after access is revoked', async () => {+ const { source, setOpen } = mount();+ setOpen(true);+ await waitFor(() => expect(source.ready()).toBe(true));+ mocks.getGuestChat.mockResolvedValue(+ err([{ code: 'FORBIDDEN', message: 'Guest left' }])+ );+ await source.refresh();+ await waitFor(() => expect(source.denied()).toBe(true));+ expect(source.messages()).toEqual([]);+ expect(source.ready()).toBe(false);+});++it('deduplicates sent messages in the cache and preserves history on transient refresh failures', async () => {+ const { source, setOpen } = mount();+ setOpen(true);+ await waitFor(() => expect(source.ready()).toBe(true));+ await source.send({ id: 'client-id', content: 'Hello' });+ expect(source.messages()).toHaveLength(1);+ mocks.getGuestChat.mockResolvedValue(+ err([{ code: 'SERVER_ERROR', message: 'Unavailable' }])+ );+ await source.refresh();+ await waitFor(() => expect(source.failed()).toBe(true));+ expect(source.ready()).toBe(true);+ expect(source.messages()).toEqual([message]);+});diff --git a/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.ts b/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.tsnew file mode 100644index 0000000000..44e2c178ba--- /dev/null+++ b/apps/web/src/features/channel/Call/chat/queries/use-guest-call-chat.ts@@ -0,0 +1,71 @@+import { thrownResultErrorHasCode, throwOnErr } from '@core/util/result';+import { queryClient } from '@queries/client';+import { callServiceClient, type GuestChatPage } from '@service-call/client';+import { queryOptions, useMutation, useQuery } from '@tanstack/solid-query';+import { type Accessor, onCleanup } from 'solid-js';+import { guestCallChatKey } from './keys';++function guestCallChatOptions(+ callId: string,+ session: { token: string; participantId: string },+ open: boolean+) {+ return queryOptions({+ queryKey: guestCallChatKey(callId, session.participantId),+ queryFn: () =>+ throwOnErr(() => callServiceClient.getGuestChat(callId, session.token)),+ enabled: open,+ refetchInterval: open ? 3000 : false,+ retry: false,+ gcTime: 0,+ });+}++export function useGuestCallChat(+ callId: Accessor<string>,+ session: Accessor<{ token: string; participantId: string }>,+ open: Accessor<boolean>+) {+ let active = true;+ const key = guestCallChatKey(callId(), session().participantId);+ const query = useQuery(() =>+ guestCallChatOptions(callId(), session(), open())+ );+ const denied = () =>+ query.isError &&+ ['FORBIDDEN', 'UNAUTHORIZED'].some((code) =>+ thrownResultErrorHasCode(query.error, code)+ );+ const send = useMutation(() => ({+ mutationFn: (input: { id: string; content: string }) =>+ throwOnErr(() =>+ callServiceClient.postGuestChat(callId(), session().token, input)+ ),+ onSuccess: (message) => {+ if (!active) return;+ queryClient.setQueryData<GuestChatPage>(key, (current) => ({+ messages: [+ ...(current?.messages ?? []).filter((item) => item.id !== message.id),+ message,+ ],+ }));+ },+ }));+ onCleanup(() => {+ active = false;+ queryClient.removeQueries({ queryKey: key, exact: true });+ });+ return {+ messages: () =>+ !denied() && (query.isSuccess || query.isRefetchError)+ ? (query.data?.messages ?? [])+ : [],+ ready: () => query.isSuccess || (query.isRefetchError && !denied()),+ failed: () => query.isError,+ denied,+ loading: () => query.isPending,+ sending: () => send.isPending,+ send: (input: { id: string; content: string }) => send.mutateAsync(input),+ refresh: () => query.refetch(),+ };+}diff --git a/apps/web/src/features/channel/Message/SenderIcon.tsx b/apps/web/src/features/channel/Message/SenderIcon.tsxindex 1d4d8d3166..27133cb3f9 100644--- a/apps/web/src/features/channel/Message/SenderIcon.tsx+++ b/apps/web/src/features/channel/Message/SenderIcon.tsx@@ -33,7 +33,11 @@ export function SenderIcon(props: SenderIconProps) {>{!props.hidden && (<Show- when={botSender()}+ when={+ message().guest_name+ ? { name: message().guest_name, avatar_url: null }+ : botSender()+ }fallback={<UserIcon id={message().sender_id} size="fill" />}>{(bot) => (diff --git a/apps/web/src/features/channel/Message/SenderName.tsx b/apps/web/src/features/channel/Message/SenderName.tsxindex e4ee8d5ead..a3fd37bf54 100644--- a/apps/web/src/features/channel/Message/SenderName.tsx+++ b/apps/web/src/features/channel/Message/SenderName.tsx@@ -31,5 +31,11 @@ export function SenderName(props: { message: MessageData }) {const name = props.message.imported_author?.name?.trim();return name ? name : undefined;};- return <>{importedName() ?? agentName() ?? displayName()}</>;+ return (+ <>+ {props.message.guest_name+ ? `${props.message.guest_name} (Guest)`+ : (importedName() ?? agentName() ?? displayName())}+ </>+ );}diff --git a/apps/web/src/features/meetings/meeting-route.tsx b/apps/web/src/features/meetings/meeting-route.tsxindex 5f855b27cc..99f20db483 100644--- a/apps/web/src/features/meetings/meeting-route.tsx+++ b/apps/web/src/features/meetings/meeting-route.tsx@@ -128,11 +128,17 @@ export function MeetingRouteContent(props: {}),disconnect: call.meetingSession.disconnect,}}- renderCall={(onLeave, name) => (+ renderCall={(onLeave, name, credentials) => (<CallOverlayonLeave={onLeave}localName={name()}- showChat={authenticated() === true}+ showChat={+ authenticated() === true ||+ (authenticated() === false && !!credentials())+ }+ guestChatSession={+ authenticated() === false ? credentials() : undefined+ }showTeamSharing={canShareWithTeam()}sharedWithTeam={record.isSuccess ? record.data.shareWithTeam : undefineddiff --git a/apps/web/src/features/meetings/primitives/meeting-session.test.ts b/apps/web/src/features/meetings/primitives/meeting-session.test.tsindex f18c8018a1..3387d0c022 100644--- a/apps/web/src/features/meetings/primitives/meeting-session.test.ts+++ b/apps/web/src/features/meetings/primitives/meeting-session.test.ts@@ -66,6 +66,7 @@ describe('meeting session ownership', () => {});await session.join(undefined, preferences);const leaving = session.leave();+ expect(session.credentials()).toBeUndefined();expect(capabilities.release).toHaveBeenCalledExactlyOnceWith(token.shareToken,token.token@@ -257,6 +258,7 @@ describe('meeting session ownership', () => {it('validates guest names before requesting a token and respects media preferences', async () => {const { session, capabilities, dispose } = setup();+ expect(session.credentials()).toBeUndefined();await session.join(' ', preferences);expect(capabilities.join).not.toHaveBeenCalled();expect(session.error()).toContain('Enter your name');@@ -264,7 +266,9 @@ describe('meeting session ownership', () => {expect(capabilities.join).toHaveBeenCalledWith('Taylor');expect(capabilities.connect).toHaveBeenCalledWith(token, preferences);expect(session.joinedCallId()).toBe(token.callId);+ expect(session.credentials()).toEqual(token);dispose();+ expect(session.credentials()).toBeUndefined();});it('releases a late token after the page is closed without opening media', async () => {@@ -307,6 +311,7 @@ describe('meeting session ownership', () => {expect(session.joining()).toBe(false);expect(session.error()).toContain('Could not join');expect(session.joinedCallId()).toBeUndefined();+ expect(session.credentials()).toBeUndefined();dispose();});diff --git a/apps/web/src/features/meetings/primitives/meeting-session.ts b/apps/web/src/features/meetings/primitives/meeting-session.tsindex 2b3666d7f0..ec6f00c503 100644--- a/apps/web/src/features/meetings/primitives/meeting-session.ts+++ b/apps/web/src/features/meetings/primitives/meeting-session.ts@@ -16,6 +16,7 @@ type IssuedMeetingSession = {export function createMeetingSession(capabilities: MeetingSessionCapabilities) {const [joining, setJoining] = createSignal(false);const [joinedCallId, setJoinedCallId] = createSignal<string>();+ const [credentials, setCredentials] = createSignal<MeetingCredentials>();const [error, setError] = createSignal<string>();const [hasLeft, setHasLeft] = createSignal(false);let issuedSession: IssuedMeetingSession | undefined;@@ -119,6 +120,7 @@ export function createMeetingSession(capabilities: MeetingSessionCapabilities) {return;}issuedSession = issued;+ setCredentials(issued.credentials);joinTrace.setAttr('call.id', issued.credentials.callId);const localTracks = claimLocalTracks();const credentials = issued.credentials;@@ -155,6 +157,7 @@ export function createMeetingSession(capabilities: MeetingSessionCapabilities) {if (disposed || attempt !== generation) return;issuedSession = undefined;setError('Could not join the call. Check your connection and try again.');+ setCredentials(undefined);console.error('Failed to join meeting', cause);} finally {joinTrace.end();@@ -178,6 +181,7 @@ export function createMeetingSession(capabilities: MeetingSessionCapabilities) {activeAttempt = undefined;const session = issuedSession;issuedSession = undefined;+ setCredentials(undefined);const cleanupLifecycle = capabilities.lifecycle.begin();if (!disposed) {setJoining(false);@@ -213,5 +217,5 @@ export function createMeetingSession(capabilities: MeetingSessionCapabilities) {fireAndForget(leave(), 'meetings');});- return { join, leave, joining, joinedCallId, error, hasLeft };+ return { join, leave, joining, joinedCallId, credentials, error, hasLeft };}diff --git a/apps/web/src/features/meetings/views/meeting-page.tsx b/apps/web/src/features/meetings/views/meeting-page.tsxindex 7c0a6cc5a7..6a6596b858 100644--- a/apps/web/src/features/meetings/views/meeting-page.tsx+++ b/apps/web/src/features/meetings/views/meeting-page.tsx@@ -21,6 +21,7 @@ import {type MeetingParticipantsState,} from '../components/meeting-participants';import type {+ MeetingCredentials,MeetingPageState,MeetingSessionCapabilities,} from '../context/meeting-session';@@ -53,7 +54,11 @@ export function MeetingPage(props: {renderInvite?: (joining: Accessor<boolean>) => JSX.Element;/** Login redirect for channel-linked calls, which are members-only. */onSignIn?: () => void;- renderCall: (onLeave: () => void, name: Accessor<string>) => JSX.Element;+ renderCall: (+ onLeave: () => void,+ name: Accessor<string>,+ credentials: Accessor<MeetingCredentials | undefined>+ ) => JSX.Element;}) {const session = createMeetingSession(props.session);const [name, setName] = createSignal('');@@ -170,7 +175,7 @@ export function MeetingPage(props: {</Match><Match when={inCall()}><div class="min-h-0 flex-1">- {props.renderCall(leave, displayName)}+ {props.renderCall(leave, displayName, session.credentials)}</div></Match><Match when={props.source().kind === 'loading'}>diff --git a/apps/web/src/lib/core/messages/types.ts b/apps/web/src/lib/core/messages/types.tsindex 47941a3d8d..f991d69d47 100644--- a/apps/web/src/lib/core/messages/types.ts+++ b/apps/web/src/lib/core/messages/types.ts@@ -8,6 +8,7 @@ import type {export type MessageData = {parent?: MessageParent;imported_author?: { name: string } | null;+ guest_name?: string | null;id: string;content: string;sender_id: string;diff --git a/apps/web/src/lib/service-clients/service-call/client.test.ts b/apps/web/src/lib/service-clients/service-call/client.test.tsindex fa61ecaefc..6546a40c3a 100644--- a/apps/web/src/lib/service-clients/service-call/client.test.ts+++ b/apps/web/src/lib/service-clients/service-call/client.test.ts@@ -22,6 +22,32 @@ beforeEach(() => {});describe('meeting transport authorization', () => {+ it('reads and posts guest chat with only the scoped RTC bearer', async () => {+ await callServiceClient.getGuestChat('call-id', 'room-token');+ await callServiceClient.postGuestChat('call-id', 'room-token', {+ id: 'message-id',+ content: 'Hello',+ });+ expect(requests.public).toHaveBeenNthCalledWith(+ 1,+ 'https://gateway.example/dss/call/guest-chat/call-id',+ {+ credentials: 'omit',+ headers: { Authorization: 'Bearer room-token' },+ }+ );+ expect(requests.public).toHaveBeenNthCalledWith(+ 2,+ 'https://gateway.example/dss/call/guest-chat/call-id',+ {+ method: 'POST',+ credentials: 'omit',+ headers: { Authorization: 'Bearer room-token' },+ body: JSON.stringify({ id: 'message-id', content: 'Hello' }),+ }+ );+ expect(requests.authenticated).not.toHaveBeenCalled();+ });it.each([[400, 'Bad request: Invalid channel ID format', 'MEETINGS_UNAVAILABLE'],[400, 'Bad request: Invalid title', 'HTTP_ERROR'],diff --git a/apps/web/src/lib/service-clients/service-call/client.ts b/apps/web/src/lib/service-clients/service-call/client.tsindex 6a6ac12ae7..7810106383 100644--- a/apps/web/src/lib/service-clients/service-call/client.ts+++ b/apps/web/src/lib/service-clients/service-call/client.ts@@ -9,6 +9,9 @@ import type { CallRecord } from '@service-storage/generated/schemas/callRecord';import type { CallTokenResponse as ApiCallTokenResponse } from '@service-storage/generated/schemas/callTokenResponse';import type { CreateMeetingRequest } from '@service-storage/generated/schemas/createMeetingRequest';import type { EditCallRecordRequest } from '@service-storage/generated/schemas/editCallRecordRequest';+import type { GuestChatMessage } from '@service-storage/generated/schemas/guestChatMessage';+import type { GuestChatPage } from '@service-storage/generated/schemas/guestChatPage';+import type { GuestChatPost } from '@service-storage/generated/schemas/guestChatPost';import type { InviteMeetingUsersRequest } from '@service-storage/generated/schemas/inviteMeetingUsersRequest';import type { LeaveCallResponse } from '@service-storage/generated/schemas/leaveCallResponse';import type { Meeting as ApiMeeting } from '@service-storage/generated/schemas/meeting';@@ -16,7 +19,13 @@ import type { MeetingPreparation } from '@service-storage/generated/schemas/meetimport type { UpdateMeetingRequest } from '@service-storage/generated/schemas/updateMeetingRequest';import type { UpdateSharePermissionRequestV2 } from '@service-storage/generated/schemas/updateSharePermissionRequestV2';-export type { CallRecord, CreateMeetingRequest, UpdateMeetingRequest };+export type {+ CallRecord,+ CreateMeetingRequest,+ GuestChatMessage,+ GuestChatPage,+ UpdateMeetingRequest,+};// Rust serializes these nullable fields explicitly; Orval marks Option<T> optional.export type CallTokenResponse = Required<ApiCallTokenResponse>;@@ -31,6 +40,26 @@ export type MeetingParticipants = {const host: string = SERVER_HOSTS['document-storage-service'];export const callServiceClient = {+ getGuestChat(callId: string, token: string) {+ return safeFetch<GuestChatPage>(+ `${host}/call/guest-chat/${encodeURIComponent(callId)}`,+ {+ credentials: 'omit',+ headers: { Authorization: `Bearer ${token}` },+ }+ );+ },+ postGuestChat(callId: string, token: string, input: GuestChatPost) {+ return safeFetch<GuestChatMessage>(+ `${host}/call/guest-chat/${encodeURIComponent(callId)}`,+ {+ method: 'POST',+ credentials: 'omit',+ headers: { Authorization: `Bearer ${token}` },+ body: JSON.stringify(input),+ }+ );+ },prepareMeeting() {return fetchWithToken<MeetingPreparation>(`${host}/call/meetings/prepare`, {method: 'POST',diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatMessage.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatMessage.tsnew file mode 100644index 0000000000..76a6f953a1--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatMessage.ts@@ -0,0 +1,24 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Guest-safe message projection: no account identities, attachments, or entity grants.+ */+export interface GuestChatMessage {+ /** Message body. */+ content: string;+ /** Creation time. */+ created_at: string;+ /** Whether the author is a guest. */+ guest: boolean;+ /** Persisted message identity. */+ id: string;+ /** Whether this session authored the message. */+ is_you: boolean;+ /** Display-only author name. */+ name: string;+}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPage.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPage.tsnew file mode 100644index 0000000000..01dd09f9dc--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPage.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 { GuestChatMessage } from './guestChatMessage';++/**+ * Messages in the call's one discussion, oldest first.+ */+export interface GuestChatPage {+ /** Visible, nondeleted messages. */+ messages: GuestChatMessage[];+}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPost.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPost.tsnew file mode 100644index 0000000000..ec543840f3--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/guestChatPost.ts@@ -0,0 +1,16 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Guests may send text only; attribution and parent are server-owned.+ */+export interface GuestChatPost {+ /** Text to append to the call discussion. */+ content: string;+ /** UUIDv7 used to deduplicate retries, including the first message. */+ id: 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.tsindex 4a7f924bd4..8e40501d18 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@@ -1083,6 +1083,9 @@ export * from './groupedSoupPageOneOfFour';export * from './groupedSoupPageOneOfFourAllOf';export * from './groupedSoupPageOneOfFourAllOfMode';export * from './groupedSoupSort';+export * from './guestChatMessage';+export * from './guestChatPage';+export * from './guestChatPost';export * from './guestId';export * from './guestJoinRequest';export * from './harness';@@ -1229,6 +1232,7 @@ export * from './messageDirection';export * from './messageEditedAt';export * from './messageEvent';export * from './messageEventNonce';+export * from './messageGuestName';export * from './messageImportedAuthor';export * from './messageListItem';export * from './messageListItemAllOf';diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/meetingToken.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/meetingToken.tsindex 3669fdf4a4..a8f9246c26 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/meetingToken.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/meetingToken.ts@@ -6,6 +6,7 @@*//**- * A bearer capability that grants access only to a meeting's RTC room.+ * An invitation capability for joining a meeting's RTC room. Chat additionally+requires the resulting participant credential and current guest membership.*/export type MeetingToken = string;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.tsindex 7ec6e635c6..e35cf2c49f 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts@@ -10,6 +10,7 @@ import type { MessageAttachment } from './messageAttachment';import type { MessageBotProfile } from './messageBotProfile';import type { MessageDeletedAt } from './messageDeletedAt';import type { MessageEditedAt } from './messageEditedAt';+import type { MessageGuestName } from './messageGuestName';import type { MessageImportedAuthor } from './messageImportedAuthor';import type { MessageParent } from './messageParent';import type { MessageThreadId } from './messageThreadId';@@ -31,6 +32,8 @@ export interface Message {deleted_at?: MessageDeletedAt;/** Last content edit, if any. */edited_at?: MessageEditedAt;+ /** Display name of a verified call guest, retained after the call ends. */+ guest_name?: MessageGuestName;/** Message UUID. */id: string;imported_author?: MessageImportedAuthor;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageGuestName.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageGuestName.tsnew file mode 100644index 0000000000..fed9649350--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageGuestName.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Display name of a verified call guest, retained after the call ends.+ */+export type MessageGuestName = string | null;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.tsindex 8d3af8ae85..b9b0eee699 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@@ -1749,6 +1749,71 @@ export const getActiveCallsResponse = zod'Response listing all active calls in channels the caller is a member of.');+/**+ * @summary Read the live call discussion as a verified guest.+ */+export const guestCallChatReadParams = zod.object({+ call_id: zod.uuid(),+});++export const guestCallChatReadResponse = zod+ .object({+ messages: zod+ .array(+ zod+ .object({+ content: zod.string().describe('Message body.'),+ created_at: zod.iso.datetime({}).describe('Creation time.'),+ guest: zod.boolean().describe('Whether the author is a guest.'),+ id: zod.uuid().describe('Persisted message identity.'),+ is_you: zod+ .boolean()+ .describe('Whether this session authored the message.'),+ name: zod.string().describe('Display-only author name.'),+ })+ .describe(+ 'Guest-safe message projection: no account identities, attachments, or entity grants.'+ )+ )+ .describe('Visible, nondeleted messages.'),+ })+ .describe("Messages in the call's one discussion, oldest first.");++/**+ * @summary Append text to the same saved discussion used by account participants.+ */+export const guestCallChatPostParams = zod.object({+ call_id: zod.uuid(),+});++export const guestCallChatPostBody = zod+ .object({+ content: zod.string().describe('Text to append to the call discussion.'),+ id: zod+ .uuid()+ .describe(+ 'UUIDv7 used to deduplicate retries, including the first message.'+ ),+ })+ .describe(+ 'Guests may send text only; attribution and parent are server-owned.'+ );++export const guestCallChatPostResponse = zod+ .object({+ content: zod.string().describe('Message body.'),+ created_at: zod.iso.datetime({}).describe('Creation time.'),+ guest: zod.boolean().describe('Whether the author is a guest.'),+ id: zod.uuid().describe('Persisted message identity.'),+ is_you: zod+ .boolean()+ .describe('Whether this session authored the message.'),+ name: zod.string().describe('Display-only author name.'),+ })+ .describe(+ 'Guest-safe message projection: no account identities, attachments, or entity grants.'+ );+/*** @summary Handle `GET /call/join/{token}` through the call domain service.*/@@ -1780,7 +1845,7 @@ export const meetingLookupResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -1900,7 +1965,7 @@ export const meetingListResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -1961,7 +2026,7 @@ export const meetingCreateResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -2000,7 +2065,7 @@ export const meetingListActiveResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -2216,7 +2281,7 @@ export const meetingUpdateResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -2629,7 +2694,7 @@ export const meetingShareResponse = zodshareToken: zod.string().describe(- "A bearer capability that grants access only to a meeting's RTC room."+ "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."),title: zod.string().describe('Human-readable meeting title.'),})@@ -45136,6 +45201,12 @@ export const messageTimelineResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -45459,6 +45530,12 @@ export const messageTimelineResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -45842,6 +45919,12 @@ export const entityMessageCreateResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -45998,6 +46081,12 @@ export const entityMessageGetMessageResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -46158,6 +46247,12 @@ export const entityMessageDeleteMessageResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -46414,6 +46509,12 @@ export const entityMessageEditResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -46578,6 +46679,12 @@ export const entityMessageReactResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -46741,6 +46848,12 @@ export const entityMessageLegacyResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -46914,6 +47027,12 @@ export const entityMessageGetThreadResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -47077,6 +47196,12 @@ export const entityMessageGetThreadResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -47653,6 +47778,12 @@ export const messageTimelineEntriesResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([@@ -48006,6 +48137,12 @@ export const messageTimelineEntriesResponse = zod.datetime({}).nullish().describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),id: zod.uuid().describe('Message UUID.'),imported_author: zod.union([diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex 5add8a3888..788707c4f6 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -999,6 +999,80 @@}}},+ "/call/guest-chat/{call_id}": {+ "get": {+ "tags": ["messages::inbound::guest_chat"],+ "summary": "Read the live call discussion as a verified guest.",+ "operationId": "guest_call_chat_read",+ "parameters": [+ {+ "name": "call_id",+ "in": "path",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatPage"+ }+ }+ }+ },+ "403": {+ "description": ""+ }+ }+ },+ "post": {+ "tags": ["messages::inbound::guest_chat"],+ "summary": "Append text to the same saved discussion used by account participants.",+ "operationId": "guest_call_chat_post",+ "parameters": [+ {+ "name": "call_id",+ "in": "path",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatPost"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatMessage"+ }+ }+ }+ },+ "403": {+ "description": ""+ }+ }+ }+ },"/call/join/{token}": {"get": {"tags": ["call::inbound::axum_router::meetings"],@@ -30648,6 +30722,70 @@"description": "Sort method for grouped queries (frecency not supported).","enum": ["viewed_at", "created_at", "updated_at", "viewed_updated"]},+ "GuestChatMessage": {+ "type": "object",+ "description": "Guest-safe message projection: no account identities, attachments, or entity grants.",+ "required": ["id", "name", "guest", "is_you", "content", "created_at"],+ "properties": {+ "content": {+ "type": "string",+ "description": "Message body."+ },+ "created_at": {+ "type": "string",+ "format": "date-time",+ "description": "Creation time."+ },+ "guest": {+ "type": "boolean",+ "description": "Whether the author is a guest."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "Persisted message identity."+ },+ "is_you": {+ "type": "boolean",+ "description": "Whether this session authored the message."+ },+ "name": {+ "type": "string",+ "description": "Display-only author name."+ }+ }+ },+ "GuestChatPage": {+ "type": "object",+ "description": "Messages in the call's one discussion, oldest first.",+ "required": ["messages"],+ "properties": {+ "messages": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/GuestChatMessage"+ },+ "description": "Visible, nondeleted messages."+ }+ }+ },+ "GuestChatPost": {+ "type": "object",+ "description": "Guests may send text only; attribution and parent are server-owned.",+ "required": ["id", "content"],+ "properties": {+ "content": {+ "type": "string",+ "description": "Text to append to the call discussion."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "UUIDv7 used to deduplicate retries, including the first message."+ }+ },+ "additionalProperties": false+ },"GuestId": {"type": "string","format": "uuid",@@ -32040,7 +32178,7 @@},"MeetingToken": {"type": "string",- "description": "A bearer capability that grants access only to a meeting's RTC room."+ "description": "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."},"MeetingsResponse": {"type": "object",@@ -32108,6 +32246,10 @@"format": "date-time","description": "Last content edit, if any."},+ "guest_name": {+ "type": ["string", "null"],+ "description": "Display name of a verified call guest, retained after the call ends."+ },"id": {"type": "string","format": "uuid",diff --git a/crates/agent_code_mode/src/domain/documentation.json b/crates/agent_code_mode/src/domain/documentation.jsonindex 2615d04563..c1eb27541f 100644--- a/crates/agent_code_mode/src/domain/documentation.json+++ b/crates/agent_code_mode/src/domain/documentation.json@@ -27,13 +27,13 @@"name": "calls","description": "Read call records and transcripts.","overview": "<!-- src/entities/calls/namespace/classes/CallRecordNamespace.md -->\n# Class: CallRecordNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CallRecordNamespace**(`client`): `CallRecordNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CallRecordNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`CallRecord`](../../call-record/classes/CallRecord.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CallRecord`](../../call-record/classes/CallRecord.md)\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n",- "documentation": "# Macro SDK: calls\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecord.md -->\n# Type Alias: CallRecord\n\n> **CallRecord** = \\{ `callId`: `string`; `channelId?`: `string` \\| `null`; `channelName?`: `string` \\| `null`; `createdBy`: `string`; `customName?`: `string` \\| `null`; `durationMs?`: `number` \\| `null`; `egressId?`: `string` \\| `null`; `endedAt?`: `string` \\| `null`; `guests`: [`CallRecordGuest`](CallRecordGuest.md)[]; `isActive`: `boolean`; `participants`: [`CallRecordParticipant`](CallRecordParticipant.md)[]; `recordingPreviewUrl?`: `string` \\| `null`; `recordingStartedAt?`: `string` \\| `null`; `recordingUrl?`: `string` \\| `null`; `roomName`: `string`; `shareWithTeam`: `boolean`; `startedAt`: `string`; `status?`: `null` \\| [`CallStatus`](CallStatus.md); `summary?`: `string` \\| `null`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `transcript`: [`CallRecordTranscriptSegment`](CallRecordTranscriptSegment.md)[]; `userAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `viewerHasDeclined?`: `boolean`; \\}\n\nFull record of a call, unifying rows from `calls` (active) and\n`call_records` (archived) into a single response shape.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId` | `string` | The call identifier. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | The channel this call belongs to. |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` \\| `null` | Resolved display name for the channel. |\n| <a id=\"property-createdby\"></a> `createdBy` | `string` | User who created the call. |\n| <a id=\"property-customname\"></a> `customName?` | `string` \\| `null` | User-supplied or AI-generated display name for the call. Only set on archived `call_records`; active calls always return `None`. |\n| <a id=\"property-durationms\"></a> `durationMs?` | `number` \\| `null` | Call duration in milliseconds (None if still active). |\n| <a id=\"property-egressid\"></a> `egressId?` | `string` \\| `null` | Recording egress ID, if any. |\n| <a id=\"property-endedat\"></a> `endedAt?` | `string` \\| `null` | When the call ended (None if still active). |\n| <a id=\"property-guests\"></a> `guests` | [`CallRecordGuest`](CallRecordGuest.md)[] | Non-account guests (both active and historic). Guests only ever exist on standalone meeting calls, never on channel calls. |\n| <a id=\"property-isactive\"></a> `isActive` | `boolean` | Whether the call is currently active (from `calls` table). |\n| <a id=\"property-participants\"></a> `participants` | [`CallRecordParticipant`](CallRecordParticipant.md)[] | Macro-account participants (both active and historic). |\n| <a id=\"property-recordingpreviewurl\"></a> `recordingPreviewUrl?` | `string` \\| `null` | Presigned URL for the call recording preview image, if available. |\n| <a id=\"property-recordingstartedat\"></a> `recordingStartedAt?` | `string` \\| `null` | When the egress recording actually began. `None` until the `egress_started` webhook arrives (typically a few seconds after `started_at`). Frontend should anchor transcript-to-audio sync to this value when present, falling back to `started_at` otherwise. |\n| <a id=\"property-recordingurl\"></a> `recordingUrl?` | `string` \\| `null` | Presigned URL for the call recording, if available. |\n| <a id=\"property-roomname\"></a> `roomName` | `string` | The RTC room name. |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam` | `boolean` | Whether the call is shared with the creator's team. While the call is live this is the pending toggle applied at archive; afterwards it mirrors `team_share_access_level`. |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When the call started (created_at for active, started_at for archived). |\n| <a id=\"property-status\"></a> `status?` | `null` \\| [`CallStatus`](CallStatus.md) | - |\n| <a id=\"property-summary\"></a> `summary?` | `string` \\| `null` | AI-generated summary of the call. Only set on archived `call_records` once summarization has run; active calls always return `None`. |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-transcript\"></a> `transcript` | [`CallRecordTranscriptSegment`](CallRecordTranscriptSegment.md)[] | Transcript segments ordered by `sequence_num`. |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-viewerhasdeclined\"></a> `viewerHasDeclined?` | `boolean` | Whether the authenticated viewer has declined this call on any device. Set on the single-record read so clients that missed `call_declined` can still stop ringing via reconciliation; `false` in list contexts. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordGuest.md -->\n# Type Alias: CallRecordGuest\n\n> **CallRecordGuest** = \\{ `displayName`: `string`; `id`: [`GuestId`](GuestId.md); `joinedAt`: `string`; `leftAt?`: `string` \\| `null`; \\}\n\nA non-account guest as returned in a [`CallRecord`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-displayname\"></a> `displayName` | `string` | Guest-provided display name. |\n| <a id=\"property-id\"></a> `id` | [`GuestId`](GuestId.md) | Opaque guest identity; matches the guest's transcript `speaker_id`. |\n| <a id=\"property-joinedat\"></a> `joinedAt` | `string` | When the guest joined the call. |\n| <a id=\"property-leftat\"></a> `leftAt?` | `string` \\| `null` | When the guest left (None if still in an active call). |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordParticipant.md -->\n# Type Alias: CallRecordParticipant\n\n> **CallRecordParticipant** = \\{ `joinedAt`: `string`; `leftAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\nA participant as returned in a [`CallRecord`] (historic — includes `left_at`).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-joinedat\"></a> `joinedAt` | `string` | When the user joined the call. |\n| <a id=\"property-leftat\"></a> `leftAt?` | `string` \\| `null` | When the user left (None if still in an active call). |\n| <a id=\"property-userid\"></a> `userId` | `string` | The Macro user id. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordTranscriptSegment.md -->\n# Type Alias: CallRecordTranscriptSegment\n\n> **CallRecordTranscriptSegment** = \\{ `content`: `string`; `diarizedSpeakerId?`: `string` \\| `null`; `endedAt?`: `string` \\| `null`; `segmentId?`: `string` \\| `null`; `sequenceNum`: `number`; `speakerId`: `string`; `startedAt`: `string`; `transcriptId`: `string`; \\}\n\nA transcript segment as returned in a [`CallRecord`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content\"></a> `content` | `string` | The transcribed text content. |\n| <a id=\"property-diarizedspeakerid\"></a> `diarizedSpeakerId?` | `string` \\| `null` | Stable per-speaker identifier produced by the STT provider's diarization pass. Unique across tracks in the call. `None` when the provider didn't return a speaker label. |\n| <a id=\"property-endedat\"></a> `endedAt?` | `string` \\| `null` | When the speaker stopped (if known). |\n| <a id=\"property-segmentid\"></a> `segmentId?` | `string` \\| `null` | LiveKit segment ID (nullable for archived records). |\n| <a id=\"property-sequencenum\"></a> `sequenceNum` | `number` | Ordering within the call. |\n| <a id=\"property-speakerid\"></a> `speakerId` | `string` | The speaker's user ID. |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When the speaker started this segment. |\n| <a id=\"property-transcriptid\"></a> `transcriptId` | `string` | Stable DB-row id for the segment. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallStatus.md -->\n# Type Alias: CallStatus\n\n> **CallStatus** = `\"ATTENDED\"` \\| `\"MISSED\"` \\| `\"UNATTENDED\"`\n\nViewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/GuestId.md -->\n# Type Alias: GuestId\n\n> **GuestId** = `string`\n\nA non-account guest of a single call session.\n\nThe id doubles as the guest's RTC participant identity, so identities are\nopaque UUIDs and never share a namespace (or a column) with Macro user\nids. Only the server mints them; Macro users keep `macro|…` identities,\nso an RTC identity classifies as exactly one of the two.\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- src/entities/calls/call-record/classes/CallRecord.md -->\n# Class: CallRecord\n\nA Macro call record (an archived or still active call).\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`CallRecordDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | () => `Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md) \\| `undefined`\\> | `...` | The channel the call belongs to, if it is a channel call. | - | - |\n| <a id=\"property-channelname\"></a> `channelName` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The display name of the channel the call belongs to. | - | - |\n| <a id=\"property-creator\"></a> `creator` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | `...` | The user who started the call. | - | - |\n| <a id=\"property-durationms\"></a> `durationMs` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | `...` | Call duration in milliseconds (undefined if still active). | - | - |\n| <a id=\"property-endedat\"></a> `endedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the call ended (undefined if still active). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"call\"` | `'call'` | Favorites identify call records as `call`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-guests\"></a> `guests` | `readonly` | () => `Promise`\\<[`CallRecordGuest`](../../../../../generated/storage/types.gen/type-aliases/CallRecordGuest.md)[]\\> | `...` | Current and past guests; each id matches its transcript speaker id. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-isactive\"></a> `isActive` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the call is still in progress. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The call's display name (user-supplied or AI-generated; unset while active). | - | - |\n| <a id=\"property-participants\"></a> `participants` | `readonly` | () => `Promise`\\<[`CallRecordParticipant`](../../../../../generated/storage/types.gen/type-aliases/CallRecordParticipant.md)[]\\> | `...` | Macro-account participants, both active and historic. | - | - |\n| <a id=\"property-recordingpreviewurl\"></a> `recordingPreviewUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | URL of the recording preview (thumbnail), once available. | - | - |\n| <a id=\"property-recordingstartedat\"></a> `recordingStartedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the recording started, if it was recorded. | - | - |\n| <a id=\"property-recordingurl\"></a> `recordingUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | URL of the call recording, once available. | - | - |\n| <a id=\"property-roomname\"></a> `roomName` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The realtime room the call runs in. | - | - |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the call is shared with the creator's team: the pending toggle while the call is live, the canonical grant once it is archived. | - | - |\n| <a id=\"property-startedat\"></a> `startedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the call started. | - | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`NonNullable`\\<CallStatus \\| null \\| undefined\\> \\| `undefined`\\> | `...` | The call's status (undefined until set). | - | - |\n| <a id=\"property-summary\"></a> `summary` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | AI-generated summary of the call, once summarization has run. | - | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel` | `readonly` | () => `Promise`\\<`NonNullable`\\<AccessLevel \\| null \\| undefined\\> \\| `undefined`\\> | `...` | The canonical access level granted to the creator's team once the call is archived, or null when it is not shared. Calls only ever grant `'view'`; while the call is live this is null and [CallRecord.shareWithTeam](#property-sharewithteam) carries the pending toggle. | - | - |\n| <a id=\"property-transcript\"></a> `transcript` | `readonly` | () => `Promise`\\<[`CallRecordTranscriptSegment`](../../../../../generated/storage/types.gen/type-aliases/CallRecordTranscriptSegment.md)[]\\> | `...` | Transcript segments, ordered by sequence number. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`CallRecord`\\> | `...` | Search calls by name and transcript, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the call record.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`CallRecord`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`CallRecord`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### message()\n\n> **message**(`id`): [`CallMessage`](../../message/classes/CallMessage.md)\n\nA message in this call's persistent chat. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CallMessage`](../../message/classes/CallMessage.md)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the call or clear the custom name.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setTeamShare()\n\n> **setTeamShare**(`shared`): `Promise`\\<`void`\\>\n\nShare the call with the creator's team (view access), or unshare it.\nWhile the call is live this sets the pending toggle any participant with\nedit access may change; once archived only the call's creator may change\nit and the API answers 403 otherwise.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `shared` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`CallRecord`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`CallRecord`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CallRecord`\n\nA handle to a call record by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CallRecord`\n\n\n<!-- src/entities/calls/message/classes/CallMessage.md -->\n# Class: CallMessage\n\nA message in a call's single persistent chat thread.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId` | `readonly` | `string` | - | - |\n| <a id=\"property-content\"></a> `content` | `readonly` | () => `Promise`\\<`string`\\> | The message body (markdown). | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the message was created. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the message was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### call()\n\n> **call**(): [`CallRecord`](../../call-record/classes/CallRecord.md)\n\nThe call whose chat contains this message.\n\n#### Returns\n\n[`CallRecord`](../../call-record/classes/CallRecord.md)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this message, preserving the rest of the call's chat.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`CallMessage`\\>\n\nReplace this message's body.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`CallMessage`\\>\n\nReply in the call's canonical thread, including when this is a reply.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `callId`, `id`): `CallMessage`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `callId` | `string` |\n| `id` | `string` |\n\n#### Returns\n\n`CallMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `callId`, `record`): `CallMessage`\n\nBuild a message from its record without another fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `callId` | `string` |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`CallMessage`\n\n\n<!-- src/entities/calls/namespace/classes/CallRecordNamespace.md -->\n# Class: CallRecordNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CallRecordNamespace**(`client`): `CallRecordNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CallRecordNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`CallRecord`](../../call-record/classes/CallRecord.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CallRecord`](../../call-record/classes/CallRecord.md)\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n"+ "documentation": "# Macro SDK: calls\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecord.md -->\n# Type Alias: CallRecord\n\n> **CallRecord** = \\{ `callId`: `string`; `channelId?`: `string` \\| `null`; `channelName?`: `string` \\| `null`; `createdBy`: `string`; `customName?`: `string` \\| `null`; `durationMs?`: `number` \\| `null`; `egressId?`: `string` \\| `null`; `endedAt?`: `string` \\| `null`; `guests`: [`CallRecordGuest`](CallRecordGuest.md)[]; `isActive`: `boolean`; `participants`: [`CallRecordParticipant`](CallRecordParticipant.md)[]; `recordingPreviewUrl?`: `string` \\| `null`; `recordingStartedAt?`: `string` \\| `null`; `recordingUrl?`: `string` \\| `null`; `roomName`: `string`; `shareWithTeam`: `boolean`; `startedAt`: `string`; `status?`: `null` \\| [`CallStatus`](CallStatus.md); `summary?`: `string` \\| `null`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `transcript`: [`CallRecordTranscriptSegment`](CallRecordTranscriptSegment.md)[]; `userAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `viewerHasDeclined?`: `boolean`; \\}\n\nFull record of a call, unifying rows from `calls` (active) and\n`call_records` (archived) into a single response shape.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId` | `string` | The call identifier. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | The channel this call belongs to. |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` \\| `null` | Resolved display name for the channel. |\n| <a id=\"property-createdby\"></a> `createdBy` | `string` | User who created the call. |\n| <a id=\"property-customname\"></a> `customName?` | `string` \\| `null` | User-supplied or AI-generated display name for the call. Only set on archived `call_records`; active calls always return `None`. |\n| <a id=\"property-durationms\"></a> `durationMs?` | `number` \\| `null` | Call duration in milliseconds (None if still active). |\n| <a id=\"property-egressid\"></a> `egressId?` | `string` \\| `null` | Recording egress ID, if any. |\n| <a id=\"property-endedat\"></a> `endedAt?` | `string` \\| `null` | When the call ended (None if still active). |\n| <a id=\"property-guests\"></a> `guests` | [`CallRecordGuest`](CallRecordGuest.md)[] | Non-account guests (both active and historic). Guests only ever exist on standalone meeting calls, never on channel calls. |\n| <a id=\"property-isactive\"></a> `isActive` | `boolean` | Whether the call is currently active (from `calls` table). |\n| <a id=\"property-participants\"></a> `participants` | [`CallRecordParticipant`](CallRecordParticipant.md)[] | Macro-account participants (both active and historic). |\n| <a id=\"property-recordingpreviewurl\"></a> `recordingPreviewUrl?` | `string` \\| `null` | Presigned URL for the call recording preview image, if available. |\n| <a id=\"property-recordingstartedat\"></a> `recordingStartedAt?` | `string` \\| `null` | When the egress recording actually began. `None` until the `egress_started` webhook arrives (typically a few seconds after `started_at`). Frontend should anchor transcript-to-audio sync to this value when present, falling back to `started_at` otherwise. |\n| <a id=\"property-recordingurl\"></a> `recordingUrl?` | `string` \\| `null` | Presigned URL for the call recording, if available. |\n| <a id=\"property-roomname\"></a> `roomName` | `string` | The RTC room name. |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam` | `boolean` | Whether the call is shared with the creator's team. While the call is live this is the pending toggle applied at archive; afterwards it mirrors `team_share_access_level`. |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When the call started (created_at for active, started_at for archived). |\n| <a id=\"property-status\"></a> `status?` | `null` \\| [`CallStatus`](CallStatus.md) | - |\n| <a id=\"property-summary\"></a> `summary?` | `string` \\| `null` | AI-generated summary of the call. Only set on archived `call_records` once summarization has run; active calls always return `None`. |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-transcript\"></a> `transcript` | [`CallRecordTranscriptSegment`](CallRecordTranscriptSegment.md)[] | Transcript segments ordered by `sequence_num`. |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-viewerhasdeclined\"></a> `viewerHasDeclined?` | `boolean` | Whether the authenticated viewer has declined this call on any device. Set on the single-record read so clients that missed `call_declined` can still stop ringing via reconciliation; `false` in list contexts. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordGuest.md -->\n# Type Alias: CallRecordGuest\n\n> **CallRecordGuest** = \\{ `displayName`: `string`; `id`: [`GuestId`](GuestId.md); `joinedAt`: `string`; `leftAt?`: `string` \\| `null`; \\}\n\nA non-account guest as returned in a [`CallRecord`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-displayname\"></a> `displayName` | `string` | Guest-provided display name. |\n| <a id=\"property-id\"></a> `id` | [`GuestId`](GuestId.md) | Opaque guest identity; matches the guest's transcript `speaker_id`. |\n| <a id=\"property-joinedat\"></a> `joinedAt` | `string` | When the guest joined the call. |\n| <a id=\"property-leftat\"></a> `leftAt?` | `string` \\| `null` | When the guest left (None if still in an active call). |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordParticipant.md -->\n# Type Alias: CallRecordParticipant\n\n> **CallRecordParticipant** = \\{ `joinedAt`: `string`; `leftAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\nA participant as returned in a [`CallRecord`] (historic — includes `left_at`).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-joinedat\"></a> `joinedAt` | `string` | When the user joined the call. |\n| <a id=\"property-leftat\"></a> `leftAt?` | `string` \\| `null` | When the user left (None if still in an active call). |\n| <a id=\"property-userid\"></a> `userId` | `string` | The Macro user id. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallRecordTranscriptSegment.md -->\n# Type Alias: CallRecordTranscriptSegment\n\n> **CallRecordTranscriptSegment** = \\{ `content`: `string`; `diarizedSpeakerId?`: `string` \\| `null`; `endedAt?`: `string` \\| `null`; `segmentId?`: `string` \\| `null`; `sequenceNum`: `number`; `speakerId`: `string`; `startedAt`: `string`; `transcriptId`: `string`; \\}\n\nA transcript segment as returned in a [`CallRecord`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content\"></a> `content` | `string` | The transcribed text content. |\n| <a id=\"property-diarizedspeakerid\"></a> `diarizedSpeakerId?` | `string` \\| `null` | Stable per-speaker identifier produced by the STT provider's diarization pass. Unique across tracks in the call. `None` when the provider didn't return a speaker label. |\n| <a id=\"property-endedat\"></a> `endedAt?` | `string` \\| `null` | When the speaker stopped (if known). |\n| <a id=\"property-segmentid\"></a> `segmentId?` | `string` \\| `null` | LiveKit segment ID (nullable for archived records). |\n| <a id=\"property-sequencenum\"></a> `sequenceNum` | `number` | Ordering within the call. |\n| <a id=\"property-speakerid\"></a> `speakerId` | `string` | The speaker's user ID. |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When the speaker started this segment. |\n| <a id=\"property-transcriptid\"></a> `transcriptId` | `string` | Stable DB-row id for the segment. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CallStatus.md -->\n# Type Alias: CallStatus\n\n> **CallStatus** = `\"ATTENDED\"` \\| `\"MISSED\"` \\| `\"UNATTENDED\"`\n\nViewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/GuestId.md -->\n# Type Alias: GuestId\n\n> **GuestId** = `string`\n\nA non-account guest of a single call session.\n\nThe id doubles as the guest's RTC participant identity, so identities are\nopaque UUIDs and never share a namespace (or a column) with Macro user\nids. Only the server mints them; Macro users keep `macro|…` identities,\nso an RTC identity classifies as exactly one of the two.\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `guest_name?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-guest_name\"></a> `guest_name?` | `string` \\| `null` | Display name of a verified call guest, retained after the call ends. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- src/entities/calls/call-record/classes/CallRecord.md -->\n# Class: CallRecord\n\nA Macro call record (an archived or still active call).\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`CallRecordDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | () => `Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md) \\| `undefined`\\> | `...` | The channel the call belongs to, if it is a channel call. | - | - |\n| <a id=\"property-channelname\"></a> `channelName` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The display name of the channel the call belongs to. | - | - |\n| <a id=\"property-creator\"></a> `creator` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | `...` | The user who started the call. | - | - |\n| <a id=\"property-durationms\"></a> `durationMs` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | `...` | Call duration in milliseconds (undefined if still active). | - | - |\n| <a id=\"property-endedat\"></a> `endedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the call ended (undefined if still active). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"call\"` | `'call'` | Favorites identify call records as `call`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-guests\"></a> `guests` | `readonly` | () => `Promise`\\<[`CallRecordGuest`](../../../../../generated/storage/types.gen/type-aliases/CallRecordGuest.md)[]\\> | `...` | Current and past guests; each id matches its transcript speaker id. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-isactive\"></a> `isActive` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the call is still in progress. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The call's display name (user-supplied or AI-generated; unset while active). | - | - |\n| <a id=\"property-participants\"></a> `participants` | `readonly` | () => `Promise`\\<[`CallRecordParticipant`](../../../../../generated/storage/types.gen/type-aliases/CallRecordParticipant.md)[]\\> | `...` | Macro-account participants, both active and historic. | - | - |\n| <a id=\"property-recordingpreviewurl\"></a> `recordingPreviewUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | URL of the recording preview (thumbnail), once available. | - | - |\n| <a id=\"property-recordingstartedat\"></a> `recordingStartedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the recording started, if it was recorded. | - | - |\n| <a id=\"property-recordingurl\"></a> `recordingUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | URL of the call recording, once available. | - | - |\n| <a id=\"property-roomname\"></a> `roomName` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The realtime room the call runs in. | - | - |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the call is shared with the creator's team: the pending toggle while the call is live, the canonical grant once it is archived. | - | - |\n| <a id=\"property-startedat\"></a> `startedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the call started. | - | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`NonNullable`\\<CallStatus \\| null \\| undefined\\> \\| `undefined`\\> | `...` | The call's status (undefined until set). | - | - |\n| <a id=\"property-summary\"></a> `summary` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | AI-generated summary of the call, once summarization has run. | - | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel` | `readonly` | () => `Promise`\\<`NonNullable`\\<AccessLevel \\| null \\| undefined\\> \\| `undefined`\\> | `...` | The canonical access level granted to the creator's team once the call is archived, or null when it is not shared. Calls only ever grant `'view'`; while the call is live this is null and [CallRecord.shareWithTeam](#property-sharewithteam) carries the pending toggle. | - | - |\n| <a id=\"property-transcript\"></a> `transcript` | `readonly` | () => `Promise`\\<[`CallRecordTranscriptSegment`](../../../../../generated/storage/types.gen/type-aliases/CallRecordTranscriptSegment.md)[]\\> | `...` | Transcript segments, ordered by sequence number. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`CallRecord`\\> | `...` | Search calls by name and transcript, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the call record.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`CallRecord`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`CallRecord`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### message()\n\n> **message**(`id`): [`CallMessage`](../../message/classes/CallMessage.md)\n\nA message in this call's persistent chat. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CallMessage`](../../message/classes/CallMessage.md)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the call or clear the custom name.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setTeamShare()\n\n> **setTeamShare**(`shared`): `Promise`\\<`void`\\>\n\nShare the call with the creator's team (view access), or unshare it.\nWhile the call is live this sets the pending toggle any participant with\nedit access may change; once archived only the call's creator may change\nit and the API answers 403 otherwise.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `shared` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CallRecord`](../../../../../generated/storage/types.gen/type-aliases/CallRecord.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`CallRecord`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`CallRecord`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CallRecord`\n\nA handle to a call record by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CallRecord`\n\n\n<!-- src/entities/calls/message/classes/CallMessage.md -->\n# Class: CallMessage\n\nA message in a call's single persistent chat thread.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId` | `readonly` | `string` | - | - |\n| <a id=\"property-content\"></a> `content` | `readonly` | () => `Promise`\\<`string`\\> | The message body (markdown). | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the message was created. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the message was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### call()\n\n> **call**(): [`CallRecord`](../../call-record/classes/CallRecord.md)\n\nThe call whose chat contains this message.\n\n#### Returns\n\n[`CallRecord`](../../call-record/classes/CallRecord.md)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this message, preserving the rest of the call's chat.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`CallMessage`\\>\n\nReplace this message's body.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`CallMessage`\\>\n\nReply in the call's canonical thread, including when this is a reply.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `callId`, `id`): `CallMessage`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `callId` | `string` |\n| `id` | `string` |\n\n#### Returns\n\n`CallMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `callId`, `record`): `CallMessage`\n\nBuild a message from its record without another fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `callId` | `string` |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`CallMessage`\n\n\n<!-- src/entities/calls/namespace/classes/CallRecordNamespace.md -->\n# Class: CallRecordNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CallRecordNamespace**(`client`): `CallRecordNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CallRecordNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`CallRecord`](../../call-record/classes/CallRecord.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CallRecord`](../../call-record/classes/CallRecord.md)\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`CallRecord`](../../call-record/classes/CallRecord.md)\\>\n"},{"name": "channels","description": "Read and send channel messages.","overview": "<!-- src/entities/channels/namespace/classes/ChannelNamespace.md -->\n# Class: ChannelNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ChannelNamespace**(`client`): `ChannelNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ChannelNamespace`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | [`ChannelLabelsNamespace`](../../labels/classes/ChannelLabelsNamespace.md) | Team-shared labels that group channels in the Chat sidebar. |\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Channel`](../../channel/classes/Channel.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `name?`: `string`; `participants?`: [`User`](../../../users/user/classes/User.md)[]; `team?`: [`Team`](../../../teams/team/classes/Team.md); `type`: [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md); \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | [`User`](../../../users/user/classes/User.md)[] | Participants to add, excluding the owner. |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) | Team, for team channels. |\n| `opts.type` | [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md) | - |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### dm()\n\n> **dm**(`recipient`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipient` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\nAll channels the authenticated user is a member of.\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\n***\n\n### private()\n\n> **private**(`recipients`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nOpen (creating if needed) the private group channel with a set of users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipients` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nSearch channels by name (client-side fuzzy filter on the full channel list)\nor by content (server-side unified search).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n",- "documentation": "# Macro SDK: channels\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelAttachment.md -->\n# Type Alias: ApiChannelAttachment\n\n> **ApiChannelAttachment** = \\{ `channel_id`: `string`; `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `message_id`: `string`; `sender_id`: `string`; `width?`: `number` \\| `null`; \\}\n\nA channel-level attachment.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was created. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity id. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Type of entity. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Height (for images). |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment id. |\n| <a id=\"property-message_id\"></a> `message_id` | `string` | Message id this attachment belongs to. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | The user who sent the message containing this attachment. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Width (for images). |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelAttachmentsPage.md -->\n# Type Alias: ApiChannelAttachmentsPage\n\n> **ApiChannelAttachmentsPage** = \\{ `items`: [`ApiChannelAttachment`](ApiChannelAttachment.md)[]; `next_cursor?`: `string` \\| `null`; \\}\n\nPaginated response of channel attachments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-items\"></a> `items` | [`ApiChannelAttachment`](ApiChannelAttachment.md)[] | Attachments on this page. |\n| <a id=\"property-next_cursor\"></a> `next_cursor?` | `string` \\| `null` | Cursor for the next page, null if no more pages. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelDetail.md -->\n# Type Alias: ApiChannelDetail\n\n> **ApiChannelDetail** = \\{ `channel_id`: `string`; `channel_name`: `string`; `channel_type`: [`ChannelType`](ChannelType.md); `participants`: [`ApiChannelParticipant`](ApiChannelParticipant.md)[]; \\}\n\nChannel detail: metadata and active participants.\n\nMessages are read through `/messages/channel/{channel_id}`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-channel_name\"></a> `channel_name` | `string` | Resolved display name from the viewer's perspective. |\n| <a id=\"property-channel_type\"></a> `channel_type` | [`ChannelType`](ChannelType.md) | Channel type. |\n| <a id=\"property-participants\"></a> `participants` | [`ApiChannelParticipant`](ApiChannelParticipant.md)[] | Active participants. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelParticipant.md -->\n# Type Alias: ApiChannelParticipant\n\n> **ApiChannelParticipant** = \\{ `channel_id`: `string`; `joined_at`: `string`; `role`: [`ApiParticipantRole`](ApiParticipantRole.md); `user_id`: `string`; \\}\n\nA channel participant.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-joined_at\"></a> `joined_at` | `string` | When the user joined. |\n| <a id=\"property-role\"></a> `role` | [`ApiParticipantRole`](ApiParticipantRole.md) | Role in the channel. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User id. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiParticipantRole.md -->\n# Type Alias: ApiParticipantRole\n\n> **ApiParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nParticipant role in a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelLabel.md -->\n# Type Alias: ChannelLabel\n\n> **ChannelLabel** = \\{ `channelCount`: `number`; `channelIds`: `string`[]; `createdAt`: `string`; `id`: `string`; `name`: `string`; `rule?`: `null` \\| [`ChannelLabelRule`](ChannelLabelRule.md); `sortOrder`: `number`; `teamId?`: `string` \\| `null`; `updatedAt`: `string`; \\}\n\nA shared or account-private label grouping chat channels in the sidebar.\n\n`channel_ids` is viewer-relative: it lists only the labelled channels the\nrequesting user participates in. `channel_count` counts every channel in\nthe label so clients can warn accurately before a delete.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelcount\"></a> `channelCount` | `number` | All assignments for a manual label; visible matches for a smart tag. |\n| <a id=\"property-channelids\"></a> `channelIds` | `string`[] | Channels in this label that the requesting user participates in. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the label was created. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable label id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, unique within the scope (case-insensitive). |\n| <a id=\"property-rule\"></a> `rule?` | `null` \\| [`ChannelLabelRule`](ChannelLabelRule.md) | - |\n| <a id=\"property-sortorder\"></a> `sortOrder` | `number` | Manual ordering value within the scope; lower sorts first. |\n| <a id=\"property-teamid\"></a> `teamId?` | `string` \\| `null` | Owning team, or `None` for account-private labels. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the label was last renamed or reordered. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelLabelRule.md -->\n# Type Alias: ChannelLabelRule\n\n> **ChannelLabelRule** = \\{ `attribute`: `\"name\"`; `contains`: `string`; \\}\n\nCase-insensitive, literal substring matching on the channel name.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attribute\"></a> `attribute` | `\"name\"` | - |\n| <a id=\"property-contains\"></a> `contains` | `string` | The substring to find anywhere in the name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelType.md -->\n# Type Alias: ChannelType\n\n> **ChannelType** = `\"public\"` \\| `\"private\"` \\| `\"direct_message\"` \\| `\"team\"`\n\nType of channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/GetChannelAttachmentsResponses.md -->\n# Type Alias: GetChannelAttachmentsResponses\n\n> **GetChannelAttachmentsResponses** = \\{ `200`: [`ApiChannelAttachmentsPage`](ApiChannelAttachmentsPage.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ApiChannelAttachmentsPage`](ApiChannelAttachmentsPage.md) |\n\n\n<!-- generated/storage/types.gen/type-aliases/GetChannelParticipantsResponses.md -->\n# Type Alias: GetChannelParticipantsResponses\n\n> **GetChannelParticipantsResponses** = \\{ `200`: [`ApiChannelParticipant`](ApiChannelParticipant.md)[]; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ApiChannelParticipant`](ApiChannelParticipant.md)[] |\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SmartTagChannelMatch.md -->\n# Type Alias: SmartTagChannelMatch\n\n> **SmartTagChannelMatch** = \\{ `id`: `string`; `name`: `string`; \\}\n\nA channel visible to the caller that matches a smart tag rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Channel id. |\n| <a id=\"property-name\"></a> `name` | `string` | Channel display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SmartTagPreview.md -->\n# Type Alias: SmartTagPreview\n\n> **SmartTagPreview** = \\{ `channels`: [`SmartTagChannelMatch`](SmartTagChannelMatch.md)[]; `totalCount`: `number`; \\}\n\nA bounded preview and the total number of visible channels matching a rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channels\"></a> `channels` | [`SmartTagChannelMatch`](SmartTagChannelMatch.md)[] | First matches, in alphabetical order. |\n| <a id=\"property-totalcount\"></a> `totalCount` | `number` | Number of matching channels the caller participates in, including overflow. |\n\n\n<!-- src/entities/channels/channel/classes/Channel.md -->\n# Class: Channel\n\nA channel.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ChannelDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"channel\"` | `'channel'` | Favorites identify channels as `channel`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The channel's display name, resolved from the viewer's perspective. | - | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<[`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md)\\> | `...` | The channel's type (e.g. `public`, `dm`, `private`). | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Channel`\\> | `...` | Search channels by content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### addParticipants()\n\n> **addParticipants**(`users`): `Promise`\\<`void`\\>\n\nAdd users to the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### attachments()\n\n> **attachments**(`opts?`): `AsyncGenerator`\\<[`ApiChannelAttachment`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelAttachment.md)\\>\n\nThe attachments posted in this channel, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts?` | \\{ `pageSize?`: `number`; `type?`: `string`; \\} | - |\n| `opts.pageSize?` | `number` | - |\n| `opts.type?` | `string` | Filter by type: `static` for images/videos, `dss` for documents. |\n\n#### Returns\n\n`AsyncGenerator`\\<[`ApiChannelAttachment`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelAttachment.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the channel. This is not reversible.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Channel`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### join()\n\n> **join**(): `Promise`\\<`void`\\>\n\nJoin the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### joinCode()\n\n> **joinCode**(): `Promise`\\<`string`\\>\n\nA reusable code that lets a user join this channel.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### leave()\n\n> **leave**(): `Promise`\\<`void`\\>\n\nLeave the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`Message`](../../message/classes/Message.md)\n\nA handle to a message in this channel by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Message`](../../message/classes/Message.md)\n\n***\n\n### messages()\n\n> **messages**(`opts?`): `AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\nRoot messages in this channel, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `pageSize?`: `number`; \\} |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### messagesAfter()\n\n> **messagesAfter**(`after`, `opts?`): `AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\nRoot messages created or replied to at or after `after`, most recent\nfirst, auto-paginated. Use it to catch up after a disconnect.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `after` | `string` \\| `Date` |\n| `opts?` | \\{ `pageSize?`: `number`; \\} |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### participants()\n\n> **participants**(): `Promise`\\<[`ApiChannelParticipant`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelParticipant.md)[]\\>\n\nThe channel's members, with their roles and join times.\n\n#### Returns\n\n`Promise`\\<[`ApiChannelParticipant`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelParticipant.md)[]\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### removeParticipants()\n\n> **removeParticipants**(`users`): `Promise`\\<`void`\\>\n\nRemove users from the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### send()\n\n> **send**(`body`, `opts?`): `Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nPost a message. Plain text, or a rich body composed with `msg`.\n\nWorks with a channel webhook token as well as a normal one — see\n[postToChannel](../../post/functions/postToChannel.md) for which endpoint that picks and what it costs.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n| `opts?` | \\{ `thread?`: [`Thread`](../../thread/classes/Thread.md); \\} |\n| `opts.thread?` | [`Thread`](../../thread/classes/Thread.md) |\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### typing()\n\n> **typing**(`action`, `opts?`): `Promise`\\<`void`\\>\n\nBroadcast a typing indicator, optionally scoped to a thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `action` | `\"stop\"` \\| `\"start\"` |\n| `opts?` | \\{ `thread?`: [`Thread`](../../thread/classes/Thread.md); \\} |\n| `opts.thread?` | [`Thread`](../../thread/classes/Thread.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Channel`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nThe channel's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Channel`\n\nA handle to a channel by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Channel`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Channel`\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `opts` | \\{ `name?`: `string`; `participants?`: [`User`](../../../users/user/classes/User.md)[]; `team?`: [`Team`](../../../teams/team/classes/Team.md); `type`: [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md); \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | [`User`](../../../users/user/classes/User.md)[] | Participants to add, excluding the owner. |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) | Team, for team channels. |\n| `opts.type` | [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md) | - |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n***\n\n### dm()\n\n> `static` **dm**(`client`, `recipient`): `Promise`\\<`Channel`\\>\n\nOpen (creating if needed) the DM channel with a user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `recipient` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n***\n\n### private()\n\n> `static` **private**(`client`, `recipients`): `Promise`\\<`Channel`\\>\n\nOpen (creating if needed) the private group channel with a set of users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `recipients` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n\n<!-- src/entities/channels/channel/type-aliases/ChannelAttachment.md -->\n# Type Alias: ChannelAttachment\n\n> **ChannelAttachment** = [`GetChannelAttachmentsResponses`](../../../../../generated/storage/types.gen/type-aliases/GetChannelAttachmentsResponses.md)\\[`200`\\]\\[`\"items\"`\\]\\[`number`\\]\n\nA file or entity attached to a message in a channel.\n\n\n<!-- src/entities/channels/channel/type-aliases/ChannelParticipant.md -->\n# Type Alias: ChannelParticipant\n\n> **ChannelParticipant** = [`GetChannelParticipantsResponses`](../../../../../generated/storage/types.gen/type-aliases/GetChannelParticipantsResponses.md)\\[`200`\\]\\[`number`\\]\n\nA member of a channel, with their role and join time.\n\n\n<!-- src/entities/channels/labels/classes/ChannelLabelsNamespace.md -->\n# Class: ChannelLabelsNamespace\n\nShared or private channel labels: named groups of channels shown in the Chat\nsidebar. Every member of the team sees the same labels in the same order,\nand any member may create, rename, delete, or move channels between them;\neach change applies to the whole team. Users without a team have private\nlabels belonging to their account.\n\nA label's `channelIds` lists only the channels the authenticated user is a\nmember of. Manual labels count all assignments; smart tags count visible\nmatches. A channel can be in one manual label and any number of matching\nsmart tags per team or account. Direct messages cannot be grouped.\n\n## Constructors\n\n### Constructor\n\n> **new ChannelLabelsNamespace**(`client`): `ChannelLabelsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ChannelLabelsNamespace`\n\n## Methods\n\n### create()\n\n> **create**(`name`, `channels?`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nCreate a label and atomically move `channels` into it. Names are unique\nwithin the team or account, case-insensitively.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `name` | `string` | `undefined` |\n| `channels?` | [`Channel`](../../channel/classes/Channel.md)[] | `[]` |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### createSmartTag()\n\n> **createSmartTag**(`name`, `rule`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nCreate a smart tag whose membership follows an attribute rule automatically.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### delete()\n\n> **delete**(`label`): `Promise`\\<`void`\\>\n\nDelete a label for the whole team; its channels return to the plain list.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)[]\\>\n\nEvery label in the authenticated user's shared or private scope.\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)[]\\>\n\n***\n\n### previewSmartTag()\n\n> **previewSmartTag**(`rule`): `Promise`\\<[`SmartTagPreview`](../../../../../generated/storage/types.gen/type-aliases/SmartTagPreview.md)\\>\n\nPreview the first matches and total visible count without creating a tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`SmartTagPreview`](../../../../../generated/storage/types.gen/type-aliases/SmartTagPreview.md)\\>\n\n***\n\n### rename()\n\n> **rename**(`label`, `name`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nRename a label for the whole team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### setLabel()\n\n> **setLabel**(`channel`, `label`): `Promise`\\<`void`\\>\n\nMove a channel into `label`, or out of any label when `label` is `undefined`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `channel` | [`Channel`](../../channel/classes/Channel.md) |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) \\| `undefined` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updateSmartTag()\n\n> **updateSmartTag**(`label`, `name`, `rule`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nUpdate the name and matching rule of an existing smart tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n| `name` | `string` |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n\n<!-- src/entities/channels/message/classes/Message.md -->\n# Class: Message\n\nA message in a channel. A thin handle: `id` and `channelId` are known up\nfront, and record-backed fields (`content`, `author`) load lazily on first\naccess and cache. Actions carry the ids for you.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId` | `readonly` | `string` | `undefined` | - | - | - |\n| <a id=\"property-content\"></a> `content` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The message body. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the message was created. | - | - |\n| <a id=\"property-editedat\"></a> `editedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the message was last edited, if it has been. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"channel_message\"` | `'channel_message'` | Favorites identify channel messages as `channel_message`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | [`SimpleMention`](../../../../../generated/storage/types.gen/type-aliases/SimpleMention.md)[] | `[]` | Entities mentioned in this message, when a list, thread, or event supplied them. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the message was last updated. | - | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### channel()\n\n> **channel**(): [`Channel`](../../channel/classes/Channel.md)\n\nThe channel this message is in.\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this message.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`Message`\\>\n\nReplace this message's body.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Message`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### react()\n\n> **react**(`emoji`): `Promise`\\<`Message`\\>\n\nAdd an emoji reaction to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `emoji` | `string` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`Message`\\>\n\nPost a reply in this message's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### thread()\n\n> **thread**(): [`Thread`](../../thread/classes/Thread.md)\n\nThe thread rooted at this message.\n\n#### Returns\n\n[`Thread`](../../thread/classes/Thread.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Message`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### unreact()\n\n> **unreact**(`emoji`): `Promise`\\<`Message`\\>\n\nRemove one of your emoji reactions from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `emoji` | `string` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `channelId`, `id`, `mentions?`): `Message`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | `undefined` |\n| `channelId` | `string` | `undefined` |\n| `id` | `string` | `undefined` |\n| `mentions?` | [`SimpleMention`](../../../../../generated/storage/types.gen/type-aliases/SimpleMention.md)[] | `[]` |\n\n#### Returns\n\n`Message`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `channelId`, `data`): `Message`\n\nBuild a root or reply from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `channelId` | `string` |\n| `data` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`Message`\n\n\n<!-- src/entities/channels/message/type-aliases/MessageData.md -->\n# Type Alias: MessageData\n\n> **MessageData** = [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\n\nThe API's representation of a message; the same record the document comment API returns.\n\n\n<!-- src/entities/channels/namespace/classes/ChannelNamespace.md -->\n# Class: ChannelNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ChannelNamespace**(`client`): `ChannelNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ChannelNamespace`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | [`ChannelLabelsNamespace`](../../labels/classes/ChannelLabelsNamespace.md) | Team-shared labels that group channels in the Chat sidebar. |\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Channel`](../../channel/classes/Channel.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `name?`: `string`; `participants?`: [`User`](../../../users/user/classes/User.md)[]; `team?`: [`Team`](../../../teams/team/classes/Team.md); `type`: [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md); \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | [`User`](../../../users/user/classes/User.md)[] | Participants to add, excluding the owner. |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) | Team, for team channels. |\n| `opts.type` | [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md) | - |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### dm()\n\n> **dm**(`recipient`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipient` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\nAll channels the authenticated user is a member of.\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\n***\n\n### private()\n\n> **private**(`recipients`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nOpen (creating if needed) the private group channel with a set of users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipients` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nSearch channels by name (client-side fuzzy filter on the full channel list)\nor by content (server-side unified search).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n\n<!-- src/entities/channels/post/functions/postToChannel.md -->\n# Function: postToChannel()\n\n> **postToChannel**(`client`, `target`, `body`): `Promise`\\<`string`\\>\n\nPost a message using the endpoint supported by the caller's credentials.\n\nMost credentials use `POST /messages/channel/{id}`. User-owned bots without\nan acting user instead use `POST /channels/{id}/webhook`, which authorizes\nthrough channel membership. The bot owner is read from `GET /bots/me` and\ncached by the client.\n\nThe webhook endpoint supports content only. Mentions in `<m-*>` tags still\nwork, but threads and attachments are not supported.\n\nPosting to a `Thread` puts the message in that thread; to a `Channel`, at the\nchannel root. One target rather than a channel plus a thread id, so the two\ncan't disagree.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `target` | [`Channel`](../../channel/classes/Channel.md) \\| [`Thread`](../../thread/classes/Thread.md) |\n| `body` | [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n## Returns\n\n`Promise`\\<`string`\\>\n\n\n<!-- src/entities/channels/thread/classes/Thread.md -->\n# Class: Thread\n\nA thread within a channel, rooted at a top-level message. Replies and\nthread-scoped posting live here.\n\n## Constructors\n\n### Constructor\n\n> **new Thread**(`client`, `channelId`, `rootId`): `Thread`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `channelId` | `string` | - |\n| `rootId` | `string` | The id of the message this thread hangs off. |\n\n#### Returns\n\n`Thread`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId` | `readonly` | `string` | - |\n| <a id=\"property-rootid\"></a> `rootId` | `readonly` | `string` | The id of the message this thread hangs off. |\n\n## Methods\n\n### channel()\n\n> **channel**(): [`Channel`](../../channel/classes/Channel.md)\n\nThe channel this thread is in.\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### replies()\n\n> **replies**(): `Promise`\\<[`Message`](../../message/classes/Message.md)[]\\>\n\nList the replies in this thread, oldest first.\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)[]\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nPost a reply in this thread.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nThe created reply.\n\n***\n\n### root()\n\n> **root**(): [`Message`](../../message/classes/Message.md)\n\nThe message this thread hangs off.\n\n#### Returns\n\n[`Message`](../../message/classes/Message.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `channelId`: `string`; `rootId`: `string`; \\}\n\nSerialize the thread identity without its authenticated client.\n\n#### Returns\n\n\\{ `channelId`: `string`; `rootId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `channelId` | `string` |\n| `rootId` | `string` |\n"+ "documentation": "# Macro SDK: channels\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelAttachment.md -->\n# Type Alias: ApiChannelAttachment\n\n> **ApiChannelAttachment** = \\{ `channel_id`: `string`; `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `message_id`: `string`; `sender_id`: `string`; `width?`: `number` \\| `null`; \\}\n\nA channel-level attachment.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was created. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity id. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Type of entity. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Height (for images). |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment id. |\n| <a id=\"property-message_id\"></a> `message_id` | `string` | Message id this attachment belongs to. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | The user who sent the message containing this attachment. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Width (for images). |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelAttachmentsPage.md -->\n# Type Alias: ApiChannelAttachmentsPage\n\n> **ApiChannelAttachmentsPage** = \\{ `items`: [`ApiChannelAttachment`](ApiChannelAttachment.md)[]; `next_cursor?`: `string` \\| `null`; \\}\n\nPaginated response of channel attachments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-items\"></a> `items` | [`ApiChannelAttachment`](ApiChannelAttachment.md)[] | Attachments on this page. |\n| <a id=\"property-next_cursor\"></a> `next_cursor?` | `string` \\| `null` | Cursor for the next page, null if no more pages. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelDetail.md -->\n# Type Alias: ApiChannelDetail\n\n> **ApiChannelDetail** = \\{ `channel_id`: `string`; `channel_name`: `string`; `channel_type`: [`ChannelType`](ChannelType.md); `participants`: [`ApiChannelParticipant`](ApiChannelParticipant.md)[]; \\}\n\nChannel detail: metadata and active participants.\n\nMessages are read through `/messages/channel/{channel_id}`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-channel_name\"></a> `channel_name` | `string` | Resolved display name from the viewer's perspective. |\n| <a id=\"property-channel_type\"></a> `channel_type` | [`ChannelType`](ChannelType.md) | Channel type. |\n| <a id=\"property-participants\"></a> `participants` | [`ApiChannelParticipant`](ApiChannelParticipant.md)[] | Active participants. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiChannelParticipant.md -->\n# Type Alias: ApiChannelParticipant\n\n> **ApiChannelParticipant** = \\{ `channel_id`: `string`; `joined_at`: `string`; `role`: [`ApiParticipantRole`](ApiParticipantRole.md); `user_id`: `string`; \\}\n\nA channel participant.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | Channel id. |\n| <a id=\"property-joined_at\"></a> `joined_at` | `string` | When the user joined. |\n| <a id=\"property-role\"></a> `role` | [`ApiParticipantRole`](ApiParticipantRole.md) | Role in the channel. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User id. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiParticipantRole.md -->\n# Type Alias: ApiParticipantRole\n\n> **ApiParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nParticipant role in a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelLabel.md -->\n# Type Alias: ChannelLabel\n\n> **ChannelLabel** = \\{ `channelCount`: `number`; `channelIds`: `string`[]; `createdAt`: `string`; `id`: `string`; `name`: `string`; `rule?`: `null` \\| [`ChannelLabelRule`](ChannelLabelRule.md); `sortOrder`: `number`; `teamId?`: `string` \\| `null`; `updatedAt`: `string`; \\}\n\nA shared or account-private label grouping chat channels in the sidebar.\n\n`channel_ids` is viewer-relative: it lists only the labelled channels the\nrequesting user participates in. `channel_count` counts every channel in\nthe label so clients can warn accurately before a delete.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelcount\"></a> `channelCount` | `number` | All assignments for a manual label; visible matches for a smart tag. |\n| <a id=\"property-channelids\"></a> `channelIds` | `string`[] | Channels in this label that the requesting user participates in. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the label was created. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable label id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, unique within the scope (case-insensitive). |\n| <a id=\"property-rule\"></a> `rule?` | `null` \\| [`ChannelLabelRule`](ChannelLabelRule.md) | - |\n| <a id=\"property-sortorder\"></a> `sortOrder` | `number` | Manual ordering value within the scope; lower sorts first. |\n| <a id=\"property-teamid\"></a> `teamId?` | `string` \\| `null` | Owning team, or `None` for account-private labels. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the label was last renamed or reordered. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelLabelRule.md -->\n# Type Alias: ChannelLabelRule\n\n> **ChannelLabelRule** = \\{ `attribute`: `\"name\"`; `contains`: `string`; \\}\n\nCase-insensitive, literal substring matching on the channel name.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attribute\"></a> `attribute` | `\"name\"` | - |\n| <a id=\"property-contains\"></a> `contains` | `string` | The substring to find anywhere in the name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelType.md -->\n# Type Alias: ChannelType\n\n> **ChannelType** = `\"public\"` \\| `\"private\"` \\| `\"direct_message\"` \\| `\"team\"`\n\nType of channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/GetChannelAttachmentsResponses.md -->\n# Type Alias: GetChannelAttachmentsResponses\n\n> **GetChannelAttachmentsResponses** = \\{ `200`: [`ApiChannelAttachmentsPage`](ApiChannelAttachmentsPage.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ApiChannelAttachmentsPage`](ApiChannelAttachmentsPage.md) |\n\n\n<!-- generated/storage/types.gen/type-aliases/GetChannelParticipantsResponses.md -->\n# Type Alias: GetChannelParticipantsResponses\n\n> **GetChannelParticipantsResponses** = \\{ `200`: [`ApiChannelParticipant`](ApiChannelParticipant.md)[]; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ApiChannelParticipant`](ApiChannelParticipant.md)[] |\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `guest_name?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-guest_name\"></a> `guest_name?` | `string` \\| `null` | Display name of a verified call guest, retained after the call ends. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SmartTagChannelMatch.md -->\n# Type Alias: SmartTagChannelMatch\n\n> **SmartTagChannelMatch** = \\{ `id`: `string`; `name`: `string`; \\}\n\nA channel visible to the caller that matches a smart tag rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Channel id. |\n| <a id=\"property-name\"></a> `name` | `string` | Channel display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SmartTagPreview.md -->\n# Type Alias: SmartTagPreview\n\n> **SmartTagPreview** = \\{ `channels`: [`SmartTagChannelMatch`](SmartTagChannelMatch.md)[]; `totalCount`: `number`; \\}\n\nA bounded preview and the total number of visible channels matching a rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channels\"></a> `channels` | [`SmartTagChannelMatch`](SmartTagChannelMatch.md)[] | First matches, in alphabetical order. |\n| <a id=\"property-totalcount\"></a> `totalCount` | `number` | Number of matching channels the caller participates in, including overflow. |\n\n\n<!-- src/entities/channels/channel/classes/Channel.md -->\n# Class: Channel\n\nA channel.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ChannelDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"channel\"` | `'channel'` | Favorites identify channels as `channel`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The channel's display name, resolved from the viewer's perspective. | - | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<[`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md)\\> | `...` | The channel's type (e.g. `public`, `dm`, `private`). | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Channel`\\> | `...` | Search channels by content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### addParticipants()\n\n> **addParticipants**(`users`): `Promise`\\<`void`\\>\n\nAdd users to the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### attachments()\n\n> **attachments**(`opts?`): `AsyncGenerator`\\<[`ApiChannelAttachment`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelAttachment.md)\\>\n\nThe attachments posted in this channel, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts?` | \\{ `pageSize?`: `number`; `type?`: `string`; \\} | - |\n| `opts.pageSize?` | `number` | - |\n| `opts.type?` | `string` | Filter by type: `static` for images/videos, `dss` for documents. |\n\n#### Returns\n\n`AsyncGenerator`\\<[`ApiChannelAttachment`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelAttachment.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the channel. This is not reversible.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Channel`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### join()\n\n> **join**(): `Promise`\\<`void`\\>\n\nJoin the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### joinCode()\n\n> **joinCode**(): `Promise`\\<`string`\\>\n\nA reusable code that lets a user join this channel.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### leave()\n\n> **leave**(): `Promise`\\<`void`\\>\n\nLeave the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`Message`](../../message/classes/Message.md)\n\nA handle to a message in this channel by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Message`](../../message/classes/Message.md)\n\n***\n\n### messages()\n\n> **messages**(`opts?`): `AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\nRoot messages in this channel, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `pageSize?`: `number`; \\} |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### messagesAfter()\n\n> **messagesAfter**(`after`, `opts?`): `AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\nRoot messages created or replied to at or after `after`, most recent\nfirst, auto-paginated. Use it to catch up after a disconnect.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `after` | `string` \\| `Date` |\n| `opts?` | \\{ `pageSize?`: `number`; \\} |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### participants()\n\n> **participants**(): `Promise`\\<[`ApiChannelParticipant`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelParticipant.md)[]\\>\n\nThe channel's members, with their roles and join times.\n\n#### Returns\n\n`Promise`\\<[`ApiChannelParticipant`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelParticipant.md)[]\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### removeParticipants()\n\n> **removeParticipants**(`users`): `Promise`\\<`void`\\>\n\nRemove users from the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### send()\n\n> **send**(`body`, `opts?`): `Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nPost a message. Plain text, or a rich body composed with `msg`.\n\nWorks with a channel webhook token as well as a normal one — see\n[postToChannel](../../post/functions/postToChannel.md) for which endpoint that picks and what it costs.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n| `opts?` | \\{ `thread?`: [`Thread`](../../thread/classes/Thread.md); \\} |\n| `opts.thread?` | [`Thread`](../../thread/classes/Thread.md) |\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiChannelDetail`](../../../../../generated/storage/types.gen/type-aliases/ApiChannelDetail.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### typing()\n\n> **typing**(`action`, `opts?`): `Promise`\\<`void`\\>\n\nBroadcast a typing indicator, optionally scoped to a thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `action` | `\"stop\"` \\| `\"start\"` |\n| `opts?` | \\{ `thread?`: [`Thread`](../../thread/classes/Thread.md); \\} |\n| `opts.thread?` | [`Thread`](../../thread/classes/Thread.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Channel`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nThe channel's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Channel`\n\nA handle to a channel by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Channel`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Channel`\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `opts` | \\{ `name?`: `string`; `participants?`: [`User`](../../../users/user/classes/User.md)[]; `team?`: [`Team`](../../../teams/team/classes/Team.md); `type`: [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md); \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | [`User`](../../../users/user/classes/User.md)[] | Participants to add, excluding the owner. |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) | Team, for team channels. |\n| `opts.type` | [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md) | - |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n***\n\n### dm()\n\n> `static` **dm**(`client`, `recipient`): `Promise`\\<`Channel`\\>\n\nOpen (creating if needed) the DM channel with a user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `recipient` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n***\n\n### private()\n\n> `static` **private**(`client`, `recipients`): `Promise`\\<`Channel`\\>\n\nOpen (creating if needed) the private group channel with a set of users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `recipients` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\n\n<!-- src/entities/channels/channel/type-aliases/ChannelAttachment.md -->\n# Type Alias: ChannelAttachment\n\n> **ChannelAttachment** = [`GetChannelAttachmentsResponses`](../../../../../generated/storage/types.gen/type-aliases/GetChannelAttachmentsResponses.md)\\[`200`\\]\\[`\"items\"`\\]\\[`number`\\]\n\nA file or entity attached to a message in a channel.\n\n\n<!-- src/entities/channels/channel/type-aliases/ChannelParticipant.md -->\n# Type Alias: ChannelParticipant\n\n> **ChannelParticipant** = [`GetChannelParticipantsResponses`](../../../../../generated/storage/types.gen/type-aliases/GetChannelParticipantsResponses.md)\\[`200`\\]\\[`number`\\]\n\nA member of a channel, with their role and join time.\n\n\n<!-- src/entities/channels/labels/classes/ChannelLabelsNamespace.md -->\n# Class: ChannelLabelsNamespace\n\nShared or private channel labels: named groups of channels shown in the Chat\nsidebar. Every member of the team sees the same labels in the same order,\nand any member may create, rename, delete, or move channels between them;\neach change applies to the whole team. Users without a team have private\nlabels belonging to their account.\n\nA label's `channelIds` lists only the channels the authenticated user is a\nmember of. Manual labels count all assignments; smart tags count visible\nmatches. A channel can be in one manual label and any number of matching\nsmart tags per team or account. Direct messages cannot be grouped.\n\n## Constructors\n\n### Constructor\n\n> **new ChannelLabelsNamespace**(`client`): `ChannelLabelsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ChannelLabelsNamespace`\n\n## Methods\n\n### create()\n\n> **create**(`name`, `channels?`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nCreate a label and atomically move `channels` into it. Names are unique\nwithin the team or account, case-insensitively.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `name` | `string` | `undefined` |\n| `channels?` | [`Channel`](../../channel/classes/Channel.md)[] | `[]` |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### createSmartTag()\n\n> **createSmartTag**(`name`, `rule`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nCreate a smart tag whose membership follows an attribute rule automatically.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### delete()\n\n> **delete**(`label`): `Promise`\\<`void`\\>\n\nDelete a label for the whole team; its channels return to the plain list.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)[]\\>\n\nEvery label in the authenticated user's shared or private scope.\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)[]\\>\n\n***\n\n### previewSmartTag()\n\n> **previewSmartTag**(`rule`): `Promise`\\<[`SmartTagPreview`](../../../../../generated/storage/types.gen/type-aliases/SmartTagPreview.md)\\>\n\nPreview the first matches and total visible count without creating a tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`SmartTagPreview`](../../../../../generated/storage/types.gen/type-aliases/SmartTagPreview.md)\\>\n\n***\n\n### rename()\n\n> **rename**(`label`, `name`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nRename a label for the whole team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n***\n\n### setLabel()\n\n> **setLabel**(`channel`, `label`): `Promise`\\<`void`\\>\n\nMove a channel into `label`, or out of any label when `label` is `undefined`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `channel` | [`Channel`](../../channel/classes/Channel.md) |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) \\| `undefined` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updateSmartTag()\n\n> **updateSmartTag**(`label`, `name`, `rule`): `Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\nUpdate the name and matching rule of an existing smart tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md) |\n| `name` | `string` |\n| `rule` | [`ChannelLabelRule`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabelRule.md) |\n\n#### Returns\n\n`Promise`\\<[`ChannelLabel`](../../../../../generated/storage/types.gen/type-aliases/ChannelLabel.md)\\>\n\n\n<!-- src/entities/channels/message/classes/Message.md -->\n# Class: Message\n\nA message in a channel. A thin handle: `id` and `channelId` are known up\nfront, and record-backed fields (`content`, `author`) load lazily on first\naccess and cache. Actions carry the ids for you.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId` | `readonly` | `string` | `undefined` | - | - | - |\n| <a id=\"property-content\"></a> `content` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The message body. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the message was created. | - | - |\n| <a id=\"property-editedat\"></a> `editedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the message was last edited, if it has been. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"channel_message\"` | `'channel_message'` | Favorites identify channel messages as `channel_message`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | [`SimpleMention`](../../../../../generated/storage/types.gen/type-aliases/SimpleMention.md)[] | `[]` | Entities mentioned in this message, when a list, thread, or event supplied them. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the message was last updated. | - | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### channel()\n\n> **channel**(): [`Channel`](../../channel/classes/Channel.md)\n\nThe channel this message is in.\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this message.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`Message`\\>\n\nReplace this message's body.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Message`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### react()\n\n> **react**(`emoji`): `Promise`\\<`Message`\\>\n\nAdd an emoji reaction to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `emoji` | `string` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`Message`\\>\n\nPost a reply in this message's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### thread()\n\n> **thread**(): [`Thread`](../../thread/classes/Thread.md)\n\nThe thread rooted at this message.\n\n#### Returns\n\n[`Thread`](../../thread/classes/Thread.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Message`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### unreact()\n\n> **unreact**(`emoji`): `Promise`\\<`Message`\\>\n\nRemove one of your emoji reactions from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `emoji` | `string` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `channelId`, `id`, `mentions?`): `Message`\n\nA handle to a message by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | `undefined` |\n| `channelId` | `string` | `undefined` |\n| `id` | `string` | `undefined` |\n| `mentions?` | [`SimpleMention`](../../../../../generated/storage/types.gen/type-aliases/SimpleMention.md)[] | `[]` |\n\n#### Returns\n\n`Message`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `channelId`, `data`): `Message`\n\nBuild a root or reply from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `channelId` | `string` |\n| `data` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`Message`\n\n\n<!-- src/entities/channels/message/type-aliases/MessageData.md -->\n# Type Alias: MessageData\n\n> **MessageData** = [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\n\nThe API's representation of a message; the same record the document comment API returns.\n\n\n<!-- src/entities/channels/namespace/classes/ChannelNamespace.md -->\n# Class: ChannelNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ChannelNamespace**(`client`): `ChannelNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ChannelNamespace`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | [`ChannelLabelsNamespace`](../../labels/classes/ChannelLabelsNamespace.md) | Team-shared labels that group channels in the Chat sidebar. |\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Channel`](../../channel/classes/Channel.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `name?`: `string`; `participants?`: [`User`](../../../users/user/classes/User.md)[]; `team?`: [`Team`](../../../teams/team/classes/Team.md); `type`: [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md); \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | [`User`](../../../users/user/classes/User.md)[] | Participants to add, excluding the owner. |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) | Team, for team channels. |\n| `opts.type` | [`ChannelType`](../../../../../generated/storage/types.gen/type-aliases/ChannelType.md) | - |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### dm()\n\n> **dm**(`recipient`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipient` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\nAll channels the authenticated user is a member of.\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)[]\\>\n\n***\n\n### private()\n\n> **private**(`recipients`): `Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nOpen (creating if needed) the private group channel with a set of users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipients` | [`User`](../../../users/user/classes/User.md)[] |\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\nSearch channels by name (client-side fuzzy filter on the full channel list)\nor by content (server-side unified search).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Channel`](../../channel/classes/Channel.md)\\>\n\n\n<!-- src/entities/channels/post/functions/postToChannel.md -->\n# Function: postToChannel()\n\n> **postToChannel**(`client`, `target`, `body`): `Promise`\\<`string`\\>\n\nPost a message using the endpoint supported by the caller's credentials.\n\nMost credentials use `POST /messages/channel/{id}`. User-owned bots without\nan acting user instead use `POST /channels/{id}/webhook`, which authorizes\nthrough channel membership. The bot owner is read from `GET /bots/me` and\ncached by the client.\n\nThe webhook endpoint supports content only. Mentions in `<m-*>` tags still\nwork, but threads and attachments are not supported.\n\nPosting to a `Thread` puts the message in that thread; to a `Channel`, at the\nchannel root. One target rather than a channel plus a thread id, so the two\ncan't disagree.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `target` | [`Channel`](../../channel/classes/Channel.md) \\| [`Thread`](../../thread/classes/Thread.md) |\n| `body` | [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n## Returns\n\n`Promise`\\<`string`\\>\n\n\n<!-- src/entities/channels/thread/classes/Thread.md -->\n# Class: Thread\n\nA thread within a channel, rooted at a top-level message. Replies and\nthread-scoped posting live here.\n\n## Constructors\n\n### Constructor\n\n> **new Thread**(`client`, `channelId`, `rootId`): `Thread`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `channelId` | `string` | - |\n| `rootId` | `string` | The id of the message this thread hangs off. |\n\n#### Returns\n\n`Thread`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId` | `readonly` | `string` | - |\n| <a id=\"property-rootid\"></a> `rootId` | `readonly` | `string` | The id of the message this thread hangs off. |\n\n## Methods\n\n### channel()\n\n> **channel**(): [`Channel`](../../channel/classes/Channel.md)\n\nThe channel this thread is in.\n\n#### Returns\n\n[`Channel`](../../channel/classes/Channel.md)\n\n***\n\n### replies()\n\n> **replies**(): `Promise`\\<[`Message`](../../message/classes/Message.md)[]\\>\n\nList the replies in this thread, oldest first.\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)[]\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nPost a reply in this thread.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<[`Message`](../../message/classes/Message.md)\\>\n\nThe created reply.\n\n***\n\n### root()\n\n> **root**(): [`Message`](../../message/classes/Message.md)\n\nThe message this thread hangs off.\n\n#### Returns\n\n[`Message`](../../message/classes/Message.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `channelId`: `string`; `rootId`: `string`; \\}\n\nSerialize the thread identity without its authenticated client.\n\n#### Returns\n\n\\{ `channelId`: `string`; `rootId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `channelId` | `string` |\n| `rootId` | `string` |\n"},{"name": "chats",@@ -45,7 +45,7 @@"name": "crm","description": "Work with CRM records.","overview": "<!-- src/entities/crm/namespace/classes/CrmNamespace.md -->\n# Class: CrmNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CrmNamespace**(`client`): `CrmNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CrmNamespace`\n\n## Methods\n\n### companyById()\n\n> **companyById**(`id`): [`Company`](../../company/classes/Company.md)\n\nA handle to a CRM company by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Company`](../../company/classes/Company.md)\n\n***\n\n### contactByEmail()\n\n> **contactByEmail**(`email`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\nResolve a CRM contact by email in the caller's current team, if present.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\n***\n\n### contactById()\n\n> **contactById**(`id`): [`Contact`](../../contact/classes/Contact.md)\n\nA handle to a CRM contact by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Contact`](../../contact/classes/Contact.md)\n\n***\n\n### createCompany()\n\n> **createCompany**(`opts`): `Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\nCreate a CRM company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`CreateCrmCompanyRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateCrmCompanyRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### resetStages()\n\n> **resetStages**(): `Promise`\\<`void`\\>\n\nReset the caller's current team's deal stages to the defaults.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### searchCompanies()\n\n> **searchCompanies**(`query`): `AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\nSearch CRM companies by name/domain, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### searchContacts()\n\n> **searchContacts**(`query`, `opts?`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\nSearch the caller's current team's CRM contacts whose email or name\ncontains `query` (case-insensitive), most recently interacted first.\nAn empty query lists the most recent contacts.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `query` | `string` | - |\n| `opts?` | \\{ `limit?`: `number`; \\} | - |\n| `opts.limit?` | `number` | Maximum contacts to return (1-500, default 20). |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\n***\n\n### setStages()\n\n> **setStages**(`stages`): `Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\nReplace the caller's current team's deal stages, in pipeline order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `stages` | [`ReplaceCrmStagesRequest`](../../../../../generated/storage/types.gen/type-aliases/ReplaceCrmStagesRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\n***\n\n### settings()\n\n> **settings**(): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nThe caller's current team's CRM settings.\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\n***\n\n### updateSettings()\n\n> **updateSettings**(`settings`): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nPartially update the caller's current team's CRM settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `settings` | [`UpdateCrmTeamSettingsRequest`](../../../../../generated/storage/types.gen/type-aliases/UpdateCrmTeamSettingsRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n",- "documentation": "# Macro SDK: crm\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CreateCrmCompanyRequest.md -->\n# Type Alias: CreateCrmCompanyRequest\n\n> **CreateCrmCompanyRequest** = \\{ `domain`: `string`; `name`: `string`; \\}\n\nRequest body for `POST /crm/companies`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-domain\"></a> `domain` | `string` | The company's email domain, e.g. \"acme.com\". Must be a bare domain (no scheme, path, or email) and not a generic email provider domain. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name for the company. Team-scoped: overrides the domain-directory name on every read path. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmCompanyResponse.md -->\n# Type Alias: CrmCompanyResponse\n\n> **CrmCompanyResponse** = \\{ `contacts`: [`CrmContactResponse`](CrmContactResponse.md)[]; `createdAt`: `string`; `description?`: `string` \\| `null`; `domains`: [`CrmDomainResponse`](CrmDomainResponse.md)[]; `emailSync`: `boolean`; `hidden`: `boolean`; `id`: `string`; `name?`: `string` \\| `null`; `teamId`: `string`; `updatedAt`: `string`; \\}\n\nA CRM company as returned by `GET /crm/companies/{company_id}`.\nMirrors the soup-listed `crmCompany` shape (`name` / `description`\nresolved from the primary domain's `crm_domain_directory` entry) and\nembeds the company's contacts so the panel can render in a single\nrequest.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contacts\"></a> `contacts` | [`CrmContactResponse`](CrmContactResponse.md)[] | Contacts attached to this company. Hidden contacts are filtered out for non-admin viewers. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Earliest known interaction with this company. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Display description from the primary domain's directory entry. |\n| <a id=\"property-domains\"></a> `domains` | [`CrmDomainResponse`](CrmDomainResponse.md)[] | All domains associated with this company, ordered by creation time ascending (primary first). |\n| <a id=\"property-emailsync\"></a> `emailSync` | `boolean` | Whether email sync is enabled for this company. |\n| <a id=\"property-hidden\"></a> `hidden` | `boolean` | Whether the company is hidden from CRM listings for the requesting team. Non-admin viewers never see `hidden = true` rows (the endpoint 404s for them); admin/owner callers see hidden companies so they can render the right toggle state. |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the company. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name from the primary domain's directory entry, or `None` when unresolved. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | The id of the team that owns this company record. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Most recent known interaction with this company. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmContactResponse.md -->\n# Type Alias: CrmContactResponse\n\n> **CrmContactResponse** = \\{ `companyId`: `string`; `createdAt`: `string`; `email`: `string`; `firstInteraction`: `string`; `hidden`: `boolean`; `id`: `string`; `lastInteraction`: `string`; `name?`: `string` \\| `null`; `updatedAt`: `string`; \\}\n\nA CRM contact as returned by `GET /crm/companies/{company_id}/contacts`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-companyid\"></a> `companyId` | `string` | The id of the company the contact belongs to. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the contact record was created. |\n| <a id=\"property-email\"></a> `email` | `string` | The contact's email address. |\n| <a id=\"property-firstinteraction\"></a> `firstInteraction` | `string` | Earliest known interaction with this contact. |\n| <a id=\"property-hidden\"></a> `hidden` | `boolean` | Whether the contact is hidden from CRM listings for the requesting team. Non-admin viewers never see `hidden = true` rows (the endpoint filters them out); admin/owner callers see hidden contacts so they can render the right toggle state. |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the contact record. |\n| <a id=\"property-lastinteraction\"></a> `lastInteraction` | `string` | Most recent known interaction with this contact. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name observed for the contact, if any. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the contact record was last updated. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmDomainResponse.md -->\n# Type Alias: CrmDomainResponse\n\n> **CrmDomainResponse** = \\{ `companyId`: `string`; `createdAt`: `string`; `domain`: `string`; `id`: `string`; \\}\n\nA CRM domain associated with a company.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-companyid\"></a> `companyId` | `string` | The id of the company the domain belongs to. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the domain record was created. |\n| <a id=\"property-domain\"></a> `domain` | `string` | The domain (e.g. \"acme.com\"). |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the domain record. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmPermissionRole.md -->\n# Type Alias: CrmPermissionRole\n\n> **CrmPermissionRole** = `\"admin\"` \\| `\"owner\"`\n\nMinimum team role required for a CRM governance capability. Members\ncan edit visible CRM records (e.g. company properties), but the\ngovernance capabilities these settings gate stay restricted to\nadmin (default) vs owner. Maps to the `team_role` Postgres enum;\n`member` is deliberately not representable.\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStageInput.md -->\n# Type Alias: CrmStageInput\n\n> **CrmStageInput** = \\{ `id?`: `string` \\| `null`; `label`: `string`; \\}\n\nOne stage in a `PUT /crm/stages` body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | Existing stage to keep; omit to add one. |\n| <a id=\"property-label\"></a> `label` | `string` | Label after the update; non-blank and unique within the set. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStageResponse.md -->\n# Type Alias: CrmStageResponse\n\n> **CrmStageResponse** = \\{ `id`: `string`; `label`: `string`; \\}\n\nOne stage of the team's custom pipeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Property option id companies carry as their stage value. |\n| <a id=\"property-label\"></a> `label` | `string` | Label. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStagesResponse.md -->\n# Type Alias: CrmStagesResponse\n\n> **CrmStagesResponse** = \\{ `definition_id`: `string`; `stages`: [`CrmStageResponse`](CrmStageResponse.md)[]; \\}\n\nThe team's custom stage set.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-definition_id\"></a> `definition_id` | `string` | Team-scoped stage definition id. |\n| <a id=\"property-stages\"></a> `stages` | [`CrmStageResponse`](CrmStageResponse.md)[] | Stages in pipeline order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md -->\n# Type Alias: CrmTeamSettingsResponse\n\n> **CrmTeamSettingsResponse** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `edit_stages_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `legacy_stage_ids`: \\{\\[`key`: `string`\\]: `string`; \\}; `move_closed_deals_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `team_views`: `unknown`; \\}\n\nThe team's CRM configuration (everything on `team_crm_settings`\nexcept the `crm_enabled` killswitch, which is managed via\n`PATCH /team/crm` on the auth service).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-closed_stage_ids\"></a> `closed_stage_ids?` | `string`[] \\| `null` | Stage option ids counting as closed deals; absent = the client falls back to its label heuristic. |\n| <a id=\"property-default_team_view_id\"></a> `default_team_view_id?` | `string` \\| `null` | Team view applied by default when a member opens the CRM view. |\n| <a id=\"property-delete_records_role\"></a> `delete_records_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can delete (hide) CRM records. |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can change the deal stage set in CRM settings. |\n| <a id=\"property-legacy_stage_ids\"></a> `legacy_stage_ids` | \\{\\[`key`: `string`\\]: `string`; \\} | System stage option id to team stage option id for seeded stages. |\n| <a id=\"property-move_closed_deals_role\"></a> `move_closed_deals_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can move deals out of a closed stage. |\n| <a id=\"property-team_views\"></a> `team_views` | `unknown` | Team saved views — an opaque JSON array owned by the frontend. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ReplaceCrmStagesRequest.md -->\n# Type Alias: ReplaceCrmStagesRequest\n\n> **ReplaceCrmStagesRequest** = \\{ `stages`: [`CrmStageInput`](CrmStageInput.md)[]; \\}\n\nRequest body for `PUT /crm/stages`: the whole stage set in order.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-stages\"></a> `stages` | [`CrmStageInput`](CrmStageInput.md)[] | Stages first to last. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadAnchor.md -->\n# Type Alias: ThreadAnchor\n\n> **ThreadAnchor** = \\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\} \\| \\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\} \\| \\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\} \\| \\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\} \\| \\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\nA thread's location within its document. PDF geometry remains annotation-owned.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mark_id` | `string` | Mark UUID serialized in the document. |\n| `marked_text?` | `string` \\| `null` | The marked text as it read when the discussion was created, already trimmed and bounded. Absent on threads created or imported before snapshots were captured: the text a mark covers cannot be recovered from the mark id alone. |\n| `type` | `\"markdown\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Highlight annotation UUID. |\n| `marked_text?` | `string` \\| `null` | The text the highlight covers, trimmed and bounded like a markdown snapshot. The highlight owns it and it can be edited there, so it is read from the highlight whenever the thread is, never stored on the thread. Absent when the highlight carries no text. |\n| `type` | `\"pdf_highlight\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Placeable annotation UUID. |\n| `type` | `\"pdf_placeable\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `range` | `string` | A1 cell or range, such as B4 or B4:C9. |\n| `sheetId` | `string` | Stable sheet identity within the workbook. |\n| `sheetName` | `string` | Sheet name when the discussion was created. |\n| `type` | `\"spreadsheet\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `nodeId?` | `string` \\| `null` | Layer the pin follows; absent for a pin on the bare canvas. |\n| `pageId` | `string` | Page (canvas) the pin is on. |\n| `type` | `\"fig\"` | - |\n| `x` | `number` | Horizontal offset from the layer's origin, or the page's when the pin is on no layer, in design units. |\n| `y` | `number` | Vertical offset, measured like `x`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadState.md -->\n# Type Alias: ThreadState\n\n> **ThreadState** = \\{ `anchor?`: `null` \\| [`ThreadAnchor`](ThreadAnchor.md); `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `resolved`: `boolean`; `root_id`: `string`; `updated_at`: `string`; `user_id`: `string`; \\}\n\nState belonging to a whole thread, keyed by its root message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-anchor\"></a> `anchor?` | `null` \\| [`ThreadAnchor`](ThreadAnchor.md) | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time of the discussion. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Explicit deletion of the entire thread, distinct from root deletion. |\n| <a id=\"property-resolved\"></a> `resolved` | `boolean` | Whether this discussion has been resolved. |\n| <a id=\"property-root_id\"></a> `root_id` | `string` | Root message UUID; there is no separate thread identity. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last state change. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User who owns this discussion, including imported discussions. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateCrmTeamSettingsRequest.md -->\n# Type Alias: UpdateCrmTeamSettingsRequest\n\n> **UpdateCrmTeamSettingsRequest** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `edit_stages_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `move_closed_deals_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `team_views?`: `unknown`; \\}\n\nRequest body for `PUT /crm/settings`. Every field is optional:\nomitted fields keep their current values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-closed_stage_ids\"></a> `closed_stage_ids?` | `string`[] \\| `null` | New closed-stage set. Omit to keep the current value; pass `null` to clear it (falling back to the client label heuristic). |\n| <a id=\"property-default_team_view_id\"></a> `default_team_view_id?` | `string` \\| `null` | New default team view id. Omit to keep the current value; pass `null` to clear it. |\n| <a id=\"property-delete_records_role\"></a> `delete_records_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-move_closed_deals_role\"></a> `move_closed_deals_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-team_views\"></a> `team_views?` | `unknown` | Replacement team-views array (whole-blob, last write wins). |\n\n\n<!-- src/entities/crm/comment/classes/CrmComment.md -->\n# Class: CrmComment\n\nA comment on a CRM company or contact: a message whose parent is the\nrecord, addressed by the record and the message UUID. Its record and\nmutations are the ones document comments and channel messages use.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was created. | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the comment was deleted, if it has been. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) | The company or contact this comment belongs to. | - |\n| <a id=\"property-text\"></a> `text` | `readonly` | () => `Promise`\\<`string`\\> | The comment's text (markdown). | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this comment. Deleting a thread's root keeps its replies.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`CrmComment`\\>\n\nReplace the comment's text. Only its author may.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`CrmComment`\\>\n\nReply in this comment's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>\n\n***\n\n### threadId()\n\n> **threadId**(): `Promise`\\<`string`\\>\n\nThe id of the thread this comment belongs to: its root, or itself for a root.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `parent`, `id`): `CrmComment`\n\nA handle to a comment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `id` | `string` |\n\n#### Returns\n\n`CrmComment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `parent`, `record`): `CrmComment`\n\nBuild a comment from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`CrmComment`\n\n\n<!-- src/entities/crm/comment/functions/listCrmCommentThreads.md -->\n# Function: listCrmCommentThreads()\n\n> **listCrmCommentThreads**(`client`, `parent`): `Promise`\\<[`CrmCommentThread`](../interfaces/CrmCommentThread.md)[]\\>\n\nA CRM record's live comment threads, each with its comments, newest thread first.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n\n## Returns\n\n`Promise`\\<[`CrmCommentThread`](../interfaces/CrmCommentThread.md)[]\\>\n\n\n<!-- src/entities/crm/comment/functions/postCrmComment.md -->\n# Function: postCrmComment()\n\n> **postCrmComment**(`client`, `parent`, `body`, `opts?`): `Promise`\\<[`CrmComment`](../classes/CrmComment.md)\\>\n\nPost a comment on a CRM record: a new thread, or a reply when `threadId`\n(the thread's root comment id) is given.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n| `opts?` | \\{ `threadId?`: `string`; \\} |\n| `opts.threadId?` | `string` |\n\n## Returns\n\n`Promise`\\<[`CrmComment`](../classes/CrmComment.md)\\>\n\n\n<!-- src/entities/crm/comment/interfaces/CrmCommentParent.md -->\n# Interface: CrmCommentParent\n\nThe CRM record a discussion hangs off.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-type\"></a> `type` | `\"crm_company\"` \\| `\"crm_contact\"` |\n\n\n<!-- src/entities/crm/comment/interfaces/CrmCommentThread.md -->\n# Interface: CrmCommentThread\n\nOne of a CRM record's comment threads: its state and its comments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comments\"></a> `comments` | [`CrmComment`](../classes/CrmComment.md)[] | The thread's comments, root first, then replies oldest first. |\n| <a id=\"property-thread\"></a> `thread` | [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md) | The thread state: root id, resolved flag, owner, timestamps. |\n\n\n<!-- src/entities/crm/company/classes/Company.md -->\n# Class: Company\n\nA CRM company: an organization the team has interacted with.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`CompanyDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the company was first created in the CRM. | - | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The company's display description, if any. | - | - |\n| <a id=\"property-emailsync\"></a> `emailSync` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether email sync is enabled for this company. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"crm_company\"` | `'crm_company'` | Favorites identify CRM companies as `crm_company`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-hidden\"></a> `hidden` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the company is hidden from CRM listings. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The company's display name, if resolved. | - | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<[`Team`](../../../teams/team/classes/Team.md)\\> | `...` | The team that owns this company. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the company was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Company`\\> | `...` | Search CRM companies by name/domain, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\nAdd a comment. Starts a new thread, or replies to an existing one when\n`threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\n***\n\n### commentById()\n\n> **commentById**(`id`): [`CrmComment`](../../comment/classes/CrmComment.md)\n\nA handle to one of this company's comments by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CrmComment`](../../comment/classes/CrmComment.md)\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\nThe comment threads on this company, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\nThe contacts attached to this company (hidden ones filtered for non-admins).\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\n***\n\n### createContact()\n\n> **createContact**(`opts`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)\\>\n\nCreate a contact under this company.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `email`: `string`; `name`: `string`; \\} |\n| `opts.email` | `string` |\n| `opts.name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### domain()\n\n> **domain**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe company's primary domain (e.g. `acme.com`), if any.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### domains()\n\n> **domains**(): `Promise`\\<`string`[]\\>\n\nAll domains associated with the company, primary first.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Company`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Company`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### hide()\n\n> **hide**(): `Promise`\\<`void`\\>\n\nHide the company from CRM listings: disables email sync and soft-hides\nits contacts. Reversible with [unhide](#unhide).\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setEmailSync()\n\n> **setEmailSync**(`enabled`): `Promise`\\<`void`\\>\n\nEnable or disable team-wide email sync for this company. Rejects with 409\nwhen enabling on a hidden company — [unhide](#unhide) first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `enabled` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Company`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Company`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### unhide()\n\n> **unhide**(): `Promise`\\<`void`\\>\n\nUn-hide the company, restoring it and its contacts to CRM listings.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Company`\n\nA handle to a CRM company by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Company`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `Company`\n\nBuild a company from an API record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md) |\n\n#### Returns\n\n`Company`\n\n\n<!-- src/entities/crm/contact/classes/Contact.md -->\n# Class: Contact\n\nA CRM contact: a person observed interacting with the team.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`ContactDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-company\"></a> `company` | `readonly` | () => `Promise`\\<[`Company`](../../company/classes/Company.md)\\> | `...` | The CRM company this contact belongs to. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the contact was first created in the CRM. | - | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The contact's email address. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"crm_contact\"` | `'crm_contact'` | Favorites identify CRM contacts as `crm_contact`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-firstinteraction\"></a> `firstInteraction` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the team first interacted with this contact. | - | - |\n| <a id=\"property-hidden\"></a> `hidden` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the contact is hidden from CRM listings. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-lastinteraction\"></a> `lastInteraction` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the team last interacted with this contact. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The contact's display name, if one has been observed. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the contact was last updated. | - | - |\n\n## Methods\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\nAdd a comment. Starts a new thread, or replies to an existing one when\n`threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\n***\n\n### commentById()\n\n> **commentById**(`id`): [`CrmComment`](../../comment/classes/CrmComment.md)\n\nA handle to one of this contact's comments by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CrmComment`](../../comment/classes/CrmComment.md)\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\nThe comment threads on this contact, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Contact`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Contact`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### hide()\n\n> **hide**(): `Promise`\\<`void`\\>\n\nHide the contact from CRM listings. Display-only; reversible with [unhide](#unhide).\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the contact for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Contact`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Contact`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### unhide()\n\n> **unhide**(): `Promise`\\<`void`\\>\n\nUn-hide the contact, restoring it to CRM listings.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Contact`\n\nA handle to a CRM contact by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Contact`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `Contact`\n\nBuild a contact from an API record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md) |\n\n#### Returns\n\n`Contact`\n\n\n<!-- src/entities/crm/namespace/classes/CrmNamespace.md -->\n# Class: CrmNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CrmNamespace**(`client`): `CrmNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CrmNamespace`\n\n## Methods\n\n### companyById()\n\n> **companyById**(`id`): [`Company`](../../company/classes/Company.md)\n\nA handle to a CRM company by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Company`](../../company/classes/Company.md)\n\n***\n\n### contactByEmail()\n\n> **contactByEmail**(`email`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\nResolve a CRM contact by email in the caller's current team, if present.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\n***\n\n### contactById()\n\n> **contactById**(`id`): [`Contact`](../../contact/classes/Contact.md)\n\nA handle to a CRM contact by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Contact`](../../contact/classes/Contact.md)\n\n***\n\n### createCompany()\n\n> **createCompany**(`opts`): `Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\nCreate a CRM company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`CreateCrmCompanyRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateCrmCompanyRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### resetStages()\n\n> **resetStages**(): `Promise`\\<`void`\\>\n\nReset the caller's current team's deal stages to the defaults.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### searchCompanies()\n\n> **searchCompanies**(`query`): `AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\nSearch CRM companies by name/domain, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### searchContacts()\n\n> **searchContacts**(`query`, `opts?`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\nSearch the caller's current team's CRM contacts whose email or name\ncontains `query` (case-insensitive), most recently interacted first.\nAn empty query lists the most recent contacts.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `query` | `string` | - |\n| `opts?` | \\{ `limit?`: `number`; \\} | - |\n| `opts.limit?` | `number` | Maximum contacts to return (1-500, default 20). |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\n***\n\n### setStages()\n\n> **setStages**(`stages`): `Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\nReplace the caller's current team's deal stages, in pipeline order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `stages` | [`ReplaceCrmStagesRequest`](../../../../../generated/storage/types.gen/type-aliases/ReplaceCrmStagesRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\n***\n\n### settings()\n\n> **settings**(): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nThe caller's current team's CRM settings.\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\n***\n\n### updateSettings()\n\n> **updateSettings**(`settings`): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nPartially update the caller's current team's CRM settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `settings` | [`UpdateCrmTeamSettingsRequest`](../../../../../generated/storage/types.gen/type-aliases/UpdateCrmTeamSettingsRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n"+ "documentation": "# Macro SDK: crm\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CreateCrmCompanyRequest.md -->\n# Type Alias: CreateCrmCompanyRequest\n\n> **CreateCrmCompanyRequest** = \\{ `domain`: `string`; `name`: `string`; \\}\n\nRequest body for `POST /crm/companies`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-domain\"></a> `domain` | `string` | The company's email domain, e.g. \"acme.com\". Must be a bare domain (no scheme, path, or email) and not a generic email provider domain. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name for the company. Team-scoped: overrides the domain-directory name on every read path. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmCompanyResponse.md -->\n# Type Alias: CrmCompanyResponse\n\n> **CrmCompanyResponse** = \\{ `contacts`: [`CrmContactResponse`](CrmContactResponse.md)[]; `createdAt`: `string`; `description?`: `string` \\| `null`; `domains`: [`CrmDomainResponse`](CrmDomainResponse.md)[]; `emailSync`: `boolean`; `hidden`: `boolean`; `id`: `string`; `name?`: `string` \\| `null`; `teamId`: `string`; `updatedAt`: `string`; \\}\n\nA CRM company as returned by `GET /crm/companies/{company_id}`.\nMirrors the soup-listed `crmCompany` shape (`name` / `description`\nresolved from the primary domain's `crm_domain_directory` entry) and\nembeds the company's contacts so the panel can render in a single\nrequest.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contacts\"></a> `contacts` | [`CrmContactResponse`](CrmContactResponse.md)[] | Contacts attached to this company. Hidden contacts are filtered out for non-admin viewers. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Earliest known interaction with this company. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Display description from the primary domain's directory entry. |\n| <a id=\"property-domains\"></a> `domains` | [`CrmDomainResponse`](CrmDomainResponse.md)[] | All domains associated with this company, ordered by creation time ascending (primary first). |\n| <a id=\"property-emailsync\"></a> `emailSync` | `boolean` | Whether email sync is enabled for this company. |\n| <a id=\"property-hidden\"></a> `hidden` | `boolean` | Whether the company is hidden from CRM listings for the requesting team. Non-admin viewers never see `hidden = true` rows (the endpoint 404s for them); admin/owner callers see hidden companies so they can render the right toggle state. |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the company. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name from the primary domain's directory entry, or `None` when unresolved. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | The id of the team that owns this company record. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Most recent known interaction with this company. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmContactResponse.md -->\n# Type Alias: CrmContactResponse\n\n> **CrmContactResponse** = \\{ `companyId`: `string`; `createdAt`: `string`; `email`: `string`; `firstInteraction`: `string`; `hidden`: `boolean`; `id`: `string`; `lastInteraction`: `string`; `name?`: `string` \\| `null`; `updatedAt`: `string`; \\}\n\nA CRM contact as returned by `GET /crm/companies/{company_id}/contacts`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-companyid\"></a> `companyId` | `string` | The id of the company the contact belongs to. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the contact record was created. |\n| <a id=\"property-email\"></a> `email` | `string` | The contact's email address. |\n| <a id=\"property-firstinteraction\"></a> `firstInteraction` | `string` | Earliest known interaction with this contact. |\n| <a id=\"property-hidden\"></a> `hidden` | `boolean` | Whether the contact is hidden from CRM listings for the requesting team. Non-admin viewers never see `hidden = true` rows (the endpoint filters them out); admin/owner callers see hidden contacts so they can render the right toggle state. |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the contact record. |\n| <a id=\"property-lastinteraction\"></a> `lastInteraction` | `string` | Most recent known interaction with this contact. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name observed for the contact, if any. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the contact record was last updated. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmDomainResponse.md -->\n# Type Alias: CrmDomainResponse\n\n> **CrmDomainResponse** = \\{ `companyId`: `string`; `createdAt`: `string`; `domain`: `string`; `id`: `string`; \\}\n\nA CRM domain associated with a company.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-companyid\"></a> `companyId` | `string` | The id of the company the domain belongs to. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the domain record was created. |\n| <a id=\"property-domain\"></a> `domain` | `string` | The domain (e.g. \"acme.com\"). |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the domain record. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmPermissionRole.md -->\n# Type Alias: CrmPermissionRole\n\n> **CrmPermissionRole** = `\"admin\"` \\| `\"owner\"`\n\nMinimum team role required for a CRM governance capability. Members\ncan edit visible CRM records (e.g. company properties), but the\ngovernance capabilities these settings gate stay restricted to\nadmin (default) vs owner. Maps to the `team_role` Postgres enum;\n`member` is deliberately not representable.\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStageInput.md -->\n# Type Alias: CrmStageInput\n\n> **CrmStageInput** = \\{ `id?`: `string` \\| `null`; `label`: `string`; \\}\n\nOne stage in a `PUT /crm/stages` body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | Existing stage to keep; omit to add one. |\n| <a id=\"property-label\"></a> `label` | `string` | Label after the update; non-blank and unique within the set. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStageResponse.md -->\n# Type Alias: CrmStageResponse\n\n> **CrmStageResponse** = \\{ `id`: `string`; `label`: `string`; \\}\n\nOne stage of the team's custom pipeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Property option id companies carry as their stage value. |\n| <a id=\"property-label\"></a> `label` | `string` | Label. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmStagesResponse.md -->\n# Type Alias: CrmStagesResponse\n\n> **CrmStagesResponse** = \\{ `definition_id`: `string`; `stages`: [`CrmStageResponse`](CrmStageResponse.md)[]; \\}\n\nThe team's custom stage set.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-definition_id\"></a> `definition_id` | `string` | Team-scoped stage definition id. |\n| <a id=\"property-stages\"></a> `stages` | [`CrmStageResponse`](CrmStageResponse.md)[] | Stages in pipeline order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md -->\n# Type Alias: CrmTeamSettingsResponse\n\n> **CrmTeamSettingsResponse** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `edit_stages_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `legacy_stage_ids`: \\{\\[`key`: `string`\\]: `string`; \\}; `move_closed_deals_role`: [`CrmPermissionRole`](CrmPermissionRole.md); `team_views`: `unknown`; \\}\n\nThe team's CRM configuration (everything on `team_crm_settings`\nexcept the `crm_enabled` killswitch, which is managed via\n`PATCH /team/crm` on the auth service).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-closed_stage_ids\"></a> `closed_stage_ids?` | `string`[] \\| `null` | Stage option ids counting as closed deals; absent = the client falls back to its label heuristic. |\n| <a id=\"property-default_team_view_id\"></a> `default_team_view_id?` | `string` \\| `null` | Team view applied by default when a member opens the CRM view. |\n| <a id=\"property-delete_records_role\"></a> `delete_records_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can delete (hide) CRM records. |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can change the deal stage set in CRM settings. |\n| <a id=\"property-legacy_stage_ids\"></a> `legacy_stage_ids` | \\{\\[`key`: `string`\\]: `string`; \\} | System stage option id to team stage option id for seeded stages. |\n| <a id=\"property-move_closed_deals_role\"></a> `move_closed_deals_role` | [`CrmPermissionRole`](CrmPermissionRole.md) | Who can move deals out of a closed stage. |\n| <a id=\"property-team_views\"></a> `team_views` | `unknown` | Team saved views — an opaque JSON array owned by the frontend. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `guest_name?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-guest_name\"></a> `guest_name?` | `string` \\| `null` | Display name of a verified call guest, retained after the call ends. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ReplaceCrmStagesRequest.md -->\n# Type Alias: ReplaceCrmStagesRequest\n\n> **ReplaceCrmStagesRequest** = \\{ `stages`: [`CrmStageInput`](CrmStageInput.md)[]; \\}\n\nRequest body for `PUT /crm/stages`: the whole stage set in order.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-stages\"></a> `stages` | [`CrmStageInput`](CrmStageInput.md)[] | Stages first to last. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadAnchor.md -->\n# Type Alias: ThreadAnchor\n\n> **ThreadAnchor** = \\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\} \\| \\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\} \\| \\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\} \\| \\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\} \\| \\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\nA thread's location within its document. PDF geometry remains annotation-owned.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mark_id` | `string` | Mark UUID serialized in the document. |\n| `marked_text?` | `string` \\| `null` | The marked text as it read when the discussion was created, already trimmed and bounded. Absent on threads created or imported before snapshots were captured: the text a mark covers cannot be recovered from the mark id alone. |\n| `type` | `\"markdown\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Highlight annotation UUID. |\n| `marked_text?` | `string` \\| `null` | The text the highlight covers, trimmed and bounded like a markdown snapshot. The highlight owns it and it can be edited there, so it is read from the highlight whenever the thread is, never stored on the thread. Absent when the highlight carries no text. |\n| `type` | `\"pdf_highlight\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Placeable annotation UUID. |\n| `type` | `\"pdf_placeable\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `range` | `string` | A1 cell or range, such as B4 or B4:C9. |\n| `sheetId` | `string` | Stable sheet identity within the workbook. |\n| `sheetName` | `string` | Sheet name when the discussion was created. |\n| `type` | `\"spreadsheet\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `nodeId?` | `string` \\| `null` | Layer the pin follows; absent for a pin on the bare canvas. |\n| `pageId` | `string` | Page (canvas) the pin is on. |\n| `type` | `\"fig\"` | - |\n| `x` | `number` | Horizontal offset from the layer's origin, or the page's when the pin is on no layer, in design units. |\n| `y` | `number` | Vertical offset, measured like `x`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadState.md -->\n# Type Alias: ThreadState\n\n> **ThreadState** = \\{ `anchor?`: `null` \\| [`ThreadAnchor`](ThreadAnchor.md); `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `resolved`: `boolean`; `root_id`: `string`; `updated_at`: `string`; `user_id`: `string`; \\}\n\nState belonging to a whole thread, keyed by its root message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-anchor\"></a> `anchor?` | `null` \\| [`ThreadAnchor`](ThreadAnchor.md) | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time of the discussion. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Explicit deletion of the entire thread, distinct from root deletion. |\n| <a id=\"property-resolved\"></a> `resolved` | `boolean` | Whether this discussion has been resolved. |\n| <a id=\"property-root_id\"></a> `root_id` | `string` | Root message UUID; there is no separate thread identity. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last state change. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User who owns this discussion, including imported discussions. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateCrmTeamSettingsRequest.md -->\n# Type Alias: UpdateCrmTeamSettingsRequest\n\n> **UpdateCrmTeamSettingsRequest** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `edit_stages_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `move_closed_deals_role?`: `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md); `team_views?`: `unknown`; \\}\n\nRequest body for `PUT /crm/settings`. Every field is optional:\nomitted fields keep their current values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-closed_stage_ids\"></a> `closed_stage_ids?` | `string`[] \\| `null` | New closed-stage set. Omit to keep the current value; pass `null` to clear it (falling back to the client label heuristic). |\n| <a id=\"property-default_team_view_id\"></a> `default_team_view_id?` | `string` \\| `null` | New default team view id. Omit to keep the current value; pass `null` to clear it. |\n| <a id=\"property-delete_records_role\"></a> `delete_records_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-move_closed_deals_role\"></a> `move_closed_deals_role?` | `null` \\| [`CrmPermissionRole`](CrmPermissionRole.md) | - |\n| <a id=\"property-team_views\"></a> `team_views?` | `unknown` | Replacement team-views array (whole-blob, last write wins). |\n\n\n<!-- src/entities/crm/comment/classes/CrmComment.md -->\n# Class: CrmComment\n\nA comment on a CRM company or contact: a message whose parent is the\nrecord, addressed by the record and the message UUID. Its record and\nmutations are the ones document comments and channel messages use.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was created. | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the comment was deleted, if it has been. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) | The company or contact this comment belongs to. | - |\n| <a id=\"property-text\"></a> `text` | `readonly` | () => `Promise`\\<`string`\\> | The comment's text (markdown). | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this comment. Deleting a thread's root keeps its replies.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`CrmComment`\\>\n\nReplace the comment's text. Only its author may.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`CrmComment`\\>\n\nReply in this comment's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>\n\n***\n\n### threadId()\n\n> **threadId**(): `Promise`\\<`string`\\>\n\nThe id of the thread this comment belongs to: its root, or itself for a root.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `parent`, `id`): `CrmComment`\n\nA handle to a comment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `id` | `string` |\n\n#### Returns\n\n`CrmComment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `parent`, `record`): `CrmComment`\n\nBuild a comment from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`CrmComment`\n\n\n<!-- src/entities/crm/comment/functions/listCrmCommentThreads.md -->\n# Function: listCrmCommentThreads()\n\n> **listCrmCommentThreads**(`client`, `parent`): `Promise`\\<[`CrmCommentThread`](../interfaces/CrmCommentThread.md)[]\\>\n\nA CRM record's live comment threads, each with its comments, newest thread first.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n\n## Returns\n\n`Promise`\\<[`CrmCommentThread`](../interfaces/CrmCommentThread.md)[]\\>\n\n\n<!-- src/entities/crm/comment/functions/postCrmComment.md -->\n# Function: postCrmComment()\n\n> **postCrmComment**(`client`, `parent`, `body`, `opts?`): `Promise`\\<[`CrmComment`](../classes/CrmComment.md)\\>\n\nPost a comment on a CRM record: a new thread, or a reply when `threadId`\n(the thread's root comment id) is given.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`CrmCommentParent`](../interfaces/CrmCommentParent.md) |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n| `opts?` | \\{ `threadId?`: `string`; \\} |\n| `opts.threadId?` | `string` |\n\n## Returns\n\n`Promise`\\<[`CrmComment`](../classes/CrmComment.md)\\>\n\n\n<!-- src/entities/crm/comment/interfaces/CrmCommentParent.md -->\n# Interface: CrmCommentParent\n\nThe CRM record a discussion hangs off.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-type\"></a> `type` | `\"crm_company\"` \\| `\"crm_contact\"` |\n\n\n<!-- src/entities/crm/comment/interfaces/CrmCommentThread.md -->\n# Interface: CrmCommentThread\n\nOne of a CRM record's comment threads: its state and its comments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comments\"></a> `comments` | [`CrmComment`](../classes/CrmComment.md)[] | The thread's comments, root first, then replies oldest first. |\n| <a id=\"property-thread\"></a> `thread` | [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md) | The thread state: root id, resolved flag, owner, timestamps. |\n\n\n<!-- src/entities/crm/company/classes/Company.md -->\n# Class: Company\n\nA CRM company: an organization the team has interacted with.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`CompanyDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the company was first created in the CRM. | - | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The company's display description, if any. | - | - |\n| <a id=\"property-emailsync\"></a> `emailSync` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether email sync is enabled for this company. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"crm_company\"` | `'crm_company'` | Favorites identify CRM companies as `crm_company`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-hidden\"></a> `hidden` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the company is hidden from CRM listings. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The company's display name, if resolved. | - | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<[`Team`](../../../teams/team/classes/Team.md)\\> | `...` | The team that owns this company. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the company was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Company`\\> | `...` | Search CRM companies by name/domain, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\nAdd a comment. Starts a new thread, or replies to an existing one when\n`threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\n***\n\n### commentById()\n\n> **commentById**(`id`): [`CrmComment`](../../comment/classes/CrmComment.md)\n\nA handle to one of this company's comments by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CrmComment`](../../comment/classes/CrmComment.md)\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\nThe comment threads on this company, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\nThe contacts attached to this company (hidden ones filtered for non-admins).\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\n***\n\n### createContact()\n\n> **createContact**(`opts`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)\\>\n\nCreate a contact under this company.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `email`: `string`; `name`: `string`; \\} |\n| `opts.email` | `string` |\n| `opts.name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### domain()\n\n> **domain**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe company's primary domain (e.g. `acme.com`), if any.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### domains()\n\n> **domains**(): `Promise`\\<`string`[]\\>\n\nAll domains associated with the company, primary first.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Company`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Company`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### hide()\n\n> **hide**(): `Promise`\\<`void`\\>\n\nHide the company from CRM listings: disables email sync and soft-hides\nits contacts. Reversible with [unhide](#unhide).\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setEmailSync()\n\n> **setEmailSync**(`enabled`): `Promise`\\<`void`\\>\n\nEnable or disable team-wide email sync for this company. Rejects with 409\nwhen enabling on a hidden company — [unhide](#unhide) first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `enabled` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Company`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Company`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### unhide()\n\n> **unhide**(): `Promise`\\<`void`\\>\n\nUn-hide the company, restoring it and its contacts to CRM listings.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Company`\n\nA handle to a CRM company by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Company`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `Company`\n\nBuild a company from an API record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`CrmCompanyResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmCompanyResponse.md) |\n\n#### Returns\n\n`Company`\n\n\n<!-- src/entities/crm/contact/classes/Contact.md -->\n# Class: Contact\n\nA CRM contact: a person observed interacting with the team.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`ContactDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-company\"></a> `company` | `readonly` | () => `Promise`\\<[`Company`](../../company/classes/Company.md)\\> | `...` | The CRM company this contact belongs to. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the contact was first created in the CRM. | - | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The contact's email address. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"crm_contact\"` | `'crm_contact'` | Favorites identify CRM contacts as `crm_contact`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-firstinteraction\"></a> `firstInteraction` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the team first interacted with this contact. | - | - |\n| <a id=\"property-hidden\"></a> `hidden` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the contact is hidden from CRM listings. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-lastinteraction\"></a> `lastInteraction` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the team last interacted with this contact. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The contact's display name, if one has been observed. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the contact was last updated. | - | - |\n\n## Methods\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\nAdd a comment. Starts a new thread, or replies to an existing one when\n`threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\>\n\n***\n\n### commentById()\n\n> **commentById**(`id`): [`CrmComment`](../../comment/classes/CrmComment.md)\n\nA handle to one of this contact's comments by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CrmComment`](../../comment/classes/CrmComment.md)\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\nThe comment threads on this contact, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CrmCommentThread`](../../comment/interfaces/CrmCommentThread.md)[]\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Contact`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Contact`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### hide()\n\n> **hide**(): `Promise`\\<`void`\\>\n\nHide the contact from CRM listings. Display-only; reversible with [unhide](#unhide).\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the contact for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`toJSON`](../../../entity/classes/FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Contact`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Contact`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### unhide()\n\n> **unhide**(): `Promise`\\<`void`\\>\n\nUn-hide the contact, restoring it to CRM listings.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Contact`\n\nA handle to a CRM contact by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Contact`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `Contact`\n\nBuild a contact from an API record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`CrmContactResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmContactResponse.md) |\n\n#### Returns\n\n`Contact`\n\n\n<!-- src/entities/crm/namespace/classes/CrmNamespace.md -->\n# Class: CrmNamespace\n\n## Constructors\n\n### Constructor\n\n> **new CrmNamespace**(`client`): `CrmNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CrmNamespace`\n\n## Methods\n\n### companyById()\n\n> **companyById**(`id`): [`Company`](../../company/classes/Company.md)\n\nA handle to a CRM company by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Company`](../../company/classes/Company.md)\n\n***\n\n### contactByEmail()\n\n> **contactByEmail**(`email`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\nResolve a CRM contact by email in the caller's current team, if present.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md) \\| `undefined`\\>\n\n***\n\n### contactById()\n\n> **contactById**(`id`): [`Contact`](../../contact/classes/Contact.md)\n\nA handle to a CRM contact by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Contact`](../../contact/classes/Contact.md)\n\n***\n\n### createCompany()\n\n> **createCompany**(`opts`): `Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\nCreate a CRM company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`CreateCrmCompanyRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateCrmCompanyRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### resetStages()\n\n> **resetStages**(): `Promise`\\<`void`\\>\n\nReset the caller's current team's deal stages to the defaults.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### searchCompanies()\n\n> **searchCompanies**(`query`): `AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\nSearch CRM companies by name/domain, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Company`](../../company/classes/Company.md)\\>\n\n***\n\n### searchContacts()\n\n> **searchContacts**(`query`, `opts?`): `Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\nSearch the caller's current team's CRM contacts whose email or name\ncontains `query` (case-insensitive), most recently interacted first.\nAn empty query lists the most recent contacts.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `query` | `string` | - |\n| `opts?` | \\{ `limit?`: `number`; \\} | - |\n| `opts.limit?` | `number` | Maximum contacts to return (1-500, default 20). |\n\n#### Returns\n\n`Promise`\\<[`Contact`](../../contact/classes/Contact.md)[]\\>\n\n***\n\n### setStages()\n\n> **setStages**(`stages`): `Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\nReplace the caller's current team's deal stages, in pipeline order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `stages` | [`ReplaceCrmStagesRequest`](../../../../../generated/storage/types.gen/type-aliases/ReplaceCrmStagesRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmStagesResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmStagesResponse.md)\\>\n\n***\n\n### settings()\n\n> **settings**(): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nThe caller's current team's CRM settings.\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\n***\n\n### updateSettings()\n\n> **updateSettings**(`settings`): `Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n\nPartially update the caller's current team's CRM settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `settings` | [`UpdateCrmTeamSettingsRequest`](../../../../../generated/storage/types.gen/type-aliases/UpdateCrmTeamSettingsRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmTeamSettingsResponse`](../../../../../generated/storage/types.gen/type-aliases/CrmTeamSettingsResponse.md)\\>\n"},{"name": "databases",@@ -57,7 +57,7 @@"name": "documents","description": "Search, read, create, and manage documents and tasks.","overview": "<!-- src/entities/documents/namespace/classes/DocumentNamespace.md -->\n# Class: DocumentNamespace\n\n## Constructors\n\n### Constructor\n\n> **new DocumentNamespace**(`client`): `DocumentNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`DocumentNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Document`](../../document/classes/Document.md)\n\nA handle to a document by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Document`](../../document/classes/Document.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSkill()\n\n> **createSkill**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a skill: markdown instructions that AI reads and follows.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSnippet()\n\n> **createSnippet**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a snippet: a reusable markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recent()\n\n> **recent**(`opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nThe user's recent documents, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `fileType?`: `string`; `pageSize?`: `number`; \\} |\n| `opts.fileType?` | `string` |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recentlyDeleted()\n\n> **recentlyDeleted**(): `Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\nThe user's recently soft-deleted documents.\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nSearch documents by name and content, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### systemSkills()\n\n> **systemSkills**(): `Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n\nThe built-in system skills: static AI instructions with no document\nbehind them. Unlike user skills they cannot be opened or edited.\n\n#### Returns\n\n`Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n",- "documentation": "# Macro SDK: documents\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/BomPart.md -->\n# Type Alias: BomPart\n\n> **BomPart** = \\{ `id`: `string`; `path`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | The uuid of the bom part |\n| <a id=\"property-path\"></a> `path` | `string` | The file path of the bom part content |\n| <a id=\"property-sha\"></a> `sha` | `string` | The sha of the bom part content There is an index on sha for more performant queries based on it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContent.md -->\n# Type Alias: DocumentContent\n\n> **DocumentContent** = \\{ `location?`: `null` \\| [`DocumentContentLocation`](DocumentContentLocation.md); `state`: [`DocumentContentState`](DocumentContentState.md); \\}\n\nAPI-visible content lifecycle and location metadata.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-location\"></a> `location?` | `null` \\| [`DocumentContentLocation`](DocumentContentLocation.md) | - |\n| <a id=\"property-state\"></a> `state` | [`DocumentContentState`](DocumentContentState.md) | The current lifecycle state of the content. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContentLocation.md -->\n# Type Alias: DocumentContentLocation\n\n> **DocumentContentLocation** = `\"object_storage\"` \\| `\"sync_service\"` \\| `\"docx_bom_parts\"` \\| `\"converted_pdf\"` \\| `\"unknown\"`\n\nWhere document content is, or is expected to be, read from.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContentState.md -->\n# Type Alias: DocumentContentState\n\n> **DocumentContentState** = `\"unknown\"` \\| `\"pending\"` \\| `\"ready\"`\n\nAPI-visible content lifecycle state derived from current document metadata.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentMetadata.md -->\n# Type Alias: DocumentMetadata\n\n> **DocumentMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentBom?`: [`BomPart`](BomPart.md)[] \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentId`: `string`; `documentName`: `string`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `modificationData?`: `unknown`; `owner`: `string`; `projectId?`: `string` \\| `null`; `projectName?`: `string` \\| `null`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| [`DocumentSubType`](DocumentSubType.md); `updatedAt?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-branchedfromid\"></a> `branchedFromId?` | `string` \\| `null` | The id of the document this document branched from |\n| <a id=\"property-branchedfromversionid\"></a> `branchedFromVersionId?` | `number` \\| `null` | The id of the version this document branched from This could be either DocumentInstance or DocumentBom id depending on the file type |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the document was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | The time the document was deleted |\n| <a id=\"property-documentbom\"></a> `documentBom?` | [`BomPart`](BomPart.md)[] \\| `null` | If the document is a DOCX document and unzipped, the document_bom will be present |\n| <a id=\"property-documentfamilyid\"></a> `documentFamilyId?` | `number` \\| `null` | The id of the document family this document belongs to |\n| <a id=\"property-documentid\"></a> `documentId` | `string` | The document id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document |\n| <a id=\"property-documentversionid\"></a> `documentVersionId` | `number` | The version of the document This could be the document_instance_id or document_bom_id depending on the file type |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document (file extension) |\n| <a id=\"property-modificationdata\"></a> `modificationData?` | `unknown` | The modification data for the document instance. This is only used for PDF documents. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document |\n| <a id=\"property-projectid\"></a> `projectId?` | `string` \\| `null` | The id of the project that this document belongs to |\n| <a id=\"property-projectname\"></a> `projectName?` | `string` \\| `null` | The name of the project that this document belongs to |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | If the document is a PDF, this is the SHA of the pdf If the document is a DOCX, this will not be present |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`DocumentSubType`](DocumentSubType.md) | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the document instance / document BOM was updated |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md -->\n# Type Alias: DocumentMetadataWithContent\n\n> **DocumentMetadataWithContent** = [`DocumentMetadata`](DocumentMetadata.md) & \\{ `content`: [`DocumentContent`](DocumentContent.md); `teamId?`: `string` \\| `null`; `teamTaskId?`: `number` \\| `null`; \\}\n\nFull document metadata plus content lifecycle metadata.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`DocumentContent`](DocumentContent.md) | Content lifecycle and location metadata. |\n| `teamId?` | `string` \\| `null` | The team this task number is scoped to, for task documents. |\n| `teamTaskId?` | `number` \\| `null` | The task number assigned within the team, for task documents. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentSubType.md -->\n# Type Alias: DocumentSubType\n\n> **DocumentSubType** = `\"task\"` \\| `\"snippet\"` \\| `\"skill\"` \\| `\"initiative_description\"`\n\nThe document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.\n\nWire, database, and `Display` spellings are all `snake_case` so a\nmulti-word variant serializes identically in every system.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md -->\n# Type Alias: DocumentTeamShareResponse\n\n> **DocumentTeamShareResponse** = \\{ `sharedWithTeam`: `boolean`; `teamId?`: `string` \\| `null`; \\}\n\nThe team-share state of a document. The team is resolved from the document\nowner's team membership.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-sharedwithteam\"></a> `sharedWithTeam` | `boolean` | Whether explicit team sharing is enabled; inherited team access does not count. |\n| <a id=\"property-teamid\"></a> `teamId?` | `string` \\| `null` | The owner's team the document is (or would be) shared with. `None` when the owner does not belong to a team. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequest.md -->\n# Type Alias: GithubPullRequest\n\n> **GithubPullRequest** = \\{ `additions?`: `number` \\| `null`; `checks?`: [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[] \\| `null`; `comments?`: [`GithubPullRequestComment`](GithubPullRequestComment.md)[] \\| `null`; `deletions?`: `number` \\| `null`; `displayName`: `string`; `foreignEntityId?`: `string` \\| `null`; `githubKey`: `string`; `name?`: `string` \\| `null`; `number`: `number`; `owner`: `string`; `repo`: `string`; `status?`: `string` \\| `null`; `url`: `string`; \\}\n\nDisplay-ready data for a GitHub pull request associated with a task.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions?` | `number` \\| `null` | The number of added lines in the pull request, when enrichment data is available. |\n| <a id=\"property-checks\"></a> `checks?` | [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[] \\| `null` | Check runs collected from the pull request head commit, when enrichment data is available. |\n| <a id=\"property-comments\"></a> `comments?` | [`GithubPullRequestComment`](GithubPullRequestComment.md)[] \\| `null` | Comments collected from the pull request, when enrichment data is available. |\n| <a id=\"property-deletions\"></a> `deletions?` | `number` \\| `null` | The number of deleted lines in the pull request, when enrichment data is available. |\n| <a id=\"property-displayname\"></a> `displayName` | `string` | A compact label suitable for display in the UI. |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId?` | `string` \\| `null` | The internal `foreign_entity.id` UUID for the GitHub pull request row. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The stored GitHub association key, in `owner/repo/pull/number` format. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The GitHub pull request title, when enrichment data is available. |\n| <a id=\"property-number\"></a> `number` | `number` | The GitHub pull request number. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The GitHub repository owner or organization. |\n| <a id=\"property-repo\"></a> `repo` | `string` | The GitHub repository name. |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | The GitHub pull request status, when enrichment data is available. |\n| <a id=\"property-url\"></a> `url` | `string` | The public GitHub URL for the pull request. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestCheckRun.md -->\n# Type Alias: GithubPullRequestCheckRun\n\n> **GithubPullRequestCheckRun** = \\{ `completedAt?`: `string` \\| `null`; `conclusion?`: `string` \\| `null`; `id`: `number`; `name`: `string`; `startedAt?`: `string` \\| `null`; `status`: `string`; `url?`: `string` \\| `null`; \\}\n\nA check run associated with a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-completedat\"></a> `completedAt?` | `string` \\| `null` | When the check run completed, when available. |\n| <a id=\"property-conclusion\"></a> `conclusion?` | `string` \\| `null` | The raw GitHub check run conclusion, when the run has completed. |\n| <a id=\"property-id\"></a> `id` | `number` | The unique GitHub identifier for the check run. |\n| <a id=\"property-name\"></a> `name` | `string` | The check run name. |\n| <a id=\"property-startedat\"></a> `startedAt?` | `string` \\| `null` | When the check run started, when available. |\n| <a id=\"property-status\"></a> `status` | `string` | The raw GitHub check run status. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The public GitHub URL for the check run, when available. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestComment.md -->\n# Type Alias: GithubPullRequestComment\n\n> **GithubPullRequestComment** = \\{ `authorAssociation?`: `string` \\| `null`; `authorId?`: `number` \\| `null`; `authorLogin?`: `string` \\| `null`; `body`: `string`; `createdAt?`: `string` \\| `null`; `id`: `number`; `inReplyToId?`: `number` \\| `null`; `line?`: `number` \\| `null`; `originalLine?`: `number` \\| `null`; `path?`: `string` \\| `null`; `pullRequestReviewId?`: `number` \\| `null`; `source`: `string`; `updatedAt?`: `string` \\| `null`; `url?`: `string` \\| `null`; \\}\n\nA comment associated with a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-authorassociation\"></a> `authorAssociation?` | `string` \\| `null` | GitHub's relationship label for the author, when available. |\n| <a id=\"property-authorid\"></a> `authorId?` | `number` \\| `null` | The stable numeric GitHub user id for the comment author, when available. |\n| <a id=\"property-authorlogin\"></a> `authorLogin?` | `string` \\| `null` | The GitHub login for the comment author, when available. |\n| <a id=\"property-body\"></a> `body` | `string` | The comment or review body text. |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | When the comment was created or the review was submitted. |\n| <a id=\"property-id\"></a> `id` | `number` | The unique GitHub identifier for the comment or review. |\n| <a id=\"property-inreplytoid\"></a> `inReplyToId?` | `number` \\| `null` | The id of the comment this one replies to, when it is part of a review thread. Only ever present on `review_comment` sources. |\n| <a id=\"property-line\"></a> `line?` | `number` \\| `null` | The line in the current diff the comment is anchored to. Cleared by GitHub when later commits outdate the comment's diff. |\n| <a id=\"property-originalline\"></a> `originalLine?` | `number` \\| `null` | The line the comment was originally anchored to, kept even when the diff has since changed. |\n| <a id=\"property-path\"></a> `path?` | `string` \\| `null` | The repository-relative file path the review comment is anchored to. Only ever present on `review_comment` sources. |\n| <a id=\"property-pullrequestreviewid\"></a> `pullRequestReviewId?` | `number` \\| `null` | The id of the pull request review this comment was submitted with. Only ever present on `review_comment` sources. |\n| <a id=\"property-source\"></a> `source` | `string` | The GitHub source for the comment, such as `issue_comment` or `review_comment`. |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | When the comment or review was last updated. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The public GitHub URL for the comment or review, when available. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadAnchor.md -->\n# Type Alias: ThreadAnchor\n\n> **ThreadAnchor** = \\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\} \\| \\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\} \\| \\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\} \\| \\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\} \\| \\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\nA thread's location within its document. PDF geometry remains annotation-owned.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mark_id` | `string` | Mark UUID serialized in the document. |\n| `marked_text?` | `string` \\| `null` | The marked text as it read when the discussion was created, already trimmed and bounded. Absent on threads created or imported before snapshots were captured: the text a mark covers cannot be recovered from the mark id alone. |\n| `type` | `\"markdown\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Highlight annotation UUID. |\n| `marked_text?` | `string` \\| `null` | The text the highlight covers, trimmed and bounded like a markdown snapshot. The highlight owns it and it can be edited there, so it is read from the highlight whenever the thread is, never stored on the thread. Absent when the highlight carries no text. |\n| `type` | `\"pdf_highlight\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Placeable annotation UUID. |\n| `type` | `\"pdf_placeable\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `range` | `string` | A1 cell or range, such as B4 or B4:C9. |\n| `sheetId` | `string` | Stable sheet identity within the workbook. |\n| `sheetName` | `string` | Sheet name when the discussion was created. |\n| `type` | `\"spreadsheet\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `nodeId?` | `string` \\| `null` | Layer the pin follows; absent for a pin on the bare canvas. |\n| `pageId` | `string` | Page (canvas) the pin is on. |\n| `type` | `\"fig\"` | - |\n| `x` | `number` | Horizontal offset from the layer's origin, or the page's when the pin is on no layer, in design units. |\n| `y` | `number` | Vertical offset, measured like `x`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadState.md -->\n# Type Alias: ThreadState\n\n> **ThreadState** = \\{ `anchor?`: `null` \\| [`ThreadAnchor`](ThreadAnchor.md); `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `resolved`: `boolean`; `root_id`: `string`; `updated_at`: `string`; `user_id`: `string`; \\}\n\nState belonging to a whole thread, keyed by its root message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-anchor\"></a> `anchor?` | `null` \\| [`ThreadAnchor`](ThreadAnchor.md) | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time of the discussion. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Explicit deletion of the entire thread, distinct from root deletion. |\n| <a id=\"property-resolved\"></a> `resolved` | `boolean` | Whether this discussion has been resolved. |\n| <a id=\"property-root_id\"></a> `root_id` | `string` | Root message UUID; there is no separate thread identity. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last state change. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User who owns this discussion, including imported discussions. |\n\n\n<!-- src/entities/documents/comment/classes/Comment.md -->\n# Class: Comment\n\nA comment on a document: a document-parent message, addressed by its\ndocument and message UUID. Its record and mutations are the ones channel\nmessages use.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was created. | - |\n| <a id=\"property-documentid\"></a> `documentId` | `readonly` | `string` | The document this comment belongs to. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-text\"></a> `text` | `readonly` | () => `Promise`\\<`string`\\> | The comment's text. | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this comment.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### document()\n\n> **document**(): [`Document`](../../document/classes/Document.md)\n\nThe document this comment is on.\n\n#### Returns\n\n[`Document`](../../document/classes/Document.md)\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`Comment`\\>\n\nReplace the comment's text.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`Comment`\\>\n\nReply in this comment's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\n***\n\n### threadId()\n\n> **threadId**(): `Promise`\\<`string`\\>\n\nThe id of the thread this comment belongs to: its root, or itself for a root.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `documentId`, `id`): `Comment`\n\nA handle to a comment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `documentId` | `string` |\n| `id` | `string` |\n\n#### Returns\n\n`Comment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `documentId`, `record`): `Comment`\n\nBuild a comment from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `documentId` | `string` |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`Comment`\n\n\n<!-- src/entities/documents/document/classes/Document.md -->\n# Class: Document\n\nA Macro document. Can be dropped into a msg template to render an\ninline link to the document.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`DocumentDetail`\\>\n\n## Extended by\n\n- [`Task`](../../../tasks/task/classes/Task.md)\n\n## Implements\n\n- [`Mentionable`](../../../../mentions/interfaces/Mentionable.md)\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-branchedfrom\"></a> `branchedFrom` | `readonly` | () => `Promise`\\<`Document` \\| `undefined`\\> | `...` | The document this one was branched from, if any. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was created. | - | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was deleted, if it has been. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"document\"` | `'document'` | Favorites identify documents as `document`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-filetype\"></a> `fileType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The document's file type (e.g. `md`, `pdf`, `docx`). | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The document's display name. | - | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | `...` | The user who owns the document. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this document belongs to, if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Document`\\> | `...` | Search documents by name and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### branchName()\n\n> **branchName**(): `Promise`\\<`string`\\>\n\nThe git branch name derived for the document (task documents).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`Comment`](../../comment/classes/Comment.md)\\>\n\nAdd a comment. Starts a new unanchored thread, or replies to an existing\none when `threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`Comment`](../../comment/classes/Comment.md)\\>\n\nThe created comment.\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CommentThread`](../interfaces/CommentThread.md)[]\\>\n\nThe document's live comment threads, each with its comments, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CommentThread`](../interfaces/CommentThread.md)[]\\>\n\n***\n\n### content()\n\n> **content**(): `Promise`\\<`string`\\>\n\nCurrent Markdown for native documents, extracted text for PDF/Word,\nor raw file content for other formats. Native reads include live edits.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### copy()\n\n> **copy**(`opts`): `Promise`\\<`Document`\\>\n\nCopy the document under a new name, optionally from a specific version.\nReturns a handle to the new document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `versionId?`: `number`; \\} |\n| `opts.name` | `string` |\n| `opts.versionId?` | `number` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the document. Soft by default (reversible with [restore](#restore));\npass `permanent: true` to delete irreversibly.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `permanent?`: `boolean`; \\} |\n| `opts.permanent?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Document`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### githubPullRequests()\n\n> **githubPullRequests**(): `Promise`\\<[`GithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/GithubPullRequest.md)[]\\>\n\nGitHub pull requests associated with the document.\n\n#### Returns\n\n`Promise`\\<[`GithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/GithubPullRequest.md)[]\\>\n\n***\n\n### move()\n\n> **move**(`project`): `Promise`\\<`void`\\>\n\nMove the document into a project (or out of one, with `null`).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `project` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### restore()\n\n> **restore**(): `Promise`\\<`void`\\>\n\nRestore a soft-deleted document.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### setTeamShare()\n\n> **setTeamShare**(`shared`): `Promise`\\<`void`\\>\n\nShare the document with the owner's team, or unshare it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `shared` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### shortId()\n\n> **shortId**(): `Promise`\\<`string`\\>\n\nThe document's short id (used in compact links and branch names).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### teamShare()\n\n> **teamShare**(): `Promise`\\<[`DocumentTeamShareResponse`](../../../../../generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md)\\>\n\nWhether the document is shared with the owner's team, and which team.\n\n#### Returns\n\n`Promise`\\<[`DocumentTeamShareResponse`](../../../../../generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### toMention()\n\n> **toMention**(): [`MentionPart`](../../../../mentions/interfaces/MentionPart.md)\n\n#### Returns\n\n[`MentionPart`](../../../../mentions/interfaces/MentionPart.md)\n\n#### Implementation of\n\n[`Mentionable`](../../../../mentions/interfaces/Mentionable.md).[`toMention`](../../../../mentions/interfaces/Mentionable.md#tomention)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Document`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nThe document's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Document`\n\nA handle to a document by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Document`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### createSkill()\n\n> `static` **createSkill**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a skill: a markdown document containing instructions that AI reads\nand follows when the skill is referenced in an AI input.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### createSnippet()\n\n> `static` **createSnippet**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a snippet: a reusable markdown document that can be inserted into\nany markdown area.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### recent()\n\n> `static` **recent**(`client`, `opts?`): `AsyncGenerator`\\<`Document`\\>\n\nThe user's recent documents, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | \\{ `fileType?`: `string`; `pageSize?`: `number`; \\} |\n| `opts.fileType?` | `string` |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Document`\\>\n\n***\n\n### recentlyDeleted()\n\n> `static` **recentlyDeleted**(`client`): `Promise`\\<`Document`[]\\>\n\nThe user's recently soft-deleted documents. The underlying endpoint also\nreturns deleted chats and projects; those are filtered out here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Document`[]\\>\n\n\n<!-- src/entities/documents/document/interfaces/CommentThread.md -->\n# Interface: CommentThread\n\nOne of a document's comment threads: its state and its comments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comments\"></a> `comments` | [`Comment`](../../comment/classes/Comment.md)[] | The root comment followed by its replies, in order. |\n| <a id=\"property-thread\"></a> `thread` | [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md) | The thread state: root id, resolved flag, owner, anchor, timestamps. |\n\n\n<!-- src/entities/documents/namespace/classes/DocumentNamespace.md -->\n# Class: DocumentNamespace\n\n## Constructors\n\n### Constructor\n\n> **new DocumentNamespace**(`client`): `DocumentNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`DocumentNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Document`](../../document/classes/Document.md)\n\nA handle to a document by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Document`](../../document/classes/Document.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSkill()\n\n> **createSkill**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a skill: markdown instructions that AI reads and follows.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSnippet()\n\n> **createSnippet**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a snippet: a reusable markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recent()\n\n> **recent**(`opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nThe user's recent documents, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `fileType?`: `string`; `pageSize?`: `number`; \\} |\n| `opts.fileType?` | `string` |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recentlyDeleted()\n\n> **recentlyDeleted**(): `Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\nThe user's recently soft-deleted documents.\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nSearch documents by name and content, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### systemSkills()\n\n> **systemSkills**(): `Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n\nThe built-in system skills: static AI instructions with no document\nbehind them. Unlike user skills they cannot be opened or edited.\n\n#### Returns\n\n`Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n\n\n<!-- src/entities/documents/system-skill/classes/SystemSkill.md -->\n# Class: SystemSkill\n\nA built-in system skill: static, code-defined AI instructions that surface\nto AI like skill documents but have no document behind them. System skills\ncannot be opened, edited, or deleted; reference them in AI inputs by id the\nsame way as skill documents.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The well-known id the skill is referenced by in mentions and AI tools. |\n| <a id=\"property-name\"></a> `name` | `readonly` | `string` | The skill's display name. |\n\n## Methods\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`SystemSkill`[]\\>\n\nThe built-in system skills, in display order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`SystemSkill`[]\\>\n"+ "documentation": "# Macro SDK: documents\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md -->\n# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[]; \\}\n\nResponse for a bulk option update: each property's reconciled final ids.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyOptionSelectionResponse`](EntityPropertyOptionSelectionResponse.md)[] | The final option ids per updated property. |\n\n\n<!-- generated/properties/types.gen/type-aliases/DataType.md -->\n# Type Alias: DataType\n\n> **DataType** = `\"BOOLEAN\"` \\| `\"DATE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityProperty.md -->\n# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; \\}\n\nAssignment of a property definition to a specific entity (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyOptionSelectionResponse.md -->\n# Type Alias: EntityPropertyOptionSelectionResponse\n\n> **EntityPropertyOptionSelectionResponse** = \\{ `option_ids`: `string`[]; `property_id`: `string`; \\}\n\nThe reconciled final option ids stored for one property after a bulk update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-option_ids\"></a> `option_ids` | `string`[] | The final option ids the server persisted, in stored order. |\n| <a id=\"property-property_id\"></a> `property_id` | `string` | The property definition the options belong to. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md -->\n# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `options?`: [`PropertyOption`](PropertyOption.md)[] \\| `null`; `property`: [`EntityProperty`](EntityProperty.md); `value?`: `null` \\| [`PropertyValue`](PropertyValue.md); \\}\n\nEntity property with its definition, value, and options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinition`](PropertyDefinition.md) |\n| <a id=\"property-options\"></a> `options?` | [`PropertyOption`](PropertyOption.md)[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | [`EntityProperty`](EntityProperty.md) |\n| <a id=\"property-value\"></a> `value?` | `null` \\| [`PropertyValue`](PropertyValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); `specific_message_id?`: `string` \\| `null`; \\}\n\nEntity reference for entity-type property values.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | - |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | - |\n| <a id=\"property-specific_message_id\"></a> `specific_message_id?` | `string` \\| `null` | For CHANNEL, CHAT, THREAD entity types - optional specific message ID. This allows referencing a specific message within a thread/channel/chat. |\n\n\n<!-- generated/properties/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"CALENDAR_EVENT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"CONTACT\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"TASK\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nType of entity that can be referenced by entity properties.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyDefinition.md -->\n# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: [`DataType`](DataType.md); `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: [`PropertyOwner`](PropertyOwner.md); `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `updated_at`: `string`; \\}\n\nProperty definition model (service representation).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_metadata\"></a> `is_metadata` | `boolean` | Flag to indicate if this is a system-generated metadata property. Not stored in database - computed at service layer. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | - |\n| <a id=\"property-is_system\"></a> `is_system` | `boolean` | Flag to indicate if this is a system property (stored in DB). |\n| <a id=\"property-owner\"></a> `owner` | [`PropertyOwner`](PropertyOwner.md) | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOption.md -->\n# Type Alias: PropertyOption\n\n> **PropertyOption** = \\{ `color`: `string` \\| `null`; `created_at`: `string`; `display_order`: `number`; `id`: `string`; `property_definition_id`: `string`; `updated_at`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nA selectable option for select-type properties (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n| <a id=\"property-value\"></a> `value` | [`PropertyOptionValue`](PropertyOptionValue.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOptionValue.md -->\n# Type Alias: PropertyOptionValue\n\n> **PropertyOptionValue** = \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\}\n\nThe value of a property option - either a string or a number.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"string\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"string\"` | - |\n| `value` | `string` | String value for SelectString properties |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | Number value for SelectNumber properties |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyOwner.md -->\n# Type Alias: PropertyOwner\n\n> **PropertyOwner** = \\{ `scope`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `scope`: `\"team\"`; `team_id`: `string`; \\} \\| \\{ `database_id`: `string`; `scope`: `\"database\"`; \\} \\| \\{ `scope`: `\"system\"`; \\}\n\nDefines who owns a property - user-scoped, team-scoped, database-scoped, or system.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md -->\n# Type Alias: PropertyTargetEntityType\n\n> **PropertyTargetEntityType** = `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"COMPANY\"` \\| `\"DATABASE_ROW\"` \\| `\"DOCUMENT\"` \\| `\"INITIATIVE\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"USER\"`\n\nCanonical type of an entity receiving properties.\n\nTasks are documents at API boundaries. `Task` intentionally does not exist\nhere; task classification is resolved by the properties domain from the\ndocument subtype.\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyTargetReference.md -->\n# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); \\}\n\nCanonical reference to an entity receiving properties.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | Canonical entity type. |\n\n\n<!-- generated/properties/types.gen/type-aliases/PropertyValue.md -->\n# Type Alias: PropertyValue\n\n> **PropertyValue** = \\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"Number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"String\"`; `value`: `string`; \\} \\| \\{ `type`: `\"Date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\} \\| \\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\nProperty value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"Boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Boolean\"` | - |\n| `value` | `boolean` | Boolean value Serializes as: {\"type\": \"Boolean\", \"value\": true} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Number\"` | - |\n| `value` | `number` | Numeric value Serializes as: {\"type\": \"Number\", \"value\": 42.5} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"String\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"String\"` | - |\n| `value` | `string` | String value Serializes as: {\"type\": \"String\", \"value\": \"text\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Date\"` | - |\n| `value` | `string` | Date/timestamp value Serializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"} |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"SelectOption\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"SelectOption\"` | - |\n| `value` | `string`[] | Select option(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1) Multi-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"EntityReference\"`; `value`: [`EntityReference`](EntityReference.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | [`EntityReference`](EntityReference.md)[] | Entity reference(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1) Multi-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+) |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"Link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"Link\"` | - |\n| `value` | `string`[] | Link value(s) - always an array (check is_multi_select to determine if single or multi) Single-select: {\"type\": \"Link\", \"value\": [\"https://example.com\"]} (length 0 or 1) Multi-select: {\"type\": \"Link\", \"value\": [\"https://example.com\", \"https://other.com\"]} (length 0+) |\n\n\n<!-- generated/properties/types.gen/type-aliases/SetPropertyValue.md -->\n# Type Alias: SetPropertyValue\n\n> **SetPropertyValue** = \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"string\"`; `value`: `string`; \\} \\| \\{ `option_id`: `string`; `type`: `\"select_option\"`; \\} \\| \\{ `option_ids`: `string`[]; `type`: `\"multi_select_option\"`; \\} \\| \\{ `reference`: [`EntityReference`](EntityReference.md); `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: [`EntityReference`](EntityReference.md)[]; `type`: `\"multi_entity_reference\"`; \\} \\| \\{ `type`: `\"link\"`; `url`: `string`; \\} \\| \\{ `type`: `\"multi_link\"`; `urls`: `string`[]; \\}\n\nType-safe enum for setting entity property values - provides compile-time validation.\n\n\n<!-- generated/storage/types.gen/type-aliases/BomPart.md -->\n# Type Alias: BomPart\n\n> **BomPart** = \\{ `id`: `string`; `path`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | The uuid of the bom part |\n| <a id=\"property-path\"></a> `path` | `string` | The file path of the bom part content |\n| <a id=\"property-sha\"></a> `sha` | `string` | The sha of the bom part content There is an index on sha for more performant queries based on it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/BotSenderProfile.md -->\n# Type Alias: BotSenderProfile\n\n> **BotSenderProfile** = \\{ `avatar_url?`: `string` \\| `null`; `name`: `string`; \\}\n\nPublic bot profile attached to bot-authored messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Bot avatar URL. |\n| <a id=\"property-name\"></a> `name` | `string` | Bot display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CountedReaction.md -->\n# Type Alias: CountedReaction\n\n> **CountedReaction** = \\{ `emoji`: `string`; `users`: `string`[]; \\}\n\nReaction emoji and the users who added it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji being reacted with. |\n| <a id=\"property-users\"></a> `users` | `string`[] | User identifiers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContent.md -->\n# Type Alias: DocumentContent\n\n> **DocumentContent** = \\{ `location?`: `null` \\| [`DocumentContentLocation`](DocumentContentLocation.md); `state`: [`DocumentContentState`](DocumentContentState.md); \\}\n\nAPI-visible content lifecycle and location metadata.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-location\"></a> `location?` | `null` \\| [`DocumentContentLocation`](DocumentContentLocation.md) | - |\n| <a id=\"property-state\"></a> `state` | [`DocumentContentState`](DocumentContentState.md) | The current lifecycle state of the content. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContentLocation.md -->\n# Type Alias: DocumentContentLocation\n\n> **DocumentContentLocation** = `\"object_storage\"` \\| `\"sync_service\"` \\| `\"docx_bom_parts\"` \\| `\"converted_pdf\"` \\| `\"unknown\"`\n\nWhere document content is, or is expected to be, read from.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentContentState.md -->\n# Type Alias: DocumentContentState\n\n> **DocumentContentState** = `\"unknown\"` \\| `\"pending\"` \\| `\"ready\"`\n\nAPI-visible content lifecycle state derived from current document metadata.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentId.md -->\n# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentMetadata.md -->\n# Type Alias: DocumentMetadata\n\n> **DocumentMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentBom?`: [`BomPart`](BomPart.md)[] \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentId`: `string`; `documentName`: `string`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `modificationData?`: `unknown`; `owner`: `string`; `projectId?`: `string` \\| `null`; `projectName?`: `string` \\| `null`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| [`DocumentSubType`](DocumentSubType.md); `updatedAt?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-branchedfromid\"></a> `branchedFromId?` | `string` \\| `null` | The id of the document this document branched from |\n| <a id=\"property-branchedfromversionid\"></a> `branchedFromVersionId?` | `number` \\| `null` | The id of the version this document branched from This could be either DocumentInstance or DocumentBom id depending on the file type |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the document was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | The time the document was deleted |\n| <a id=\"property-documentbom\"></a> `documentBom?` | [`BomPart`](BomPart.md)[] \\| `null` | If the document is a DOCX document and unzipped, the document_bom will be present |\n| <a id=\"property-documentfamilyid\"></a> `documentFamilyId?` | `number` \\| `null` | The id of the document family this document belongs to |\n| <a id=\"property-documentid\"></a> `documentId` | `string` | The document id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document |\n| <a id=\"property-documentversionid\"></a> `documentVersionId` | `number` | The version of the document This could be the document_instance_id or document_bom_id depending on the file type |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document (file extension) |\n| <a id=\"property-modificationdata\"></a> `modificationData?` | `unknown` | The modification data for the document instance. This is only used for PDF documents. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document |\n| <a id=\"property-projectid\"></a> `projectId?` | `string` \\| `null` | The id of the project that this document belongs to |\n| <a id=\"property-projectname\"></a> `projectName?` | `string` \\| `null` | The name of the project that this document belongs to |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | If the document is a PDF, this is the SHA of the pdf If the document is a DOCX, this will not be present |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`DocumentSubType`](DocumentSubType.md) | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the document instance / document BOM was updated |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md -->\n# Type Alias: DocumentMetadataWithContent\n\n> **DocumentMetadataWithContent** = [`DocumentMetadata`](DocumentMetadata.md) & \\{ `content`: [`DocumentContent`](DocumentContent.md); `teamId?`: `string` \\| `null`; `teamTaskId?`: `number` \\| `null`; \\}\n\nFull document metadata plus content lifecycle metadata.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`DocumentContent`](DocumentContent.md) | Content lifecycle and location metadata. |\n| `teamId?` | `string` \\| `null` | The team this task number is scoped to, for task documents. |\n| `teamTaskId?` | `number` \\| `null` | The task number assigned within the team, for task documents. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentSubType.md -->\n# Type Alias: DocumentSubType\n\n> **DocumentSubType** = `\"task\"` \\| `\"snippet\"` \\| `\"skill\"` \\| `\"initiative_description\"`\n\nThe document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.\n\nWire, database, and `Display` spellings are all `snake_case` so a\nmulti-word variant serializes identically in every system.\n\n\n<!-- generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md -->\n# Type Alias: DocumentTeamShareResponse\n\n> **DocumentTeamShareResponse** = \\{ `sharedWithTeam`: `boolean`; `teamId?`: `string` \\| `null`; \\}\n\nThe team-share state of a document. The team is resolved from the document\nowner's team membership.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-sharedwithteam\"></a> `sharedWithTeam` | `boolean` | Whether explicit team sharing is enabled; inherited team access does not count. |\n| <a id=\"property-teamid\"></a> `teamId?` | `string` \\| `null` | The owner's team the document is (or would be) shared with. `None` when the owner does not belong to a team. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequest.md -->\n# Type Alias: GithubPullRequest\n\n> **GithubPullRequest** = \\{ `additions?`: `number` \\| `null`; `checks?`: [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[] \\| `null`; `comments?`: [`GithubPullRequestComment`](GithubPullRequestComment.md)[] \\| `null`; `deletions?`: `number` \\| `null`; `displayName`: `string`; `foreignEntityId?`: `string` \\| `null`; `githubKey`: `string`; `name?`: `string` \\| `null`; `number`: `number`; `owner`: `string`; `repo`: `string`; `status?`: `string` \\| `null`; `url`: `string`; \\}\n\nDisplay-ready data for a GitHub pull request associated with a task.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions?` | `number` \\| `null` | The number of added lines in the pull request, when enrichment data is available. |\n| <a id=\"property-checks\"></a> `checks?` | [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[] \\| `null` | Check runs collected from the pull request head commit, when enrichment data is available. |\n| <a id=\"property-comments\"></a> `comments?` | [`GithubPullRequestComment`](GithubPullRequestComment.md)[] \\| `null` | Comments collected from the pull request, when enrichment data is available. |\n| <a id=\"property-deletions\"></a> `deletions?` | `number` \\| `null` | The number of deleted lines in the pull request, when enrichment data is available. |\n| <a id=\"property-displayname\"></a> `displayName` | `string` | A compact label suitable for display in the UI. |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId?` | `string` \\| `null` | The internal `foreign_entity.id` UUID for the GitHub pull request row. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The stored GitHub association key, in `owner/repo/pull/number` format. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The GitHub pull request title, when enrichment data is available. |\n| <a id=\"property-number\"></a> `number` | `number` | The GitHub pull request number. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The GitHub repository owner or organization. |\n| <a id=\"property-repo\"></a> `repo` | `string` | The GitHub repository name. |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | The GitHub pull request status, when enrichment data is available. |\n| <a id=\"property-url\"></a> `url` | `string` | The public GitHub URL for the pull request. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestCheckRun.md -->\n# Type Alias: GithubPullRequestCheckRun\n\n> **GithubPullRequestCheckRun** = \\{ `completedAt?`: `string` \\| `null`; `conclusion?`: `string` \\| `null`; `id`: `number`; `name`: `string`; `startedAt?`: `string` \\| `null`; `status`: `string`; `url?`: `string` \\| `null`; \\}\n\nA check run associated with a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-completedat\"></a> `completedAt?` | `string` \\| `null` | When the check run completed, when available. |\n| <a id=\"property-conclusion\"></a> `conclusion?` | `string` \\| `null` | The raw GitHub check run conclusion, when the run has completed. |\n| <a id=\"property-id\"></a> `id` | `number` | The unique GitHub identifier for the check run. |\n| <a id=\"property-name\"></a> `name` | `string` | The check run name. |\n| <a id=\"property-startedat\"></a> `startedAt?` | `string` \\| `null` | When the check run started, when available. |\n| <a id=\"property-status\"></a> `status` | `string` | The raw GitHub check run status. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The public GitHub URL for the check run, when available. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestComment.md -->\n# Type Alias: GithubPullRequestComment\n\n> **GithubPullRequestComment** = \\{ `authorAssociation?`: `string` \\| `null`; `authorId?`: `number` \\| `null`; `authorLogin?`: `string` \\| `null`; `body`: `string`; `createdAt?`: `string` \\| `null`; `id`: `number`; `inReplyToId?`: `number` \\| `null`; `line?`: `number` \\| `null`; `originalLine?`: `number` \\| `null`; `path?`: `string` \\| `null`; `pullRequestReviewId?`: `number` \\| `null`; `source`: `string`; `updatedAt?`: `string` \\| `null`; `url?`: `string` \\| `null`; \\}\n\nA comment associated with a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-authorassociation\"></a> `authorAssociation?` | `string` \\| `null` | GitHub's relationship label for the author, when available. |\n| <a id=\"property-authorid\"></a> `authorId?` | `number` \\| `null` | The stable numeric GitHub user id for the comment author, when available. |\n| <a id=\"property-authorlogin\"></a> `authorLogin?` | `string` \\| `null` | The GitHub login for the comment author, when available. |\n| <a id=\"property-body\"></a> `body` | `string` | The comment or review body text. |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | When the comment was created or the review was submitted. |\n| <a id=\"property-id\"></a> `id` | `number` | The unique GitHub identifier for the comment or review. |\n| <a id=\"property-inreplytoid\"></a> `inReplyToId?` | `number` \\| `null` | The id of the comment this one replies to, when it is part of a review thread. Only ever present on `review_comment` sources. |\n| <a id=\"property-line\"></a> `line?` | `number` \\| `null` | The line in the current diff the comment is anchored to. Cleared by GitHub when later commits outdate the comment's diff. |\n| <a id=\"property-originalline\"></a> `originalLine?` | `number` \\| `null` | The line the comment was originally anchored to, kept even when the diff has since changed. |\n| <a id=\"property-path\"></a> `path?` | `string` \\| `null` | The repository-relative file path the review comment is anchored to. Only ever present on `review_comment` sources. |\n| <a id=\"property-pullrequestreviewid\"></a> `pullRequestReviewId?` | `number` \\| `null` | The id of the pull request review this comment was submitted with. Only ever present on `review_comment` sources. |\n| <a id=\"property-source\"></a> `source` | `string` | The GitHub source for the comment, such as `issue_comment` or `review_comment`. |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | When the comment or review was last updated. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The public GitHub URL for the comment or review, when available. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportedAuthor.md -->\n# Type Alias: ImportedAuthor\n\n> **ImportedAuthor** = \\{ `name`: `string`; \\}\n\nDisplay attribution for a comment imported from an external document.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Original author text; never interpreted as an authenticated principal. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Message.md -->\n# Type Alias: Message\n\n> **Message** = \\{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \\| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `guest_name?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \\| `null`; `triggered_by?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nShared message representation for channel timelines and entity discussions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`MessageAttachment`](MessageAttachment.md)[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| [`BotSenderProfile`](BotSenderProfile.md) | - |\n| <a id=\"property-content\"></a> `content` | `string` | Macro Markdown body. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Message tombstone, independent of thread deletion. |\n| <a id=\"property-edited_at\"></a> `edited_at?` | `string` \\| `null` | Last content edit, if any. |\n| <a id=\"property-guest_name\"></a> `guest_name?` | `string` \\| `null` | Display name of a verified call guest, retained after the call ends. |\n| <a id=\"property-id\"></a> `id` | `string` | Message UUID. |\n| <a id=\"property-imported_author\"></a> `imported_author?` | `null` \\| [`ImportedAuthor`](ImportedAuthor.md) | - |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | [`MessageParent`](MessageParent.md) | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | [`CountedReaction`](CountedReaction.md)[] | Aggregated reactions. |\n| <a id=\"property-sender_id\"></a> `sender_id` | `string` | Authenticated actor or owner of imported content. |\n| <a id=\"property-thread_id\"></a> `thread_id?` | `string` \\| `null` | Root message UUID for replies; absent on roots. |\n| <a id=\"property-triggered_by\"></a> `triggered_by?` | `string` \\| `null` | User who triggered a bot-authored message. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last persisted update. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageAttachment.md -->\n# Type Alias: MessageAttachment\n\n> **MessageAttachment** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `string`; `height?`: `number` \\| `null`; `id`: `string`; `width?`: `number` \\| `null`; \\}\n\nAn entity attached to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the attachment was added. |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Attached entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Attached entity type. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Optional media height. |\n| <a id=\"property-id\"></a> `id` | `string` | Attachment UUID. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Optional media width. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\} \\| \\{ `id`: `string`; `type`: `\"initiative\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_company\"`; \\} \\| \\{ `id`: `string`; `type`: `\"crm_contact\"`; \\} \\| \\{ `id`: `string`; `type`: `\"call\"`; \\}\n\nThe entity whose permissions and lifecycle govern a message.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"channel\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A channel, including direct messages. |\n| `type` | `\"channel\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: [`DocumentId`](DocumentId.md); `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | [`DocumentId`](DocumentId.md) | A document, including tasks and PDFs. |\n| `type` | `\"document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"initiative\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An initiative, presented as a project in the application. |\n| `type` | `\"initiative\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_company\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM company. |\n| `type` | `\"crm_company\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"crm_contact\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A CRM contact. |\n| `type` | `\"crm_contact\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `type`: `\"call\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A video call and its persistent chat thread. |\n| `type` | `\"call\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SimpleMention.md -->\n# Type Alias: SimpleMention\n\n> **SimpleMention** = \\{ `entity_id`: `string`; `entity_type`: `string`; \\}\n\nA mention tracked in a message body.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | Mentioned entity identifier. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `string` | Mentioned entity type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadAnchor.md -->\n# Type Alias: ThreadAnchor\n\n> **ThreadAnchor** = \\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\} \\| \\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\} \\| \\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\} \\| \\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\} \\| \\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\nA thread's location within its document. PDF geometry remains annotation-owned.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mark_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"markdown\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mark_id` | `string` | Mark UUID serialized in the document. |\n| `marked_text?` | `string` \\| `null` | The marked text as it read when the discussion was created, already trimmed and bounded. Absent on threads created or imported before snapshots were captured: the text a mark covers cannot be recovered from the mark id alone. |\n| `type` | `\"markdown\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `marked_text?`: `string` \\| `null`; `type`: `\"pdf_highlight\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Highlight annotation UUID. |\n| `marked_text?` | `string` \\| `null` | The text the highlight covers, trimmed and bounded like a markdown snapshot. The highlight owns it and it can be edited there, so it is read from the highlight whenever the thread is, never stored on the thread. Absent when the highlight carries no text. |\n| `type` | `\"pdf_highlight\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `anchor_id`: `string`; `type`: `\"pdf_placeable\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `anchor_id` | `string` | Placeable annotation UUID. |\n| `type` | `\"pdf_placeable\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `range`: `string`; `sheetId`: `string`; `sheetName`: `string`; `type`: `\"spreadsheet\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `range` | `string` | A1 cell or range, such as B4 or B4:C9. |\n| `sheetId` | `string` | Stable sheet identity within the workbook. |\n| `sheetName` | `string` | Sheet name when the discussion was created. |\n| `type` | `\"spreadsheet\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `nodeId?`: `string` \\| `null`; `pageId`: `string`; `type`: `\"fig\"`; `x`: `number`; `y`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `nodeId?` | `string` \\| `null` | Layer the pin follows; absent for a pin on the bare canvas. |\n| `pageId` | `string` | Page (canvas) the pin is on. |\n| `type` | `\"fig\"` | - |\n| `x` | `number` | Horizontal offset from the layer's origin, or the page's when the pin is on no layer, in design units. |\n| `y` | `number` | Vertical offset, measured like `x`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ThreadState.md -->\n# Type Alias: ThreadState\n\n> **ThreadState** = \\{ `anchor?`: `null` \\| [`ThreadAnchor`](ThreadAnchor.md); `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `resolved`: `boolean`; `root_id`: `string`; `updated_at`: `string`; `user_id`: `string`; \\}\n\nState belonging to a whole thread, keyed by its root message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-anchor\"></a> `anchor?` | `null` \\| [`ThreadAnchor`](ThreadAnchor.md) | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time of the discussion. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Explicit deletion of the entire thread, distinct from root deletion. |\n| <a id=\"property-resolved\"></a> `resolved` | `boolean` | Whether this discussion has been resolved. |\n| <a id=\"property-root_id\"></a> `root_id` | `string` | Root message UUID; there is no separate thread identity. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Last state change. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User who owns this discussion, including imported discussions. |\n\n\n<!-- src/entities/documents/comment/classes/Comment.md -->\n# Class: Comment\n\nA comment on a document: a document-parent message, addressed by its\ndocument and message UUID. Its record and mutations are the ones channel\nmessages use.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was created. | - |\n| <a id=\"property-documentid\"></a> `documentId` | `readonly` | `string` | The document this comment belongs to. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-text\"></a> `text` | `readonly` | () => `Promise`\\<`string`\\> | The comment's text. | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the comment was last updated. | - |\n\n## Methods\n\n### author()\n\n> **author**(): `Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<[`User`](../../../users/user/classes/User.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this comment.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### document()\n\n> **document**(): [`Document`](../../document/classes/Document.md)\n\nThe document this comment is on.\n\n#### Returns\n\n[`Document`](../../document/classes/Document.md)\n\n***\n\n### edit()\n\n> **edit**(`body`): `Promise`\\<`Comment`\\>\n\nReplace the comment's text.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\n***\n\n### reply()\n\n> **reply**(`body`): `Promise`\\<`Comment`\\>\n\nReply in this comment's thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\n***\n\n### threadId()\n\n> **threadId**(): `Promise`\\<`string`\\>\n\nThe id of the thread this comment belongs to: its root, or itself for a root.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `documentId`, `id`): `Comment`\n\nA handle to a comment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `documentId` | `string` |\n| `id` | `string` |\n\n#### Returns\n\n`Comment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `documentId`, `record`): `Comment`\n\nBuild a comment from a message record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `documentId` | `string` |\n| `record` | [`Message`](../../../../../generated/storage/types.gen/type-aliases/Message.md) |\n\n#### Returns\n\n`Comment`\n\n\n<!-- src/entities/documents/document/classes/Document.md -->\n# Class: Document\n\nA Macro document. Can be dropped into a msg template to render an\ninline link to the document.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`DocumentDetail`\\>\n\n## Extended by\n\n- [`Task`](../../../tasks/task/classes/Task.md)\n\n## Implements\n\n- [`Mentionable`](../../../../mentions/interfaces/Mentionable.md)\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-branchedfrom\"></a> `branchedFrom` | `readonly` | () => `Promise`\\<`Document` \\| `undefined`\\> | `...` | The document this one was branched from, if any. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was created. | - | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was deleted, if it has been. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"document\"` | `'document'` | Favorites identify documents as `document`. | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`entityType`](../../../entity/classes/PropertiedEntity.md#property-entitytype) | - |\n| <a id=\"property-filetype\"></a> `fileType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The document's file type (e.g. `md`, `pdf`, `docx`). | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`id`](../../../entity/classes/PropertiedEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The document's display name. | - | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | `...` | The user who owns the document. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this document belongs to, if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Document`\\> | `...` | Search documents by name and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### branchName()\n\n> **branchName**(): `Promise`\\<`string`\\>\n\nThe git branch name derived for the document (task documents).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`Comment`](../../comment/classes/Comment.md)\\>\n\nAdd a comment. Starts a new unanchored thread, or replies to an existing\none when `threadId` (the thread's root comment id) is given.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../../../../mentions/interfaces/RichMessage.md) | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<[`Comment`](../../comment/classes/Comment.md)\\>\n\nThe created comment.\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CommentThread`](../interfaces/CommentThread.md)[]\\>\n\nThe document's live comment threads, each with its comments, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CommentThread`](../interfaces/CommentThread.md)[]\\>\n\n***\n\n### content()\n\n> **content**(): `Promise`\\<`string`\\>\n\nCurrent Markdown for native documents, extracted text for PDF/Word,\nor raw file content for other formats. Native reads include live edits.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### copy()\n\n> **copy**(`opts`): `Promise`\\<`Document`\\>\n\nCopy the document under a new name, optionally from a specific version.\nReturns a handle to the new document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `versionId?`: `number`; \\} |\n| `opts.name` | `string` |\n| `opts.versionId?` | `number` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the document. Soft by default (reversible with [restore](#restore));\npass `permanent: true` to delete irreversibly.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `permanent?`: `boolean`; \\} |\n| `opts.permanent?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\nRemove a property from this entity, given its [properties](#properties) entry.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | [`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`deleteProperty`](../../../entity/classes/PropertiedEntity.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Document`\\>\n\nAdd this entity to the user's favorites. Returns this handle for chaining.\nPlain unwrap: favoriting alters the user's favorites collection, not this\nentity's own detail, so there's nothing cached to invalidate.\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### githubPullRequests()\n\n> **githubPullRequests**(): `Promise`\\<[`GithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/GithubPullRequest.md)[]\\>\n\nGitHub pull requests associated with the document.\n\n#### Returns\n\n`Promise`\\<[`GithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/GithubPullRequest.md)[]\\>\n\n***\n\n### move()\n\n> **move**(`project`): `Promise`\\<`void`\\>\n\nMove the document into a project (or out of one, with `null`).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `project` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\nThe properties set on this entity, each with its definition, value, and options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`EntityPropertyWithDefinition`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`properties`](../../../entity/classes/PropertiedEntity.md#properties)\n\n***\n\n### propertyReference()\n\n> **propertyReference**(): [`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n[`PropertyTargetReference`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetReference.md)\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`propertyReference`](../../../entity/classes/PropertiedEntity.md#propertyreference)\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### restore()\n\n> **restore**(): `Promise`\\<`void`\\>\n\nRestore a soft-deleted document.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\nSet a property value on this entity, or attach the property without a\nvalue when `value` is omitted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md) |\n| `value?` | [`SetPropertyValue`](../../../../../generated/properties/types.gen/type-aliases/SetPropertyValue.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`setProperty`](../../../entity/classes/PropertiedEntity.md#setproperty)\n\n***\n\n### setTeamShare()\n\n> **setTeamShare**(`shared`): `Promise`\\<`void`\\>\n\nShare the document with the owner's team, or unshare it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `shared` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### shortId()\n\n> **shortId**(): `Promise`\\<`string`\\>\n\nThe document's short id (used in compact links and branch names).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### teamShare()\n\n> **teamShare**(): `Promise`\\<[`DocumentTeamShareResponse`](../../../../../generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md)\\>\n\nWhether the document is shared with the owner's team, and which team.\n\n#### Returns\n\n`Promise`\\<[`DocumentTeamShareResponse`](../../../../../generated/storage/types.gen/type-aliases/DocumentTeamShareResponse.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`DocumentMetadataWithContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentMetadataWithContent.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`toJSON`](../../../entity/classes/PropertiedEntity.md#tojson)\n\n***\n\n### toMention()\n\n> **toMention**(): [`MentionPart`](../../../../mentions/interfaces/MentionPart.md)\n\n#### Returns\n\n[`MentionPart`](../../../../mentions/interfaces/MentionPart.md)\n\n#### Implementation of\n\n[`Mentionable`](../../../../mentions/interfaces/Mentionable.md).[`toMention`](../../../../mentions/interfaces/Mentionable.md#tomention)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Document`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`updatePropertyOptions`](../../../entity/classes/PropertiedEntity.md#updatepropertyoptions)\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nThe document's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Document`\n\nA handle to a document by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Document`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### createSkill()\n\n> `static` **createSkill**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a skill: a markdown document containing instructions that AI reads\nand follows when the skill is referenced in an AI input.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### createSnippet()\n\n> `static` **createSnippet**(`client`, `opts`): `Promise`\\<`Document`\\>\n\nCreate a snippet: a reusable markdown document that can be inserted into\nany markdown area.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n***\n\n### recent()\n\n> `static` **recent**(`client`, `opts?`): `AsyncGenerator`\\<`Document`\\>\n\nThe user's recent documents, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | \\{ `fileType?`: `string`; `pageSize?`: `number`; \\} |\n| `opts.fileType?` | `string` |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Document`\\>\n\n***\n\n### recentlyDeleted()\n\n> `static` **recentlyDeleted**(`client`): `Promise`\\<`Document`[]\\>\n\nThe user's recently soft-deleted documents. The underlying endpoint also\nreturns deleted chats and projects; those are filtered out here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Document`[]\\>\n\n\n<!-- src/entities/documents/document/interfaces/CommentThread.md -->\n# Interface: CommentThread\n\nOne of a document's comment threads: its state and its comments.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comments\"></a> `comments` | [`Comment`](../../comment/classes/Comment.md)[] | The root comment followed by its replies, in order. |\n| <a id=\"property-thread\"></a> `thread` | [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md) | The thread state: root id, resolved flag, owner, anchor, timestamps. |\n\n\n<!-- src/entities/documents/namespace/classes/DocumentNamespace.md -->\n# Class: DocumentNamespace\n\n## Constructors\n\n### Constructor\n\n> **new DocumentNamespace**(`client`): `DocumentNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`DocumentNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Document`](../../document/classes/Document.md)\n\nA handle to a document by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Document`](../../document/classes/Document.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSkill()\n\n> **createSkill**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a skill: markdown instructions that AI reads and follows.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### createSnippet()\n\n> **createSnippet**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a snippet: a reusable markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recent()\n\n> **recent**(`opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nThe user's recent documents, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `fileType?`: `string`; `pageSize?`: `number`; \\} |\n| `opts.fileType?` | `string` |\n| `opts.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### recentlyDeleted()\n\n> **recentlyDeleted**(): `Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\nThe user's recently soft-deleted documents.\n\n#### Returns\n\n`Promise`\\<[`Document`](../../document/classes/Document.md)[]\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\nSearch documents by name and content, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`Document`](../../document/classes/Document.md)\\>\n\n***\n\n### systemSkills()\n\n> **systemSkills**(): `Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n\nThe built-in system skills: static AI instructions with no document\nbehind them. Unlike user skills they cannot be opened or edited.\n\n#### Returns\n\n`Promise`\\<[`SystemSkill`](../../system-skill/classes/SystemSkill.md)[]\\>\n\n\n<!-- src/entities/documents/system-skill/classes/SystemSkill.md -->\n# Class: SystemSkill\n\nA built-in system skill: static, code-defined AI instructions that surface\nto AI like skill documents but have no document behind them. System skills\ncannot be opened, edited, or deleted; reference them in AI inputs by id the\nsame way as skill documents.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The well-known id the skill is referenced by in mentions and AI tools. |\n| <a id=\"property-name\"></a> `name` | `readonly` | `string` | The skill's display name. |\n\n## Methods\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`SystemSkill`[]\\>\n\nThe built-in system skills, in display order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`SystemSkill`[]\\>\n"},{"name": "email",diff --git a/crates/agent_code_mode/src/domain/operations.json b/crates/agent_code_mode/src/domain/operations.jsonindex f465ac7a4e..c22ec9e13b 100644--- a/crates/agent_code_mode/src/domain/operations.json+++ b/crates/agent_code_mode/src/domain/operations.json@@ -313,6 +313,8 @@"storage.listTeamCalendar": "List Team Calendar","storage.listTeamOutOfOffice": "List Team Out Of Office","storage.getActiveCalls": "Get Active Calls",+ "storage.guestCallChatRead": "Guest Call Chat Read",+ "storage.guestCallChatPost": "Guest Call Chat Post","storage.meetingLookup": "Meeting Lookup","storage.meetingGuestJoin": "Meeting Guest Join","storage.meetingLeave": "Meeting Leave",diff --git a/crates/agent_harness/src/outbound/channel_announcer/test.rs b/crates/agent_harness/src/outbound/channel_announcer/test.rsindex b586b36df3..97e8792c6f 100644--- a/crates/agent_harness/src/outbound/channel_announcer/test.rs+++ b/crates/agent_harness/src/outbound/channel_announcer/test.rs@@ -386,6 +386,7 @@ async fn an_answer_the_thread_may_not_carry_points_at_the_session() {triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: "composed pointer".to_owned(),created_at: chrono::Utc::now(),@@ -500,6 +501,7 @@ async fn shared_thread_and_dm_snapshots_omit_raw_tool_details() {triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: post.content,created_at: chrono::Utc::now(),diff --git a/crates/agent_harness/src/outbound/channel_prompt_context/test.rs b/crates/agent_harness/src/outbound/channel_prompt_context/test.rsindex 9824fc8778..8bdb306286 100644--- a/crates/agent_harness/src/outbound/channel_prompt_context/test.rs+++ b/crates/agent_harness/src/outbound/channel_prompt_context/test.rs@@ -67,6 +67,7 @@ fn posted(triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: content.into(),created_at: at(minute),diff --git a/crates/agent_session/src/outbound/postgres/test.rs b/crates/agent_session/src/outbound/postgres/test.rsindex 5b7c1df6d0..18035cb71c 100644--- a/crates/agent_session/src/outbound/postgres/test.rs+++ b/crates/agent_session/src/outbound/postgres/test.rs@@ -2609,6 +2609,7 @@ async fn a_document_session_preserves_its_origin_and_inherits_live_document_accelet parent = MessageParent::parse("document", &document_id).unwrap();let root = messages.create(CreateMessage {+ guest_name: None,canonical_root_id: None,parent: parent.clone(),actor: OWNER.to_owned().try_into().unwrap(),diff --git a/crates/agent_trigger/src/domain/task_assignment/test.rs b/crates/agent_trigger/src/domain/task_assignment/test.rsindex ef1b3e2b2f..6ef615fc7c 100644--- a/crates/agent_trigger/src/domain/task_assignment/test.rs+++ b/crates/agent_trigger/src/domain/task_assignment/test.rs@@ -155,6 +155,7 @@ fn discussion(assignment: &TaskAssignment) -> messages::domain::models::Messagesender_id: channel_sender::ChannelSender::new_from_bot(BotId::TEST_A),triggered_by: None,bot_profile: None,+ guest_name: None,imported_author: None,content: "Work on this task".to_owned(),created_at: Utc::now(),diff --git a/crates/agent_trigger/src/outbound/discussion_context/test.rs b/crates/agent_trigger/src/outbound/discussion_context/test.rsindex 7bf6594a8f..9dfdb15bb9 100644--- a/crates/agent_trigger/src/outbound/discussion_context/test.rs+++ b/crates/agent_trigger/src/outbound/discussion_context/test.rs@@ -131,6 +131,7 @@ fn posted(triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: content.into(),created_at: at(minute),diff --git a/crates/agent_trigger/src/outbound/message_thread_history/test.rs b/crates/agent_trigger/src/outbound/message_thread_history/test.rsindex a508fc493c..a8ca6010cf 100644--- a/crates/agent_trigger/src/outbound/message_thread_history/test.rs+++ b/crates/agent_trigger/src/outbound/message_thread_history/test.rs@@ -48,6 +48,7 @@ fn message(id: Uuid, deleted: bool) -> Message {triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: "history".into(),created_at: now,diff --git a/crates/bots/src/inbound/channel_webhook_router/tests.rs b/crates/bots/src/inbound/channel_webhook_router/tests.rsindex eae98fff19..8764193853 100644--- a/crates/bots/src/inbound/channel_webhook_router/tests.rs+++ b/crates/bots/src/inbound/channel_webhook_router/tests.rs@@ -565,6 +565,7 @@ impl messages::domain::api::MessageCommands for TestChannelPoster {parent: messages::domain::models::MessageParent::Channel(channel_id),thread_id: input.thread_id,sender_id: actor,+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),diff --git a/crates/call/AGENTS.md b/crates/call/AGENTS.mdindex 2946d4edbc..dff4064baa 100644--- a/crates/call/AGENTS.md+++ b/crates/call/AGENTS.md@@ -9,6 +9,8 @@ in-call chat.## Start here- `src/domain/service.rs` + `src/domain/models.rs`: call lifecycle policy.+- `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/inbound/axum_router.rs`, `src/inbound/stale_call_sweeper.rs`: HTTP routesdiff --git a/crates/call/Cargo.toml b/crates/call/Cargo.tomlindex 4f87dd810f..8eb4913fa2 100644--- a/crates/call/Cargo.toml+++ b/crates/call/Cargo.toml@@ -35,7 +35,7 @@ outbound = ["dep:urlencoding","ports",]-ports = ["dep:entity_access", "dep:tokio"]+ports = ["dep:entity_access", "dep:tokio", "dep:async-trait", "dep:messages"][dependencies]activity = { path = "../activity", default-features = false }@@ -75,6 +75,7 @@ macro_event_broker = { path = "../macro_event_broker", default-features = falsemacro_event_topics = { path = "../macro_event_topics" }macro_user_id = { path = "../macro_user_id" }macro_uuid = { path = "../macro_uuid" }+messages = { path = "../messages", default-features = false, features = ["ports"], optional = true }model-entity = { path = "../model-entity" }model-error-response = { path = "../model-error-response", optional = true }models_pagination = { path = "../models_pagination" }diff --git a/crates/call/src/domain/meetings.rs b/crates/call/src/domain/meetings.rsindex 9718d89f48..d9511fb27a 100644--- a/crates/call/src/domain/meetings.rs+++ b/crates/call/src/domain/meetings.rs@@ -6,7 +6,8 @@ use uuid::Uuid;use super::models::CallError;-/// A bearer capability that grants access only to a meeting's RTC room.+/// An invitation capability for joining a meeting's RTC room. Chat additionally+/// requires the resulting participant credential and current guest membership.#[derive(Clone, serde::Serialize, serde::Deserialize)]#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]#[serde(try_from = "String", into = "String")]diff --git a/crates/call/src/domain/service.rs b/crates/call/src/domain/service.rsindex ef3e563cae..4da152c635 100644--- a/crates/call/src/domain/service.rs+++ b/crates/call/src/domain/service.rs@@ -3,6 +3,7 @@#[cfg(test)]mod test;+mod guest_chat;mod meeting_invites;mod meetings;mod reconcile;diff --git a/crates/call/src/domain/service/guest_chat.rs b/crates/call/src/domain/service/guest_chat.rsnew file mode 100644index 0000000000..63a4ed93fe--- /dev/null+++ b/crates/call/src/domain/service/guest_chat.rs@@ -0,0 +1,64 @@+//! Call session authorization for the shared guest discussion boundary.+use super::*;+use crate::domain::meetings::GuestId;+use messages::domain::{+ ports::MessageError,+ service::guest_chat::{GuestCallAccess, GuestCallAuthorizer},+};++#[async_trait::async_trait]+impl<+ R: CallRepository + Clone,+ C: CallRtcClient,+ Cn: ConnectionService,+ E: EntityAccessService,+ N: NotificationIngress,+ S: RecordingStorage,+ Sm: CallSummarizer + Clone,+ V: VoipPushSender,+ Vr: VoiceRepository + Clone,+ B: MacroEventBroker + Clone,+> GuestCallAuthorizer for CallServiceImpl<R, C, Cn, E, N, S, Sm, V, Vr, B>+{+ #[tracing::instrument(err, skip_all, fields(%call_id))]+ async fn authorize(&self, call_id: Uuid, token: &str) -> Result<GuestCallAccess, MessageError> {+ let verified = self+ .rtc_client+ .verify_access_token(token)+ .map_err(|_| MessageError::Forbidden)?;+ let guest_id =+ GuestId::parse_rtc_identity(&verified.identity).ok_or(MessageError::Forbidden)?;+ let call = self+ .repo+ .get_call_by_id(&call_id)+ .await+ .map_err(|e| {+ MessageError::Repository(rootcause::report!(CallError::Internal(e.into())).into())+ })?+ .ok_or(MessageError::Forbidden)?;+ if call.channel_id.is_some() || verified.room.as_deref() != Some(call.room_name.as_str()) {+ return Err(MessageError::Forbidden);+ }+ let guests = self.repo.get_active_guests(&call_id).await.map_err(|e| {+ MessageError::Repository(rootcause::report!(CallError::Internal(e.into())).into())+ })?;+ if !guests.iter().any(|(id, _)| *id == guest_id) {+ return Err(MessageError::Forbidden);+ }+ // RTC membership closes the webhook-delay window after a guest disconnects.+ let participants = self+ .rtc_client+ .list_meeting_participants(&call.room_name)+ .await+ .map_err(|_| MessageError::Forbidden)?+ .ok_or(MessageError::Forbidden)?;+ let participant = participants+ .into_iter()+ .find(|participant| participant.identity == verified.identity)+ .ok_or(MessageError::Forbidden)?;+ Ok(GuestCallAccess {+ guest_id: guest_id.as_uuid(),+ name: participant.name,+ })+ }+}diff --git a/crates/call/src/domain/service/meetings.rs b/crates/call/src/domain/service/meetings.rsindex 7c8ce9ff06..49f73e812b 100644--- a/crates/call/src/domain/service/meetings.rs+++ b/crates/call/src/domain/service/meetings.rs@@ -1,4 +1,5 @@-//! Invitation use cases. Guests receive room access; signed-in attendees also receive call-only Comment access for chat.+//! Invitation use cases. Guests receive room credentials used for active-session chat;+//! signed-in attendees also receive call-only Comment access for saved discussions.use super::*;use crate::domain::meetings::{diff --git a/crates/call/src/domain/service/test.rs b/crates/call/src/domain/service/test.rsindex 3e97e18f8b..31f9f02bd4 100644--- a/crates/call/src/domain/service/test.rs+++ b/crates/call/src/domain/service/test.rs@@ -25,6 +25,7 @@ use serde_json::json;use uuid::Uuid;mod active_meetings;+mod guest_chat;mod meeting_invites;mod meeting_participants;mod meeting_startup;@@ -1044,7 +1045,7 @@ fn build_webhook_service(repo: MockCallRepository,rtc_client: MockCallRtcClient,event_broker: RecordingEventBroker,-) -> impl CallService {+) -> impl CallService + messages::domain::service::guest_chat::GuestCallAuthorizer {build_webhook_service_with_connection(repo, rtc_client, StubConnectionService, event_broker)}@@ -1053,7 +1054,7 @@ fn build_webhook_service_with_connection<Cn: ConnectionService>(rtc_client: MockCallRtcClient,connection_service: Cn,event_broker: RecordingEventBroker,-) -> impl CallService {+) -> impl CallService + messages::domain::service::guest_chat::GuestCallAuthorizer {let service: BaseWebhookCallService<Cn> = CallServiceImpl::new(repo,rtc_client,diff --git a/crates/call/src/domain/service/test/guest_chat.rs b/crates/call/src/domain/service/test/guest_chat.rsnew file mode 100644index 0000000000..72323a48c1--- /dev/null+++ b/crates/call/src/domain/service/test/guest_chat.rs@@ -0,0 +1,110 @@+use super::*;+use crate::domain::meetings::MeetingRtcParticipant;+use messages::domain::{ports::MessageError, service::guest_chat::GuestCallAuthorizer};++#[tokio::test]+async fn guest_chat_rejects_invalid_credentials_before_reading_calls() {+ let mut rtc = MockCallRtcClient::new();+ rtc.expect_verify_access_token()+ .returning(|_| Err(anyhow::anyhow!("expired")));+ let service = build_webhook_service(+ MockCallRepository::new(),+ rtc,+ RecordingEventBroker::default(),+ );+ assert!(matches!(+ service.authorize(Uuid::now_v7(), "expired").await,+ Err(MessageError::Forbidden)+ ));+}++#[tokio::test]+async fn guest_chat_checks_room_call_type_and_both_membership_sources() {+ // Every failure stops before requesting facts beyond the failed boundary.+ for scenario in [+ "valid",+ "member",+ "ended",+ "wrong-room",+ "channel",+ "left",+ "disconnected",+ ] {+ let call_id = Uuid::now_v7();+ let guest_id = GuestId::generate();+ let mut rtc = MockCallRtcClient::new();+ rtc.expect_verify_access_token().returning(move |_| {+ Ok(VerifiedRingToken {+ identity: if scenario == "member" {+ "macro|[email protected]".into()+ } else {+ guest_id.to_string()+ },+ room: Some(+ if scenario == "wrong-room" {+ "other"+ } else {+ "guest-room"+ }+ .into(),+ ),+ })+ });+ let mut repo = MockCallRepository::new();+ if scenario != "member" {+ repo.expect_get_call_by_id()+ .withf(move |id| *id == call_id)+ .times(1)+ .returning(move |_| {+ Box::pin(async move {+ Ok((scenario != "ended").then(|| Call {+ id: call_id,+ channel_id: (scenario == "channel").then(Uuid::now_v7),+ room_name: "guest-room".into(),+ created_by: "macro|[email protected]".into(),+ created_at: Utc::now(),+ egress_id: None,+ }))+ })+ });+ }+ if matches!(scenario, "valid" | "left" | "disconnected") {+ repo.expect_get_active_guests()+ .times(1)+ .returning(move |_| {+ Box::pin(async move {+ Ok(if scenario == "left" {+ vec![]+ } else {+ vec![(guest_id, Utc::now())]+ })+ })+ });+ }+ if matches!(scenario, "valid" | "disconnected") {+ rtc.expect_list_meeting_participants()+ .times(1)+ .returning(move |_| {+ Box::pin(async move {+ Ok(Some(if scenario == "disconnected" {+ vec![]+ } else {+ vec![MeetingRtcParticipant {+ identity: guest_id.to_string(),+ name: "Visitor".into(),+ }]+ }))+ })+ });+ }+ let service = build_webhook_service(repo, rtc, RecordingEventBroker::default());+ let result = service.authorize(call_id, "session").await;+ if scenario == "valid" {+ let access = result.unwrap();+ assert_eq!(access.guest_id, guest_id.as_uuid());+ assert_eq!(access.name, "Visitor");+ } else {+ assert!(matches!(result, Err(MessageError::Forbidden)), "{scenario}");+ }+ }+}diff --git a/crates/channel_bots/src/domain/test.rs b/crates/channel_bots/src/domain/test.rsindex f75fbab754..b9206b7d3b 100644--- a/crates/channel_bots/src/domain/test.rs+++ b/crates/channel_bots/src/domain/test.rs@@ -66,6 +66,7 @@ pub(crate) fn message(id: u128, thread: Option<Uuid>, body: &str) -> Message {sender_id: channel_sender::ChannelSender::new_from_user(user()),bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,triggered_by: None,content: body.into(),diff --git a/crates/channel_sender/Cargo.toml b/crates/channel_sender/Cargo.tomlindex 0f9678ca80..eb457dce42 100644--- a/crates/channel_sender/Cargo.toml+++ b/crates/channel_sender/Cargo.toml@@ -9,12 +9,11 @@ schema = ["dep:utoipa"][dependencies]bot_id = { path = "../bot_id" }-either = { workspace = true }macro_user_id = { path = "../macro_user_id" }serde = { workspace = true }+uuid = { workspace = true }utoipa = { workspace = true, optional = true }workspace-hack = { version = "0.1", path = "../workspace-hack" }[dev-dependencies]serde_json = { workspace = true }-uuid = { workspace = true }diff --git a/crates/channel_sender/src/lib.rs b/crates/channel_sender/src/lib.rsindex d7dd3971f7..d88e3bfec7 100644--- a/crates/channel_sender/src/lib.rs+++ b/crates/channel_sender/src/lib.rs@@ -1,20 +1,25 @@#![deny(missing_docs)]-//! This crate defines the [ChannelSender] which is a wrapper type which denotes either a first party macro user, OR, a bot user+//! Message author identities: Macro users, bots, and call-scoped guests.use bot_id::{BotId, BotIdStr, cowlike::CowLike};-use either::Either;use macro_user_id::{error::ParseErr, user_id::MacroUserIdStr};use serde::{Deserialize, Serialize};+use std::borrow::Cow;#[cfg(test)]mod test;-type InnerVal<'a> = Either<BotIdStr<'a>, MacroUserIdStr<'a>>;+#[derive(Debug, Clone, PartialEq, Eq, Hash)]+enum InnerVal<'a> {+ Bot(BotIdStr<'a>),+ User(MacroUserIdStr<'a>),+ Guest(Cow<'a, str>),+}/// Actor identity for channel mutations.#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]#[serde(try_from = "String", into = "String")]-pub struct ChannelSender<'a>(pub InnerVal<'a>);+pub struct ChannelSender<'a>(InnerVal<'a>);#[cfg(feature = "schema")]impl<'a> utoipa::ToSchema for ChannelSender<'a> {@@ -56,58 +61,94 @@ impl<'a> CowLike<'a> for ChannelSender<'a> {type Owned<'b> = ChannelSender<'b>;fn into_owned(self) -> Self::Owned<'static> {- ChannelSender(self.0.into_owned())+ ChannelSender(match self.0 {+ InnerVal::Bot(id) => InnerVal::Bot(id.into_owned()),+ InnerVal::User(id) => InnerVal::User(id.into_owned()),+ InnerVal::Guest(id) => InnerVal::Guest(Cow::Owned(id.into_owned())),+ })}fn copied(&'a self) -> Self {- ChannelSender(self.0.copied())+ ChannelSender(match &self.0 {+ InnerVal::Bot(id) => InnerVal::Bot(id.copied()),+ InnerVal::User(id) => InnerVal::User(id.copied()),+ InnerVal::Guest(id) => InnerVal::Guest(Cow::Borrowed(id)),+ })}}impl<'a> ChannelSender<'a> {/// attempt to return the user id str if this value contains a userpub fn as_user(&self) -> Option<&MacroUserIdStr<'a>> {- self.0.as_ref().right()+ match &self.0 {+ InnerVal::User(id) => Some(id),+ _ => None,+ }}/// attempt to return the bot id str if this value contains a botpub fn as_bot(&self) -> Option<&BotIdStr<'a>> {- self.0.as_ref().left()+ match &self.0 {+ InnerVal::Bot(id) => Some(id),+ _ => None,+ }}/// attempt to return the user id str if this value contains a userpub fn into_user(self) -> Option<MacroUserIdStr<'a>> {- self.0.right()+ match self.0 {+ InnerVal::User(id) => Some(id),+ _ => None,+ }}/// attempt to return the bot id str if this value contains a botpub fn into_bot(self) -> Option<BotIdStr<'a>> {- self.0.left()+ match self.0 {+ InnerVal::Bot(id) => Some(id),+ _ => None,+ }}/// attempt to parse a value of self from an input strpub fn parse_from_str(value: &'a str) -> Result<Self, ParseErr> {+ if let Some(id) = value.strip_prefix("guest|")+ && uuid::Uuid::parse_str(id).is_ok_and(|uuid| uuid.to_string() == id)+ {+ return Ok(Self(InnerVal::Guest(Cow::Borrowed(value))));+ }match BotIdStr::try_from(value) {- Ok(bot_id) => Ok(ChannelSender(Either::Left(bot_id))),+ Ok(bot_id) => Ok(ChannelSender(InnerVal::Bot(bot_id))),Err(_) => MacroUserIdStr::try_from(value)- .map(Either::Right)+ .map(InnerVal::User).map(ChannelSender),}}/// create a new instance of self containing a [MacroUserIdStr]pub fn new_from_user(user: MacroUserIdStr<'a>) -> Self {- Self(InnerVal::Right(user))+ Self(InnerVal::User(user))}/// create a new instance of self containing a [BotIdStr] derived from the given [BotId]pub fn new_from_bot(bot_id: BotId) -> ChannelSender<'static> {- ChannelSender(Either::Left(bot_id.into_storage_id()))+ ChannelSender(InnerVal::Bot(bot_id.into_storage_id()))+ }++ /// Author identity only; callers must separately authorize active call membership.+ pub fn new_from_guest(id: uuid::Uuid) -> ChannelSender<'static> {+ ChannelSender(InnerVal::Guest(Cow::Owned(format!("guest|{id}"))))+ }++ /// Whether this is a non-account guest, never a user or bot principal.+ pub fn is_guest(&self) -> bool {+ matches!(self.0, InnerVal::Guest(_))}}impl<'a> AsRef<str> for ChannelSender<'a> {fn as_ref(&self) -> &str {match &self.0 {- Either::Left(l) => l.as_ref(),- Either::Right(r) => r.as_ref(),+ InnerVal::Bot(id) => id.as_ref(),+ InnerVal::User(id) => id.as_ref(),+ InnerVal::Guest(id) => id.as_ref(),}}}diff --git a/crates/channel_sender/src/test.rs b/crates/channel_sender/src/test.rsindex ddf81c77a9..d96e03157c 100644--- a/crates/channel_sender/src/test.rs+++ b/crates/channel_sender/src/test.rs@@ -3,12 +3,32 @@ use uuid::Uuid;use super::*;+#[test]+fn guest_identity_is_distinct_and_round_trips() {+ let sender = ChannelSender::new_from_guest(Uuid::now_v7());+ assert!(sender.is_guest());+ assert!(sender.as_user().is_none());+ assert!(sender.as_bot().is_none());+ let value = serde_json::to_string(&sender).unwrap();+ let decoded: ChannelSender<'static> = serde_json::from_str(&value).unwrap();+ assert_eq!(decoded, sender);+ assert_eq!(sender.copied().into_owned(), sender);+ for invalid in [+ "guest|",+ "guest|macro|[email protected]",+ "guest|not-a-uuid",+ "guest|00000000000000000000000000000001",+ ] {+ assert!(ChannelSender::try_from(invalid).is_err());+ }+}+#[test]fn sender_round_trips_user_storage_string() {let sender = ChannelSender::parse_from_str("macro|[email protected]").unwrap();assert_eq!(sender.as_ref(), "macro|[email protected]");- assert!(matches!(sender.0, InnerVal::Right(_)));+ assert!(matches!(sender.0, InnerVal::User(_)));}#[test]@@ -23,7 +43,7 @@ fn sender_round_trips_bot_storage_string() {let deserialized: ChannelSender<'static> = serde_json::from_value(serialized).unwrap();assert_eq!(deserialized.as_ref(), storage);- assert!(matches!(deserialized.0, InnerVal::Left(_)));+ assert!(matches!(deserialized.0, InnerVal::Bot(_)));}#[test]@@ -39,11 +59,11 @@ fn bot_sender_into_owned_and_copied_preserve_contents() {let copied_value = ChannelSender::parse_from_str(storage).unwrap();let copied = copied_value.copied();- assert!(matches!(copied.0, InnerVal::Left(bot_id) if bot_id.as_ref() == storage));+ assert!(matches!(copied.0, InnerVal::Bot(bot_id) if bot_id.as_ref() == storage));let owned_value = ChannelSender::parse_from_str(storage).unwrap();let owned = owned_value.into_owned();- assert!(matches!(owned.0, InnerVal::Left(bot_id) if bot_id.as_ref() == storage));+ assert!(matches!(owned.0, InnerVal::Bot(bot_id) if bot_id.as_ref() == storage));}#[test]@@ -52,9 +72,9 @@ fn user_sender_into_owned_and_copied_preserve_contents() {let copied_value = ChannelSender::parse_from_str(storage).unwrap();let copied = copied_value.copied();- assert!(matches!(copied.0, InnerVal::Right(user_id) if user_id.as_ref() == storage));+ assert!(matches!(copied.0, InnerVal::User(user_id) if user_id.as_ref() == storage));let owned_value = ChannelSender::parse_from_str(storage).unwrap();let owned = owned_value.into_owned();- assert!(matches!(owned.0, InnerVal::Right(user_id) if user_id.as_ref() == storage));+ assert!(matches!(owned.0, InnerVal::User(user_id) if user_id.as_ref() == storage));}diff --git a/crates/channels/src/domain/message_delivery/test.rs b/crates/channels/src/domain/message_delivery/test.rsindex e8a4b7309c..a234849e4a 100644--- a/crates/channels/src/domain/message_delivery/test.rs+++ b/crates/channels/src/domain/message_delivery/test.rs@@ -114,6 +114,7 @@ fn message() -> Message {triggered_by: None,bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,content: "Message".into(),created_at: Utc::now(),diff --git a/crates/channels/src/inbound/toolset/test.rs b/crates/channels/src/inbound/toolset/test.rsindex 547b64e188..8c63c3ae93 100644--- a/crates/channels/src/inbound/toolset/test.rs+++ b/crates/channels/src/inbound/toolset/test.rs@@ -82,6 +82,7 @@ impl RecordingMessages {.stored_sender.clone().unwrap_or_else(|| Sender::new_from_user(user_id())),+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],@@ -146,6 +147,7 @@ impl messages::domain::api::MessageCommands for RecordingMessages {parent,thread_id: input.thread_id,sender_id: sender,+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],diff --git a/crates/channels/src/inbound/toolset/types/test.rs b/crates/channels/src/inbound/toolset/types/test.rsindex ec556c3a37..6e45acf289 100644--- a/crates/channels/src/inbound/toolset/types/test.rs+++ b/crates/channels/src/inbound/toolset/types/test.rs@@ -12,6 +12,7 @@ fn reply(seconds: i64) -> Message {sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),triggered_by: None,bot_profile: None,+ guest_name: None,imported_author: None,mentions: vec![],content: "reply".into(),diff --git a/crates/code_execution/src/outbound/deno/sdk.mjs b/crates/code_execution/src/outbound/deno/sdk.mjsindex 4629aede0c..60e66d9667 100644--- a/crates/code_execution/src/outbound/deno/sdk.mjs+++ b/crates/code_execution/src/outbound/deno/sdk.mjs@@ -49,4 +49,4 @@ async function VO($,O,x){if(!Number.isInteger(O)||O<1)throw RangeError(`concurre`);U=k.pop()??"";for(let a of k){let i=a.split(``),_=[],y;for(let R of i)if(R.startsWith("data:"))_.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))y=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))Q=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let v=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(v))V=v}let C,h=!1;if(_.length){let R=_.join(`-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(j)C=await j(C)}if(x?.({data:C,event:y,id:Q,retry:V}),_.length)yield C}}}finally{I.removeEventListener("abort",g),H.releaseLock()}break}catch(A){if(O?.(A),G!==void 0&&B>=G)break;let D=Math.min(V*2**(B-1),Z??30000);await T(D)}}}()}}var d6=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},u6=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},l6=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},bx=({allowReserved:$,explode:O,name:x,style:j,value:S})=>{if(!O){let Z=($?S:S.map((X)=>encodeURIComponent(X))).join(u6(j));switch(j){case"label":return`.${Z}`;case"matrix":return`;${x}=${Z}`;case"simple":return Z;default:return`${x}=${Z}`}}let K=d6(j),G=S.map((Z)=>{if(j==="label"||j==="simple")return $?Z:encodeURIComponent(Z);return KO({allowReserved:$,name:x,value:Z})}).join(K);return j==="label"||j==="matrix"?K+G:G},KO=({allowReserved:$,name:O,value:x})=>{if(x===void 0||x===null)return"";if(typeof x==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?x:encodeURIComponent(x)}`},gx=({allowReserved:$,explode:O,name:x,style:j,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${x}=${S.toISOString()}`;if(j!=="deepObject"&&!O){let X=[];Object.entries(S).forEach(([Y,Q])=>{X=[...X,Y,$?Q:encodeURIComponent(Q)]});let L=X.join(",");switch(j){case"form":return`${x}=${L}`;case"label":return`.${L}`;case"matrix":return`;${x}=${L}`;default:return L}}let G=l6(j),Z=Object.entries(S).map(([X,L])=>KO({allowReserved:$,name:j==="deepObject"?`${x}[${X}]`:X,value:L})).join(G);return j==="label"||j==="matrix"?G+Z:Z};var r6=/\{[^{}]+\}/g,p6=({path:$,url:O})=>{let x=O,j=O.match(r6);if(j)for(let S of j){let K=!1,G=S.substring(1,S.length-1),Z="simple";if(G.endsWith("*"))K=!0,G=G.substring(0,G.length-1);if(G.startsWith("."))G=G.substring(1),Z="label";else if(G.startsWith(";"))G=G.substring(1),Z="matrix";let X=$[G];if(X===void 0||X===null)continue;if(Array.isArray(X)){x=x.replace(S,bx({explode:K,name:G,style:Z,value:X}));continue}if(typeof X==="object"){x=x.replace(S,gx({explode:K,name:G,style:Z,value:X,valueOnly:!0}));continue}if(Z==="matrix"){x=x.replace(S,`;${KO({name:G,value:X})}`);continue}let L=encodeURIComponent(Z==="label"?`.${X}`:X);x=x.replace(S,L)}return x},NS=({baseUrl:$,path:O,query:x,querySerializer:j,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,G=($??"")+K;if(O)G=p6({path:O,url:G});let Z=x?j(x):"";if(Z.startsWith("?"))Z=Z.substring(1);if(Z)G+=`?${Z}`;return G};function j0($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var US=async($,O)=>{let x=typeof O==="function"?await O($):O;if(!x)return;if($.scheme==="bearer")return`Bearer ${x}`;if($.scheme==="basic")return`Basic ${btoa(x)}`;return x};var zS={bodySerializer:($)=>JSON.stringify($,(O,x)=>typeof x==="bigint"?x.toString():x)};var IS=({parameters:$={},...O}={})=>{return(j)=>{let S=[];if(j&&typeof j==="object")for(let K in j){let G=j[K];if(G===void 0||G===null)continue;let Z=$[K]||O;if(Array.isArray(G)){let X=bx({allowReserved:Z.allowReserved,explode:!0,name:K,style:"form",value:G,...Z.array});if(X)S.push(X)}else if(typeof G==="object"){let X=gx({allowReserved:Z.allowReserved,explode:!0,name:K,style:"deepObject",value:G,...Z.object});if(X)S.push(X)}else{let X=KO({allowReserved:Z.allowReserved,name:K,value:G});if(X)S.push(X)}}return S.join("&")}},TS=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((x)=>O.startsWith(x)))return"blob";if(O.startsWith("text/"))return"text";return},a6=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function HS($){for(let O of $.security??[]){if(a6($,O.name))continue;let x=await US(O,$.auth);if(!x)continue;let j=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[j]=x;break;case"cookie":$.headers.append("Cookie",`${j}=${x}`);break;case"header":default:$.headers.set(j,x);break}}}var S0=($)=>NS({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:IS($.querySerializer),url:$.url}),G0=($,O)=>{let x={...$,...O};if(x.baseUrl?.endsWith("/"))x.baseUrl=x.baseUrl.substring(0,x.baseUrl.length-1);return x.headers=yx($.headers,O.headers),x},i6=($)=>{let O=[];return $.forEach((x,j)=>{O.push([j,x])}),O},yx=(...$)=>{let O=new Headers;for(let x of $){if(!x)continue;let j=x instanceof Headers?i6(x):Object.entries(x);for(let[S,K]of j)if(K===null)O.delete(S);else if(Array.isArray(K))for(let G of K)O.append(S,G);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class kx{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let x=this.getInterceptorIndex($);if(this.fns[x])return this.fns[x]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var RS=()=>({error:new kx,request:new kx,response:new kx}),n6=IS({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),s6={"Content-Type":"application/json"},_O=($={})=>({...zS,headers:s6,parseAs:"auto",querySerializer:n6,...$});var FO=($={})=>{let O=G0(_O(),$),x=()=>({...O}),j=(Y)=>{return O=G0(O,Y),x()},S=RS(),K=async(Y)=>{let Q={...O,...Y,fetch:Y.fetch??O.fetch??globalThis.fetch,headers:yx(O.headers,Y.headers),serializedBody:void 0};if(Q.security)await HS(Q);if(Q.requestValidator)await Q.requestValidator(Q);if(Q.body!==void 0&&Q.bodySerializer)Q.serializedBody=Q.bodySerializer(Q.body);if(Q.body===void 0||Q.serializedBody==="")Q.headers.delete("Content-Type");let T=Q,z=S0(T);return{opts:T,url:z}},G=async(Y)=>{let Q=Y.throwOnError??O.throwOnError,T=Y.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(Y),I={redirect:"follow",...V,body:j0(V)};z=new Request(B,I);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let A={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?TS(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...A}}let H;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":H=await W[N]();break;case"json":{let U=await W.text();H=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...A}}if(N==="json"){if(V.responseValidator)await V.responseValidator(H);if(V.responseTransformer)H=await V.responseTransformer(H)}return V.responseStyle==="data"?H:{data:H,...A}}let D=await W.text(),F;try{F=JSON.parse(D)}catch{}throw F??D}catch(V){let B=V;for(let I of S.error.fns)if(I)B=await I(B,W,z,Y);if(B=B||{},Q)throw B;return T==="data"?void 0:{error:B,request:z,response:W}}},Z=(Y)=>(Q)=>G({...Q,method:Y}),X=(Y)=>async(Q)=>{let{opts:T,url:z}=await K(Q);return LS({...T,body:T.body,method:Y,onRequest:async(W,V)=>{let B=new Request(W,V);for(let I of S.request.fns)if(I)B=await I(B,T);return B},serializedBody:j0(T),url:z})};return{buildUrl:(Y)=>S0({...O,...Y}),connect:Z("CONNECT"),delete:Z("DELETE"),get:Z("GET"),getConfig:x,head:Z("HEAD"),interceptors:S,options:Z("OPTIONS"),patch:Z("PATCH"),post:Z("POST"),put:Z("PUT"),request:G,setConfig:j,sse:{connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),head:X("HEAD"),options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),trace:X("TRACE")},trace:Z("TRACE")}};var AS=FO(_O());class DS{client;constructor($){this.client=$?.client??AS}}class CS{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class hx extends DS{static __registry=new CS;constructor($){super($);hx.__registry.set(this,$?.key)}listAgents($){return($?.client??this.client).get({url:"/agents",...$})}createAgent($){return($.client??this.client).post({url:"/agents",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateAgent($){return($.client??this.client).put({url:"/agents/{agent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteAnchor($){return($.client??this.client).delete({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}editAnchor($){return($.client??this.client).patch({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentAnchors($){return($.client??this.client).get({url:"/annotations/anchors/document/{document_id}",...$})}createAnchor($){return($.client??this.client).post({url:"/annotations/anchors/document/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSelfBot($){return($?.client??this.client).get({url:"/bots/me",...$})}getBotOwnerProfiles($){return($?.client??this.client).get({url:"/bots/profiles",...$})}listBotChannels($){return($.client??this.client).get({url:"/bots/{bot_id}/channels",...$})}removeBotFromChannelByBot($){return($.client??this.client).delete({url:"/bots/{bot_id}/channels/{channel_id}",...$})}listOccurrences($){return($.client??this.client).get({url:"/calendar-events",...$})}mentionPreviews($){return($.client??this.client).post({url:"/calendar-events/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}listTeamCalendar($){return($.client??this.client).get({url:"/calendar-events/team",...$})}listTeamOutOfOffice($){return($.client??this.client).get({url:"/calendar-events/team-out-of-office",...$})}getActiveCalls($){return($?.client??this.client).get({url:"/call/active",...$})}meetingLookup($){return($.client??this.client).get({url:"/call/join/{token}",...$})}meetingGuestJoin($){return($.client??this.client).post({url:"/call/join/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingLeave($){return($.client??this.client).post({url:"/call/join/{token}/leave",...$})}meetingGuestParticipants($){return($.client??this.client).get({url:"/call/join/{token}/participants",...$})}meetingList($){return($?.client??this.client).get({url:"/call/meetings",...$})}meetingCreate($){return($.client??this.client).post({url:"/call/meetings",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingListActive($){return($?.client??this.client).get({url:"/call/meetings/active",...$})}meetingInvitePermissions($){return($.client??this.client).get({url:"/call/meetings/invite/{token}",...$})}meetingInvite($){return($.client??this.client).post({url:"/call/meetings/invite/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingInviteUsers($){return($.client??this.client).post({url:"/call/meetings/invite/{token}/users",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingJoin($){return($.client??this.client).post({url:"/call/meetings/join/{token}",...$})}meetingParticipants($){return($.client??this.client).get({url:"/call/meetings/join/{token}/participants",...$})}meetingPrepare($){return($?.client??this.client).post({url:"/call/meetings/prepare",...$})}meetingCancelPreparation($){return($.client??this.client).delete({url:"/call/meetings/prepare/{preparation_id}",...$})}meetingCancel($){return($.client??this.client).delete({url:"/call/meetings/{meeting_id}",...$})}meetingUpdate($){return($.client??this.client).patch({url:"/call/meetings/{meeting_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchCallRecordPreview($){return($.client??this.client).post({url:"/call/record/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCallRecord($){return($.client??this.client).delete({url:"/call/record/{call_id}",...$})}getCallRecord($){return($.client??this.client).get({url:"/call/record/{call_id}",...$})}editCallRecord($){return($.client??this.client).patch({url:"/call/record/{call_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}declineCall($){return($.client??this.client).post({url:"/call/record/{call_id}/decline",...$})}meetingShare($){return($.client??this.client).post({url:"/call/record/{call_id}/link",...$})}toggleShareWithTeam($){return($.client??this.client).post({url:"/call/record/{call_id}/share-with-team/toggle",...$})}editCallTranscript($){return($.client??this.client).patch({url:"/call/record/{call_id}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}getRingStatus($){return($.client??this.client).get({url:"/call/ring-status/{call_id}",...$})}declineRing($){return($.client??this.client).post({url:"/call/ring-status/{call_id}/decline",...$})}callWebhook($){return($?.client??this.client).post({url:"/call/webhook",...$})}leaveOrEndCall($){return($.client??this.client).delete({url:"/call/{channel_id}",...$})}getOrCreateCall($){return($.client??this.client).get({url:"/call/{channel_id}",...$})}checkActiveCall($){return($.client??this.client).get({url:"/call/{channel_id}/active",...$})}ingestTranscript($){return($.client??this.client).post({url:"/call/{room_name}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}listChannelLabels($){return($?.client??this.client).get({url:"/channel-labels",...$})}createChannelLabel($){return($.client??this.client).post({url:"/channel-labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelLabel($){return($.client??this.client).put({url:"/channel-labels/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}previewSmartTag($){return($.client??this.client).post({url:"/channel-labels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannelLabel($){return($.client??this.client).delete({url:"/channel-labels/{label_id}",...$})}renameChannelLabel($){return($.client??this.client).patch({url:"/channel-labels/{label_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createChannel($){return($.client??this.client).post({url:"/channels",...$,headers:{"Content-Type":"application/json",...$.headers}})}getActivity($){return($?.client??this.client).get({url:"/channels/activity",...$})}postActivity($){return($.client??this.client).post({url:"/channels/activity",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAttachmentReferences($){return($.client??this.client).get({url:"/channels/attachments/{entity_type}/{entity_id}/references",...$})}getOrCreateDm($){return($.client??this.client).post({url:"/channels/get_or_create_dm",...$,headers:{"Content-Type":"application/json",...$.headers}})}getOrCreatePrivate($){return($.client??this.client).post({url:"/channels/get_or_create_private",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannelByCode($){return($.client??this.client).post({url:"/channels/join/{join_code}",...$})}createEntityMention($){return($.client??this.client).post({url:"/channels/mentions",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteEntityMention($){return($.client??this.client).delete({url:"/channels/mentions/{mention_id}",...$})}getBatchChannelPreview($){return($.client??this.client).post({url:"/channels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannel($){return($.client??this.client).delete({url:"/channels/{channel_id}",...$})}getChannel($){return($.client??this.client).get({url:"/channels/{channel_id}",...$})}patchChannel($){return($.client??this.client).patch({url:"/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelAttachments($){return($.client??this.client).get({url:"/channels/{channel_id}/attachments",...$})}createChannelScopedBot($){return($.client??this.client).post({url:"/channels/{channel_id}/bots/scoped",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/join",...$})}getChannelJoinLink($){return($.client??this.client).get({url:"/channels/{channel_id}/join-link",...$})}leaveChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/leave",...$})}removeParticipants($){return($.client??this.client).delete({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelParticipants($){return($.client??this.client).get({url:"/channels/{channel_id}/participants",...$})}addParticipants($){return($.client??this.client).post({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelPicture($){return($.client??this.client).put({url:"/channels/{channel_id}/profile_picture",...$,headers:{"Content-Type":"application/json",...$.headers}})}postChannelBotWebhook($){return($.client??this.client).post({url:"/channels/{channel_id}/webhook",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCollabSurface($){return($.client??this.client).delete({url:"/collab_surfaces/{id}",...$})}getCollabSurface($){return($.client??this.client).get({url:"/collab_surfaces/{id}",...$})}ensureCollabSurface($){return($.client??this.client).put({url:"/collab_surfaces/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createCollabSurfaceToken($){return($.client??this.client).post({url:"/collab_surfaces/{id}/token",...$})}getChannels($){return($?.client??this.client).get({url:"/comms/channels",...$})}createCrmCompany($){return($.client??this.client).post({url:"/crm/companies",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCompany($){return($.client??this.client).get({url:"/crm/companies/{company_id}",...$})}listCompanyContacts($){return($.client??this.client).get({url:"/crm/companies/{company_id}/contacts",...$})}createCrmContact($){return($.client??this.client).post({url:"/crm/companies/{company_id}/contacts",...$,headers:{"Content-Type":"application/json",...$.headers}})}setEmailSync($){return($.client??this.client).put({url:"/crm/companies/{company_id}/email-sync",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCompanyHidden($){return($.client??this.client).put({url:"/crm/companies/{company_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmCompanyName($){return($.client??this.client).put({url:"/crm/companies/{company_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}searchContacts($){return($?.client??this.client).get({url:"/crm/contacts",...$})}getContactByEmail($){return($.client??this.client).get({url:"/crm/contacts/by-email",...$})}getContact($){return($.client??this.client).get({url:"/crm/contacts/{contact_id}",...$})}setContactHidden($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmContactName($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCrmPipelines($){return($?.client??this.client).get({url:"/crm/pipelines",...$})}createCrmPipeline($){return($.client??this.client).post({url:"/crm/pipelines",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipeline($){return($.client??this.client).get({url:"/crm/pipelines/{id}",...$})}renameCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyCrmPipelineOps($){return($.client??this.client).post({url:"/crm/pipelines/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelinePermissions($){return($.client??this.client).get({url:"/crm/pipelines/{id}/permissions",...$})}updateCrmPipelinePermissions($){return($.client??this.client).patch({url:"/crm/pipelines/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineRows($){return($.client??this.client).get({url:"/crm/pipelines/{id}/rows",...$})}queryCrmPipelineRows($){return($.client??this.client).post({url:"/crm/pipelines/{id}/rows",...$,headers:{"Content-Type":"application/json",...$.headers}})}shareCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/sharing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineTable($){return($.client??this.client).get({url:"/crm/pipelines/{id}/table",...$})}trashCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/trash",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmTeamSettings($){return($?.client??this.client).get({url:"/crm/settings",...$})}putCrmTeamSettings($){return($.client??this.client).put({url:"/crm/settings",...$,headers:{"Content-Type":"application/json",...$.headers}})}resetCrmTeamStages($){return($?.client??this.client).delete({url:"/crm/stages",...$})}putCrmTeamStages($){return($.client??this.client).put({url:"/crm/stages",...$,headers:{"Content-Type":"application/json",...$.headers}})}listDatabases($){return($?.client??this.client).get({url:"/databases",...$})}createDatabase($){return($.client??this.client).post({url:"/databases",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDatabaseQuery($){return($.client??this.client).post({url:"/databases/queries",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseQuery($){return($.client??this.client).get({url:"/databases/queries/{query_id}",...$})}ensureStarterHandler($){return($?.client??this.client).post({url:"/databases/starter",...$})}deliverDatabaseWebhook($){return($.client??this.client).post({url:"/databases/webhooks/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabase($){return($.client??this.client).get({url:"/databases/{id}",...$})}shareDatabaseAwareness($){return($.client??this.client).put({url:"/databases/{id}/awareness",...$,headers:{"Content-Type":"application/json",...$.headers}})}undoDatabaseChange($){return($.client??this.client).post({url:"/databases/{id}/changes/{change}/undo",...$})}importDatabaseTable($){return($.client??this.client).post({url:"/databases/{id}/import",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyDatabaseOps($){return($.client??this.client).post({url:"/databases/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabasePermissions($){return($.client??this.client).get({url:"/databases/{id}/permissions",...$})}updateDatabasePermissions($){return($.client??this.client).patch({url:"/databases/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseTableChanges($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/changes",...$})}listDatabaseColumnCasts($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/casts",...$})}convertDatabaseColumn($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/conversion",...$,headers:{"Content-Type":"application/json",...$.headers}})}inferDatabaseColumnType($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/infer-type",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseRowHistory($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/rows/{row_id}/history",...$})}getDatabaseViewPositions($){return($.client??this.client).get({url:"/databases/{id}/views/{view_id}/positions",...$})}listDatabaseWebhooks($){return($.client??this.client).get({url:"/databases/{id}/webhooks",...$})}createDatabaseWebhook($){return($.client??this.client).post({url:"/databases/{id}/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteDatabaseWebhook($){return($.client??this.client).delete({url:"/databases/{id}/webhooks/{webhook_id}",...$})}transcribeDictation($){return($.client??this.client).post({bodySerializer:null,url:"/dictation/transcribe",...$,headers:{"Content-Type":"audio/webm",...$.headers}})}getUserDocumentsHandler($){return($.client??this.client).get({url:"/documents",...$})}createDocument($){return($.client??this.client).post({url:"/documents",...$,headers:{"Content-Type":"application/json",...$.headers}})}createMarkdownHandler($){return($.client??this.client).post({url:"/documents/create_markdown",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSkillHandler($){return($.client??this.client).post({url:"/documents/create_skill",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSnippetHandler($){return($.client??this.client).post({url:"/documents/create_snippet",...$,headers:{"Content-Type":"application/json",...$.headers}})}createTaskHandler($){return($.client??this.client).post({url:"/documents/create_task",...$,headers:{"Content-Type":"application/json",...$.headers}})}getGithubPullRequestTasks($){return($.client??this.client).post({url:"/documents/github_prs/tasks",...$,headers:{"Content-Type":"application/json",...$.headers}})}initializeUserDocuments($){return($?.client??this.client).post({url:"/documents/initialize_user_documents",...$})}getDocumentListHandler($){return($?.client??this.client).get({url:"/documents/list",...$})}validateDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/validate",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/{document_id}",...$})}presaveDocumentHandler($){return($.client??this.client).put({url:"/documents/presave/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchPreviewHandler($){return($.client??this.client).post({url:"/documents/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentByTeamSlug($){return($.client??this.client).get({url:"/documents/slug/{slug}",...$})}handler($){return($?.client??this.client).get({url:"/documents/starter_docs",...$})}getSystemSkillsHandler($){return($?.client??this.client).get({url:"/documents/system_skills",...$})}deleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}",...$})}getDocument($){return($.client??this.client).get({url:"/documents/{document_id}",...$})}editDocument($){return($.client??this.client).patch({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDocumentHandler($){return($.client??this.client).put({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentBranchName($){return($.client??this.client).get({url:"/documents/{document_id}/branch_name",...$})}copyDocument($){return($.client??this.client).post({url:"/documents/{document_id}/copy",...$,headers:{"Content-Type":"application/json",...$.headers}})}exportDocument($){return($.client??this.client).get({url:"/documents/{document_id}/export",...$})}getDocumentGithubPullRequests($){return($.client??this.client).get({url:"/documents/{document_id}/github_prs",...$})}getLocationHandler($){return($.client??this.client).get({url:"/documents/{document_id}/location",...$})}getDocumentLocationV3($){return($.client??this.client).get({url:"/documents/{document_id}/location_v3",...$})}permanentlyDeleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}/permanent",...$})}getDocumentProcessingResult($){return($.client??this.client).get({url:"/documents/{document_id}/processing",...$})}jobProcessingResultHandler($){return($.client??this.client).get({url:"/documents/{document_id}/processing/{job_id}",...$})}revertDeleteDocument($){return($.client??this.client).put({url:"/documents/{document_id}/revert_delete",...$})}getDocumentShortId($){return($.client??this.client).get({url:"/documents/{document_id}/short_id",...$})}simpleSave($){return($.client??this.client).put({url:"/documents/{document_id}/simple_save",...$})}getDocumentTeamShare($){return($.client??this.client).get({url:"/documents/{document_id}/team_share",...$})}setDocumentTeamShare($){return($.client??this.client).put({url:"/documents/{document_id}/team_share",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentTextContent($){return($.client??this.client).get({url:"/documents/{document_id}/text-content",...$})}getDocumentViewsHandler($){return($.client??this.client).get({url:"/documents/{document_id}/views",...$})}getDocumentVersion($){return($.client??this.client).get({url:"/documents/{document_id}/{document_version_id}",...$})}accessRequestsState($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/access-requests",...$})}accessRequestsCancel($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$})}accessRequestsSubmit($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsResolve($){return($.client??this.client).post({url:"/entities/{entity_type}/{entity_id}/access-requests/{request_id}/resolve",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsDirect($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/direct-access",...$})}accessRequestsRemoveDirect($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$})}accessRequestsSetDirect($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getEntityPermission($){return($.client??this.client).get({url:"/entity/{entity_type}/{entity_id}/permissions",...$})}listFavorites($){return($?.client??this.client).get({url:"/favorites",...$})}addFavorite($){return($.client??this.client).post({url:"/favorites",...$,headers:{"Content-Type":"application/json",...$.headers}})}reorderFavorites($){return($.client??this.client).patch({url:"/favorites/reorder",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeFavoriteByEntity($){return($.client??this.client).delete({url:"/favorites/{entity_type}/{entity_id}",...$})}getForeignEntityBySource($){return($.client??this.client).get({url:"/foreign_entity/by_source/{source}/{foreign_entity_id}",...$})}getForeignEntity($){return($.client??this.client).get({url:"/foreign_entity/{id}",...$})}listForms($){return($.client??this.client).get({url:"/forms",...$})}createForm($){return($.client??this.client).post({url:"/forms",...$,headers:{"Content-Type":"application/json",...$.headers}})}listAccessibleForms($){return($?.client??this.client).get({url:"/forms/accessible",...$})}getForm($){return($.client??this.client).get({url:"/forms/{id}",...$})}updateForm($){return($.client??this.client).patch({url:"/forms/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}collaborateForm($){return($.client??this.client).post({url:"/forms/{id}/collaboration",...$})}putFormLayout($){return($.client??this.client).put({url:"/forms/{id}/layout",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormPermissions($){return($.client??this.client).get({url:"/forms/{id}/permissions",...$})}updateFormPermissions($){return($.client??this.client).patch({url:"/forms/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}submitFormResponse($){return($.client??this.client).post({url:"/forms/{id}/responses",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMyFormResponse($){return($.client??this.client).get({url:"/forms/{id}/responses/mine",...$})}editMyFormResponse($){return($.client??this.client).put({url:"/forms/{id}/responses/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormResponseSummary($){return($.client??this.client).get({url:"/forms/{id}/responses/summary",...$})}getFormTally($){return($.client??this.client).get({url:"/forms/{id}/tally",...$})}installSync($){return($?.client??this.client).get({url:"/github/install-sync",...$})}getGithubPullRequestFacets($){return($?.client??this.client).get({url:"/github_pull_requests/facets",...$})}getGithubPullRequest($){return($.client??this.client).get({url:"/github_pull_requests/{id}",...$})}getGithubPullRequestChanges($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes",...$})}getGithubPullRequestChangesPatch($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes/patch",...$})}createHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings",...$,headers:{"Content-Type":"application/json",...$.headers}})}getHarnessPairing($){return($.client??this.client).get({url:"/harness-pairings/{code}",...$})}approveHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{code}/approve",...$,headers:{"Content-Type":"application/json",...$.headers}})}claimHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{pairing_id}/claim",...$,headers:{"Content-Type":"application/json",...$.headers}})}listHarnesses($){return($?.client??this.client).get({url:"/harnesses",...$})}deleteSelfHarness($){return($?.client??this.client).delete({url:"/harnesses/me",...$})}getSelfHarness($){return($?.client??this.client).get({url:"/harnesses/me",...$})}listHarnessAgents($){return($?.client??this.client).get({url:"/harnesses/me/agents",...$})}listHarnessSessions($){return($?.client??this.client).get({url:"/harnesses/me/sessions",...$})}deleteHarness($){return($.client??this.client).delete({url:"/harnesses/{harness_id}",...$})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getHistoryHandler($){return($?.client??this.client).get({url:"/history",...$})}deleteHistoryHandler($){return($.client??this.client).delete({url:"/history/{item_type}/{item_id}",...$})}upsertHistoryHandler($){return($.client??this.client).post({url:"/history/{item_type}/{item_id}",...$})}listInitiatives($){return($?.client??this.client).get({url:"/initiatives",...$})}createInitiative($){return($.client??this.client).post({url:"/initiatives",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteInitiative($){return($.client??this.client).delete({url:"/initiatives/{initiative_id}",...$})}getInitiative($){return($.client??this.client).get({url:"/initiatives/{initiative_id}",...$})}updateInitiative($){return($.client??this.client).patch({url:"/initiatives/{initiative_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getInstructionsHandler($){return($?.client??this.client).get({url:"/instructions",...$})}createInstructionsHandler($){return($?.client??this.client).post({url:"/instructions",...$})}getItemsSoup($){return($?.client??this.client).get({url:"/items/soup",...$})}postItemsSoup($){return($.client??this.client).post({url:"/items/soup",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAst($){return($.client??this.client).post({url:"/items/soup/ast",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAstGrouped($){return($.client??this.client).post({url:"/items/soup/ast/grouped",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimeline($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}",...$})}entityMessageCreate($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageDeleteMessage($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageGetMessage($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageEdit($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageReact($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/items/{id}/reactions",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageLegacy($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/legacy/{legacy_id}",...$})}entityMessageDeleteThread($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessageGetThread($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessagePatchThread($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimelineEntries($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/timeline",...$})}entityMessageTyping($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/typing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPinsHandler($){return($?.client??this.client).get({url:"/pins",...$})}reorderPinsHandler($){return($.client??this.client).patch({url:"/pins",...$,headers:{"Content-Type":"application/json",...$.headers}})}removePinHandler($){return($.client??this.client).delete({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}addPinHandler($){return($.client??this.client).post({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getProjectsHandler($){return($?.client??this.client).get({url:"/projects",...$})}createProjectHandler($){return($.client??this.client).post({url:"/projects",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPendingProjectsHandler($){return($?.client??this.client).get({url:"/projects/pending",...$})}getBatchProjectPreview($){return($.client??this.client).post({url:"/projects/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadFolderHandler($){return($.client??this.client).post({url:"/projects/upload",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadExtractFolderHandler($){return($.client??this.client).post({url:"/projects/upload_extract",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteProjectHandler($){return($.client??this.client).delete({url:"/projects/{id}",...$})}getProjectHandler($){return($.client??this.client).get({url:"/projects/{id}",...$})}getProjectUserAccessLevel($){return($.client??this.client).get({url:"/projects/{id}/access_level",...$})}getProjectContentHandler($){return($.client??this.client).get({url:"/projects/{id}/content",...$})}permanentlyDeleteProject($){return($.client??this.client).delete({url:"/projects/{id}/permanent",...$})}getProjectPermissionsV2($){return($.client??this.client).get({url:"/projects/{id}/permissions",...$})}revertDeleteProject($){return($.client??this.client).put({url:"/projects/{id}/revert_delete",...$})}recentlyDeleted($){return($?.client??this.client).get({url:"/recents/deleted",...$})}listEmailReminders($){return($?.client??this.client).get({url:"/reminders/email/collection",...$})}getEmailFollowup($){return($.client??this.client).get({url:"/reminders/email/{thread_id}",...$})}setEmailFollowup($){return($.client??this.client).put({url:"/reminders/email/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getViewsHandler($){return($?.client??this.client).get({url:"/saved_views",...$})}createViewHandler($){return($.client??this.client).post({url:"/saved_views",...$,headers:{"Content-Type":"application/json",...$.headers}})}excludeDefaultViewHandler($){return($.client??this.client).post({url:"/saved_views/exclude_default",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteViewHandler($){return($.client??this.client).delete({url:"/saved_views/{saved_view_id}",...$})}patchViewHandler($){return($.client??this.client).patch({url:"/saved_views/{saved_view_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listSlackImports($){return($?.client??this.client).get({url:"/slack/imports",...$})}createSlackImport($){return($.client??this.client).post({url:"/slack/imports",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSlackImport($){return($.client??this.client).get({url:"/slack/imports/{job_id}",...$})}cancelSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/cancel",...$})}finalizeSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/finalize",...$})}registerSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads",...$,headers:{"Content-Type":"application/json",...$.headers}})}completeSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkWakeupSyncServiceDocuments($){return($.client??this.client).post({url:"/sync_service/wakeup",...$,headers:{"Content-Type":"application/json",...$.headers}})}editThreadV2($){return($.client??this.client).patch({url:"/threads/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listUserApiKeys($){return($?.client??this.client).get({url:"/user-api-keys",...$})}createUserApiKey($){return($.client??this.client).post({url:"/user-api-keys",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserApiKey($){return($.client??this.client).delete({url:"/user-api-keys/{id}",...$})}deleteUserDocumentViewLocation($){return($.client??this.client).delete({url:"/user_document_view_location/{document_id}",...$})}getUserDocumentViewLocation($){return($.client??this.client).get({url:"/user_document_view_location/{document_id}",...$})}upsertUserDocumentViewLocation($){return($.client??this.client).post({url:"/user_document_view_location/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsV2($){return($.client??this.client).get({url:"/v2/documents/{document_id}/permissions",...$})}editProjectV2($){return($.client??this.client).patch({url:"/v2/projects/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}streamEvents($){return($.client??this.client).sse.get({url:"/webhook/events/stream",...$})}listWebhooks($){return($?.client??this.client).get({url:"/webhook/webhooks",...$})}createWebhook($){return($.client??this.client).post({url:"/webhook/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteWebhook($){return($.client??this.client).delete({url:"/webhook/webhooks/{webhook_id}",...$})}getWebhook($){return($.client??this.client).get({url:"/webhook/webhooks/{webhook_id}",...$})}patchWebhook($){return($.client??this.client).patch({url:"/webhook/webhooks/{webhook_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}validateWebhook($){return($.client??this.client).post({url:"/webhook/webhooks/{webhook_id}/validate",...$})}}var MS={dev:"https://dev.macro.com",prod:"https://macro.com",local:"http://localhost:3000"},Z0={dev:{"agent-harness":"https://dev-gateway.macro.com/agent-harness",storage:"https://dev-gateway.macro.com/dss",auth:"https://dev-gateway.macro.com/auth",email:"https://dev-gateway.macro.com/email",calendar:"https://dev-gateway.macro.com/calendar",cognition:"https://dev-gateway.macro.com/cognition",notification:"https://dev-gateway.macro.com/notification",properties:"https://dev-gateway.macro.com/dss",search:"https://dev-gateway.macro.com/dss","scheduled-action":"https://dev-gateway.macro.com/scheduled-action","static-files":"https://static-file-service-dev.macro.com",connection:"https://dev-gateway.macro.com/connection-gateway",contacts:"https://dev-gateway.macro.com/contacts",unfurl:"https://dev-gateway.macro.com/unfurl"},prod:{"agent-harness":"https://gateway.macro.com/agent-harness",storage:"https://gateway.macro.com/dss",auth:"https://gateway.macro.com/auth",email:"https://gateway.macro.com/email",calendar:"https://gateway.macro.com/calendar",cognition:"https://gateway.macro.com/cognition",notification:"https://gateway.macro.com/notification",properties:"https://gateway.macro.com/dss",search:"https://gateway.macro.com/dss","scheduled-action":"https://gateway.macro.com/scheduled-action","static-files":"https://static-file-service.macro.com",connection:"https://gateway.macro.com/connection-gateway",contacts:"https://gateway.macro.com/contacts",unfurl:"https://gateway.macro.com/unfurl"},local:{"agent-harness":"http://localhost:8101",storage:"http://localhost:8086",auth:"http://localhost:8080",email:"http://localhost:8087",calendar:"http://localhost:8088/calendar",cognition:"http://localhost:8085",notification:"http://localhost:8089",properties:"http://localhost:8086",search:"http://localhost:8086","scheduled-action":"http://localhost:8099","static-files":"http://localhost:8100",connection:"http://localhost:8082",contacts:"http://localhost:8083",unfurl:"http://localhost:8095"}};function e6($,O){let x=O?.channel_id;return O&&x?{channel:f.byId($,x),thread:new P$($,x,O.thread_id)}:{channel:void 0,thread:void 0}}function B$($,O){return{session:$$.byId($,O.session_id),owner:M.byId($,O.owner_id),...e6($,O.origin)}}function YO($,O,x){let j=O.origin?.channel_id;return j&&x?j$.byId($,j,x):void 0}function QO($,O){return O?M.byId($,O):void 0}function PS($,O){return d(O).with({event_type:"agent_session.opened"},({metadata:x})=>({event_type:"agent_session.opened",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.turn_started"},({metadata:x})=>({event_type:"agent_session.turn_started",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.turn_ended"},({metadata:x})=>({event_type:"agent_session.turn_ended",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.command_rejected"},({metadata:x})=>({event_type:"agent_session.command_rejected",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.settled"},({metadata:x})=>({event_type:"agent_session.settled",metadata:x,...B$($,x.identity),actor:QO($,x.last_turn?.actor),announcement:YO($,x.identity,x.last_turn?.announcement_message_id)})).with({event_type:"agent_session.waiting_for_input"},({metadata:x})=>({event_type:"agent_session.waiting_for_input",metadata:x,...B$($,x.identity),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.input_received"},({metadata:x})=>({event_type:"agent_session.input_received",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.mentioned"},({metadata:x})=>({event_type:"agent_session.mentioned",metadata:x,...B$($,x.identity),mentionedBy:QO($,x.mentioned_by),mentioned:x.mentioned.map((j)=>M.byId($,j))})).with({event_type:"agent_session.stopped"},({metadata:x})=>({event_type:"agent_session.stopped",metadata:x,...B$($,x.identity),actor:QO($,x.turn_in_flight?.actor),announcement:YO($,x.identity,x.turn_in_flight?.announcement_message_id)})).with({event_type:"agent_session.renamed"},({metadata:x})=>({event_type:"agent_session.renamed",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.deleted"},({metadata:x})=>({event_type:"agent_session.deleted",metadata:x,...B$($,x.identity)})).exhaustive()}var _S="macro|";function J$($,O){return O.startsWith(_S)&&O.length>_S.length?M.byId($,O.toLowerCase()):void 0}function FS($,O){return d(O).with({event_type:"channel.created"},({metadata:x})=>({event_type:"channel.created",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor),participants:x.participant_user_ids.map((j)=>M.byId($,j))})).with({event_type:"channel.updated"},({metadata:x})=>({event_type:"channel.updated",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.deleted"},({metadata:x})=>({event_type:"channel.deleted",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.picture_changed"},({metadata:x})=>({event_type:"channel.picture_changed",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.participant_added"},({metadata:x})=>({event_type:"channel.participant_added",metadata:x,channel:f.byId($,x.channel_id),addedBy:J$($,x.added_by),addedUsers:x.added_user_ids.map((j)=>M.byId($,j))})).with({event_type:"channel.participant_removed"},({metadata:x})=>({event_type:"channel.participant_removed",metadata:x,channel:f.byId($,x.channel_id),removedBy:M.byId($,x.removed_by),removedUsers:x.removed_user_ids.map((j)=>M.byId($,j))})).exhaustive()}function ES($,O){return d(O).with({event_type:"document.created"},({metadata:x})=>({event_type:"document.created",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner),project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.updated"},({metadata:x})=>({event_type:"document.updated",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner),actor:x.actor_user_id?M.byId($,x.actor_user_id):void 0,project:x.project_id?u.byId($,x.project_id):void 0,previousProject:x.previous_project_id?u.byId($,x.previous_project_id):void 0})).with({event_type:"document.deleted"},({metadata:x})=>({event_type:"document.deleted",metadata:x,document:E.byId($,x.document_id),actor:x.actor_user_id?M.byId($,x.actor_user_id):void 0,project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.content_uploaded"},({metadata:x})=>({event_type:"document.content_uploaded",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner)})).with({event_type:"document.sync_content_updated"},({metadata:x})=>({event_type:"document.sync_content_updated",metadata:x,document:E.byId($,x.document_id)})).with({event_type:"document.purged"},({metadata:x})=>({event_type:"document.purged",metadata:x,document:E.byId($,x.document_id)})).with({event_type:"document.copied"},({metadata:x})=>({event_type:"document.copied",metadata:x,document:E.byId($,x.document_id),sourceDocument:E.byId($,x.source_document_id),owner:M.byId($,x.owner),project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.interaction"},({metadata:x})=>({event_type:"document.interaction",metadata:x,document:E.byId($,x.document_id)})).exhaustive()}function JO($,O,x=[]){let j=O.parent;if(j.type==="call")return{type:"call",call:K$.byId($,j.id),message:k$.byId($,j.id,O.message_id),threadId:j.id};if(j.type==="channel")return{type:"channel",channel:f.byId($,j.id),message:j$.byId($,j.id,O.message_id,x),thread:O.thread_id?new P$($,j.id,O.thread_id):void 0};return{type:"document",document:E.byId($,j.id),comment:d$.byId($,j.id,O.message_id),threadId:O.root_id}}function wS($,O){return d(O).with({event_type:"message.posted"},({metadata:x})=>({event_type:"message.posted",metadata:x,target:JO($,x,x.mentions),sender:J$($,x.sender)})).with({event_type:"message.mentioned"},({metadata:x})=>({event_type:"message.mentioned",metadata:x,target:JO($,x),sender:J$($,x.sender)})).with({event_type:"message.patched"},({metadata:x})=>({event_type:"message.patched",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.deleted"},({metadata:x})=>({event_type:"message.deleted",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.attachment_created"},({metadata:x})=>({event_type:"message.attachment_created",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.attachment_removed"},({metadata:x})=>({event_type:"message.attachment_removed",metadata:x,target:JO($,x),actor:J$($,x.actor)})).exhaustive()}async function qS($){let O=new TextEncoder,x=await crypto.subtle.importKey("raw",O.encode($.secret),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),j=await crypto.subtle.sign("HMAC",x,O.encode(`${$.timestamp}.${$.rawBody}`));return`v1=${new Uint8Array(j).toHex()}`===$.signature}var t6="webhook.validation.test";function o6($,O){return d(O).with({event_type:O$.string.startsWith("document.")},(x)=>ES($,x)).with({event_type:O$.string.startsWith("channel.")},(x)=>FS($,x)).with({event_type:O$.string.startsWith("message.")},(x)=>wS($,x)).with({event_type:O$.string.startsWith("agent_session.")},(x)=>PS($,x)).otherwise(()=>{return})}class X0{client;secret;handlers=new Map;constructor($,O){this.client=$;this.secret=O}on($,O){let x=this.handlers.get($)??new Set;return x.add(O),this.handlers.set($,x),()=>x.delete(O)}onSelfMention($){return this.on("message.mentioned",async(O)=>{if(O.metadata.mentioned.entity_id.toLowerCase()!==(await this.client.myPrincipalId()).toLowerCase())return;await $(O)})}async listen($={}){let O=$.filters??this.filtersFromHandlers();if(O.length===0||O.every((K)=>K.events.length===0))throw new w("listen() needs filters — pass filters or register handlers with .on() first");let x=new AbortController;if($.signal)if($.signal.aborted)x.abort();else $.signal.addEventListener("abort",()=>x.abort(),{once:!0});let{stream:j}=await this.client.storage.streamEvents({query:{scope:$.scope??"user",filters:JSON.stringify(O)},signal:x.signal});return(async()=>{try{for await(let K of j)await this.dispatchEvent(K)}catch{if(x.signal.aborted)return;throw new w("event stream failed")}})().catch(()=>{}),()=>{x.abort()}}async handle($,O){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");if(!await qS({secret:this.secret,timestamp:O.timestamp??"",rawBody:$,signature:O.signature??""}))throw new w("invalid webhook signature");if(O.event===t6)return;await this.dispatchEvent(JSON.parse($))}webhook(){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");return async($)=>{return await this.handle(await $.text(),{event:$.headers.get("x-macro-event")??void 0,eventId:$.headers.get("x-macro-event-id")??void 0,timestamp:$.headers.get("x-macro-timestamp")??void 0,signature:$.headers.get("x-macro-signature")??void 0}),new Response("ok")}}filtersFromHandlers(){let $=[...this.handlers.entries()].filter(([,O])=>O.size>0).map(([O])=>O);return $.length>0?[{events:$}]:[]}async dispatchEvent($){let O=typeof $==="string"?JSON.parse($):$;if(O===null||typeof O!=="object"||!("event_type"in O))return;let x=O,j=this.handlers.get(x.event_type);if(!j||j.size===0)return;let S=o6(this.client,x);if(!S)return;await Promise.all([...j].map((K)=>K(S)))}}function fS(){return}var $7=0,K0;function O7($){K0=$}function L$($,O,x){if(!x&&!K0)return $;let j=(S)=>{for(let K of[K0,x])try{Promise.resolve(K?.(S)).catch(()=>{})}catch{}};return new Proxy($,{get(S,K,G){let Z=Reflect.get(S,K,G);if(typeof K!=="string"||typeof Z!=="function")return Z;return async(...X)=>{let L={id:++$7,service:O,operation:K};j({...L,status:"started"});try{let Y=await Reflect.apply(Z,S,X),Q=Y!==null&&typeof Y==="object"&&"error"in Y&&Y.error!=null;return j({...L,status:Q?"failed":"completed"}),Y}catch(Y){throw j({...L,status:"failed"}),Y}}}})}var gS="x-macro-user-api-key",x7="mak_",Y0="mbot_";function j7($){return d($).with(O$.string.startsWith(Y0),()=>{throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.")}).with(O$.string.startsWith(x7),(O)=>[gS,O]).otherwise((O)=>["Authorization",`Bearer ${O}`])}async function bS($){return typeof $==="function"?await $():$}async function S7($,O,x){return d($).with({type:"bot"},async(j)=>{let S=await bS(j.token);if(!S.startsWith(Y0))throw Error("user API key passed as a bot token. Use auth: { type: 'user', apiKey } or MACRO_API_KEY.");let K=[["x-macro-bot-token",S]];if(!x?.hasBotScope)K.push(["x-macro-bot-scope",j.scope??(O?"user":"team")]);if(O)K.push(["x-macro-bot-for-macro-user-id",O]);return K}).with({type:"user",apiKey:O$.string},({apiKey:j})=>{if(j.startsWith(Y0))throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.");return[[gS,j]]}).with({type:"user"},async({token:j})=>{return[j7(await bS(j))]}).exhaustive()}class Q0{agentHarness;auth;calendar;cognition;contacts;email;notification;properties;search;storage;webAppUrl;wsVerify;events;authConfig;hosts;localPortmap;requestedAs;selfBotRecord;selfPrincipal;constructor($){let O=G7($),x=O==="local"?fS():void 0,j={...Z0[O],...x?.hosts,...$.hosts};this.hosts=j,this.localPortmap=x;let S=typeof process<"u"?{}.MACRO_WEB_URL:void 0;if(this.webAppUrl=$.webAppUrl??S??x?.webAppUrl??MS[O],this.authConfig=Z7($),this.requestedAs=$.requestedAs,this.requestedAs&&this.authConfig.type!=="bot")throw Error("requestedAs() requires bot auth — a user token always acts as its own user");this.wsVerify=$.wsVerify,this.agentHarness=L$(new aO({client:this.makeClient(j["agent-harness"])}),"agent-harness",$.onRequest),this.auth=L$(new tO({client:this.makeClient(j.auth)}),"auth",$.onRequest),this.calendar=L$(new jx({client:this.makeClient(j.calendar)}),"calendar",$.onRequest),this.cognition=L$(new Kx({client:this.makeClient(j.cognition)}),"cognition",$.onRequest),this.contacts=L$(new Wx({client:this.makeClient(j.contacts)}),"contacts",$.onRequest),this.email=L$(new zx({client:this.makeClient(j.email)}),"email",$.onRequest),this.notification=L$(new Ax({client:this.makeClient(j.notification)}),"notification",$.onRequest),this.properties=L$(new _x({client:this.makeClient(j.properties)}),"properties",$.onRequest),this.search=L$(new fx({client:this.makeClient(j.search)}),"search",$.onRequest),this.storage=L$(new hx({client:this.makeClient(j.storage)}),"storage",$.onRequest);let K=typeof process<"u"?{}.MACRO_WEBHOOK_SECRET:void 0,G=$.webhookSecret??K;this.events=new X0(this,G)}hasActingUser(){return this.authConfig.type==="user"||this.requestedAs!==void 0}selfBot(){return this.selfBotRecord??=new BO(this).me().catch(($)=>{throw this.selfBotRecord=void 0,$}),this.selfBotRecord}myPrincipalId(){return this.selfPrincipal??=(this.authConfig.type==="bot"?this.selfBot().then(($)=>`bot|${$.id}`):M.me(this).then(($)=>$.id)).catch(($)=>{throw this.selfPrincipal=void 0,$}),this.selfPrincipal}makeClient($){let O=FO({baseUrl:$});return O.interceptors.request.use(async(x)=>{let j=await S7(this.authConfig,this.requestedAs,{hasBotScope:x.headers.has("x-macro-bot-scope")});for(let[S,K]of j)x.headers.set(S,K);return x}),O}}function G7($){if($.env)return $.env;let O=typeof process<"u"?{}.MACRO_ENV:void 0;if(!O)return"prod";if(!(O in Z0))throw Error(`invalid MACRO_ENV "${O}" — expected local, dev, or prod`);return O}function Z7($){if($.auth)return $.auth;if($.token)return{type:"user",token:$.token};let O=typeof process<"u"?{}.MACRO_API_KEY:void 0,x=typeof process<"u"?{}.MACRO_BOT_TOKEN:void 0;if(O&&x)throw Error("both MACRO_API_KEY and MACRO_BOT_TOKEN are set — pass auth to new Macro() to pick one");if(x)return{type:"bot",token:x};return{type:"user",token:O??(()=>{throw Error("no Macro credential. Set MACRO_API_KEY (API key or bearer token) or MACRO_BOT_TOKEN, or pass token/auth to new Macro().")})}}class kS{agentSessions;ai;bots;calendar;calls;channels;chats;crm;databases;documents;email;favorites;foreignEntities;forms;notifications;pins;projects;properties;tasks;teams;users;webhooks;workspace;events;webAppUrl;_client;opts;constructor($){this.opts=$;let O=new Q0($);this._client=O,this.agentSessions=new mx(O),this.ai=new cx(O),this.bots=new BO(O),this.calendar=new dx(O),this.calls=new ux(O),this.channels=new rx(O),this.chats=new px(O),this.crm=new ax(O),this.databases=new jj(O),this.documents=new Sj(O),this.email=new Gj(O),this.favorites=new Zj(O),this.foreignEntities=new Xj(O),this.forms=new Kj(O),this.notifications=new Yj(O),this.pins=new Qj(O),this.projects=new Jj(O),this.properties=new Vj(O),this.tasks=new Wj(O),this.teams=new Bj(O),this.users=new Lj(O),this.webhooks=new Nj(O),this.workspace=new Tj(O),this.events=O.events,this.webAppUrl=O.webAppUrl}myPrincipalId(){return this._client.myPrincipalId()}requestedAs($){return new kS({...this.opts,requestedAs:$.id})}}export{b$ as wrapXml,e as toBody,O7 as observeRequests,vS as msg,hS as here,Z$ as SessionReview,vx as ReviewItem,xj as MacroOpRefusedError,kS as Macro,f$ as FormSection,e$ as FormResponse,mO as FormReference,q$ as FormQuestion,n$ as FormOption,D$ as Form,WO as CodeExecution};+`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(j)C=await j(C)}if(x?.({data:C,event:y,id:Q,retry:V}),_.length)yield C}}}finally{I.removeEventListener("abort",g),H.releaseLock()}break}catch(A){if(O?.(A),G!==void 0&&B>=G)break;let D=Math.min(V*2**(B-1),Z??30000);await T(D)}}}()}}var d6=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},u6=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},l6=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},bx=({allowReserved:$,explode:O,name:x,style:j,value:S})=>{if(!O){let Z=($?S:S.map((X)=>encodeURIComponent(X))).join(u6(j));switch(j){case"label":return`.${Z}`;case"matrix":return`;${x}=${Z}`;case"simple":return Z;default:return`${x}=${Z}`}}let K=d6(j),G=S.map((Z)=>{if(j==="label"||j==="simple")return $?Z:encodeURIComponent(Z);return KO({allowReserved:$,name:x,value:Z})}).join(K);return j==="label"||j==="matrix"?K+G:G},KO=({allowReserved:$,name:O,value:x})=>{if(x===void 0||x===null)return"";if(typeof x==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?x:encodeURIComponent(x)}`},gx=({allowReserved:$,explode:O,name:x,style:j,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${x}=${S.toISOString()}`;if(j!=="deepObject"&&!O){let X=[];Object.entries(S).forEach(([Y,Q])=>{X=[...X,Y,$?Q:encodeURIComponent(Q)]});let L=X.join(",");switch(j){case"form":return`${x}=${L}`;case"label":return`.${L}`;case"matrix":return`;${x}=${L}`;default:return L}}let G=l6(j),Z=Object.entries(S).map(([X,L])=>KO({allowReserved:$,name:j==="deepObject"?`${x}[${X}]`:X,value:L})).join(G);return j==="label"||j==="matrix"?G+Z:Z};var r6=/\{[^{}]+\}/g,p6=({path:$,url:O})=>{let x=O,j=O.match(r6);if(j)for(let S of j){let K=!1,G=S.substring(1,S.length-1),Z="simple";if(G.endsWith("*"))K=!0,G=G.substring(0,G.length-1);if(G.startsWith("."))G=G.substring(1),Z="label";else if(G.startsWith(";"))G=G.substring(1),Z="matrix";let X=$[G];if(X===void 0||X===null)continue;if(Array.isArray(X)){x=x.replace(S,bx({explode:K,name:G,style:Z,value:X}));continue}if(typeof X==="object"){x=x.replace(S,gx({explode:K,name:G,style:Z,value:X,valueOnly:!0}));continue}if(Z==="matrix"){x=x.replace(S,`;${KO({name:G,value:X})}`);continue}let L=encodeURIComponent(Z==="label"?`.${X}`:X);x=x.replace(S,L)}return x},NS=({baseUrl:$,path:O,query:x,querySerializer:j,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,G=($??"")+K;if(O)G=p6({path:O,url:G});let Z=x?j(x):"";if(Z.startsWith("?"))Z=Z.substring(1);if(Z)G+=`?${Z}`;return G};function j0($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var US=async($,O)=>{let x=typeof O==="function"?await O($):O;if(!x)return;if($.scheme==="bearer")return`Bearer ${x}`;if($.scheme==="basic")return`Basic ${btoa(x)}`;return x};var zS={bodySerializer:($)=>JSON.stringify($,(O,x)=>typeof x==="bigint"?x.toString():x)};var IS=({parameters:$={},...O}={})=>{return(j)=>{let S=[];if(j&&typeof j==="object")for(let K in j){let G=j[K];if(G===void 0||G===null)continue;let Z=$[K]||O;if(Array.isArray(G)){let X=bx({allowReserved:Z.allowReserved,explode:!0,name:K,style:"form",value:G,...Z.array});if(X)S.push(X)}else if(typeof G==="object"){let X=gx({allowReserved:Z.allowReserved,explode:!0,name:K,style:"deepObject",value:G,...Z.object});if(X)S.push(X)}else{let X=KO({allowReserved:Z.allowReserved,name:K,value:G});if(X)S.push(X)}}return S.join("&")}},TS=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((x)=>O.startsWith(x)))return"blob";if(O.startsWith("text/"))return"text";return},a6=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function HS($){for(let O of $.security??[]){if(a6($,O.name))continue;let x=await US(O,$.auth);if(!x)continue;let j=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[j]=x;break;case"cookie":$.headers.append("Cookie",`${j}=${x}`);break;case"header":default:$.headers.set(j,x);break}}}var S0=($)=>NS({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:IS($.querySerializer),url:$.url}),G0=($,O)=>{let x={...$,...O};if(x.baseUrl?.endsWith("/"))x.baseUrl=x.baseUrl.substring(0,x.baseUrl.length-1);return x.headers=yx($.headers,O.headers),x},i6=($)=>{let O=[];return $.forEach((x,j)=>{O.push([j,x])}),O},yx=(...$)=>{let O=new Headers;for(let x of $){if(!x)continue;let j=x instanceof Headers?i6(x):Object.entries(x);for(let[S,K]of j)if(K===null)O.delete(S);else if(Array.isArray(K))for(let G of K)O.append(S,G);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class kx{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let x=this.getInterceptorIndex($);if(this.fns[x])return this.fns[x]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var RS=()=>({error:new kx,request:new kx,response:new kx}),n6=IS({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),s6={"Content-Type":"application/json"},_O=($={})=>({...zS,headers:s6,parseAs:"auto",querySerializer:n6,...$});var FO=($={})=>{let O=G0(_O(),$),x=()=>({...O}),j=(Y)=>{return O=G0(O,Y),x()},S=RS(),K=async(Y)=>{let Q={...O,...Y,fetch:Y.fetch??O.fetch??globalThis.fetch,headers:yx(O.headers,Y.headers),serializedBody:void 0};if(Q.security)await HS(Q);if(Q.requestValidator)await Q.requestValidator(Q);if(Q.body!==void 0&&Q.bodySerializer)Q.serializedBody=Q.bodySerializer(Q.body);if(Q.body===void 0||Q.serializedBody==="")Q.headers.delete("Content-Type");let T=Q,z=S0(T);return{opts:T,url:z}},G=async(Y)=>{let Q=Y.throwOnError??O.throwOnError,T=Y.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(Y),I={redirect:"follow",...V,body:j0(V)};z=new Request(B,I);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let A={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?TS(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...A}}let H;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":H=await W[N]();break;case"json":{let U=await W.text();H=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...A}}if(N==="json"){if(V.responseValidator)await V.responseValidator(H);if(V.responseTransformer)H=await V.responseTransformer(H)}return V.responseStyle==="data"?H:{data:H,...A}}let D=await W.text(),F;try{F=JSON.parse(D)}catch{}throw F??D}catch(V){let B=V;for(let I of S.error.fns)if(I)B=await I(B,W,z,Y);if(B=B||{},Q)throw B;return T==="data"?void 0:{error:B,request:z,response:W}}},Z=(Y)=>(Q)=>G({...Q,method:Y}),X=(Y)=>async(Q)=>{let{opts:T,url:z}=await K(Q);return LS({...T,body:T.body,method:Y,onRequest:async(W,V)=>{let B=new Request(W,V);for(let I of S.request.fns)if(I)B=await I(B,T);return B},serializedBody:j0(T),url:z})};return{buildUrl:(Y)=>S0({...O,...Y}),connect:Z("CONNECT"),delete:Z("DELETE"),get:Z("GET"),getConfig:x,head:Z("HEAD"),interceptors:S,options:Z("OPTIONS"),patch:Z("PATCH"),post:Z("POST"),put:Z("PUT"),request:G,setConfig:j,sse:{connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),head:X("HEAD"),options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),trace:X("TRACE")},trace:Z("TRACE")}};var AS=FO(_O());class DS{client;constructor($){this.client=$?.client??AS}}class CS{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class hx extends DS{static __registry=new CS;constructor($){super($);hx.__registry.set(this,$?.key)}listAgents($){return($?.client??this.client).get({url:"/agents",...$})}createAgent($){return($.client??this.client).post({url:"/agents",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateAgent($){return($.client??this.client).put({url:"/agents/{agent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteAnchor($){return($.client??this.client).delete({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}editAnchor($){return($.client??this.client).patch({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentAnchors($){return($.client??this.client).get({url:"/annotations/anchors/document/{document_id}",...$})}createAnchor($){return($.client??this.client).post({url:"/annotations/anchors/document/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSelfBot($){return($?.client??this.client).get({url:"/bots/me",...$})}getBotOwnerProfiles($){return($?.client??this.client).get({url:"/bots/profiles",...$})}listBotChannels($){return($.client??this.client).get({url:"/bots/{bot_id}/channels",...$})}removeBotFromChannelByBot($){return($.client??this.client).delete({url:"/bots/{bot_id}/channels/{channel_id}",...$})}listOccurrences($){return($.client??this.client).get({url:"/calendar-events",...$})}mentionPreviews($){return($.client??this.client).post({url:"/calendar-events/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}listTeamCalendar($){return($.client??this.client).get({url:"/calendar-events/team",...$})}listTeamOutOfOffice($){return($.client??this.client).get({url:"/calendar-events/team-out-of-office",...$})}getActiveCalls($){return($?.client??this.client).get({url:"/call/active",...$})}guestCallChatRead($){return($.client??this.client).get({url:"/call/guest-chat/{call_id}",...$})}guestCallChatPost($){return($.client??this.client).post({url:"/call/guest-chat/{call_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingLookup($){return($.client??this.client).get({url:"/call/join/{token}",...$})}meetingGuestJoin($){return($.client??this.client).post({url:"/call/join/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingLeave($){return($.client??this.client).post({url:"/call/join/{token}/leave",...$})}meetingGuestParticipants($){return($.client??this.client).get({url:"/call/join/{token}/participants",...$})}meetingList($){return($?.client??this.client).get({url:"/call/meetings",...$})}meetingCreate($){return($.client??this.client).post({url:"/call/meetings",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingListActive($){return($?.client??this.client).get({url:"/call/meetings/active",...$})}meetingInvitePermissions($){return($.client??this.client).get({url:"/call/meetings/invite/{token}",...$})}meetingInvite($){return($.client??this.client).post({url:"/call/meetings/invite/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingInviteUsers($){return($.client??this.client).post({url:"/call/meetings/invite/{token}/users",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingJoin($){return($.client??this.client).post({url:"/call/meetings/join/{token}",...$})}meetingParticipants($){return($.client??this.client).get({url:"/call/meetings/join/{token}/participants",...$})}meetingPrepare($){return($?.client??this.client).post({url:"/call/meetings/prepare",...$})}meetingCancelPreparation($){return($.client??this.client).delete({url:"/call/meetings/prepare/{preparation_id}",...$})}meetingCancel($){return($.client??this.client).delete({url:"/call/meetings/{meeting_id}",...$})}meetingUpdate($){return($.client??this.client).patch({url:"/call/meetings/{meeting_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchCallRecordPreview($){return($.client??this.client).post({url:"/call/record/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCallRecord($){return($.client??this.client).delete({url:"/call/record/{call_id}",...$})}getCallRecord($){return($.client??this.client).get({url:"/call/record/{call_id}",...$})}editCallRecord($){return($.client??this.client).patch({url:"/call/record/{call_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}declineCall($){return($.client??this.client).post({url:"/call/record/{call_id}/decline",...$})}meetingShare($){return($.client??this.client).post({url:"/call/record/{call_id}/link",...$})}toggleShareWithTeam($){return($.client??this.client).post({url:"/call/record/{call_id}/share-with-team/toggle",...$})}editCallTranscript($){return($.client??this.client).patch({url:"/call/record/{call_id}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}getRingStatus($){return($.client??this.client).get({url:"/call/ring-status/{call_id}",...$})}declineRing($){return($.client??this.client).post({url:"/call/ring-status/{call_id}/decline",...$})}callWebhook($){return($?.client??this.client).post({url:"/call/webhook",...$})}leaveOrEndCall($){return($.client??this.client).delete({url:"/call/{channel_id}",...$})}getOrCreateCall($){return($.client??this.client).get({url:"/call/{channel_id}",...$})}checkActiveCall($){return($.client??this.client).get({url:"/call/{channel_id}/active",...$})}ingestTranscript($){return($.client??this.client).post({url:"/call/{room_name}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}listChannelLabels($){return($?.client??this.client).get({url:"/channel-labels",...$})}createChannelLabel($){return($.client??this.client).post({url:"/channel-labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelLabel($){return($.client??this.client).put({url:"/channel-labels/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}previewSmartTag($){return($.client??this.client).post({url:"/channel-labels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannelLabel($){return($.client??this.client).delete({url:"/channel-labels/{label_id}",...$})}renameChannelLabel($){return($.client??this.client).patch({url:"/channel-labels/{label_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createChannel($){return($.client??this.client).post({url:"/channels",...$,headers:{"Content-Type":"application/json",...$.headers}})}getActivity($){return($?.client??this.client).get({url:"/channels/activity",...$})}postActivity($){return($.client??this.client).post({url:"/channels/activity",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAttachmentReferences($){return($.client??this.client).get({url:"/channels/attachments/{entity_type}/{entity_id}/references",...$})}getOrCreateDm($){return($.client??this.client).post({url:"/channels/get_or_create_dm",...$,headers:{"Content-Type":"application/json",...$.headers}})}getOrCreatePrivate($){return($.client??this.client).post({url:"/channels/get_or_create_private",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannelByCode($){return($.client??this.client).post({url:"/channels/join/{join_code}",...$})}createEntityMention($){return($.client??this.client).post({url:"/channels/mentions",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteEntityMention($){return($.client??this.client).delete({url:"/channels/mentions/{mention_id}",...$})}getBatchChannelPreview($){return($.client??this.client).post({url:"/channels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannel($){return($.client??this.client).delete({url:"/channels/{channel_id}",...$})}getChannel($){return($.client??this.client).get({url:"/channels/{channel_id}",...$})}patchChannel($){return($.client??this.client).patch({url:"/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelAttachments($){return($.client??this.client).get({url:"/channels/{channel_id}/attachments",...$})}createChannelScopedBot($){return($.client??this.client).post({url:"/channels/{channel_id}/bots/scoped",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/join",...$})}getChannelJoinLink($){return($.client??this.client).get({url:"/channels/{channel_id}/join-link",...$})}leaveChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/leave",...$})}removeParticipants($){return($.client??this.client).delete({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelParticipants($){return($.client??this.client).get({url:"/channels/{channel_id}/participants",...$})}addParticipants($){return($.client??this.client).post({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelPicture($){return($.client??this.client).put({url:"/channels/{channel_id}/profile_picture",...$,headers:{"Content-Type":"application/json",...$.headers}})}postChannelBotWebhook($){return($.client??this.client).post({url:"/channels/{channel_id}/webhook",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCollabSurface($){return($.client??this.client).delete({url:"/collab_surfaces/{id}",...$})}getCollabSurface($){return($.client??this.client).get({url:"/collab_surfaces/{id}",...$})}ensureCollabSurface($){return($.client??this.client).put({url:"/collab_surfaces/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createCollabSurfaceToken($){return($.client??this.client).post({url:"/collab_surfaces/{id}/token",...$})}getChannels($){return($?.client??this.client).get({url:"/comms/channels",...$})}createCrmCompany($){return($.client??this.client).post({url:"/crm/companies",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCompany($){return($.client??this.client).get({url:"/crm/companies/{company_id}",...$})}listCompanyContacts($){return($.client??this.client).get({url:"/crm/companies/{company_id}/contacts",...$})}createCrmContact($){return($.client??this.client).post({url:"/crm/companies/{company_id}/contacts",...$,headers:{"Content-Type":"application/json",...$.headers}})}setEmailSync($){return($.client??this.client).put({url:"/crm/companies/{company_id}/email-sync",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCompanyHidden($){return($.client??this.client).put({url:"/crm/companies/{company_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmCompanyName($){return($.client??this.client).put({url:"/crm/companies/{company_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}searchContacts($){return($?.client??this.client).get({url:"/crm/contacts",...$})}getContactByEmail($){return($.client??this.client).get({url:"/crm/contacts/by-email",...$})}getContact($){return($.client??this.client).get({url:"/crm/contacts/{contact_id}",...$})}setContactHidden($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmContactName($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCrmPipelines($){return($?.client??this.client).get({url:"/crm/pipelines",...$})}createCrmPipeline($){return($.client??this.client).post({url:"/crm/pipelines",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipeline($){return($.client??this.client).get({url:"/crm/pipelines/{id}",...$})}renameCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyCrmPipelineOps($){return($.client??this.client).post({url:"/crm/pipelines/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelinePermissions($){return($.client??this.client).get({url:"/crm/pipelines/{id}/permissions",...$})}updateCrmPipelinePermissions($){return($.client??this.client).patch({url:"/crm/pipelines/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineRows($){return($.client??this.client).get({url:"/crm/pipelines/{id}/rows",...$})}queryCrmPipelineRows($){return($.client??this.client).post({url:"/crm/pipelines/{id}/rows",...$,headers:{"Content-Type":"application/json",...$.headers}})}shareCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/sharing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineTable($){return($.client??this.client).get({url:"/crm/pipelines/{id}/table",...$})}trashCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/trash",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmTeamSettings($){return($?.client??this.client).get({url:"/crm/settings",...$})}putCrmTeamSettings($){return($.client??this.client).put({url:"/crm/settings",...$,headers:{"Content-Type":"application/json",...$.headers}})}resetCrmTeamStages($){return($?.client??this.client).delete({url:"/crm/stages",...$})}putCrmTeamStages($){return($.client??this.client).put({url:"/crm/stages",...$,headers:{"Content-Type":"application/json",...$.headers}})}listDatabases($){return($?.client??this.client).get({url:"/databases",...$})}createDatabase($){return($.client??this.client).post({url:"/databases",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDatabaseQuery($){return($.client??this.client).post({url:"/databases/queries",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseQuery($){return($.client??this.client).get({url:"/databases/queries/{query_id}",...$})}ensureStarterHandler($){return($?.client??this.client).post({url:"/databases/starter",...$})}deliverDatabaseWebhook($){return($.client??this.client).post({url:"/databases/webhooks/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabase($){return($.client??this.client).get({url:"/databases/{id}",...$})}shareDatabaseAwareness($){return($.client??this.client).put({url:"/databases/{id}/awareness",...$,headers:{"Content-Type":"application/json",...$.headers}})}undoDatabaseChange($){return($.client??this.client).post({url:"/databases/{id}/changes/{change}/undo",...$})}importDatabaseTable($){return($.client??this.client).post({url:"/databases/{id}/import",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyDatabaseOps($){return($.client??this.client).post({url:"/databases/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabasePermissions($){return($.client??this.client).get({url:"/databases/{id}/permissions",...$})}updateDatabasePermissions($){return($.client??this.client).patch({url:"/databases/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseTableChanges($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/changes",...$})}listDatabaseColumnCasts($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/casts",...$})}convertDatabaseColumn($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/conversion",...$,headers:{"Content-Type":"application/json",...$.headers}})}inferDatabaseColumnType($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/infer-type",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseRowHistory($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/rows/{row_id}/history",...$})}getDatabaseViewPositions($){return($.client??this.client).get({url:"/databases/{id}/views/{view_id}/positions",...$})}listDatabaseWebhooks($){return($.client??this.client).get({url:"/databases/{id}/webhooks",...$})}createDatabaseWebhook($){return($.client??this.client).post({url:"/databases/{id}/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteDatabaseWebhook($){return($.client??this.client).delete({url:"/databases/{id}/webhooks/{webhook_id}",...$})}transcribeDictation($){return($.client??this.client).post({bodySerializer:null,url:"/dictation/transcribe",...$,headers:{"Content-Type":"audio/webm",...$.headers}})}getUserDocumentsHandler($){return($.client??this.client).get({url:"/documents",...$})}createDocument($){return($.client??this.client).post({url:"/documents",...$,headers:{"Content-Type":"application/json",...$.headers}})}createMarkdownHandler($){return($.client??this.client).post({url:"/documents/create_markdown",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSkillHandler($){return($.client??this.client).post({url:"/documents/create_skill",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSnippetHandler($){return($.client??this.client).post({url:"/documents/create_snippet",...$,headers:{"Content-Type":"application/json",...$.headers}})}createTaskHandler($){return($.client??this.client).post({url:"/documents/create_task",...$,headers:{"Content-Type":"application/json",...$.headers}})}getGithubPullRequestTasks($){return($.client??this.client).post({url:"/documents/github_prs/tasks",...$,headers:{"Content-Type":"application/json",...$.headers}})}initializeUserDocuments($){return($?.client??this.client).post({url:"/documents/initialize_user_documents",...$})}getDocumentListHandler($){return($?.client??this.client).get({url:"/documents/list",...$})}validateDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/validate",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/{document_id}",...$})}presaveDocumentHandler($){return($.client??this.client).put({url:"/documents/presave/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchPreviewHandler($){return($.client??this.client).post({url:"/documents/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentByTeamSlug($){return($.client??this.client).get({url:"/documents/slug/{slug}",...$})}handler($){return($?.client??this.client).get({url:"/documents/starter_docs",...$})}getSystemSkillsHandler($){return($?.client??this.client).get({url:"/documents/system_skills",...$})}deleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}",...$})}getDocument($){return($.client??this.client).get({url:"/documents/{document_id}",...$})}editDocument($){return($.client??this.client).patch({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDocumentHandler($){return($.client??this.client).put({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentBranchName($){return($.client??this.client).get({url:"/documents/{document_id}/branch_name",...$})}copyDocument($){return($.client??this.client).post({url:"/documents/{document_id}/copy",...$,headers:{"Content-Type":"application/json",...$.headers}})}exportDocument($){return($.client??this.client).get({url:"/documents/{document_id}/export",...$})}getDocumentGithubPullRequests($){return($.client??this.client).get({url:"/documents/{document_id}/github_prs",...$})}getLocationHandler($){return($.client??this.client).get({url:"/documents/{document_id}/location",...$})}getDocumentLocationV3($){return($.client??this.client).get({url:"/documents/{document_id}/location_v3",...$})}permanentlyDeleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}/permanent",...$})}getDocumentProcessingResult($){return($.client??this.client).get({url:"/documents/{document_id}/processing",...$})}jobProcessingResultHandler($){return($.client??this.client).get({url:"/documents/{document_id}/processing/{job_id}",...$})}revertDeleteDocument($){return($.client??this.client).put({url:"/documents/{document_id}/revert_delete",...$})}getDocumentShortId($){return($.client??this.client).get({url:"/documents/{document_id}/short_id",...$})}simpleSave($){return($.client??this.client).put({url:"/documents/{document_id}/simple_save",...$})}getDocumentTeamShare($){return($.client??this.client).get({url:"/documents/{document_id}/team_share",...$})}setDocumentTeamShare($){return($.client??this.client).put({url:"/documents/{document_id}/team_share",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentTextContent($){return($.client??this.client).get({url:"/documents/{document_id}/text-content",...$})}getDocumentViewsHandler($){return($.client??this.client).get({url:"/documents/{document_id}/views",...$})}getDocumentVersion($){return($.client??this.client).get({url:"/documents/{document_id}/{document_version_id}",...$})}accessRequestsState($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/access-requests",...$})}accessRequestsCancel($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$})}accessRequestsSubmit($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsResolve($){return($.client??this.client).post({url:"/entities/{entity_type}/{entity_id}/access-requests/{request_id}/resolve",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsDirect($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/direct-access",...$})}accessRequestsRemoveDirect($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$})}accessRequestsSetDirect($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getEntityPermission($){return($.client??this.client).get({url:"/entity/{entity_type}/{entity_id}/permissions",...$})}listFavorites($){return($?.client??this.client).get({url:"/favorites",...$})}addFavorite($){return($.client??this.client).post({url:"/favorites",...$,headers:{"Content-Type":"application/json",...$.headers}})}reorderFavorites($){return($.client??this.client).patch({url:"/favorites/reorder",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeFavoriteByEntity($){return($.client??this.client).delete({url:"/favorites/{entity_type}/{entity_id}",...$})}getForeignEntityBySource($){return($.client??this.client).get({url:"/foreign_entity/by_source/{source}/{foreign_entity_id}",...$})}getForeignEntity($){return($.client??this.client).get({url:"/foreign_entity/{id}",...$})}listForms($){return($.client??this.client).get({url:"/forms",...$})}createForm($){return($.client??this.client).post({url:"/forms",...$,headers:{"Content-Type":"application/json",...$.headers}})}listAccessibleForms($){return($?.client??this.client).get({url:"/forms/accessible",...$})}getForm($){return($.client??this.client).get({url:"/forms/{id}",...$})}updateForm($){return($.client??this.client).patch({url:"/forms/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}collaborateForm($){return($.client??this.client).post({url:"/forms/{id}/collaboration",...$})}putFormLayout($){return($.client??this.client).put({url:"/forms/{id}/layout",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormPermissions($){return($.client??this.client).get({url:"/forms/{id}/permissions",...$})}updateFormPermissions($){return($.client??this.client).patch({url:"/forms/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}submitFormResponse($){return($.client??this.client).post({url:"/forms/{id}/responses",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMyFormResponse($){return($.client??this.client).get({url:"/forms/{id}/responses/mine",...$})}editMyFormResponse($){return($.client??this.client).put({url:"/forms/{id}/responses/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormResponseSummary($){return($.client??this.client).get({url:"/forms/{id}/responses/summary",...$})}getFormTally($){return($.client??this.client).get({url:"/forms/{id}/tally",...$})}installSync($){return($?.client??this.client).get({url:"/github/install-sync",...$})}getGithubPullRequestFacets($){return($?.client??this.client).get({url:"/github_pull_requests/facets",...$})}getGithubPullRequest($){return($.client??this.client).get({url:"/github_pull_requests/{id}",...$})}getGithubPullRequestChanges($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes",...$})}getGithubPullRequestChangesPatch($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes/patch",...$})}createHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings",...$,headers:{"Content-Type":"application/json",...$.headers}})}getHarnessPairing($){return($.client??this.client).get({url:"/harness-pairings/{code}",...$})}approveHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{code}/approve",...$,headers:{"Content-Type":"application/json",...$.headers}})}claimHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{pairing_id}/claim",...$,headers:{"Content-Type":"application/json",...$.headers}})}listHarnesses($){return($?.client??this.client).get({url:"/harnesses",...$})}deleteSelfHarness($){return($?.client??this.client).delete({url:"/harnesses/me",...$})}getSelfHarness($){return($?.client??this.client).get({url:"/harnesses/me",...$})}listHarnessAgents($){return($?.client??this.client).get({url:"/harnesses/me/agents",...$})}listHarnessSessions($){return($?.client??this.client).get({url:"/harnesses/me/sessions",...$})}deleteHarness($){return($.client??this.client).delete({url:"/harnesses/{harness_id}",...$})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getHistoryHandler($){return($?.client??this.client).get({url:"/history",...$})}deleteHistoryHandler($){return($.client??this.client).delete({url:"/history/{item_type}/{item_id}",...$})}upsertHistoryHandler($){return($.client??this.client).post({url:"/history/{item_type}/{item_id}",...$})}listInitiatives($){return($?.client??this.client).get({url:"/initiatives",...$})}createInitiative($){return($.client??this.client).post({url:"/initiatives",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteInitiative($){return($.client??this.client).delete({url:"/initiatives/{initiative_id}",...$})}getInitiative($){return($.client??this.client).get({url:"/initiatives/{initiative_id}",...$})}updateInitiative($){return($.client??this.client).patch({url:"/initiatives/{initiative_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getInstructionsHandler($){return($?.client??this.client).get({url:"/instructions",...$})}createInstructionsHandler($){return($?.client??this.client).post({url:"/instructions",...$})}getItemsSoup($){return($?.client??this.client).get({url:"/items/soup",...$})}postItemsSoup($){return($.client??this.client).post({url:"/items/soup",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAst($){return($.client??this.client).post({url:"/items/soup/ast",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAstGrouped($){return($.client??this.client).post({url:"/items/soup/ast/grouped",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimeline($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}",...$})}entityMessageCreate($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageDeleteMessage($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageGetMessage($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageEdit($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageReact($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/items/{id}/reactions",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageLegacy($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/legacy/{legacy_id}",...$})}entityMessageDeleteThread($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessageGetThread($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessagePatchThread($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimelineEntries($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/timeline",...$})}entityMessageTyping($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/typing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPinsHandler($){return($?.client??this.client).get({url:"/pins",...$})}reorderPinsHandler($){return($.client??this.client).patch({url:"/pins",...$,headers:{"Content-Type":"application/json",...$.headers}})}removePinHandler($){return($.client??this.client).delete({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}addPinHandler($){return($.client??this.client).post({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getProjectsHandler($){return($?.client??this.client).get({url:"/projects",...$})}createProjectHandler($){return($.client??this.client).post({url:"/projects",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPendingProjectsHandler($){return($?.client??this.client).get({url:"/projects/pending",...$})}getBatchProjectPreview($){return($.client??this.client).post({url:"/projects/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadFolderHandler($){return($.client??this.client).post({url:"/projects/upload",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadExtractFolderHandler($){return($.client??this.client).post({url:"/projects/upload_extract",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteProjectHandler($){return($.client??this.client).delete({url:"/projects/{id}",...$})}getProjectHandler($){return($.client??this.client).get({url:"/projects/{id}",...$})}getProjectUserAccessLevel($){return($.client??this.client).get({url:"/projects/{id}/access_level",...$})}getProjectContentHandler($){return($.client??this.client).get({url:"/projects/{id}/content",...$})}permanentlyDeleteProject($){return($.client??this.client).delete({url:"/projects/{id}/permanent",...$})}getProjectPermissionsV2($){return($.client??this.client).get({url:"/projects/{id}/permissions",...$})}revertDeleteProject($){return($.client??this.client).put({url:"/projects/{id}/revert_delete",...$})}recentlyDeleted($){return($?.client??this.client).get({url:"/recents/deleted",...$})}listEmailReminders($){return($?.client??this.client).get({url:"/reminders/email/collection",...$})}getEmailFollowup($){return($.client??this.client).get({url:"/reminders/email/{thread_id}",...$})}setEmailFollowup($){return($.client??this.client).put({url:"/reminders/email/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getViewsHandler($){return($?.client??this.client).get({url:"/saved_views",...$})}createViewHandler($){return($.client??this.client).post({url:"/saved_views",...$,headers:{"Content-Type":"application/json",...$.headers}})}excludeDefaultViewHandler($){return($.client??this.client).post({url:"/saved_views/exclude_default",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteViewHandler($){return($.client??this.client).delete({url:"/saved_views/{saved_view_id}",...$})}patchViewHandler($){return($.client??this.client).patch({url:"/saved_views/{saved_view_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listSlackImports($){return($?.client??this.client).get({url:"/slack/imports",...$})}createSlackImport($){return($.client??this.client).post({url:"/slack/imports",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSlackImport($){return($.client??this.client).get({url:"/slack/imports/{job_id}",...$})}cancelSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/cancel",...$})}finalizeSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/finalize",...$})}registerSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads",...$,headers:{"Content-Type":"application/json",...$.headers}})}completeSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkWakeupSyncServiceDocuments($){return($.client??this.client).post({url:"/sync_service/wakeup",...$,headers:{"Content-Type":"application/json",...$.headers}})}editThreadV2($){return($.client??this.client).patch({url:"/threads/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listUserApiKeys($){return($?.client??this.client).get({url:"/user-api-keys",...$})}createUserApiKey($){return($.client??this.client).post({url:"/user-api-keys",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserApiKey($){return($.client??this.client).delete({url:"/user-api-keys/{id}",...$})}deleteUserDocumentViewLocation($){return($.client??this.client).delete({url:"/user_document_view_location/{document_id}",...$})}getUserDocumentViewLocation($){return($.client??this.client).get({url:"/user_document_view_location/{document_id}",...$})}upsertUserDocumentViewLocation($){return($.client??this.client).post({url:"/user_document_view_location/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsV2($){return($.client??this.client).get({url:"/v2/documents/{document_id}/permissions",...$})}editProjectV2($){return($.client??this.client).patch({url:"/v2/projects/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}streamEvents($){return($.client??this.client).sse.get({url:"/webhook/events/stream",...$})}listWebhooks($){return($?.client??this.client).get({url:"/webhook/webhooks",...$})}createWebhook($){return($.client??this.client).post({url:"/webhook/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteWebhook($){return($.client??this.client).delete({url:"/webhook/webhooks/{webhook_id}",...$})}getWebhook($){return($.client??this.client).get({url:"/webhook/webhooks/{webhook_id}",...$})}patchWebhook($){return($.client??this.client).patch({url:"/webhook/webhooks/{webhook_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}validateWebhook($){return($.client??this.client).post({url:"/webhook/webhooks/{webhook_id}/validate",...$})}}var MS={dev:"https://dev.macro.com",prod:"https://macro.com",local:"http://localhost:3000"},Z0={dev:{"agent-harness":"https://dev-gateway.macro.com/agent-harness",storage:"https://dev-gateway.macro.com/dss",auth:"https://dev-gateway.macro.com/auth",email:"https://dev-gateway.macro.com/email",calendar:"https://dev-gateway.macro.com/calendar",cognition:"https://dev-gateway.macro.com/cognition",notification:"https://dev-gateway.macro.com/notification",properties:"https://dev-gateway.macro.com/dss",search:"https://dev-gateway.macro.com/dss","scheduled-action":"https://dev-gateway.macro.com/scheduled-action","static-files":"https://static-file-service-dev.macro.com",connection:"https://dev-gateway.macro.com/connection-gateway",contacts:"https://dev-gateway.macro.com/contacts",unfurl:"https://dev-gateway.macro.com/unfurl"},prod:{"agent-harness":"https://gateway.macro.com/agent-harness",storage:"https://gateway.macro.com/dss",auth:"https://gateway.macro.com/auth",email:"https://gateway.macro.com/email",calendar:"https://gateway.macro.com/calendar",cognition:"https://gateway.macro.com/cognition",notification:"https://gateway.macro.com/notification",properties:"https://gateway.macro.com/dss",search:"https://gateway.macro.com/dss","scheduled-action":"https://gateway.macro.com/scheduled-action","static-files":"https://static-file-service.macro.com",connection:"https://gateway.macro.com/connection-gateway",contacts:"https://gateway.macro.com/contacts",unfurl:"https://gateway.macro.com/unfurl"},local:{"agent-harness":"http://localhost:8101",storage:"http://localhost:8086",auth:"http://localhost:8080",email:"http://localhost:8087",calendar:"http://localhost:8088/calendar",cognition:"http://localhost:8085",notification:"http://localhost:8089",properties:"http://localhost:8086",search:"http://localhost:8086","scheduled-action":"http://localhost:8099","static-files":"http://localhost:8100",connection:"http://localhost:8082",contacts:"http://localhost:8083",unfurl:"http://localhost:8095"}};function e6($,O){let x=O?.channel_id;return O&&x?{channel:f.byId($,x),thread:new P$($,x,O.thread_id)}:{channel:void 0,thread:void 0}}function B$($,O){return{session:$$.byId($,O.session_id),owner:M.byId($,O.owner_id),...e6($,O.origin)}}function YO($,O,x){let j=O.origin?.channel_id;return j&&x?j$.byId($,j,x):void 0}function QO($,O){return O?M.byId($,O):void 0}function PS($,O){return d(O).with({event_type:"agent_session.opened"},({metadata:x})=>({event_type:"agent_session.opened",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.turn_started"},({metadata:x})=>({event_type:"agent_session.turn_started",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.turn_ended"},({metadata:x})=>({event_type:"agent_session.turn_ended",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.command_rejected"},({metadata:x})=>({event_type:"agent_session.command_rejected",metadata:x,...B$($,x.identity),actor:QO($,x.actor),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.settled"},({metadata:x})=>({event_type:"agent_session.settled",metadata:x,...B$($,x.identity),actor:QO($,x.last_turn?.actor),announcement:YO($,x.identity,x.last_turn?.announcement_message_id)})).with({event_type:"agent_session.waiting_for_input"},({metadata:x})=>({event_type:"agent_session.waiting_for_input",metadata:x,...B$($,x.identity),announcement:YO($,x.identity,x.announcement_message_id)})).with({event_type:"agent_session.input_received"},({metadata:x})=>({event_type:"agent_session.input_received",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.mentioned"},({metadata:x})=>({event_type:"agent_session.mentioned",metadata:x,...B$($,x.identity),mentionedBy:QO($,x.mentioned_by),mentioned:x.mentioned.map((j)=>M.byId($,j))})).with({event_type:"agent_session.stopped"},({metadata:x})=>({event_type:"agent_session.stopped",metadata:x,...B$($,x.identity),actor:QO($,x.turn_in_flight?.actor),announcement:YO($,x.identity,x.turn_in_flight?.announcement_message_id)})).with({event_type:"agent_session.renamed"},({metadata:x})=>({event_type:"agent_session.renamed",metadata:x,...B$($,x.identity)})).with({event_type:"agent_session.deleted"},({metadata:x})=>({event_type:"agent_session.deleted",metadata:x,...B$($,x.identity)})).exhaustive()}var _S="macro|";function J$($,O){return O.startsWith(_S)&&O.length>_S.length?M.byId($,O.toLowerCase()):void 0}function FS($,O){return d(O).with({event_type:"channel.created"},({metadata:x})=>({event_type:"channel.created",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor),participants:x.participant_user_ids.map((j)=>M.byId($,j))})).with({event_type:"channel.updated"},({metadata:x})=>({event_type:"channel.updated",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.deleted"},({metadata:x})=>({event_type:"channel.deleted",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.picture_changed"},({metadata:x})=>({event_type:"channel.picture_changed",metadata:x,channel:f.byId($,x.channel_id),actor:J$($,x.actor)})).with({event_type:"channel.participant_added"},({metadata:x})=>({event_type:"channel.participant_added",metadata:x,channel:f.byId($,x.channel_id),addedBy:J$($,x.added_by),addedUsers:x.added_user_ids.map((j)=>M.byId($,j))})).with({event_type:"channel.participant_removed"},({metadata:x})=>({event_type:"channel.participant_removed",metadata:x,channel:f.byId($,x.channel_id),removedBy:M.byId($,x.removed_by),removedUsers:x.removed_user_ids.map((j)=>M.byId($,j))})).exhaustive()}function ES($,O){return d(O).with({event_type:"document.created"},({metadata:x})=>({event_type:"document.created",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner),project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.updated"},({metadata:x})=>({event_type:"document.updated",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner),actor:x.actor_user_id?M.byId($,x.actor_user_id):void 0,project:x.project_id?u.byId($,x.project_id):void 0,previousProject:x.previous_project_id?u.byId($,x.previous_project_id):void 0})).with({event_type:"document.deleted"},({metadata:x})=>({event_type:"document.deleted",metadata:x,document:E.byId($,x.document_id),actor:x.actor_user_id?M.byId($,x.actor_user_id):void 0,project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.content_uploaded"},({metadata:x})=>({event_type:"document.content_uploaded",metadata:x,document:E.byId($,x.document_id),owner:M.byId($,x.owner)})).with({event_type:"document.sync_content_updated"},({metadata:x})=>({event_type:"document.sync_content_updated",metadata:x,document:E.byId($,x.document_id)})).with({event_type:"document.purged"},({metadata:x})=>({event_type:"document.purged",metadata:x,document:E.byId($,x.document_id)})).with({event_type:"document.copied"},({metadata:x})=>({event_type:"document.copied",metadata:x,document:E.byId($,x.document_id),sourceDocument:E.byId($,x.source_document_id),owner:M.byId($,x.owner),project:x.project_id?u.byId($,x.project_id):void 0})).with({event_type:"document.interaction"},({metadata:x})=>({event_type:"document.interaction",metadata:x,document:E.byId($,x.document_id)})).exhaustive()}function JO($,O,x=[]){let j=O.parent;if(j.type==="call")return{type:"call",call:K$.byId($,j.id),message:k$.byId($,j.id,O.message_id),threadId:j.id};if(j.type==="channel")return{type:"channel",channel:f.byId($,j.id),message:j$.byId($,j.id,O.message_id,x),thread:O.thread_id?new P$($,j.id,O.thread_id):void 0};return{type:"document",document:E.byId($,j.id),comment:d$.byId($,j.id,O.message_id),threadId:O.root_id}}function wS($,O){return d(O).with({event_type:"message.posted"},({metadata:x})=>({event_type:"message.posted",metadata:x,target:JO($,x,x.mentions),sender:J$($,x.sender)})).with({event_type:"message.mentioned"},({metadata:x})=>({event_type:"message.mentioned",metadata:x,target:JO($,x),sender:J$($,x.sender)})).with({event_type:"message.patched"},({metadata:x})=>({event_type:"message.patched",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.deleted"},({metadata:x})=>({event_type:"message.deleted",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.attachment_created"},({metadata:x})=>({event_type:"message.attachment_created",metadata:x,target:JO($,x),actor:J$($,x.actor)})).with({event_type:"message.attachment_removed"},({metadata:x})=>({event_type:"message.attachment_removed",metadata:x,target:JO($,x),actor:J$($,x.actor)})).exhaustive()}async function qS($){let O=new TextEncoder,x=await crypto.subtle.importKey("raw",O.encode($.secret),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),j=await crypto.subtle.sign("HMAC",x,O.encode(`${$.timestamp}.${$.rawBody}`));return`v1=${new Uint8Array(j).toHex()}`===$.signature}var t6="webhook.validation.test";function o6($,O){return d(O).with({event_type:O$.string.startsWith("document.")},(x)=>ES($,x)).with({event_type:O$.string.startsWith("channel.")},(x)=>FS($,x)).with({event_type:O$.string.startsWith("message.")},(x)=>wS($,x)).with({event_type:O$.string.startsWith("agent_session.")},(x)=>PS($,x)).otherwise(()=>{return})}class X0{client;secret;handlers=new Map;constructor($,O){this.client=$;this.secret=O}on($,O){let x=this.handlers.get($)??new Set;return x.add(O),this.handlers.set($,x),()=>x.delete(O)}onSelfMention($){return this.on("message.mentioned",async(O)=>{if(O.metadata.mentioned.entity_id.toLowerCase()!==(await this.client.myPrincipalId()).toLowerCase())return;await $(O)})}async listen($={}){let O=$.filters??this.filtersFromHandlers();if(O.length===0||O.every((K)=>K.events.length===0))throw new w("listen() needs filters — pass filters or register handlers with .on() first");let x=new AbortController;if($.signal)if($.signal.aborted)x.abort();else $.signal.addEventListener("abort",()=>x.abort(),{once:!0});let{stream:j}=await this.client.storage.streamEvents({query:{scope:$.scope??"user",filters:JSON.stringify(O)},signal:x.signal});return(async()=>{try{for await(let K of j)await this.dispatchEvent(K)}catch{if(x.signal.aborted)return;throw new w("event stream failed")}})().catch(()=>{}),()=>{x.abort()}}async handle($,O){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");if(!await qS({secret:this.secret,timestamp:O.timestamp??"",rawBody:$,signature:O.signature??""}))throw new w("invalid webhook signature");if(O.event===t6)return;await this.dispatchEvent(JSON.parse($))}webhook(){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");return async($)=>{return await this.handle(await $.text(),{event:$.headers.get("x-macro-event")??void 0,eventId:$.headers.get("x-macro-event-id")??void 0,timestamp:$.headers.get("x-macro-timestamp")??void 0,signature:$.headers.get("x-macro-signature")??void 0}),new Response("ok")}}filtersFromHandlers(){let $=[...this.handlers.entries()].filter(([,O])=>O.size>0).map(([O])=>O);return $.length>0?[{events:$}]:[]}async dispatchEvent($){let O=typeof $==="string"?JSON.parse($):$;if(O===null||typeof O!=="object"||!("event_type"in O))return;let x=O,j=this.handlers.get(x.event_type);if(!j||j.size===0)return;let S=o6(this.client,x);if(!S)return;await Promise.all([...j].map((K)=>K(S)))}}function fS(){return}var $7=0,K0;function O7($){K0=$}function L$($,O,x){if(!x&&!K0)return $;let j=(S)=>{for(let K of[K0,x])try{Promise.resolve(K?.(S)).catch(()=>{})}catch{}};return new Proxy($,{get(S,K,G){let Z=Reflect.get(S,K,G);if(typeof K!=="string"||typeof Z!=="function")return Z;return async(...X)=>{let L={id:++$7,service:O,operation:K};j({...L,status:"started"});try{let Y=await Reflect.apply(Z,S,X),Q=Y!==null&&typeof Y==="object"&&"error"in Y&&Y.error!=null;return j({...L,status:Q?"failed":"completed"}),Y}catch(Y){throw j({...L,status:"failed"}),Y}}}})}var gS="x-macro-user-api-key",x7="mak_",Y0="mbot_";function j7($){return d($).with(O$.string.startsWith(Y0),()=>{throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.")}).with(O$.string.startsWith(x7),(O)=>[gS,O]).otherwise((O)=>["Authorization",`Bearer ${O}`])}async function bS($){return typeof $==="function"?await $():$}async function S7($,O,x){return d($).with({type:"bot"},async(j)=>{let S=await bS(j.token);if(!S.startsWith(Y0))throw Error("user API key passed as a bot token. Use auth: { type: 'user', apiKey } or MACRO_API_KEY.");let K=[["x-macro-bot-token",S]];if(!x?.hasBotScope)K.push(["x-macro-bot-scope",j.scope??(O?"user":"team")]);if(O)K.push(["x-macro-bot-for-macro-user-id",O]);return K}).with({type:"user",apiKey:O$.string},({apiKey:j})=>{if(j.startsWith(Y0))throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.");return[[gS,j]]}).with({type:"user"},async({token:j})=>{return[j7(await bS(j))]}).exhaustive()}class Q0{agentHarness;auth;calendar;cognition;contacts;email;notification;properties;search;storage;webAppUrl;wsVerify;events;authConfig;hosts;localPortmap;requestedAs;selfBotRecord;selfPrincipal;constructor($){let O=G7($),x=O==="local"?fS():void 0,j={...Z0[O],...x?.hosts,...$.hosts};this.hosts=j,this.localPortmap=x;let S=typeof process<"u"?{}.MACRO_WEB_URL:void 0;if(this.webAppUrl=$.webAppUrl??S??x?.webAppUrl??MS[O],this.authConfig=Z7($),this.requestedAs=$.requestedAs,this.requestedAs&&this.authConfig.type!=="bot")throw Error("requestedAs() requires bot auth — a user token always acts as its own user");this.wsVerify=$.wsVerify,this.agentHarness=L$(new aO({client:this.makeClient(j["agent-harness"])}),"agent-harness",$.onRequest),this.auth=L$(new tO({client:this.makeClient(j.auth)}),"auth",$.onRequest),this.calendar=L$(new jx({client:this.makeClient(j.calendar)}),"calendar",$.onRequest),this.cognition=L$(new Kx({client:this.makeClient(j.cognition)}),"cognition",$.onRequest),this.contacts=L$(new Wx({client:this.makeClient(j.contacts)}),"contacts",$.onRequest),this.email=L$(new zx({client:this.makeClient(j.email)}),"email",$.onRequest),this.notification=L$(new Ax({client:this.makeClient(j.notification)}),"notification",$.onRequest),this.properties=L$(new _x({client:this.makeClient(j.properties)}),"properties",$.onRequest),this.search=L$(new fx({client:this.makeClient(j.search)}),"search",$.onRequest),this.storage=L$(new hx({client:this.makeClient(j.storage)}),"storage",$.onRequest);let K=typeof process<"u"?{}.MACRO_WEBHOOK_SECRET:void 0,G=$.webhookSecret??K;this.events=new X0(this,G)}hasActingUser(){return this.authConfig.type==="user"||this.requestedAs!==void 0}selfBot(){return this.selfBotRecord??=new BO(this).me().catch(($)=>{throw this.selfBotRecord=void 0,$}),this.selfBotRecord}myPrincipalId(){return this.selfPrincipal??=(this.authConfig.type==="bot"?this.selfBot().then(($)=>`bot|${$.id}`):M.me(this).then(($)=>$.id)).catch(($)=>{throw this.selfPrincipal=void 0,$}),this.selfPrincipal}makeClient($){let O=FO({baseUrl:$});return O.interceptors.request.use(async(x)=>{let j=await S7(this.authConfig,this.requestedAs,{hasBotScope:x.headers.has("x-macro-bot-scope")});for(let[S,K]of j)x.headers.set(S,K);return x}),O}}function G7($){if($.env)return $.env;let O=typeof process<"u"?{}.MACRO_ENV:void 0;if(!O)return"prod";if(!(O in Z0))throw Error(`invalid MACRO_ENV "${O}" — expected local, dev, or prod`);return O}function Z7($){if($.auth)return $.auth;if($.token)return{type:"user",token:$.token};let O=typeof process<"u"?{}.MACRO_API_KEY:void 0,x=typeof process<"u"?{}.MACRO_BOT_TOKEN:void 0;if(O&&x)throw Error("both MACRO_API_KEY and MACRO_BOT_TOKEN are set — pass auth to new Macro() to pick one");if(x)return{type:"bot",token:x};return{type:"user",token:O??(()=>{throw Error("no Macro credential. Set MACRO_API_KEY (API key or bearer token) or MACRO_BOT_TOKEN, or pass token/auth to new Macro().")})}}class kS{agentSessions;ai;bots;calendar;calls;channels;chats;crm;databases;documents;email;favorites;foreignEntities;forms;notifications;pins;projects;properties;tasks;teams;users;webhooks;workspace;events;webAppUrl;_client;opts;constructor($){this.opts=$;let O=new Q0($);this._client=O,this.agentSessions=new mx(O),this.ai=new cx(O),this.bots=new BO(O),this.calendar=new dx(O),this.calls=new ux(O),this.channels=new rx(O),this.chats=new px(O),this.crm=new ax(O),this.databases=new jj(O),this.documents=new Sj(O),this.email=new Gj(O),this.favorites=new Zj(O),this.foreignEntities=new Xj(O),this.forms=new Kj(O),this.notifications=new Yj(O),this.pins=new Qj(O),this.projects=new Jj(O),this.properties=new Vj(O),this.tasks=new Wj(O),this.teams=new Bj(O),this.users=new Lj(O),this.webhooks=new Nj(O),this.workspace=new Tj(O),this.events=O.events,this.webAppUrl=O.webAppUrl}myPrincipalId(){return this._client.myPrincipalId()}requestedAs($){return new kS({...this.opts,requestedAs:$.id})}}export{b$ as wrapXml,e as toBody,O7 as observeRequests,vS as msg,hS as here,Z$ as SessionReview,vx as ReviewItem,xj as MacroOpRefusedError,kS as Macro,f$ as FormSection,e$ as FormResponse,mO as FormReference,q$ as FormQuestion,n$ as FormOption,D$ as Form,WO as CodeExecution};diff --git a/crates/crm/src/outbound/lookup/test/message_store.rs b/crates/crm/src/outbound/lookup/test/message_store.rsindex 74c9e23e7d..0682306e16 100644--- a/crates/crm/src/outbound/lookup/test/message_store.rs+++ b/crates/crm/src/outbound/lookup/test/message_store.rs@@ -224,6 +224,7 @@ async fn crm_discussion_lifecycle_cascades_on_company_deletion(pool: PgPool) {&& !residual.mentions);let late = CreateMessage {+ guest_name: None,canonical_root_id: None,parent: company,actor: USER.to_owned().try_into().unwrap(),diff --git a/crates/documents/src/domain/comments/test.rs b/crates/documents/src/domain/comments/test.rsindex f727f1c14a..b85ca20bf4 100644--- a/crates/documents/src/domain/comments/test.rs+++ b/crates/documents/src/domain/comments/test.rs@@ -44,6 +44,7 @@ fn message(n: u128, root: Option<u128>, content: &str) -> Message {parent: MessageParent::parse("document", DOCUMENT).unwrap(),thread_id: root.map(id),sender_id: ChannelSender::new_from_user(user()),+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],diff --git a/crates/documents/src/inbound/toolset/comment_test.rs b/crates/documents/src/inbound/toolset/comment_test.rsindex 4c01f7c83b..b0b6ae6dc7 100644--- a/crates/documents/src/inbound/toolset/comment_test.rs+++ b/crates/documents/src/inbound/toolset/comment_test.rs@@ -71,6 +71,7 @@ impl FakeMessages {.comment_author.clone().expect("test configured a stored comment"),+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],@@ -184,6 +185,7 @@ impl MessageCommands for FakeMessages {bot_id::MACRO_AI_BOT_ID.into_storage_id().to_string(),).unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],diff --git a/crates/macro_db_client/migrations/20261019164038_call_chat_guest_authors.sql b/crates/macro_db_client/migrations/20261019164038_call_chat_guest_authors.sqlnew file mode 100644index 0000000000..3eaaf2abfe--- /dev/null+++ b/crates/macro_db_client/migrations/20261019164038_call_chat_guest_authors.sql@@ -0,0 +1,12 @@+SET LOCAL lock_timeout = '5s';++ALTER TABLE comms_messages ADD COLUMN guest_name text;++-- Guest attribution is only meaningful on call conversations. Existing writers+-- omit the nullable name; validation of historical rows can run separately.+ALTER TABLE comms_messages ADD CONSTRAINT comms_messages_guest_author+CHECK (+ (guest_name IS NULL AND sender_id NOT LIKE 'guest|%')+ OR (parent_entity_type = 'call' AND sender_id LIKE 'guest|%'+ AND guest_name IS NOT NULL AND length(guest_name) BETWEEN 1 AND 80)+) NOT VALID;diff --git a/crates/macro_db_client/src/annotations/create_anchor/test.rs b/crates/macro_db_client/src/annotations/create_anchor/test.rsindex ebff04b33c..05d1a85f12 100644--- a/crates/macro_db_client/src/annotations/create_anchor/test.rs+++ b/crates/macro_db_client/src/annotations/create_anchor/test.rs@@ -28,6 +28,7 @@ async fn standalone_highlight_remains_unthreaded_until_a_message_attaches_it(poolet repo = messages::outbound::pg_message_repo::PgMessageRepository::new(pool.clone());let root = repo.create(CreateMessage {+ guest_name: None,canonical_root_id: None,parent: MessageParent::parse("document", "document-with-comments").unwrap(),actor: "macro|[email protected]".to_owned().try_into().unwrap(),diff --git a/crates/mention_utils/src/parse.rs b/crates/mention_utils/src/parse.rsindex 739bae01ac..c9408117ad 100644--- a/crates/mention_utils/src/parse.rs+++ b/crates/mention_utils/src/parse.rs@@ -1,6 +1,5 @@use bot_id::BotIdStr;use channel_sender::ChannelSender;-use either::Either;use nom::{Finish, IResult, Parser,branch::alt,@@ -468,9 +467,12 @@ impl XmlFormatter for PlainTextFormatter {}fn format_user(user: &ParsedUserMention<'_>, f: &mut Formatter<'_>) -> std::fmt::Result {- match &user.user_id.0 {- Either::Left(bot) => write!(f, "{}", user.bot_display_name(bot)),- Either::Right(r) => write!(f, "{}", r.email_part().as_ref()),+ if let Some(bot) = user.user_id.as_bot() {+ write!(f, "{}", user.bot_display_name(bot))+ } else if let Some(account) = user.user_id.as_user() {+ write!(f, "{}", account.email_part().as_ref())+ } else {+ write!(f, "Guest")}}diff --git a/crates/messages/AGENTS.md b/crates/messages/AGENTS.mdindex 6c8eb4d98d..9ff6e49ab5 100644--- a/crates/messages/AGENTS.md+++ b/crates/messages/AGENTS.md@@ -15,6 +15,8 @@ they need.- `src/domain/api.rs`: `MessageServiceApi`, the boundary HTTP/agents/channeladapters call through.- `src/inbound/axum_router.rs`: the HTTP surface (feature `inbound`).+- `src/domain/service/guest_chat.rs` + `src/inbound/guest_chat.rs`: live guest+ call discussions; the call domain verifies RTC credentials and membership.- `src/outbound/pg_message_repo.rs` + `pg_discussion_context.rs`: Postgresadapters (feature `outbound`).- `src/outbound/connection_gateway.rs`, `notification_sender.rs`, `broker.rs`:diff --git a/crates/messages/Cargo.toml b/crates/messages/Cargo.tomlindex 4985871cdb..422ccc678f 100644--- a/crates/messages/Cargo.toml+++ b/crates/messages/Cargo.toml@@ -21,6 +21,8 @@ delivery = []inbound = ["dep:axum",+ "dep:ip_extractor",+ "dep:rate_limit","dep:macro_authorization","entity_access/inbound","ports",@@ -36,6 +38,8 @@ test-utils = ["dep:mockall", "ports"]activity = { path = "../activity", default-features = false }async-trait = { workspace = true, optional = true }axum = { workspace = true, optional = true }+ip_extractor = { path = "../ip_extractor", optional = true }+rate_limit = { path = "../rate_limit", features = ["axum"], optional = true }futures = { workspace = true, optional = true }bot_id = { path = "../bot_id" }channel_sender = { path = "../channel_sender" }diff --git a/crates/messages/src/domain/delivery/test.rs b/crates/messages/src/domain/delivery/test.rsindex ac82ab0f39..cda3fbdc1f 100644--- a/crates/messages/src/domain/delivery/test.rs+++ b/crates/messages/src/domain/delivery/test.rs@@ -77,6 +77,7 @@ fn event() -> MessageEvent {sender_id: actor.clone().try_into().unwrap(),bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: None,triggered_by: None,content: "A private discussion".into(),diff --git a/crates/messages/src/domain/models.rs b/crates/messages/src/domain/models.rsindex 4141f199b6..3fbad9d903 100644--- a/crates/messages/src/domain/models.rs+++ b/crates/messages/src/domain/models.rs@@ -447,6 +447,9 @@ pub struct Message {#[cfg_attr(feature = "schema", schema(value_type = String))]#[cfg_attr(feature = "json-schema", schemars(with = "String"))]pub sender_id: ChannelSender<'static>,+ /// Display name of a verified call guest, retained after the call ends.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub guest_name: Option<String>,/// Original external author, when imported.pub imported_author: Option<ImportedAuthor>,/// Public bot name and avatar for rendering shared message authors.diff --git a/crates/messages/src/domain/ports.rs b/crates/messages/src/domain/ports.rsindex 1370217229..5333f315e8 100644--- a/crates/messages/src/domain/ports.rs+++ b/crates/messages/src/domain/ports.rs@@ -163,6 +163,8 @@ pub struct CreateMessage {pub parent: MessageParent,/// Verified actor.pub actor: ChannelSender<'static>,+ /// Server-verified guest display name; absent for account authors.+ pub guest_name: Option<String>,/// User who triggered a bot message, if applicable.pub triggered_by: Option<String>,/// Parsed message input.diff --git a/crates/messages/src/domain/service.rs b/crates/messages/src/domain/service.rsindex 79de613e5f..b8a5b379c7 100644--- a/crates/messages/src/domain/service.rs+++ b/crates/messages/src/domain/service.rs@@ -11,6 +11,9 @@ use uuid::Uuid;mod test;mod timeline;+/// Call-scoped guest conversation use cases.+pub mod guest_chat;+/// Minimum view permission for any supported message parent.#[derive(Debug, Clone, Copy)]pub struct MessageView;@@ -376,6 +379,7 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {canonical_root_id,parent: parent.clone(),actor: actor.clone(),+ guest_name: None,triggered_by: access.acting_user_id().filter(|_| {diff --git a/crates/messages/src/domain/service/guest_chat.rs b/crates/messages/src/domain/service/guest_chat.rsnew file mode 100644index 0000000000..64aefed00b--- /dev/null+++ b/crates/messages/src/domain/service/guest_chat.rs@@ -0,0 +1,205 @@+//! Guests share the persisted call thread through a narrowly scoped session capability.+use super::*;+use chrono::{DateTime, Utc};+use macro_user_id::email::ReadEmailParts;+use std::sync::Arc;++/// Identity returned only after verifying an active guest's call session.+pub struct GuestCallAccess {+ /// Server-minted guest identity, distinct from account and bot principals.+ pub guest_id: Uuid,+ /// Verified room display name.+ pub name: String,+}++/// The call domain owns token validation and current membership policy.+#[async_trait::async_trait]+pub trait GuestCallAuthorizer: Send + Sync + 'static {+ /// Reject invalid/expired credentials, other rooms, and departed guests.+ async fn authorize(&self, call_id: Uuid, token: &str) -> Result<GuestCallAccess, MessageError>;+}++/// Guest-safe message projection: no account identities, attachments, or entity grants.+#[derive(serde::Serialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+pub struct GuestChatMessage {+ /// Persisted message identity.+ pub id: Uuid,+ /// Display-only author name.+ pub name: String,+ /// Whether the author is a guest.+ pub guest: bool,+ /// Whether this session authored the message.+ pub is_you: bool,+ /// Message body.+ pub content: String,+ /// Creation time.+ pub created_at: DateTime<Utc>,+}++/// Messages in the call's one discussion, oldest first.+#[derive(serde::Serialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+pub struct GuestChatPage {+ /// Visible, nondeleted messages.+ pub messages: Vec<GuestChatMessage>,+}++/// Guests may send text only; attribution and parent are server-owned.+#[derive(serde::Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[serde(deny_unknown_fields)]+pub struct GuestChatPost {+ /// UUIDv7 used to deduplicate retries, including the first message.+ pub id: Uuid,+ /// Text to append to the call discussion.+ pub content: String,+}++/// Guest conversation boundary for HTTP adapters.+#[async_trait::async_trait]+pub trait GuestChatApi: Send + Sync + 'static {+ /// Read the current call discussion under a live guest credential.+ async fn read(&self, call_id: Uuid, token: &str) -> Result<GuestChatPage, MessageError>;+ /// Persist and deliver a guest message under the same credential.+ async fn post(+ &self,+ call_id: Uuid,+ token: &str,+ input: GuestChatPost,+ ) -> Result<GuestChatMessage, MessageError>;+}++/// Reuses the same message store and delivery pipeline as signed-in participants.+pub struct GuestChatService<R, E> {+ messages: Arc<MessageService<R, E>>,+ access: Arc<dyn GuestCallAuthorizer>,+}++impl<R, E> GuestChatService<R, E> {+ /// Compose with the owning call service and existing message service.+ pub fn new(messages: Arc<MessageService<R, E>>, access: Arc<dyn GuestCallAuthorizer>) -> Self {+ Self { messages, access }+ }+}++fn project(message: Message, actor: &ChannelSender<'_>) -> GuestChatMessage {+ let name = message+ .guest_name+ .or_else(|| message.imported_author.map(|author| author.name))+ .or_else(|| message.bot_profile.map(|bot| bot.name))+ .or_else(|| {+ message+ .sender_id+ .as_user()+ .map(|user| user.email_part().local_part().to_owned())+ })+ .unwrap_or_else(|| "Participant".to_owned());+ GuestChatMessage {+ id: message.id,+ name,+ guest: message.sender_id.is_guest(),+ is_you: message.sender_id == *actor,+ content: message.content,+ created_at: message.created_at,+ }+}++#[async_trait::async_trait]+impl<R: MessageRepository, E: MessageEventPublisher> GuestChatApi for GuestChatService<R, E> {+ #[tracing::instrument(err, skip_all, fields(%call_id))]+ async fn read(&self, call_id: Uuid, token: &str) -> Result<GuestChatPage, MessageError> {+ let access = self.access.authorize(call_id, token).await?;+ let actor = ChannelSender::new_from_guest(access.guest_id);+ let parent = MessageParent::Call(call_id);+ let Some(state) = self.messages.repo.thread(&parent, call_id).await? else {+ return Ok(GuestChatPage { messages: vec![] });+ };+ if state.deleted_at.is_some() {+ return Err(MessageError::NotFound);+ }+ let root = self.messages.repo.get(&parent, call_id).await?;+ let replies = self.messages.repo.replies(&parent, call_id).await?;+ Ok(GuestChatPage {+ messages: root+ .into_iter()+ .chain(replies)+ .filter(|message| message.deleted_at.is_none())+ .map(|message| project(message, &actor))+ .collect(),+ })+ }++ #[tracing::instrument(err, skip_all, fields(%call_id))]+ async fn post(+ &self,+ call_id: Uuid,+ token: &str,+ input: GuestChatPost,+ ) -> Result<GuestChatMessage, MessageError> {+ let access = self.access.authorize(call_id, token).await?;+ validate_client_id(input.id, Utc::now())?;+ if input.content.trim().is_empty() || input.content.chars().count() > 16_000 {+ return Err(MessageError::Invalid(+ "Enter a message of at most 16000 characters",+ ));+ }+ let parent = MessageParent::Call(call_id);+ let actor = ChannelSender::new_from_guest(access.guest_id);+ if let Some(message) = self+ .messages+ .repo+ .get_by_client_message_id(&parent, &actor, input.id)+ .await?+ {+ return Ok(project(message, &actor));+ }+ let result = self+ .messages+ .repo+ .create(CreateMessage {+ canonical_root_id: Some(call_id),+ parent: parent.clone(),+ actor: actor.clone(),+ guest_name: Some(access.name),+ triggered_by: None,+ input: PostMessage {+ id: Some(input.id),+ content: input.content,+ thread_id: None,+ anchor: None,+ mentions: vec![],+ attachments: vec![],+ nonce: None,+ attribution: MessageAttribution::default(),+ notification_policy: PostMessageNotificationPolicy::default(),+ },+ })+ .await;+ let message = match result {+ Err(MessageError::Conflict) => {+ return self+ .messages+ .repo+ .get_by_client_message_id(&parent, &actor, input.id)+ .await?+ .map(|message| project(message, &actor))+ .ok_or(MessageError::Conflict);+ }+ result => result?,+ };+ self.messages+ .publish(MessageEvent {+ parent,+ actor: actor.as_ref().to_owned(),+ nonce: None,+ change: MessageChange::Posted {+ notification_policy: PostMessageNotificationPolicy::default(),+ message: message.clone(),+ mentions: vec![],+ },+ })+ .await;+ Ok(project(message, &actor))+ }+}diff --git a/crates/messages/src/domain/service/test.rs b/crates/messages/src/domain/service/test.rsindex 55b2138d5b..61be35ab5e 100644--- a/crates/messages/src/domain/service/test.rs+++ b/crates/messages/src/domain/service/test.rs@@ -5,6 +5,7 @@ use std::sync::{Arc, Mutex};mod call_retries;mod event_posts;+mod guest_chat;mod initiative;#[derive(Clone)]@@ -149,6 +150,7 @@ impl MessageRepository for Repo {message.id = command.input.id.unwrap_or(message.id);message.parent = command.parent.clone();message.sender_id = command.actor.clone();+ message.guest_name = command.guest_name.clone();message.content = command.input.content.clone();message.mentions = command.input.mentions.clone();message.triggered_by = command.triggered_by.clone();@@ -248,6 +250,7 @@ fn fixture() -> Repo {sender_id: ChannelSender::try_from(user.to_owned()).unwrap(),bot_profile: None,mentions: vec![],+ guest_name: None,imported_author: Some(ImportedAuthor {name: "External PDF author".into(),}),@@ -290,6 +293,7 @@ fn reply_from(root: &Message, id: u128, sender: &str) -> Message {id: Uuid::from_u128(id),thread_id: Some(root.id),sender_id: ChannelSender::try_from(sender.to_owned()).unwrap(),+ guest_name: None,imported_author: None,content: "reply".into(),..root.clone()diff --git a/crates/messages/src/domain/service/test/guest_chat.rs b/crates/messages/src/domain/service/test/guest_chat.rsnew file mode 100644index 0000000000..1e02662158--- /dev/null+++ b/crates/messages/src/domain/service/test/guest_chat.rs@@ -0,0 +1,136 @@+use super::*;+use crate::domain::service::guest_chat::*;++struct Authorizer {+ call: Uuid,+ guest: Uuid,+}+#[async_trait::async_trait]+impl GuestCallAuthorizer for Authorizer {+ async fn authorize(&self, call: Uuid, token: &str) -> Result<GuestCallAccess, MessageError> {+ if call != self.call || token != "active-session" {+ return Err(MessageError::Forbidden);+ }+ Ok(GuestCallAccess {+ guest_id: self.guest,+ name: "Visitor".into(),+ })+ }+}+fn setup() -> (Repo, Events, GuestChatService<Repo, Events>, Uuid, Uuid) {+ let mut repo = fixture();+ let call = Uuid::now_v7();+ let guest = Uuid::now_v7();+ repo.message.id = call;+ repo.message.parent = MessageParent::Call(call);+ repo.message.imported_author = None;+ repo.state.root_id = call;+ let events = Events::default();+ let service = GuestChatService::new(+ Arc::new(MessageService::new(repo.clone(), events.clone())),+ Arc::new(Authorizer { call, guest }),+ );+ (repo, events, service, call, guest)+}++#[tokio::test]+async fn guest_read_and_post_require_current_session_for_the_same_call() {+ let (repo, events, service, call, _) = setup();+ for (call_id, token) in [(call, "expired"), (Uuid::now_v7(), "active-session")] {+ assert!(matches!(+ service.read(call_id, token).await,+ Err(MessageError::Forbidden)+ ));+ assert!(matches!(+ service+ .post(+ call_id,+ token,+ GuestChatPost {+ id: Uuid::now_v7(),+ content: "Hello".into()+ }+ )+ .await,+ Err(MessageError::Forbidden)+ ));+ }+ assert!(repo.creates.lock().unwrap().is_empty());+ assert!(events.0.lock().unwrap().is_empty());+}++#[tokio::test]+async fn guest_reads_the_member_thread_and_posts_with_server_owned_attribution() {+ let (repo, events, service, call, guest) = setup();+ let page = service.read(call, "active-session").await.unwrap();+ assert_eq!(page.messages.len(), 1);+ assert_eq!(page.messages[0].content, "root");+ assert_eq!(page.messages[0].name, "author");+ assert!(!page.messages[0].is_you);+ let message = service+ .post(+ call,+ "active-session",+ GuestChatPost {+ id: Uuid::now_v7(),+ content: "Hello".into(),+ },+ )+ .await+ .unwrap();+ assert_eq!(message.name, "Visitor");+ assert!(message.guest && message.is_you);+ let writes = repo.creates.lock().unwrap();+ assert_eq!(writes[0].canonical_root_id, Some(call));+ assert_eq!(writes[0].parent, MessageParent::Call(call));+ assert_eq!(writes[0].actor, ChannelSender::new_from_guest(guest));+ assert!(writes[0].input.mentions.is_empty());+ assert!(writes[0].input.attachments.is_empty());+ assert_eq!(events.0.lock().unwrap().len(), 1);+}++#[tokio::test]+async fn guest_retries_recover_the_original_without_publishing_again() {+ let (mut repo, events, _, call, guest) = setup();+ let id = Uuid::now_v7();+ repo.client_message_id = Some(id);+ repo.message.sender_id = ChannelSender::new_from_guest(guest);+ repo.message.guest_name = Some("Visitor".into());+ let service = GuestChatService::new(+ Arc::new(MessageService::new(repo.clone(), events.clone())),+ Arc::new(Authorizer { call, guest }),+ );+ let message = service+ .post(+ call,+ "active-session",+ GuestChatPost {+ id,+ content: "Retry".into(),+ },+ )+ .await+ .unwrap();+ assert_eq!(message.id, call);+ assert!(repo.creates.lock().unwrap().is_empty());+ assert!(events.0.lock().unwrap().is_empty());+}++#[tokio::test]+async fn guest_posts_reject_empty_oversize_and_invalid_ids() {+ let (repo, _, service, call, _) = setup();+ for (id, content) in [+ (Uuid::now_v7(), " ".into()),+ (Uuid::now_v7(), "x".repeat(16001)),+ (Uuid::nil(), "hello".into()),+ ] {+ assert!(matches!(+ service+ .post(call, "active-session", GuestChatPost { id, content })+ .await,+ Err(MessageError::Invalid(_))+ ));+ }+ assert!(repo.creates.lock().unwrap().is_empty());+ assert!(serde_json::from_value::<GuestChatPost>(serde_json::json!({"id": Uuid::now_v7(), "content": "hello", "sender_id": "macro|[email protected]"})).is_err());+}diff --git a/crates/messages/src/domain/service/timeline/test.rs b/crates/messages/src/domain/service/timeline/test.rsindex 09ab4feb75..8266c7b622 100644--- a/crates/messages/src/domain/service/timeline/test.rs+++ b/crates/messages/src/domain/service/timeline/test.rs@@ -16,6 +16,7 @@ fn message(id: u128) -> MessageListItem {let id = Uuid::from_u128(id);MessageListItem {message: Message {+ guest_name: None,id,parent: MessageParent::Channel(Uuid::from_u128(100)),thread_id: None,diff --git a/crates/messages/src/inbound/axum_router.rs b/crates/messages/src/inbound/axum_router.rsindex 53d5a199fd..376bd56c10 100644--- a/crates/messages/src/inbound/axum_router.rs+++ b/crates/messages/src/inbound/axum_router.rs@@ -149,6 +149,8 @@ pub struct ParentPath {}/// HTTP failure mapping; business decisions are made by the domain service.+#[derive(Debug, thiserror::Error)]+#[error(transparent)]pub struct MessageHttpError(MessageError);impl From<MessageError> for MessageHttpError {fn from(value: MessageError) -> Self {diff --git a/crates/messages/src/inbound/guest_chat.rs b/crates/messages/src/inbound/guest_chat.rsnew file mode 100644index 0000000000..5317c94947--- /dev/null+++ b/crates/messages/src/inbound/guest_chat.rs@@ -0,0 +1,97 @@+//! Thin guest HTTP adapters; the call and message domains own authorization.+use super::axum_router::MessageHttpError;+use crate::domain::ports::MessageError;+use crate::domain::service::guest_chat::{+ GuestChatApi, GuestChatMessage, GuestChatPage, GuestChatPost,+};+use axum::{+ Json, RequestPartsExt, Router,+ extract::{FromRequestParts, Path, State},+ http::{HeaderMap, header::AUTHORIZATION},+ routing::get,+};+use ip_extractor::ClientIp;+use rate_limit::{+ RateLimitConfig, RateLimitKey, RateLimitService,+ inbound::{RateLimitExtractable, RateLimitExtractor},+};+use std::{sync::Arc, time::Duration};+use uuid::Uuid;++/// Per-IP guest chat budget, separate from joining and leaving calls.+pub struct GuestChatBudget(ClientIp);+impl<S: Send + Sync> RateLimitExtractable<S> for GuestChatBudget {+ fn config() -> RateLimitConfig {+ RateLimitConfig {+ // Twenty open guest chats poll 24,000 times/hour behind one NAT;+ // leave headroom for sends, retries, and opening the panel.+ max_count: 30_000,+ window: Duration::from_mins(60),+ }+ }+ fn key(&self) -> RateLimitKey {+ RateLimitKey::builder(&"per-ip-guest-call-chat")+ .append(&self.0.origin_ip())+ .finish()+ }+}+impl<S: Send + Sync> FromRequestParts<S> for GuestChatBudget {+ type Rejection = <ClientIp as FromRequestParts<S>>::Rejection;+ async fn from_request_parts(+ parts: &mut axum::http::request::Parts,+ state: &S,+ ) -> Result<Self, Self::Rejection> {+ Ok(Self(parts.extract_with_state(state).await?))+ }+}+async fn limit<R: RateLimitService + Clone + Send + Sync + 'static>(+ _permit: RateLimitExtractor<GuestChatBudget, R>,+ request: axum::extract::Request,+ next: axum::middleware::Next,+) -> axum::response::Response {+ next.run(request).await+}++/// Mounted outside account auth; every request verifies an RTC guest credential.+pub fn router<R, S>(service: Arc<dyn GuestChatApi>, limiter: R) -> Router<S>+where+ R: RateLimitService + Clone + Send + Sync + 'static,+ S: Clone + Send + Sync + 'static,+{+ Router::new()+ .route("/{call_id}", get(read).post(post))+ .layer(axum::middleware::from_fn_with_state(limiter, limit::<R>))+ .with_state(service)+}++fn bearer(headers: &HeaderMap) -> Result<&str, MessageHttpError> {+ headers+ .get(AUTHORIZATION)+ .and_then(|value| value.to_str().ok())+ .and_then(|value| value.strip_prefix("Bearer "))+ .filter(|token| !token.is_empty())+ .ok_or_else(|| MessageError::Forbidden.into())+}++/// Read the live call discussion as a verified guest.+#[utoipa::path(get, operation_id = "guest_call_chat_read", path = "/call/guest-chat/{call_id}", params(("call_id" = Uuid, Path)), responses((status = 200, body = GuestChatPage), (status = 403)))]+#[tracing::instrument(err, skip_all)]+pub async fn read(+ State(service): State<Arc<dyn GuestChatApi>>,+ Path(call_id): Path<Uuid>,+ headers: HeaderMap,+) -> Result<Json<GuestChatPage>, MessageHttpError> {+ Ok(Json(service.read(call_id, bearer(&headers)?).await?))+}++/// Append text to the same saved discussion used by account participants.+#[utoipa::path(post, operation_id = "guest_call_chat_post", path = "/call/guest-chat/{call_id}", params(("call_id" = Uuid, Path)), request_body = GuestChatPost, responses((status = 200, body = GuestChatMessage), (status = 403)))]+#[tracing::instrument(err, skip_all)]+pub async fn post(+ State(service): State<Arc<dyn GuestChatApi>>,+ Path(call_id): Path<Uuid>,+ headers: HeaderMap,+ Json(input): Json<GuestChatPost>,+) -> Result<Json<GuestChatMessage>, MessageHttpError> {+ Ok(Json(service.post(call_id, bearer(&headers)?, input).await?))+}diff --git a/crates/messages/src/inbound/mod.rs b/crates/messages/src/inbound/mod.rsindex 872b3438b1..25d3957d93 100644--- a/crates/messages/src/inbound/mod.rs+++ b/crates/messages/src/inbound/mod.rs@@ -1,2 +1,4 @@/// Parent-scoped message HTTP API.pub mod axum_router;+/// RTC-authenticated guest access to a call's discussion.+pub mod guest_chat;diff --git a/crates/messages/src/outbound/broker/test.rs b/crates/messages/src/outbound/broker/test.rsindex 177be522d7..d7c6dc1668 100644--- a/crates/messages/src/outbound/broker/test.rs+++ b/crates/messages/src/outbound/broker/test.rs@@ -47,6 +47,7 @@ fn reply(parent: MessageParent, attachments: Vec<MessageAttachment>) -> Messageparent,thread_id: Some(ROOT),sender_id: SENDER.to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: vec![],diff --git a/crates/messages/src/outbound/pg_message_repo.rs b/crates/messages/src/outbound/pg_message_repo.rsindex 7e3d811815..35b4a4807b 100644--- a/crates/messages/src/outbound/pg_message_repo.rs+++ b/crates/messages/src/outbound/pg_message_repo.rs@@ -27,6 +27,7 @@ struct StoredMessage {parent_entity_id: String,thread_id: Option<Uuid>,sender_id: String,+ guest_name: Option<String>,imported_author: Option<String>,triggered_by_user_id: Option<String>,content: String,@@ -257,6 +258,7 @@ impl PgMessageRepository {.try_into().map_err(|e| MessageError::Repository(rootcause::Report::new(e).into()))?,imported_author: r.imported_author.map(|name| ImportedAuthor { name }),+ guest_name: r.guest_name,triggered_by: r.triggered_by_user_id,content: if deleted { String::new() } else { r.content },created_at: r.created_at,@@ -739,8 +741,8 @@ impl MessageRepository for PgMessageRepository {}sqlx::query!(r#"INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,- sender_id, triggered_by_user_id, content, client_message_id)- VALUES ($1, $2, $3, $4, $5, $6, $7, $8)"#,+ sender_id, triggered_by_user_id, content, client_message_id, guest_name)+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)"#,id,command.parent.entity_type(),command.parent.entity_id(),@@ -749,6 +751,7 @@ impl MessageRepository for PgMessageRepository {command.triggered_by,command.input.content,command.canonical_root_id.and(command.input.id),+ command.guest_name,).execute(&mut *tx).awaitdiff --git a/crates/messages/src/outbound/pg_message_repo/test.rs b/crates/messages/src/outbound/pg_message_repo/test.rsindex 56c673c6ef..fea1520f85 100644--- a/crates/messages/src/outbound/pg_message_repo/test.rs+++ b/crates/messages/src/outbound/pg_message_repo/test.rs@@ -32,6 +32,7 @@ async fn setup(pool: &PgPool) {fn command(document: &str, root: Option<Uuid>, content: &str) -> CreateMessage {CreateMessage {+ guest_name: None,canonical_root_id: None,parent: MessageParent::parse("document", document).unwrap(),actor: USER.to_owned().try_into().unwrap(),@@ -1538,6 +1539,37 @@ async fn concurrent_first_call_messages_share_one_thread(pool: PgPool) {);}+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]+async fn guests_and_members_share_the_persisted_call_discussion(pool: PgPool) {+ let call_id = setup_call_chat(&pool).await;+ let repo = PgMessageRepository::new(pool);+ let mut guest = call_message(call_id, "Hello from the guest");+ let sender = ChannelSender::new_from_guest(Uuid::now_v7());+ guest.actor = sender.clone();+ guest.guest_name = Some("Visitor".into());+ let root = repo.create(guest).await.unwrap();+ let reply = repo+ .create(call_message(call_id, "Hello from the member"))+ .await+ .unwrap();+ assert_eq!(root.id, call_id);+ assert_eq!(reply.thread_id, Some(call_id));+ let stored = repo+ .get(&MessageParent::Call(call_id), call_id)+ .await+ .unwrap()+ .unwrap();+ assert_eq!(stored.sender_id, sender);+ assert_eq!(stored.guest_name.as_deref(), Some("Visitor"));+ assert_eq!(+ repo.replies(&MessageParent::Call(call_id), call_id)+ .await+ .unwrap()+ .len(),+ 1+ );+}+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]async fn call_chat_survives_archiving_and_is_removed_with_the_record(pool: PgPool) {let call_id = setup_call_chat(&pool).await;diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex 1c8240c5d6..7778e71706 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -94,7 +94,8 @@ For local verification, set `VITE_ENABLE_QUICK_CALLS=true` or `false` explicitlyDuring a quick or scheduled call, signed-in participants can open **Call chat**from its separate button at the far right of the bottom toolbar. Messages persistwith that call session and are visible in its recording page after it ends.-Guests do not see chat. The `@` menu includes Macro and available agents;+Guests can open the same call discussion and read and send text while connected;+their messages show their name with **(Guest)**. The signed-in composer’s `@` menu includes Macro and available agents;mentioning one invokes it in the call thread. Reply on any live message, includingyour own, quotes it in the bottom composer. Verify the reply preserves a draft,an agent reply appears, and messages remain in the saved history; starting adiff --git a/docs/agent-guide/calls.md b/docs/agent-guide/calls.mdindex 8eff5ce81f..4e89a5a850 100644--- a/docs/agent-guide/calls.md+++ b/docs/agent-guide/calls.md@@ -118,7 +118,7 @@ in the background, so the next call does not wait for that room to be deleted.It keeps its label and shows a checkmark for a few seconds after copying, thenrestores the copy icon.-Guest access is limited to the call room; joining does not expose the channel or grant+Guest access is limited to the call room and its live text discussion; joining does not expose the channel or grantanonymous access to saved transcripts and recordings. Guest names are preserved inthe host's call history. Signed-in attendees receive access to that session's savedcall without gaining access to the channel.diff --git a/docs/agent-guide/channels.md b/docs/agent-guide/channels.mdindex 74c8a2736b..e6fb9a936c 100644--- a/docs/agent-guide/channels.md+++ b/docs/agent-guide/channels.md@@ -1033,8 +1033,15 @@ and returns focus to the chat button; reopening preserves the draft and scrollposition. The call continues while chat is open or closed.Signed-in participants in channel, quick, and scheduled calls use the same chat-panel. Guest meeting participants do not see chat because shared messages require-a Macro account. Each call session has one persistent message thread, using the+panel. Guests in quick and scheduled calls can also open chat and read and send+text without signing in. Guest authors appear as **Name (Guest)**. Their composer+uses Enter to send on desktop and the Send button on touch devices, preserves drafts on close, and+keeps failed messages available to retry. Guest chat refreshes while open and is+available only while that guest is connected to the call. Check a signed-in+participant and a guest exchanging messages in both directions, then verify the+guest loses access after leaving or after the call ends. Guest messages remain+in the saved call discussion. Each call session has one persistent message thread;+signed-in participants use theshared message composer, attachments, reactions, and message actions. The `@`menu offers Macro and available owned and team agents. Mention an agent and sendto invoke it in the call thread; follow-up mentions use the same thread. Replydiff --git a/packages/sdk-docs/reference/generated/storage/types.gen/README.md b/packages/sdk-docs/reference/generated/storage/types.gen/README.mdindex c791991725..77cddfb14b 100644--- a/packages/sdk-docs/reference/generated/storage/types.gen/README.md+++ b/packages/sdk-docs/reference/generated/storage/types.gen/README.md@@ -1203,6 +1203,17 @@- [GroupedSoupInitialPage](type-aliases/GroupedSoupInitialPage.md)- [GroupedSoupPage](type-aliases/GroupedSoupPage.md)- [GroupedSoupSort](type-aliases/GroupedSoupSort.md)+- [GuestCallChatPostData](type-aliases/GuestCallChatPostData.md)+- [GuestCallChatPostErrors](type-aliases/GuestCallChatPostErrors.md)+- [GuestCallChatPostResponse](type-aliases/GuestCallChatPostResponse.md)+- [GuestCallChatPostResponses](type-aliases/GuestCallChatPostResponses.md)+- [GuestCallChatReadData](type-aliases/GuestCallChatReadData.md)+- [GuestCallChatReadErrors](type-aliases/GuestCallChatReadErrors.md)+- [GuestCallChatReadResponse](type-aliases/GuestCallChatReadResponse.md)+- [GuestCallChatReadResponses](type-aliases/GuestCallChatReadResponses.md)+- [GuestChatMessage](type-aliases/GuestChatMessage.md)+- [GuestChatPage](type-aliases/GuestChatPage.md)+- [GuestChatPost](type-aliases/GuestChatPost.md)- [GuestId](type-aliases/GuestId.md)- [GuestJoinRequest](type-aliases/GuestJoinRequest.md)- [HandlerData](type-aliases/HandlerData.md)diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostData.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostData.mdnew file mode 100644index 0000000000..2283743657--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostData.md@@ -0,0 +1,13 @@+# Type Alias: GuestCallChatPostData++> **GuestCallChatPostData** = \{ `body`: [`GuestChatPost`](GuestChatPost.md); `path`: \{ `call_id`: `string`; \}; `query?`: `never`; `url`: `"/call/guest-chat/{call_id}"`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-body"></a> `body` | [`GuestChatPost`](GuestChatPost.md) |+| <a id="property-path"></a> `path` | \{ `call_id`: `string`; \} |+| `path.call_id` | `string` |+| <a id="property-query"></a> `query?` | `never` |+| <a id="property-url"></a> `url` | `"/call/guest-chat/{call_id}"` |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostErrors.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostErrors.mdnew file mode 100644index 0000000000..fe7b589706--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostErrors.md@@ -0,0 +1,9 @@+# Type Alias: GuestCallChatPostErrors++> **GuestCallChatPostErrors** = \{ `403`: `unknown`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-403"></a> `403` | `unknown` |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponse.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponse.mdnew file mode 100644index 0000000000..347a0e5406--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponse.md@@ -0,0 +1,3 @@+# Type Alias: GuestCallChatPostResponse++> **GuestCallChatPostResponse** = [`GuestCallChatPostResponses`](GuestCallChatPostResponses.md)\[keyof [`GuestCallChatPostResponses`](GuestCallChatPostResponses.md)\]diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponses.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponses.mdnew file mode 100644index 0000000000..dee5ba97c8--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatPostResponses.md@@ -0,0 +1,9 @@+# Type Alias: GuestCallChatPostResponses++> **GuestCallChatPostResponses** = \{ `200`: [`GuestChatMessage`](GuestChatMessage.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-200"></a> `200` | [`GuestChatMessage`](GuestChatMessage.md) |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadData.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadData.mdnew file mode 100644index 0000000000..b0e9151f52--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadData.md@@ -0,0 +1,13 @@+# Type Alias: GuestCallChatReadData++> **GuestCallChatReadData** = \{ `body?`: `never`; `path`: \{ `call_id`: `string`; \}; `query?`: `never`; `url`: `"/call/guest-chat/{call_id}"`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-body"></a> `body?` | `never` |+| <a id="property-path"></a> `path` | \{ `call_id`: `string`; \} |+| `path.call_id` | `string` |+| <a id="property-query"></a> `query?` | `never` |+| <a id="property-url"></a> `url` | `"/call/guest-chat/{call_id}"` |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadErrors.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadErrors.mdnew file mode 100644index 0000000000..9c6cf4ff8f--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadErrors.md@@ -0,0 +1,9 @@+# Type Alias: GuestCallChatReadErrors++> **GuestCallChatReadErrors** = \{ `403`: `unknown`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-403"></a> `403` | `unknown` |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponse.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponse.mdnew file mode 100644index 0000000000..5b5147470b--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponse.md@@ -0,0 +1,3 @@+# Type Alias: GuestCallChatReadResponse++> **GuestCallChatReadResponse** = [`GuestCallChatReadResponses`](GuestCallChatReadResponses.md)\[keyof [`GuestCallChatReadResponses`](GuestCallChatReadResponses.md)\]diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponses.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponses.mdnew file mode 100644index 0000000000..2b0034d062--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestCallChatReadResponses.md@@ -0,0 +1,9 @@+# Type Alias: GuestCallChatReadResponses++> **GuestCallChatReadResponses** = \{ `200`: [`GuestChatPage`](GuestChatPage.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-200"></a> `200` | [`GuestChatPage`](GuestChatPage.md) |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatMessage.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatMessage.mdnew file mode 100644index 0000000000..b750bad877--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatMessage.md@@ -0,0 +1,16 @@+# Type Alias: GuestChatMessage++> **GuestChatMessage** = \{ `content`: `string`; `created_at`: `string`; `guest`: `boolean`; `id`: `string`; `is_you`: `boolean`; `name`: `string`; \}++Guest-safe message projection: no account identities, attachments, or entity grants.++## Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-content"></a> `content` | `string` | Message body. |+| <a id="property-created_at"></a> `created_at` | `string` | Creation time. |+| <a id="property-guest"></a> `guest` | `boolean` | Whether the author is a guest. |+| <a id="property-id"></a> `id` | `string` | Persisted message identity. |+| <a id="property-is_you"></a> `is_you` | `boolean` | Whether this session authored the message. |+| <a id="property-name"></a> `name` | `string` | Display-only author name. |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPage.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPage.mdnew file mode 100644index 0000000000..6a2213082d--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPage.md@@ -0,0 +1,11 @@+# Type Alias: GuestChatPage++> **GuestChatPage** = \{ `messages`: [`GuestChatMessage`](GuestChatMessage.md)[]; \}++Messages in the call's one discussion, oldest first.++## Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-messages"></a> `messages` | [`GuestChatMessage`](GuestChatMessage.md)[] | Visible, nondeleted messages. |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPost.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPost.mdnew file mode 100644index 0000000000..80197204f7--- /dev/null+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/GuestChatPost.md@@ -0,0 +1,12 @@+# Type Alias: GuestChatPost++> **GuestChatPost** = \{ `content`: `string`; `id`: `string`; \}++Guests may send text only; attribution and parent are server-owned.++## Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-content"></a> `content` | `string` | Text to append to the call discussion. |+| <a id="property-id"></a> `id` | `string` | UUIDv7 used to deduplicate retries, including the first message. |diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/MeetingToken.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/MeetingToken.mdindex 34a9ca0f1b..0e536293f2 100644--- a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/MeetingToken.md+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/MeetingToken.md@@ -2,4 +2,5 @@> **MeetingToken** = `string`-A bearer capability that grants access only to a meeting's RTC room.+An invitation capability for joining a meeting's RTC room. Chat additionally+requires the resulting participant credential and current guest membership.diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Message.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Message.mdindex c3668283af..d310401ccd 100644--- a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Message.md+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Message.md@@ -1,6 +1,6 @@# Type Alias: Message-> **Message** = \{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \| `null`; `edited_at?`: `string` \| `null`; `id`: `string`; `imported_author?`: `null` \| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \| `null`; `triggered_by?`: `string` \| `null`; `updated_at`: `string`; \}+> **Message** = \{ `attachments`: [`MessageAttachment`](MessageAttachment.md)[]; `bot_profile?`: `null` \| [`BotSenderProfile`](BotSenderProfile.md); `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \| `null`; `edited_at?`: `string` \| `null`; `guest_name?`: `string` \| `null`; `id`: `string`; `imported_author?`: `null` \| [`ImportedAuthor`](ImportedAuthor.md); `mentions`: [`SimpleMention`](SimpleMention.md)[]; `parent`: [`MessageParent`](MessageParent.md); `reactions`: [`CountedReaction`](CountedReaction.md)[]; `sender_id`: `string`; `thread_id?`: `string` \| `null`; `triggered_by?`: `string` \| `null`; `updated_at`: `string`; \}Shared message representation for channel timelines and entity discussions.@@ -14,6 +14,7 @@ Shared message representation for channel timelines and entity discussions.| <a id="property-created_at"></a> `created_at` | `string` | Creation time. || <a id="property-deleted_at"></a> `deleted_at?` | `string` \| `null` | Message tombstone, independent of thread deletion. || <a id="property-edited_at"></a> `edited_at?` | `string` \| `null` | Last content edit, if any. |+| <a id="property-guest_name"></a> `guest_name?` | `string` \| `null` | Display name of a verified call guest, retained after the call ends. || <a id="property-id"></a> `id` | `string` | Message UUID. || <a id="property-imported_author"></a> `imported_author?` | `null` \| [`ImportedAuthor`](ImportedAuthor.md) | - || <a id="property-mentions"></a> `mentions` | [`SimpleMention`](SimpleMention.md)[] | Tracked mentions, retained when a caller changes attachments only. |diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.tsindex d186b09667..48c2f1a934 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-tsexport { type Options, Sdk } from './sdk.gen';-export type { 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, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, AgentTyping, AgentTypingPhase, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, 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, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, 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, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, 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, 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, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseOp, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, 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, 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, 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, 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, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, 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, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, 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, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, 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, 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, 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, GuestId, GuestJoinRequest, 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, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, 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, 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, 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, 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, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, 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, 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, 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, RequestedHarnessScope, RequestedLayout, RequestStatus, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveRequest, ResponseStatus, ResponseSummary, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, 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, 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, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, 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, 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, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, 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, 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, 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, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, Widget, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';+export type { 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, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, AgentTyping, AgentTypingPhase, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, 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, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, 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, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, 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, 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, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseOp, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, 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, 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, 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, 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, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, 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, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, 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, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, 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, 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, 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, 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, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, 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, 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, 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, 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, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, 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, 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, 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, RequestedHarnessScope, RequestedLayout, RequestStatus, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveRequest, ResponseStatus, ResponseSummary, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, 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, 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, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, 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, 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, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, 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, 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, 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, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, 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.tsindex 0642f69db8..145b09e463 100644--- a/packages/sdk/generated/storage/sdk.gen.ts+++ b/packages/sdk/generated/storage/sdk.gen.ts@@ -2,7 +2,7 @@import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, 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, AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CollaborateFormData, CollaborateFormErrors, CollaborateFormResponses, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponses, ConvertDatabaseColumnData, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponses, 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, 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, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, 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, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, 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, GetCrmPipelineTableData, GetCrmPipelineTableResponses, 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, 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, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, 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, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, 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, 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, PatchChannelData, PatchChannelErrors, PatchChannelResponses, 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, 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, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, 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, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, ShareCrmPipelineData, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, SubmitFormResponseData, SubmitFormResponseErrors, SubmitFormResponseResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, TrashCrmPipelineData, TrashCrmPipelineResponses, UndoDatabaseChangeData, UndoDatabaseChangeErrors, UndoDatabaseChangeResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponses, UpdateDatabasePermissionsData, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponses, UpdateFormData, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsErrors, UpdateFormPermissionsResponses, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } 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, AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CollaborateFormData, CollaborateFormErrors, CollaborateFormResponses, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponses, ConvertDatabaseColumnData, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponses, 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, 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, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, 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, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, 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, GetCrmPipelineTableData, GetCrmPipelineTableResponses, 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, 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, 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, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, 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, 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, PatchChannelData, PatchChannelErrors, PatchChannelResponses, 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, 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, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, 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, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, ShareCrmPipelineData, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, SubmitFormResponseData, SubmitFormResponseErrors, SubmitFormResponseResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, TrashCrmPipelineData, TrashCrmPipelineResponses, UndoDatabaseChangeData, UndoDatabaseChangeErrors, UndoDatabaseChangeResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponses, UpdateDatabasePermissionsData, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponses, UpdateFormData, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsErrors, UpdateFormPermissionsResponses, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } from './types.gen';export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {/**@@ -220,6 +220,27 @@ export class Sdk extends HeyApiClient {return (options?.client ?? this.client).get<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError>({ url: '/call/active', ...options });}+ /**+ * Read the live call discussion as a verified guest.+ */+ public guestCallChatRead<ThrowOnError extends boolean = false>(options: Options<GuestCallChatReadData, ThrowOnError>): RequestResult<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError>({ url: '/call/guest-chat/{call_id}', ...options });+ }++ /**+ * Append text to the same saved discussion used by account participants.+ */+ public guestCallChatPost<ThrowOnError extends boolean = false>(options: Options<GuestCallChatPostData, ThrowOnError>): RequestResult<GuestCallChatPostResponses, GuestCallChatPostErrors, ThrowOnError> {+ return (options.client ?? this.client).post<GuestCallChatPostResponses, GuestCallChatPostErrors, ThrowOnError>({+ url: '/call/guest-chat/{call_id}',+ ...options,+ headers: {+ 'Content-Type': 'application/json',+ ...options.headers+ }+ });+ }+/*** Handle `GET /call/join/{token}` through the call domain service.*/diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex 72ec67ba39..c8701c703b 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -7910,6 +7910,60 @@ export type GroupedSoupPage = (GroupedSoupInitialPage & {*/export type GroupedSoupSort = 'viewed_at' | 'created_at' | 'updated_at' | 'viewed_updated';+/**+ * Guest-safe message projection: no account identities, attachments, or entity grants.+ */+export type GuestChatMessage = {+ /**+ * Message body.+ */+ content: string;+ /**+ * Creation time.+ */+ created_at: string;+ /**+ * Whether the author is a guest.+ */+ guest: boolean;+ /**+ * Persisted message identity.+ */+ id: string;+ /**+ * Whether this session authored the message.+ */+ is_you: boolean;+ /**+ * Display-only author name.+ */+ name: string;+};++/**+ * Messages in the call's one discussion, oldest first.+ */+export type GuestChatPage = {+ /**+ * Visible, nondeleted messages.+ */+ messages: Array<GuestChatMessage>;+};++/**+ * Guests may send text only; attribution and parent are server-owned.+ */+export type GuestChatPost = {+ /**+ * Text to append to the call discussion.+ */+ content: string;+ /**+ * UUIDv7 used to deduplicate retries, including the first message.+ */+ id: string;+};+/*** A non-account guest of a single call session.*@@ -8815,7 +8869,8 @@ export type MeetingPreparation = {};/**- * A bearer capability that grants access only to a meeting's RTC room.+ * An invitation capability for joining a meeting's RTC room. Chat additionally+ * requires the resulting participant credential and current guest membership.*/export type MeetingToken = string;@@ -8854,6 +8909,10 @@ export type Message = {* Last content edit, if any.*/edited_at?: string | null;+ /**+ * Display name of a verified call guest, retained after the call ends.+ */+ guest_name?: string | null;/*** Message UUID.*/@@ -15372,6 +15431,44 @@ export type GetActiveCallsResponses = {export type GetActiveCallsResponse = GetActiveCallsResponses[keyof GetActiveCallsResponses];+export type GuestCallChatReadData = {+ body?: never;+ path: {+ call_id: string;+ };+ query?: never;+ url: '/call/guest-chat/{call_id}';+};++export type GuestCallChatReadErrors = {+ 403: unknown;+};++export type GuestCallChatReadResponses = {+ 200: GuestChatPage;+};++export type GuestCallChatReadResponse = GuestCallChatReadResponses[keyof GuestCallChatReadResponses];++export type GuestCallChatPostData = {+ body: GuestChatPost;+ path: {+ call_id: string;+ };+ query?: never;+ url: '/call/guest-chat/{call_id}';+};++export type GuestCallChatPostErrors = {+ 403: unknown;+};++export type GuestCallChatPostResponses = {+ 200: GuestChatMessage;+};++export type GuestCallChatPostResponse = GuestCallChatPostResponses[keyof GuestCallChatPostResponses];+export type MeetingLookupData = {body?: never;path: {diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex 5add8a3888..788707c4f6 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -999,6 +999,80 @@}}},+ "/call/guest-chat/{call_id}": {+ "get": {+ "tags": ["messages::inbound::guest_chat"],+ "summary": "Read the live call discussion as a verified guest.",+ "operationId": "guest_call_chat_read",+ "parameters": [+ {+ "name": "call_id",+ "in": "path",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatPage"+ }+ }+ }+ },+ "403": {+ "description": ""+ }+ }+ },+ "post": {+ "tags": ["messages::inbound::guest_chat"],+ "summary": "Append text to the same saved discussion used by account participants.",+ "operationId": "guest_call_chat_post",+ "parameters": [+ {+ "name": "call_id",+ "in": "path",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatPost"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GuestChatMessage"+ }+ }+ }+ },+ "403": {+ "description": ""+ }+ }+ }+ },"/call/join/{token}": {"get": {"tags": ["call::inbound::axum_router::meetings"],@@ -30648,6 +30722,70 @@"description": "Sort method for grouped queries (frecency not supported).","enum": ["viewed_at", "created_at", "updated_at", "viewed_updated"]},+ "GuestChatMessage": {+ "type": "object",+ "description": "Guest-safe message projection: no account identities, attachments, or entity grants.",+ "required": ["id", "name", "guest", "is_you", "content", "created_at"],+ "properties": {+ "content": {+ "type": "string",+ "description": "Message body."+ },+ "created_at": {+ "type": "string",+ "format": "date-time",+ "description": "Creation time."+ },+ "guest": {+ "type": "boolean",+ "description": "Whether the author is a guest."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "Persisted message identity."+ },+ "is_you": {+ "type": "boolean",+ "description": "Whether this session authored the message."+ },+ "name": {+ "type": "string",+ "description": "Display-only author name."+ }+ }+ },+ "GuestChatPage": {+ "type": "object",+ "description": "Messages in the call's one discussion, oldest first.",+ "required": ["messages"],+ "properties": {+ "messages": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/GuestChatMessage"+ },+ "description": "Visible, nondeleted messages."+ }+ }+ },+ "GuestChatPost": {+ "type": "object",+ "description": "Guests may send text only; attribution and parent are server-owned.",+ "required": ["id", "content"],+ "properties": {+ "content": {+ "type": "string",+ "description": "Text to append to the call discussion."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "UUIDv7 used to deduplicate retries, including the first message."+ }+ },+ "additionalProperties": false+ },"GuestId": {"type": "string","format": "uuid",@@ -32040,7 +32178,7 @@},"MeetingToken": {"type": "string",- "description": "A bearer capability that grants access only to a meeting's RTC room."+ "description": "An invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership."},"MeetingsResponse": {"type": "object",@@ -32108,6 +32246,10 @@"format": "date-time","description": "Last content edit, if any."},+ "guest_name": {+ "type": ["string", "null"],+ "description": "Display name of a verified call guest, retained after the call ends."+ },"id": {"type": "string","format": "uuid",diff --git a/packages/sdk/src/coverage/skipped.ts b/packages/sdk/src/coverage/skipped.tsindex 0e27d68902..609be1a3a5 100644--- a/packages/sdk/src/coverage/skipped.ts+++ b/packages/sdk/src/coverage/skipped.ts@@ -369,6 +369,9 @@ export const storageExcluded = ['getRingStatus','getUserDocumentViewLocation','getViewsHandler',+ // Guest chat uses a live RTC session token, not SDK account credentials.+ 'guestCallChatPost',+ 'guestCallChatRead','handler','healthHandler','ingestTranscript',diff --git a/services/document_storage_service/AGENTS.md b/services/document_storage_service/AGENTS.mdindex 2263cfd25e..c943d256ee 100644--- a/services/document_storage_service/AGENTS.md+++ b/services/document_storage_service/AGENTS.md@@ -17,6 +17,8 @@ threads, pins, recents, notifications, folders, activity.- `src/server.rs`: composition root, including access-request routes and thetracked delivery dispatcher; `src/outbound/access_requests.rs` composes thenotification/withdrawal/realtime ports. Policy lives in `crates/access_requests`.+- 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.- `src/service/entity_mutation.rs`: generic entity-mutation plumbing usedacross item types.- `src/service/delete_document_worker.rs`: background worker handling documentdiff --git a/services/document_storage_service/src/api.rs b/services/document_storage_service/src/api.rsindex 620c663fc5..21d7accce7 100644--- a/services/document_storage_service/src/api.rs+++ b/services/document_storage_service/src/api.rs@@ -98,6 +98,13 @@ fn api_router(state: ApiContext) -> Router {// Webhook router is outside auth — LiveKit validates via its own JWT,// cal.com validates via HMAC signature.let webhook_router = Router::new()+ .nest(+ "/call/guest-chat",+ messages::inbound::guest_chat::router(+ state.guest_chat_service.clone(),+ state.call_public_rate_limiter.clone(),+ ),+ ).nest("/call",call::inbound::axum_router::webhook_router(diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rsindex b7d22c4864..d6ef698881 100644--- a/services/document_storage_service/src/api/context.rs+++ b/services/document_storage_service/src/api/context.rs@@ -888,6 +888,7 @@ pub(crate) struct ApiContext {pub projects_state: ProjectsState,pub channels_state: DssChannelsState,pub messages_state: DssMessagesState,+ pub guest_chat_service: Arc<dyn messages::domain::service::guest_chat::GuestChatApi>,pub annotation_service: Arc<DssAnnotationService>,/// Shared channel service, for calling channel domain operations outside/// the channels router (starter-doc seeding records mention backlinks).diff --git a/services/document_storage_service/src/api/swagger.rs b/services/document_storage_service/src/api/swagger.rsindex ce22bd5d63..b15ce510f9 100644--- a/services/document_storage_service/src/api/swagger.rs+++ b/services/document_storage_service/src/api/swagger.rs@@ -293,6 +293,8 @@ use utoipa::OpenApi;// messages (channels and documents)messages::inbound::axum_router::timeline,+ messages::inbound::guest_chat::read,+ messages::inbound::guest_chat::post,messages::inbound::axum_router::timeline_entries,messages::inbound::axum_router::create,messages::inbound::axum_router::get_message,diff --git a/services/document_storage_service/src/server.rs b/services/document_storage_service/src/server.rsindex 4c07ebb327..f1e2be4d71 100644--- a/services/document_storage_service/src/server.rs+++ b/services/document_storage_service/src/server.rs@@ -1296,6 +1296,12 @@ pub async fn run() -> anyhow::Result<()> {),);let message_commands: Arc<dyn messages::domain::api::MessageCommands> = message_service.clone();+ let guest_chat_service = Arc::new(+ messages::domain::service::guest_chat::GuestChatService::new(+ message_service.clone(),+ call_service.clone(),+ ),+ );let messages_state = messages::inbound::axum_router::MessagesRouterState {service: message_service.clone(),access: entity_access_service.clone(),@@ -2237,6 +2243,7 @@ pub async fn run() -> anyhow::Result<()> {authorization_state.clone(),),messages_state,+ guest_chat_service,annotation_service,bots_state: bots::inbound::axum_router::BotsRouterState::new(bots_service.clone(),diff --git a/services/scheduled_action/src/outbound/event_content/routine_event/test.rs b/services/scheduled_action/src/outbound/event_content/routine_event/test.rsindex 99542eb476..f87bc4a170 100644--- a/services/scheduled_action/src/outbound/event_content/routine_event/test.rs+++ b/services/scheduled_action/src/outbound/event_content/routine_event/test.rs@@ -432,6 +432,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {parent: MessageParent::Channel(channel_id),thread_id: Some(root_id),sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),@@ -466,6 +467,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {parent: MessageParent::Channel(channel_id),thread_id: None,sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),@@ -484,6 +486,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {parent: MessageParent::Channel(channel_id),thread_id: Some(root_id),sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),@@ -501,6 +504,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {parent: MessageParent::Channel(channel_id),thread_id: Some(root_id),sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),@@ -519,6 +523,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {parent: MessageParent::Channel(channel_id),thread_id: Some(root_id),sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),diff --git a/services/scheduled_action/src/outbound/event_content/test.rs b/services/scheduled_action/src/outbound/event_content/test.rsindex 3b31620b7f..1f74f514a2 100644--- a/services/scheduled_action/src/outbound/event_content/test.rs+++ b/services/scheduled_action/src/outbound/event_content/test.rs@@ -117,6 +117,7 @@ fn message(content: &str) -> Message {parent: MessageParent::Channel(Uuid::nil()),thread_id: None,sender_id: "macro|[email protected]".to_owned().try_into().unwrap(),+ guest_name: None,imported_author: None,bot_profile: None,mentions: Vec::new(),