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(code-mode): list SDK symbols per entity and read them one at a time (#8875)
Eric Hayes498e7f9a642d
diff --git a/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx b/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsxindex d3c0a75b34..7081354941 100644--- a/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx+++ b/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx@@ -130,7 +130,8 @@ export function ToolCallPart(props: {props.part.name.kind === 'mcp' &&(props.part.name.server === 'macro' ||(props.part.name.server === 'macro_internal' &&- props.part.name.tool === 'DescribeCodeTools')) &&+ (props.part.name.tool === 'DescribeCodeTools' ||+ props.part.name.tool === 'ReadCodeDocs'))) &&hasToolRenderer(props.part.name.tool)}fallback={<ExchangeToolCall detail={detail()} common={common()} />}diff --git a/apps/web/src/features/block-agent/state/tool-approval-wording.ts b/apps/web/src/features/block-agent/state/tool-approval-wording.tsindex f8de3b4dec..eb9a7595d6 100644--- a/apps/web/src/features/block-agent/state/tool-approval-wording.ts+++ b/apps/web/src/features/block-agent/state/tool-approval-wording.ts@@ -140,6 +140,7 @@ const MACRO_TOOLS: Record<MacroToolName, Wording | null> = {UpdateAgentSessionSharing: (whose) => `change ${whose} session sharing`,ReadAgentSession: (whose) => `read ${whose} agent sessions`,ReadChat: (whose) => `read ${whose} chats`,+ ReadCodeDocs: null,ReadCanvas: (whose) => `read ${whose} canvases`,RenderCanvas: (whose) => `view ${whose} canvases`,ReadContent: (whose) => `read ${whose} documents`,diff --git a/apps/web/src/lib/core/component/AI/component/tool/CodeMode.tsx b/apps/web/src/lib/core/component/AI/component/tool/CodeMode.tsxindex 6b084ba79c..384fcd1a94 100644--- a/apps/web/src/lib/core/component/AI/component/tool/CodeMode.tsx+++ b/apps/web/src/lib/core/component/AI/component/tool/CodeMode.tsx@@ -42,6 +42,44 @@ export const describeCodeToolsHandler = createToolRenderer({},});+export const readCodeDocsHandler = createToolRenderer({+ name: 'ReadCodeDocs',+ render: (ctx) => {+ const [expanded, setExpanded] = createSignal(false);+ return (+ <BaseTool+ icon={CodeIcon}+ renderContext={ctx.renderContext}+ type="call"+ response={+ <Show when={expanded()}>+ <pre class="max-h-96 overflow-auto whitespace-pre-wrap break-words p-3 text-xs">+ {JSON.stringify(ctx.response?.data, null, 2)}+ </pre>+ </Show>+ }+ >+ <span class="flex-1">Read SDK reference</span>+ <Show when={ctx.response}>+ <button+ type="button"+ aria-label="Show SDK reference"+ aria-expanded={expanded()}+ onClick={() => setExpanded(!expanded())}+ class="flex items-center gap-2"+ >+ <span>{ctx.response?.data.references.length} symbols</span>+ <CaretRight+ class="size-3.5"+ classList={{ 'rotate-90': expanded() }}+ />+ </button>+ </Show>+ </BaseTool>+ );+ },+});+/** Fallback for hosts without session records; agent sessions use CodeExecutionPart. */export const executeCodeHandler = createToolRenderer({name: 'ExecuteCode',diff --git a/apps/web/src/lib/core/component/AI/component/tool/handler.tsx b/apps/web/src/lib/core/component/AI/component/tool/handler.tsxindex affbb97da6..a9a14d14bc 100644--- a/apps/web/src/lib/core/component/AI/component/tool/handler.tsx+++ b/apps/web/src/lib/core/component/AI/component/tool/handler.tsx@@ -76,7 +76,11 @@ import {renameChannelHandler,shareWithChannelHandler,} from './ChannelMutations';-import { describeCodeToolsHandler, executeCodeHandler } from './CodeMode';+import {+ describeCodeToolsHandler,+ executeCodeHandler,+ readCodeDocsHandler,+} from './CodeMode';import {dispatchCodingAgentHandler,listCodingAgentsHandler,@@ -212,6 +216,7 @@ const toolHandlers: ToolHandlerMap<RenderContext> = {...initiativeToolHandlers,ExecuteCode: executeCodeHandler,DescribeCodeTools: describeCodeToolsHandler,+ ReadCodeDocs: readCodeDocsHandler,DispatchCodingAgent: dispatchCodingAgentHandler,ListCodingAgents: listCodingAgentsHandler,ReadSpreadsheet: readSpreadsheetHandler,diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.tsindex 171b83a817..5664320786 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts@@ -17235,7 +17235,7 @@ export const CodeToolsDescription = z.object({z.object({name: z.string(),description: z.string(),- documentation: z.union([z.string(), z.null()]).optional(),+ index: z.union([z.string(), z.null()]).optional(),})),omitted: z.array(z.string()),@@ -17277,7 +17277,7 @@ export const CodeToolsDescription = z.object({z.object({name: z.string(),description: z.string(),- documentation: z.union([z.string(), z.null()]).optional(),+ index: z.union([z.string(), z.null()]).optional(),})),});@@ -17370,6 +17370,14 @@ export const ExecutionReceipt = z.object({error: z.union([z.string(), z.null()]).optional(),});+export const ReadCodeDocs = z.object({ symbols: z.array(z.string()) }).strict();++export const SymbolReferences = z.object({+ references: z.array(z.object({ symbol: z.string(), reference: z.string() })),+ omitted: z.array(z.string()),+ unknown: z.array(z.string()),+});+export const ReadChat = z.object({ chatId: z.string() });export const ReadChatResponse = z.object({diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/tool.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/tool.tsindex 09dd2d6c71..fe460b645a 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/tool.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/tool.ts@@ -397,6 +397,7 @@ type ToolParserMap = {response: types.ReadChannelThreadResponse;};ReadChat: { call: types.ReadChat; response: types.ReadChatResponse };+ ReadCodeDocs: { call: types.ReadCodeDocs; response: types.SymbolReferences };ReadContent: { call: types.ReadContent; response: types.ReadContentResponse };ReadDesign: { call: types.ReadDesign; response: types.ReadDesignResponse };ReadDiscussion: {@@ -974,6 +975,10 @@ const toolParserMap = {response: schemas.ReadChannelThreadResponse,},ReadChat: { call: schemas.ReadChat, response: schemas.ReadChatResponse },+ ReadCodeDocs: {+ call: schemas.ReadCodeDocs,+ response: schemas.SymbolReferences,+ },ReadContent: {call: schemas.ReadContent,response: schemas.ReadContentResponse,@@ -1547,6 +1552,7 @@ type ToolDataMap = {response: types.ReadChannelThreadResponse;};ReadChat: { call: types.ReadChat; response: types.ReadChatResponse };+ ReadCodeDocs: { call: types.ReadCodeDocs; response: types.SymbolReferences };ReadContent: { call: types.ReadContent; response: types.ReadContentResponse };ReadDesign: { call: types.ReadDesign; response: types.ReadDesignResponse };ReadDiscussion: {diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.tsindex 3617cac743..a09e26ff18 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts@@ -16012,15 +16012,15 @@ export interface WebSearchToolError {error_code: string;}/**- * Look up Macro SDK documentation for ExecuteCode. Before writing a program, pass task, a short description of what the program must do, to receive every relevant SDK entity reference in one call; skip it only when the references you need are already in context. Request up to five entity names together for full declarations, e.g. entities omitted for size. Request topics for workflow guides. With no arguments, returns the compact entity catalog.+ * Find Macro SDK methods for ExecuteCode. Before writing a program, pass task, a short description of what the program must do, to receive the index of every relevant SDK entity in one call; skip it only when the indexes you need are already in context. An index lists each class, method and type by symbol with its signature; read the symbols you need with ReadCodeDocs. Request up to five entity names together for their indexes, e.g. entities omitted for size. Request topics for workflow guides. With no arguments, returns the compact entity catalog.*/export interface DescribeCodeTools {/**- * What the program you are about to write must do, in the user's terms, e.g. 'find unread emails from Acme this week and summarize them'. Returns every relevant SDK entity reference.+ * What the program you are about to write must do, in the user's terms, e.g. 'find unread emails from Acme this week and summarize them'. Returns the index of every relevant SDK entity.*/task?: string | null;/**- * Up to five SDK entity names such as documents, email, ai, or core. Empty names, topics and task list the compact entity catalog.+ * Up to five SDK entity names such as documents, email, ai, or core, for their indexes. Empty names, topics and task list the compact entity catalog.*/names?: string[];/**@@ -16049,18 +16049,17 @@ export interface CodeToolsDescription {*/instructions: string;/**- * SDK entities; full declarations are omitted in the compact catalog.+ * SDK entities; indexes are omitted in the compact catalog.*/tools: SdkDocumentation[];}/**- * Every SDK reference Jev considers relevant to a described task.+ * Every SDK entity Jev considers relevant to a described task.*/export interface TaskDocumentation {status: SelectionStatus;/**- * Relevant entities, most relevant first, each with its full reference or,- * when that does not fit, its namespace overview.+ * Relevant entities, most relevant first, each with its index.*/entities: SdkDocumentation[];/**@@ -16069,7 +16068,7 @@ export interface TaskDocumentation {omitted: string[];}/**- * Public Markdown documentation generated from the real SDK by TypeDoc.+ * One SDK entity, generated from the real SDK by TypeDoc.*/export interface SdkDocumentation {/**@@ -16081,9 +16080,10 @@ export interface SdkDocumentation {*/description: string;/**- * API reference Markdown; omitted in a compact catalog.+ * Every class, method and type the entity declares, one line each and+ * named by the symbol `ReadCodeDocs` reads; omitted in a compact catalog.*/- documentation?: string | null;+ index?: string | null;}/*** One requested Markdown guide.@@ -16098,7 +16098,7 @@ export interface CodeGuide {/*** Copy turn_id from the current prompt’s hidden invocation context; never substitute another turn’s ID for a stale call. Run a JavaScript ES module in Deno. Export async function main({macro, session, execution}); return {data: <JSON>}. Optional reviews: [{kind: "email" | "calendar", id: "..."}] defaults to an empty list when omitted. The host supplies real public Macro SDK handles authenticated as the explicitly selected acting_as account. Optional imports: import {Macro} from "@macro-inc/sdk"; import Handlebars from "handlebars". main also receives token, hosts, sessionId and executionId for explicit SDK construction. Never print, return or persist token. No TypeScript syntax or package installation.*- * Prefer ExecuteCode for supported Macro work, including a single precise call. SDK API reference sections expanded in context are already your documentation. Execute directly when they cover the task; do not call DescribeCodeTools merely to confirm them. The compact entity index alone is not a method reference. Use DescribeCodeTools only for missing methods, options, enum values or workflow guides, requesting the missing entities together rather than guessing. Request up to five entity names together (e.g. workspace, documents, email, ai, core).+ * Prefer ExecuteCode for supported Macro work, including a single precise call. Entity indexes in context list each method with its signature. Before writing a program, read the symbols it needs with ReadCodeDocs for their parameters, options and return types, all together in one call, unless their reference is already in context; do not guess option names. Use DescribeCodeTools for the index of an entity not in context or for workflow guides, requesting entities together (e.g. documents, email, ai, core).** For editable email/calendar drafts, persist them with execution.reviews.create({kind, title, drafts}), then return reviews: [await review.reference()]. This does not send emails or create calendar events. Creation immediately presents a completed PresentReview ACP tool call, even while main continues. "Presented to the user" means saved in the conversation, not approved or sent. The saved cards remain usable after this execution and chat continues. User decisions arrive as typed system events referring to the same review ID. Use GetReview to read final drafts and confirmed outcomes; notifications never authorize repeating an action. Use the direct EditDocument tool for AI document edits. Direct human-interactive tools, subagents and unsupported SDK operations remain available.*@@ -16161,6 +16161,45 @@ export interface ExecutionActivity {label: string;status: RecordedCallStatus;}+/**+ * Read the Macro SDK reference for symbols named in an entity index or another reference: a class (Task), one of its methods (TaskNamespace.create) or a type (CreateReviewOptions). Request every symbol the next program needs together, up to ten. Each reference has the full signature, parameters, option fields and return type; symbols it names in backticks can be read the same way.+ */+export interface ReadCodeDocs {+ /**+ * Up to ten symbols exactly as an index or reference names them, e.g. ["TaskNamespace.create", "Task"].+ */+ symbols: string[];+}+/**+ * The references for requested symbols, within one result's budget.+ */+export interface SymbolReferences {+ /**+ * References in request order.+ */+ references: SymbolReference[];+ /**+ * Requested symbols left out for size; request them again.+ */+ omitted: string[];+ /**+ * Requested symbols no index or reference names.+ */+ unknown: string[];+}+/**+ * One symbol's reference.+ */+export interface SymbolReference {+ /**+ * The symbol as requested.+ */+ symbol: string;+ /**+ * Its TypeDoc reference; symbols it names in backticks can be read too.+ */+ reference: string;+}/*** Retrieve a chat thread's message history by its ID. Returns the conversation title and messages with their roles, content, and attachment references.*/diff --git a/crates/agent_code_mode/AGENTS.md b/crates/agent_code_mode/AGENTS.mdindex f2109c9949..0aa16e0f77 100644--- a/crates/agent_code_mode/AGENTS.md+++ b/crates/agent_code_mode/AGENTS.md@@ -30,9 +30,10 @@ stacks. Process isolation belongs toAn import review only starts its write: its `review.decided` is quiet, andits `review.settled` comes from the import when the write ends; only animport that could not start settles here.-- `src/domain/documentation.rs`: Jev selection of generated SDK docs, rendered- into the per-turn prompt (top four, 48 KiB) or returned for a- `DescribeCodeTools` `task` (every relevant entity, 32 KiB).+- `src/domain/documentation.rs`: the generated SDK catalog (an index per+ entity, a reference per symbol). Jev selects entity indexes for the per-turn+ prompt (top four, 48 KiB) or a `DescribeCodeTools` `task` (every relevant+ entity, 32 KiB); `ReadCodeDocs` reads symbol references (32 KiB).- `src/inbound/toolset.rs`: `toolset()` for sessions, `user_toolset()` for thepublic MCP. Tool texts are composed: host-specific parts in `toolset/session/`and `toolset/user/`, guidance both share in `toolset/shared/`. Edit shareddiff --git a/crates/agent_code_mode/SKILL.md b/crates/agent_code_mode/SKILL.mdindex 220611d1b7..70057999bc 100644--- a/crates/agent_code_mode/SKILL.md+++ b/crates/agent_code_mode/SKILL.md@@ -1,6 +1,6 @@# Macro code mode-Code mode runs plain JavaScript using the actual public Macro SDK. Prefer it for supported Macro work, even a single precise call. API reference sections already expanded in the prompt are ready to use: execute directly when they cover the task. Use DescribeCodeTools only for missing entity details or workflow guides, never just to confirm preloaded documentation. The full entity index is always available. Jev selects likely relevant sections once per turn, with a short deadline and an index-only fallback.+Code mode runs plain JavaScript using the actual public Macro SDK. Prefer it for supported Macro work, even a single precise call. Entity indexes list each class, method with its signature, and type by symbol; read the symbols a program needs with ReadCodeDocs, all together, unless their reference is already in context. Use DescribeCodeTools for the index of an entity not in context or for workflow guides. The entity catalog is always available. Jev loads the indexes of likely relevant entities once per turn, with a short deadline and a catalog-only fallback.Copy turn_id from the current prompt’s hidden invocation context into ExecuteCode. A stale call must not obtain a replacement ID from discovery or another turn. Choose acting_as explicitly on ExecuteCode. Prefer requester; choose owner only when the request needs the session owner’s access. One account authenticates every operation in the execution. Missing permissions or connections never switch accounts automatically.@@ -33,7 +33,7 @@ macro, session and execution are real SDK handles. You can instead import {Macro## Correctness and bounds-Use documentation already expanded in context; request unfamiliar methods, options and enum values together with DescribeCodeTools instead of guessing. Use loops, early breaks, Promise.all, Promise.allSettled and dependencies as appropriate. Await all started work. Use entity-specific searches to preserve the user's scope. SDK searches are async iterators with pagination; do not invent the old tool's response shape. Bound concurrency and return compact evidence, not live handles or full broad search batches. A stopped iterator or failed branch does not prove exhaustive coverage.+Use references already in context; read unfamiliar methods, options and enum values together with ReadCodeDocs instead of guessing. Use loops, early breaks, Promise.all, Promise.allSettled and dependencies as appropriate. Await all started work. Use entity-specific searches to preserve the user's scope. SDK searches are async iterators with pagination; do not invent the old tool's response shape. Bound concurrency and return compact evidence, not live handles or full broad search batches. A stopped iterator or failed branch does not prove exhaustive coverage.Each execution is a fresh Deno process in the agent harness: 30 seconds including queueing, 64 KiB source, 256 KiB result. Imports are prebundled; direct network is restricted to configured Macro service hosts. Filesystem writes, arbitrary imports, subprocesses and environment access are denied. Completed API writes remain after failure or cancellation. Check state before retrying and never blindly replay writes. Source, status and final result are journaled; individual direct HTTP responses are not old tool-call receipts.diff --git a/crates/agent_code_mode/src/domain/documentation.json b/crates/agent_code_mode/src/domain/documentation.jsonindex 1eb0fcbbad..3d3c601a84 100644--- a/crates/agent_code_mode/src/domain/documentation.json+++ b/crates/agent_code_mode/src/domain/documentation.json@@ -1,182 +1,1944 @@-[- {- "name": "agentSessions",- "description": "Create and inspect agent sessions, read any viewable session's history as folded messages (`session.foldedLog()`), saved code executions, and editable email or calendar review stacks.",- "overview": "<!-- src/entities/agent-sessions/agent-session/type-aliases/CreateManagedSessionOptions.md -->\n# Type Alias: CreateManagedSessionOptions\n\n> **CreateManagedSessionOptions** = \\{ `instructions?`: `string`; `model?`: `string`; `prompt?`: `string`; `repoBranch?`: `string`; `repoUrl?`: `string`; \\}\n\nWhat a managed session is created with.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` | Instructions the session's runtime works under, fixed for its life. |\n| <a id=\"property-model\"></a> `model?` | `string` | The model the session runs on, instead of its persona's. The session's model from creation, read back as [AgentSession.model](../classes/AgentSession.md#property-model). |\n| <a id=\"property-prompt\"></a> `prompt?` | `string` | First prompt to deliver once the session is running. |\n| <a id=\"property-repobranch\"></a> `repoBranch?` | `string` | The branch the session starts on; needs `repoUrl`. Omitted, the repository's default branch. |\n| <a id=\"property-repourl\"></a> `repoUrl?` | `string` | The repository the session works on, as one of the URLs [AgentSession.repositories](../classes/AgentSession.md#repositories) lists for the caller. Omitted, the runtime chooses from the prompt. Honored for Cursor sessions. |\n\n\n<!-- src/entities/agent-sessions/agent-session/type-aliases/SelectableRepository.md -->\n# Type Alias: SelectableRepository\n\n> **SelectableRepository** = \\{ `defaultBranch?`: `string`; `url`: `string`; \\}\n\nA GitHub repository the caller can point a managed session at.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-defaultbranch\"></a> `defaultBranch?` | `string` | The branch its clones check out, and where a session starts unless `createManaged` names another. Absent for a repository with no commits. |\n| <a id=\"property-url\"></a> `url` | `string` | The canonical `https://github.com/owner/name` URL, as `createManaged` takes it. |\n\n\n<!-- src/entities/agent-sessions/namespace/classes/AgentSessionNamespace.md -->\n# Class: AgentSessionNamespace\n\nEntry point for coding-agent sessions.\n\n## Constructors\n\n### Constructor\n\n> **new AgentSessionNamespace**(`client`): `AgentSessionNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AgentSessionNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`AgentSession`](../../agent-session/classes/AgentSession.md)\n\nA handle to an agent session by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n***\n\n### codingPreferences()\n\n> **codingPreferences**(): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nWhat the caller's new coding sessions are told to do beyond their assignment.\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### createManaged()\n\n> **createManaged**(`opts?`): `Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)\\>\n\nCreate a managed agent session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`CreateManagedSessionOptions`](../../agent-session/type-aliases/CreateManagedSessionOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)\\>\n\n***\n\n### defaultSandboxSize()\n\n> **defaultSandboxSize**(): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nThe caller's default sandbox size for new `@coder` sessions.\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n***\n\n### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)[]\\>\n\nThe sessions linked to the GitHub pull request at `url` that the caller\ncan view.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)[]\\>\n\n***\n\n### repositories()\n\n> **repositories**(): `Promise`\\<[`SelectableRepository`](../../agent-session/type-aliases/SelectableRepository.md)[]\\>\n\nThe GitHub repositories the caller can hand a managed session, with the\nbranch each one's sessions start on by default.\n\n#### Returns\n\n`Promise`\\<[`SelectableRepository`](../../agent-session/type-aliases/SelectableRepository.md)[]\\>\n\n***\n\n### repositoryBranches()\n\n> **repositoryBranches**(`repoUrl`): `Promise`\\<`string`[]\\>\n\nBranch names on one repository the caller can start a managed session\nfrom. `repoUrl` is one of the URLs [AgentSessionNamespace.repositories](#repositories)\nlists.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `repoUrl` | `string` |\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### setCodingPreferences()\n\n> **setCodingPreferences**(`preferences`): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nReplace the caller's coding preferences.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `preferences` | [`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md) |\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### setDefaultSandboxSize()\n\n> **setDefaultSandboxSize**(`size`): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nSet the caller's default sandbox size for the next `@coder` mention.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `size` | [`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md) |\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n",- "documentation": "# Macro SDK: agentSessions\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/agent-harness/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/agent-harness/types.gen/type-aliases/AgentAction.md -->\n# Type Alias: AgentAction\n\n> **AgentAction** = [`AgentPromptAction`](AgentPromptAction.md) & \\{ `type`: `\"prompt\"`; \\} \\| [`AgentSetModelAction`](AgentSetModelAction.md) & \\{ `type`: `\"setModel\"`; \\} \\| [`AgentSetConfigOptionAction`](AgentSetConfigOptionAction.md) & \\{ `type`: `\"setConfigOption\"`; \\} \\| \\{ `type`: `\"compact\"`; \\} \\| \\{ `type`: `\"stop\"`; \\} \\| [`AgentRespondElicitationAction`](AgentRespondElicitationAction.md) & \\{ `type`: `\"respondElicitation\"`; \\} \\| [`AgentPermissionAction`](AgentPermissionAction.md) & \\{ `type`: `\"respondToPermission\"`; \\}\n\nOne thing a caller wants an agent to do.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentActionId.md -->\n# Type Alias: AgentActionId\n\n> **AgentActionId** = `string`\n\nIdentifies one accepted [`AgentAction`] end to end: returned by the\ncontrol endpoint, written as the JSON-RPC request id on the action's wire\nframe, and read back off that frame as `request_id` on the folded message\nit derives.\n\nA v7 uuid, so ids sort by mint time. Minted by the server at accept time,\nor by a client that speculated the action and named it in the control\nrequest - either way the server is the only writer of runtime-bound\nframes, so a uuid-shaped request id remains the whole ownership test. The\nmachine's own handshake request ids (`agent_session:{session}:{n}`) are\nnot uuids and stay `None`.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentConversationDto.md -->\n# Type Alias: AgentConversationDto\n\n> **AgentConversationDto** = \\{ `available`: `boolean`; `avatarUrl?`: `string` \\| `null`; `botId`: `string`; `channelId`: `string`; `name`: `string`; `sessions`: [`AgentConversationSessionDto`](AgentConversationSessionDto.md)[]; `settingsChanged`: `boolean`; `turns`: [`AgentConversationTurnDto`](AgentConversationTurnDto.md)[]; \\}\n\nAn agent's conversation in a channel, as the person it is with sees it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-available\"></a> `available` | `boolean` | Whether the caller may currently send a new prompt. |\n| <a id=\"property-avatarurl\"></a> `avatarUrl?` | `string` \\| `null` | Optional persona avatar. |\n| <a id=\"property-botid\"></a> `botId` | `string` | Persona id (without the bot principal prefix). |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel containing the visible transcript. |\n| <a id=\"property-name\"></a> `name` | `string` | Persona's historical display name. |\n| <a id=\"property-sessions\"></a> `sessions` | [`AgentConversationSessionDto`](AgentConversationSessionDto.md)[] | The sessions the conversation has run on, oldest first. |\n| <a id=\"property-settingschanged\"></a> `settingsChanged` | `boolean` | Whether new persona settings are available to adopt explicitly. |\n| <a id=\"property-turns\"></a> `turns` | [`AgentConversationTurnDto`](AgentConversationTurnDto.md)[] | Persistent state of each accepted message and its current attempt. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentConversationSessionDto.md -->\n# Type Alias: AgentConversationSessionDto\n\n> **AgentConversationSessionDto** = \\{ `createdAt`: `string`; `isCurrent`: `boolean`; `sessionId`: `string`; \\}\n\nOne session a conversation has run on; every channel message stays visible.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the session began. |\n| <a id=\"property-iscurrent\"></a> `isCurrent` | `boolean` | Whether this is the current agent context. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Session whose controls and live events belong to this context. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentConversationTurnDto.md -->\n# Type Alias: AgentConversationTurnDto\n\n> **AgentConversationTurnDto** = \\{ `actionId`: `string`; `createdAt`: `string`; `replyMessageId?`: `string` \\| `null`; `retryable`: `boolean`; `sessionId`: `string`; `sourceMessageId`: `string`; `state`: [`ConversationTurnState`](ConversationTurnState.md); \\}\n\nExecution status without exposing the persona prompt or stored credentials.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | `string` | Current runtime attempt identity. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the source message was first accepted. |\n| <a id=\"property-replymessageid\"></a> `replyMessageId?` | `string` \\| `null` | The associated agent reply, if it has been posted. |\n| <a id=\"property-retryable\"></a> `retryable` | `boolean` | Whether Retry would be accepted now. A failed attempt is not retryable until its reply says how it ended. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Session carrying this turn. |\n| <a id=\"property-sourcemessageid\"></a> `sourceMessageId` | `string` | The user's message in the channel timeline. |\n| <a id=\"property-state\"></a> `state` | [`ConversationTurnState`](ConversationTurnState.md) | Durable execution state. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentPermissionAction.md -->\n# Type Alias: AgentPermissionAction\n\n> **AgentPermissionAction** = \\{ `answer`: [`PermissionAnswer`](PermissionAnswer.md); `requestId`: `unknown`; \\}\n\nA user's answer to the agent's `session/request_permission`.\n\nUnlike every other action this is not a new request but the reply to one\nthe agent made, so it carries the agent's own request id rather than\nreceiving a server-minted one.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-answer\"></a> `answer` | [`PermissionAnswer`](PermissionAnswer.md) | What the user decided. |\n| <a id=\"property-requestid\"></a> `requestId` | `unknown` | The agent's JSON-RPC request id, echoed verbatim from the folded permission part. A string or a number on the wire; agents mint both, and `7` does not answer `\"7\"`. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentPromptAction.md -->\n# Type Alias: AgentPromptAction\n\n> **AgentPromptAction** = \\{ `attachments?`: [`PromptAttachment`](PromptAttachment.md)[]; `prompt`: `string`; \\}\n\nAsk the agent to work on something.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments?` | [`PromptAttachment`](PromptAttachment.md)[] | Files the prompt refers to, in the order the user attached them. Delivered after the text as one `resource_link` block each. |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | What to tell the agent. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentRespondElicitationAction.md -->\n# Type Alias: AgentRespondElicitationAction\n\n> **AgentRespondElicitationAction** = [`ElicitationAnswer`](ElicitationAnswer.md) & \\{ `requestId`: [`ElicitationRequestId`](ElicitationRequestId.md); \\}\n\nAnswer an elicitation the agent is waiting on.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `requestId` | [`ElicitationRequestId`](ElicitationRequestId.md) | The agent's `elicitation/create` request id - not an [`AgentActionId`], because the agent minted it. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSessionChangesResponse.md -->\n# Type Alias: AgentSessionChangesResponse\n\n> **AgentSessionChangesResponse** = \\{ `attempt?`: `null` \\| [`CaptureAttemptDto`](CaptureAttemptDto.md); `capturing`: `boolean`; `changeset?`: `null` \\| [`ChangesetDto`](ChangesetDto.md); \\}\n\nResponse body for `GET /agent-sessions/{session_id}/changes`.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attempt\"></a> `attempt?` | `null` \\| [`CaptureAttemptDto`](CaptureAttemptDto.md) | - |\n| <a id=\"property-capturing\"></a> `capturing` | `boolean` | A capture is running right now. |\n| <a id=\"property-changeset\"></a> `changeset?` | `null` \\| [`ChangesetDto`](ChangesetDto.md) | - |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSessionLogEntryDto.md -->\n# Type Alias: AgentSessionLogEntryDto\n\n> **AgentSessionLogEntryDto** = [`LogFrameDto`](LogFrameDto.md) & \\{ `createdAt`: `string`; `id`: `string`; `userId?`: `string` \\| `null`; \\}\n\nOne entry of a session's protocol log.\n\nSerializes as `{\"userId\": ..., \"direction\": ..., \"content\": ...}` - the\nframe's own two fields, flattened in beside the attribution, which is the\nsame shape a recorded session's JSONL carries. A reader can deserialize the\n`direction`/`content` pair straight back into the fold's own log type\nrather than through a transport vocabulary of its own.\n\n`agentSessionId` is not repeated per entry: every entry in a response\nbelongs to the session named once at the top.\n\n`Deserialize` is for the wire-contract tests only - nothing server-side\ndecodes its own response type.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `createdAt` | `string` | When the log recorded the frame. The frame itself carries no time, so this comes from the log row. It is what a reader has to order these against anything else it is showing beside them - the fold derives an order among the messages of one session and nothing more. |\n| `id` | `string` | Durable transport row identity; together with `createdAt`, its order cursor. |\n| `userId?` | `string` \\| `null` | The user whose action produced the frame, absent when no user did. Only prompts carry one, and only when the frame was attributed at the time - a replayed or recorded session's are anonymous. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSessionLogResponse.md -->\n# Type Alias: AgentSessionLogResponse\n\n> **AgentSessionLogResponse** = \\{ `bot`: [`SessionBot`](SessionBot.md); `entries`: [`AgentSessionLogEntryDto`](AgentSessionLogEntryDto.md)[]; \\}\n\nResponse body for one session's raw protocol log.\n\nA wrapper rather than a bare array so that anything which is about the\nresponse rather than about a frame has somewhere to go later without\nbreaking every client.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bot\"></a> `bot` | [`SessionBot`](SessionBot.md) | The agent whose messages the log derives. Here because a client renders those messages and cannot otherwise work out who sent them: the sender of an agent message is this session's bot, and nothing else names it. |\n| <a id=\"property-entries\"></a> `entries` | [`AgentSessionLogEntryDto`](AgentSessionLogEntryDto.md)[] | Effective history in ascending `(createdAt, id)` order. The first row is the inclusive history boundary cursor: buffered rows before it are obsolete. Reconcile snapshot overlap by row ID, never content. An empty history has no boundary or overlapping rows. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSessionResponse.md -->\n# Type Alias: AgentSessionResponse\n\n> **AgentSessionResponse** = \\{ `acpSessionId?`: `string` \\| `null`; `botId`: `string`; `canEdit`: `boolean`; `createdAt`: `string`; `external?`: `null` \\| [`ExternalSessionResponse`](ExternalSessionResponse.md); `harness`: `string`; `id`: `string`; `instructions?`: `string` \\| `null`; `isArchived`: `boolean`; `model`: `string`; `modifiedAt`: `string`; `name`: `string`; `originatingMessageId?`: `string` \\| `null`; `ownerId`: `string`; `pullRequestUrl?`: `string` \\| `null`; `repoUrl?`: `string` \\| `null`; `sandboxSize`: [`SandboxSize`](SandboxSize.md); `status`: [`SessionStatusDto`](SessionStatusDto.md); `taskId?`: `string` \\| `null`; `threadChannelId?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; `threadParent?`: `null` \\| [`MessageParent`](MessageParent.md); `workspace`: `string`; \\}\n\nResponse body describing an agent session.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-acpsessionid\"></a> `acpSessionId?` | `string` \\| `null` | The ACP session id, if one exists. |\n| <a id=\"property-botid\"></a> `botId` | `string` | The bot running the agent. |\n| <a id=\"property-canedit\"></a> `canEdit` | `boolean` | Whether the caller may drive the session - prompt it, answer its questions, stop it - rather than only watch. Edit access; the creator owns the session, so a create response always says so. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the session was created. |\n| <a id=\"property-external\"></a> `external?` | `null` \\| [`ExternalSessionResponse`](ExternalSessionResponse.md) | - |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness slug. |\n| <a id=\"property-id\"></a> `id` | `string` | The session id. |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` \\| `null` | Instructions the session's runtime works under, when any were stated at creation. Absent otherwise, so existing payloads are unchanged. |\n| <a id=\"property-isarchived\"></a> `isArchived` | `boolean` | Whether the session is archived and read-only. |\n| <a id=\"property-model\"></a> `model` | `string` | Model slug. |\n| <a id=\"property-modifiedat\"></a> `modifiedAt` | `string` | When the session was last modified. |\n| <a id=\"property-name\"></a> `name` | `string` | User-facing session name. |\n| <a id=\"property-originatingmessageid\"></a> `originatingMessageId?` | `string` \\| `null` | The exact message that invoked the bot, if any. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | The user who created and owns the session. |\n| <a id=\"property-pullrequesturl\"></a> `pullRequestUrl?` | `string` \\| `null` | The session's linked pull request. |\n| <a id=\"property-repourl\"></a> `repoUrl?` | `string` \\| `null` | The repository the session works with, when one was stated. |\n| <a id=\"property-sandboxsize\"></a> `sandboxSize` | [`SandboxSize`](SandboxSize.md) | Compute tier of the managed sandbox. |\n| <a id=\"property-status\"></a> `status` | [`SessionStatusDto`](SessionStatusDto.md) | The session's status. |\n| <a id=\"property-taskid\"></a> `taskId?` | `string` \\| `null` | The Macro task the session was linked to. |\n| <a id=\"property-threadchannelid\"></a> `threadChannelId?` | `string` \\| `null` | The channel `thread_id` lives in, when the session was spawned from a channel thread. Derived from `thread_parent`. |\n| <a id=\"property-threadid\"></a> `threadId?` | `string` \\| `null` | The root message of the thread the session was created from, if any. |\n| <a id=\"property-threadparent\"></a> `threadParent?` | `null` \\| [`MessageParent`](MessageParent.md) | - |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSetConfigOptionAction.md -->\n# Type Alias: AgentSetConfigOptionAction\n\n> **AgentSetConfigOptionAction** = \\{ `configId`: `string`; `value`: `string`; \\}\n\nAsk the agent to change one advertised select-style session setting.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-configid\"></a> `configId` | `string` | Opaque ACP config id advertised by the agent. |\n| <a id=\"property-value\"></a> `value` | `string` | Opaque select value advertised for that config option. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AgentSetModelAction.md -->\n# Type Alias: AgentSetModelAction\n\n> **AgentSetModelAction** = \\{ `model`: `string`; \\}\n\nAsk the agent to run on a different model from here on.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-model\"></a> `model` | `string` | The model slug the agent should switch to. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/AnswerToolApprovalResponse.md -->\n# Type Alias: AnswerToolApprovalResponse\n\n> **AnswerToolApprovalResponse** = \\{ `status`: [`ToolApprovalStatusDto`](ToolApprovalStatusDto.md); \\}\n\nResponse body for answering a held tool call.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-status\"></a> `status` | [`ToolApprovalStatusDto`](ToolApprovalStatusDto.md) | Where the call stands now. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/BotId.md -->\n# Type Alias: BotId\n\n> **BotId** = `string`\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/CaptureAttemptDto.md -->\n# Type Alias: CaptureAttemptDto\n\n> **CaptureAttemptDto** = \\{ `error?`: `string` \\| `null`; `finishedAt?`: `string` \\| `null`; `outcome?`: `null` \\| [`CaptureOutcomeDto`](CaptureOutcomeDto.md); `startedAt`: `string`; \\}\n\nThe latest capture attempt.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Why it did not capture, in a sentence the user can read. |\n| <a id=\"property-finishedat\"></a> `finishedAt?` | `string` \\| `null` | When it ended; absent while it runs. |\n| <a id=\"property-outcome\"></a> `outcome?` | `null` \\| [`CaptureOutcomeDto`](CaptureOutcomeDto.md) | - |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When it started. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/CaptureOutcomeDto.md -->\n# Type Alias: CaptureOutcomeDto\n\n> **CaptureOutcomeDto** = `\"captured\"` \\| `\"not_ready\"` \\| `\"failed\"`\n\nHow the latest capture attempt ended, on the wire.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ChangedFileDto.md -->\n# Type Alias: ChangedFileDto\n\n> **ChangedFileDto** = \\{ `additions`: `number`; `binary`: `boolean`; `deletions`: `number`; `kind`: [`FileChangeKindDto`](FileChangeKindDto.md); `patchOmitted`: `boolean`; `path`: `string`; `previousPath?`: `string` \\| `null`; \\}\n\nOne changed file.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added. |\n| <a id=\"property-binary\"></a> `binary` | `boolean` | The diff carries no text for this file. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed. |\n| <a id=\"property-kind\"></a> `kind` | [`FileChangeKindDto`](FileChangeKindDto.md) | What happened to the file. |\n| <a id=\"property-patchomitted\"></a> `patchOmitted` | `boolean` | The file's hunks were left out of the patch to fit the size budget. |\n| <a id=\"property-path\"></a> `path` | `string` | The file's path after the change, or before it for a deletion. |\n| <a id=\"property-previouspath\"></a> `previousPath?` | `string` \\| `null` | Where a renamed file came from. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ChangesetDto.md -->\n# Type Alias: ChangesetDto\n\n> **ChangesetDto** = \\{ `additions`: `number`; `base`: [`GitRefDto`](GitRefDto.md); `capturedAt`: `string`; `deletions`: `number`; `files`: [`ChangedFileDto`](ChangedFileDto.md)[]; `head`: [`GitRefDto`](GitRefDto.md); `id`: `string`; `patchBytes`: `number`; `repository?`: `string` \\| `null`; `source`: [`ChangesetSourceDto`](ChangesetSourceDto.md); `truncated`: `boolean`; \\}\n\nOne changeset: the files a patch touches and what happened to each.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added across all files. |\n| <a id=\"property-base\"></a> `base` | [`GitRefDto`](GitRefDto.md) | The side the work started from. |\n| <a id=\"property-capturedat\"></a> `capturedAt` | `string` | When the diff was taken. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed across all files. |\n| <a id=\"property-files\"></a> `files` | [`ChangedFileDto`](ChangedFileDto.md)[] | Every changed file, in patch order. |\n| <a id=\"property-head\"></a> `head` | [`GitRefDto`](GitRefDto.md) | The side carrying the work. |\n| <a id=\"property-id\"></a> `id` | `string` | The changeset's id; a different id means different changes. |\n| <a id=\"property-patchbytes\"></a> `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| <a id=\"property-repository\"></a> `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| <a id=\"property-source\"></a> `source` | [`ChangesetSourceDto`](ChangesetSourceDto.md) | Where the diff was read from. |\n| <a id=\"property-truncated\"></a> `truncated` | `boolean` | Some files' hunks were left out of the patch. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ChangesetSourceDto.md -->\n# Type Alias: ChangesetSourceDto\n\n> **ChangesetSourceDto** = `\"github_pull_request\"`\n\nThe source of a changeset's diff, on the wire.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md -->\n# Type Alias: CodingPreferencesBody\n\n> **CodingPreferencesBody** = \\{ `createTasks`: `boolean`; `openPullRequests`: `boolean`; \\}\n\nRequest or response body for the caller's coding preferences.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createtasks\"></a> `createTasks` | `boolean` | Whether new coding sessions research prior work and link a Macro task. |\n| <a id=\"property-openpullrequests\"></a> `openPullRequests` | `boolean` | Whether new coding sessions deliver their work as a pull request. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ControlResponse.md -->\n# Type Alias: ControlResponse\n\n> **ControlResponse** = \\{ `actionId`: [`AgentActionId`](AgentActionId.md); `status`: [`ControlStatusDto`](ControlStatusDto.md); \\}\n\nResponse body for a control operation.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | [`AgentActionId`](AgentActionId.md) | Matches `requestId` on the folded message this action derives once it dispatches, and names the queue entry until then. The caller's own `actionId` when it supplied one; a freshly minted id otherwise. |\n| <a id=\"property-status\"></a> `status` | [`ControlStatusDto`](ControlStatusDto.md) | Whether the action went out or waits in the queue. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ControlStatusDto.md -->\n# Type Alias: ControlStatusDto\n\n> **ControlStatusDto** = `\"sent\"` \\| `\"queued\"`\n\nWhat accepting a control operation did with it, on the wire.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ConversationTurnState.md -->\n# Type Alias: ConversationTurnState\n\n> **ConversationTurnState** = `\"queued\"` \\| `\"running\"` \\| `\"succeeded\"` \\| `\"failed\"` \\| `\"stopped\"` \\| `\"interrupted\"`\n\nThe state of one source message, retained after completion for deduplication.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/DecisionVia.md -->\n# Type Alias: DecisionVia\n\n> **DecisionVia** = `\"card\"` \\| `\"chat\"` \\| `\"inbox\"`\n\nSurface of a review decision.\n\n\n<!-- generated/agent-harness/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/agent-harness/types.gen/type-aliases/ElicitationAnswer.md -->\n# Type Alias: ElicitationAnswer\n\n> **ElicitationAnswer** = \\{ `action`: `\"accept\"`; `content?`: \\{\\[`key`: `string`\\]: [`ElicitationContentValue`](ElicitationContentValue.md); \\} \\| `null`; \\} \\| \\{ `action`: `\"decline\"`; \\} \\| \\{ `action`: `\"cancel\"`; \\}\n\nWhat the user decided about an elicitation. Mirrors ACP's three actions;\nthere is no `Other` because we never originate an action we do not know.\n\n## Union Members\n\n### Type Literal\n\n\\{ `action`: `\"accept\"`; `content?`: \\{\\[`key`: `string`\\]: [`ElicitationContentValue`](ElicitationContentValue.md); \\} \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action` | `\"accept\"` | - |\n| `content?` | \\{\\[`key`: `string`\\]: [`ElicitationContentValue`](ElicitationContentValue.md); \\} \\| `null` | Form: the submitted values keyed by property. URL: omitted. |\n\n***\n\n### Type Literal\n\n\\{ `action`: `\"decline\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `action`: `\"cancel\"`; \\}\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ElicitationContentValue.md -->\n# Type Alias: ElicitationContentValue\n\n> **ElicitationContentValue** = `string` \\| `boolean` \\| `number` \\| `number` \\| `string`[]\n\nA value ACP accepts in an elicitation answer.\n\nMirrors ACP's `ElicitationContentValue` so that the contract a caller\nanswers against is the closed union ACP will accept, rather than arbitrary\nJSON narrowed on the way out. An object, a null, or a mixed array is\nrefused when the request is deserialized - where the caller learns of it -\ninstead of at send time, when the elicitation slot has already been\nreleased.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ElicitationRequestId.md -->\n# Type Alias: ElicitationRequestId\n\n> **ElicitationRequestId** = `number` \\| `string`\n\nThe JSON-RPC id of an agent's `elicitation/create` request, carried whole\nso the answer echoes exactly what the agent sent.\n\nAgents pick these, not us: Claude Code counts from `0`, others use\nstrings. `null` is not a legal id for a request that expects a response,\nso it is not representable here.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ExecutionActivity.md -->\n# Type Alias: ExecutionActivity\n\n> **ExecutionActivity** = \\{ `id`: `number`; `label`: `string`; `status`: [`RecordedCallStatus`](RecordedCallStatus.md); \\}\n\nA bounded SDK operation observed during execution; not an authorization or write receipt.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `number` | Request identity within the execution. |\n| <a id=\"property-label\"></a> `label` | `string` | Server-selected label from the generated operation catalog. |\n| <a id=\"property-status\"></a> `status` | [`RecordedCallStatus`](RecordedCallStatus.md) | Observed request state; unfinished operations have unknown outcomes. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ExecutionId.md -->\n# Type Alias: ExecutionId\n\n> **ExecutionId** = `string`\n\nCaller-selected UUID persisted in tool input before execution begins.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ExecutionRecord.md -->\n# Type Alias: ExecutionRecord\n\n> **ExecutionRecord** = \\{ `actingAs?`: `null` \\| [`ToolActor`](ToolActor.md); `activity?`: [`ExecutionActivity`](ExecutionActivity.md)[]; `activityTruncated?`: `boolean`; `calls`: [`RecordedToolCall`](RecordedToolCall.md)[]; `error?`: `string` \\| `null`; `executionId`: [`ExecutionId`](ExecutionId.md); `result?`: `unknown`; `source`: `string`; `status`: [`ExecutionStatus`](ExecutionStatus.md); `turnId?`: `string` \\| `null`; \\}\n\nDurable source and final outcome, with historical bridge calls when present.\nThe full journal is not included in the model's tool result.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actingas\"></a> `actingAs?` | `null` \\| [`ToolActor`](ToolActor.md) | - |\n| <a id=\"property-activity\"></a> `activity?` | [`ExecutionActivity`](ExecutionActivity.md)[] | Advisory SDK operation activity, without arguments or response contents. |\n| <a id=\"property-activitytruncated\"></a> `activityTruncated?` | `boolean` | Additional request activity was omitted at the bounded observation limit. |\n| <a id=\"property-calls\"></a> `calls` | [`RecordedToolCall`](RecordedToolCall.md)[] | Historical bridge calls. Direct HTTP executions leave this empty. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Safe execution failure text. |\n| <a id=\"property-executionid\"></a> `executionId` | [`ExecutionId`](ExecutionId.md) | Execution identity. |\n| <a id=\"property-result\"></a> `result?` | `unknown` | JSON returned by the program, if successful. |\n| <a id=\"property-source\"></a> `source` | `string` | The submitted JavaScript module. |\n| <a id=\"property-status\"></a> `status` | [`ExecutionStatus`](ExecutionStatus.md) | Overall execution state. |\n| <a id=\"property-turnid\"></a> `turnId?` | `string` \\| `null` | Original turn, preventing another requester from replaying a saved result. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ExecutionStatus.md -->\n# Type Alias: ExecutionStatus\n\n> **ExecutionStatus** = `\"running\"` \\| `\"succeeded\"` \\| `\"failed\"` \\| `\"cancelled\"` \\| `\"timed_out\"`\n\nThe recorded outcome of a program.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ExternalSessionResponse.md -->\n# Type Alias: ExternalSessionResponse\n\n> **ExternalSessionResponse** = \\{ `name?`: `string` \\| `null`; `provider`: `string`; `url?`: `string` \\| `null`; \\}\n\nThe provider-side identity of an externally-served session.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The provider's display name for the agent, when it reported one. |\n| <a id=\"property-provider\"></a> `provider` | `string` | Which provider serves the session, e.g. `cursor`. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The agent's page on the provider's site, for a client to link out to. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/FileChangeKindDto.md -->\n# Type Alias: FileChangeKindDto\n\n> **FileChangeKindDto** = `\"added\"` \\| `\"modified\"` \\| `\"deleted\"` \\| `\"renamed\"`\n\nWhat happened to a file, on the wire.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/GitRefDto.md -->\n# Type Alias: GitRefDto\n\n> **GitRefDto** = \\{ `name?`: `string` \\| `null`; `sha?`: `string` \\| `null`; \\}\n\nOne end of the compared range.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The branch name, when known. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The commit, when known. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/LogDirectionDto.md -->\n# Type Alias: LogDirectionDto\n\n> **LogDirectionDto** = `\"notification\"` \\| `\"to_server\"` \\| `\"to_runtime\"`\n\nWhich way a logged frame travelled, mirroring [`Message`]'s discriminant.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/LogFrameDto.md -->\n# Type Alias: LogFrameDto\n\n> **LogFrameDto** = \\{ `content`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `direction`: [`LogDirectionDto`](LogDirectionDto.md); \\}\n\nThe two fields [`AgentSessionLogEntryDto`] flattens in.\n\nSchema only. Nothing constructs one: the entry serializes through\n[`Message`], and this exists so the generated clients see `direction` and\n`content` as named fields instead of an open map. A hand-built copy could\ndrift from the fold's wire format, and the point of the endpoint is that it\ncannot - so this describes that format without being able to produce it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content\"></a> `content` | \\{\\[`key`: `string`\\]: `unknown`; \\} | The protocol envelope, verbatim. Opaque here: it is Agent Runtime Protocol, whose shape belongs to the fold rather than this endpoint. |\n| <a id=\"property-direction\"></a> `direction` | [`LogDirectionDto`](LogDirectionDto.md) | Which way the frame travelled. |\n\n\n<!-- generated/agent-harness/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/agent-harness/types.gen/type-aliases/PermissionAnswer.md -->\n# Type Alias: PermissionAnswer\n\n> **PermissionAnswer** = \\{ `kind`: `\"selected\"`; `optionId`: `string`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\}\n\nThe decision carried by an [`AgentPermissionAction`].\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"selected\"`; `optionId`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"selected\"` | - |\n| `optionId` | `string` | The chosen option's id, as the agent listed it. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/PromptAttachment.md -->\n# Type Alias: PromptAttachment\n\n> **PromptAttachment** = \\{ `mimeType?`: `string` \\| `null`; `name`: `string`; `size?`: `number` \\| `null`; `uri`: `string`; \\}\n\nA file the prompt refers to, by where the agent can fetch it.\n\nMirrors ACP's `resource_link` content block, which every agent must\naccept: bytes never ride the prompt, only a URI (a static file service URL\nin practice) with enough metadata for a client to render a chip and for\nthe agent to decide whether to fetch it. Keeping the wire shape ACP-native\nmeans the harness translates without resolving anything, and the fold\nreads the same fields back off the logged frame.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mimetype\"></a> `mimeType?` | `string` \\| `null` | The file's media type, when known. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, typically the original file name. |\n| <a id=\"property-size\"></a> `size?` | `number` \\| `null` | Size in bytes, when known. |\n| <a id=\"property-uri\"></a> `uri` | `string` | Where the agent can fetch the file. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/PullRequestLinkSource.md -->\n# Type Alias: PullRequestLinkSource\n\n> **PullRequestLinkSource** = `\"agent\"` \\| `\"user\"`\n\nWho associated a pull request with a session.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/QueuedActionDto.md -->\n# Type Alias: QueuedActionDto\n\n> **QueuedActionDto** = \\{ `actionId`: [`AgentActionId`](AgentActionId.md); `actorUserId?`: `string` \\| `null`; `attachments?`: [`PromptAttachment`](PromptAttachment.md)[]; `createdAt`: `string`; `kind`: `string`; `prompt?`: `string` \\| `null`; \\}\n\nOne action waiting in a session's queue.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | [`AgentActionId`](AgentActionId.md) | The id the action was accepted under. |\n| <a id=\"property-actoruserid\"></a> `actorUserId?` | `string` \\| `null` | The user who queued it, absent when a bot acted on nobody's behalf. |\n| <a id=\"property-attachments\"></a> `attachments?` | [`PromptAttachment`](PromptAttachment.md)[] | Files the prompt refers to, for prompts only. Kept through an edit, which replaces the text alone. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was accepted. |\n| <a id=\"property-kind\"></a> `kind` | `string` | What kind of action waits - `prompt` or `compact`; only turn-occupying actions are ever queued. |\n| <a id=\"property-prompt\"></a> `prompt?` | `string` \\| `null` | The prompt's raw text, present for prompts only. What an edit replaces. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/RecordedCallStatus.md -->\n# Type Alias: RecordedCallStatus\n\n> **RecordedCallStatus** = `\"running\"` \\| `\"completed\"` \\| `\"failed\"` \\| `\"unknown\"`\n\nA dispatch result; unfinished work is never reported as success.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/RecordedToolCall.md -->\n# Type Alias: RecordedToolCall\n\n> **RecordedToolCall** = \\{ `error?`: `string` \\| `null`; `id`: `string`; `input`: `unknown`; `name`: `string`; `output?`: `unknown`; `outputOmitted`: `boolean`; `status`: [`RecordedCallStatus`](RecordedCallStatus.md); \\}\n\nA real inner call, recorded by trusted dispatch for the existing renderers.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Safe tool failure, if one was returned. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable, execution-scoped component identity. |\n| <a id=\"property-input\"></a> `input` | `unknown` | Arguments passed to the actual tool. |\n| <a id=\"property-name\"></a> `name` | `string` | Canonical Macro tool name from the allowlisted registry. |\n| <a id=\"property-output\"></a> `output?` | `unknown` | Original tool output, retained independently of the program's return value. |\n| <a id=\"property-outputomitted\"></a> `outputOmitted` | `boolean` | Whether the response was omitted to keep the durable journal bounded. |\n| <a id=\"property-status\"></a> `status` | [`RecordedCallStatus`](RecordedCallStatus.md) | A started call that never replied has an unknown side-effect outcome. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewDecisionContext.md -->\n# Type Alias: ReviewDecisionContext\n\n> **ReviewDecisionContext** = \\{ `by`: `string`; `items`: `string`[]; `revision`: `number`; `via`: [`DecisionVia`](DecisionVia.md); \\}\n\nFacts about the most recent account-holder decision.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-by\"></a> `by` | `string` | Authenticated account holder. |\n| <a id=\"property-items\"></a> `items` | `string`[] | Items selected by this decision. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision claimed by this batch, used in notification deduplication. |\n| <a id=\"property-via\"></a> `via` | [`DecisionVia`](DecisionVia.md) | Entry surface. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewId.md -->\n# Type Alias: ReviewId\n\n> **ReviewId** = `string`\n\nPersisted review identity.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewItem.md -->\n# Type Alias: ReviewItem\n\n> **ReviewItem** = \\{ `draft`: `unknown`; `edited?`: `boolean`; `error?`: `string` \\| `null`; `id`: `string`; `result?`: `unknown`; `status`: [`ReviewItemStatus`](ReviewItemStatus.md); \\}\n\nOne editable item and its durable outcome.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `unknown` | Validated arguments for the existing composer/action. |\n| <a id=\"property-edited\"></a> `edited?` | `boolean` | Whether the account holder edited this draft before deciding. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Failure or uncertainty description. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable item identity across stack navigation and edits. |\n| <a id=\"property-result\"></a> `result?` | `unknown` | Actual backend response, never a model assertion. |\n| <a id=\"property-status\"></a> `status` | [`ReviewItemStatus`](ReviewItemStatus.md) | Current outcome. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewItemStatus.md -->\n# Type Alias: ReviewItemStatus\n\n> **ReviewItemStatus** = `\"pending\"` \\| `\"submitting\"` \\| `\"completed\"` \\| `\"dismissed\"` \\| `\"unknown\"`\n\nReview item state, shared with notification consumers.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewKind.md -->\n# Type Alias: ReviewKind\n\n> **ReviewKind** = `\"email\"` \\| `\"calendar\"` \\| `\"import\"`\n\nThe component and action used to finish a review.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ReviewRecord.md -->\n# Type Alias: ReviewRecord\n\n> **ReviewRecord** = \\{ `actingUser?`: `string` \\| `null`; `decision?`: `null` \\| [`ReviewDecisionContext`](ReviewDecisionContext.md); `executionId?`: `null` \\| [`ExecutionId`](ExecutionId.md); `id`: [`ReviewId`](ReviewId.md); `items`: [`ReviewItem`](ReviewItem.md)[]; `kind`: [`ReviewKind`](ReviewKind.md); `presentedAt?`: `number` \\| `null`; `revision`: `number`; `sessionId`: `string`; `title`: `string`; `updatedAt`: `number`; \\}\n\nFull UI record, fetched outside the model context.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actinguser\"></a> `actingUser?` | `string` \\| `null` | Account whose email/calendar the drafts use; historical records use the session owner. |\n| <a id=\"property-decision\"></a> `decision?` | `null` \\| [`ReviewDecisionContext`](ReviewDecisionContext.md) | - |\n| <a id=\"property-executionid\"></a> `executionId?` | `null` \\| [`ExecutionId`](ExecutionId.md) | - |\n| <a id=\"property-id\"></a> `id` | [`ReviewId`](ReviewId.md) | Review identity. |\n| <a id=\"property-items\"></a> `items` | [`ReviewItem`](ReviewItem.md)[] | Drafts and per-item outcomes. |\n| <a id=\"property-kind\"></a> `kind` | [`ReviewKind`](ReviewKind.md) | Component kind. |\n| <a id=\"property-presentedat\"></a> `presentedAt?` | `number` \\| `null` | Durable presentation acknowledgment, separate from user decisions. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Compare-and-swap revision for edits and submissions. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Owning session. |\n| <a id=\"property-title\"></a> `title` | `string` | Stack label. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `number` | Milliseconds since epoch of the last state change. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/SandboxSize.md -->\n# Type Alias: SandboxSize\n\n> **SandboxSize** = `\"small\"` \\| `\"default\"` \\| `\"large\"`\n\nNamed compute tier for a managed sandbox.\n\nThe API and database store the name. CPU, RAM, and disk live in\n`crates/agent_harness/sandbox_sizes.json`.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/SessionBot.md -->\n# Type Alias: SessionBot\n\n> **SessionBot** = \\{ `avatarUrl?`: `string` \\| `null`; `handle`: `string`; `id`: [`BotId`](BotId.md); `name`: `string`; \\}\n\nThe agent behind a session, as much of it as rendering a message needs.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatarurl\"></a> `avatarUrl?` | `string` \\| `null` | Avatar, when it has one. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable `@` handle, without a leading `@`. |\n| <a id=\"property-id\"></a> `id` | [`BotId`](BotId.md) | The bot's id. A message it sent has `\"bot\\|{id}\"` as its sender. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/SessionStatusDto.md -->\n# Type Alias: SessionStatusDto\n\n> **SessionStatusDto** = \\{ `kind`: `\"no_messages\"`; \\} \\| \\{ `event`: `string`; `kind`: `\"event\"`; \\} \\| \\{ `kind`: `\"disconnected\"`; \\}\n\nTransport representation of a session's status, mirroring\n[`SessionStatus`].\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"no_messages\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `event`: `string`; `kind`: `\"event\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `event` | `string` | The wire name of the system event, e.g. `acp_ready`. |\n| `kind` | `\"event\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ToolActor.md -->\n# Type Alias: ToolActor\n\n> **ToolActor** = `\"requester\"` \\| `\"owner\"`\n\nWhich authenticated participant's access a tool call requests.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ToolApprovalAnswerDto.md -->\n# Type Alias: ToolApprovalAnswerDto\n\n> **ToolApprovalAnswerDto** = `\"approve\"` \\| `\"approve_and_remember\"` \\| `\"deny\"` \\| `\"cancel\"`\n\nHow a person answers a held tool call.\n\n\n<!-- generated/agent-harness/types.gen/type-aliases/ToolApprovalStatusDto.md -->\n# Type Alias: ToolApprovalStatusDto\n\n> **ToolApprovalStatusDto** = `\"pending\"` \\| `\"approved\"` \\| `\"denied\"` \\| `\"cancelled\"` \\| `\"expired\"`\n\nWhere a held tool call stands once answered.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- src/entities/agent-sessions/agent-session/classes/AgentSession.md -->\n# Class: AgentSession\n\nA managed or externally hosted coding-agent session.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`AgentSessionResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionResponse.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | Access requests and direct user grants. | - |\n| <a id=\"property-codeexecutions\"></a> `codeExecutions` | `readonly` | \\{ `byId`: (`id`) => [`CodeExecution`](../../code-execution/classes/CodeExecution.md); \\} | Saved code executions scoped to this session. Handle construction makes no request. | - |\n| `codeExecutions.byId` | `public` | (`id`) => [`CodeExecution`](../../code-execution/classes/CodeExecution.md) | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the session was created. | - |\n| <a id=\"property-harness\"></a> `harness` | `readonly` | () => `Promise`\\<`string`\\> | The agent harness implementation serving the session. | - |\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-instructions\"></a> `instructions` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Instructions the session's runtime works under, when any were stated at creation. Fixed for the session's life. | - |\n| <a id=\"property-isarchived\"></a> `isArchived` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the session is archived and read-only. | - |\n| <a id=\"property-model\"></a> `model` | `readonly` | () => `Promise`\\<`string`\\> | The model currently configured for the session. | - |\n| <a id=\"property-modifiedat\"></a> `modifiedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the session was last modified. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The session's user-facing display name. | - |\n| <a id=\"property-repourl\"></a> `repoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The repository the agent works with, when one was supplied. | - |\n| <a id=\"property-reviews\"></a> `reviews` | `readonly` | \\{ `byId`: (`id`) => [`SessionReview`](../../review/classes/SessionReview.md); `create`: (`input`) => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)\\>; \\} | Persisted reviews scoped to this session, with or without a code execution. | - |\n| `reviews.byId` | `public` | (`id`) => [`SessionReview`](../../review/classes/SessionReview.md) | - | - |\n| `reviews.create` | `public` | (`input`) => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)\\> | - | - |\n| <a id=\"property-sandboxsize\"></a> `sandboxSize` | `readonly` | () => `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\> | Compute tier of the managed sandbox. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`SessionStatusDto`](../../../../../generated/agent-harness/types.gen/type-aliases/SessionStatusDto.md)\\> | The session's latest runtime status. | - |\n\n## Methods\n\n### archive()\n\n> **archive**(): `Promise`\\<`void`\\>\n\nArchive this session, making it read-only until unarchived.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### changes()\n\n> **changes**(): `Promise`\\<[`AgentSessionChangesResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionChangesResponse.md)\\>\n\nRead the latest captured GitHub pull request changes and capture status.\n\n#### Returns\n\n`Promise`\\<[`AgentSessionChangesResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionChangesResponse.md)\\>\n\n***\n\n### changesPatch()\n\n> **changesPatch**(): `Promise`\\<`string`\\>\n\nRead the unified diff of the latest captured changeset.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### control()\n\n> **control**(`action`): `Promise`\\<[`ControlResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/ControlResponse.md)\\>\n\nSend a prompt or lifecycle operation to the live agent session.\n\nThe returned `actionId` matches `requestId` on the folded message the\naction derives once it dispatches. A `queued` status means a turn was\nrunning: the action waits in the session's queue ([queue](#queue)) and\ndispatches when that turn ends.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `action` | [`AgentAction`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentAction.md) |\n\n#### Returns\n\n`Promise`\\<[`ControlResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/ControlResponse.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this session and any live resources it owns.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### foldedLog()\n\n> **foldedLog**(): `Promise`\\<[`FoldedAgentSessionLog`](../type-aliases/FoldedAgentSessionLog.md)\\>\n\nRead this session's whole history as the conversation the app renders:\neach user prompt and agent reply, oldest first, with tool calls and their\nresults, plans, permission requests and how each turn ended. Works on any\nsession the caller can view, live or finished, so it is the way to read\nwhat another agent session did. Prefer it to [log](#log), which returns\nraw protocol frames.\n\n#### Returns\n\n`Promise`\\<[`FoldedAgentSessionLog`](../type-aliases/FoldedAgentSessionLog.md)\\>\n\n***\n\n### linkPullRequest()\n\n> **linkPullRequest**(`url`): `Promise`\\<`void`\\>\n\nLink the GitHub pull request at `url` to this session. Linking one that\nis already linked changes nothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### log()\n\n> **log**(): `Promise`\\<[`AgentSessionLogResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionLogResponse.md)\\>\n\nRead the complete raw protocol log for this session.\n\n#### Returns\n\n`Promise`\\<[`AgentSessionLogResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionLogResponse.md)\\>\n\n***\n\n### prompt()\n\n> **prompt**(`text`, `attachments?`): `Promise`\\<[`ControlResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/ControlResponse.md)\\>\n\nSend a prompt to the session — sugar over [control](#control).\n\n`attachments` are files the prompt refers to, each by a URL the agent\ncan fetch (a static file service URL in practice); they reach the agent\nas ACP `resource_link` blocks after the text.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `text` | `string` |\n| `attachments?` | [`PromptAttachment`](../../../../../generated/agent-harness/types.gen/type-aliases/PromptAttachment.md)[] |\n\n#### Returns\n\n`Promise`\\<[`ControlResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/ControlResponse.md)\\>\n\n***\n\n### pullRequests()\n\n> **pullRequests**(): `Promise`\\<[`SessionPullRequest`](../type-aliases/SessionPullRequest.md)[]\\>\n\nThe GitHub pull requests linked to this session: the one its agent\nopened and any a person linked, oldest first.\n\n#### Returns\n\n`Promise`\\<[`SessionPullRequest`](../type-aliases/SessionPullRequest.md)[]\\>\n\n***\n\n### queue()\n\n> **queue**(): `Promise`\\<[`QueuedAction`](../../queued-action/classes/QueuedAction.md)[]\\>\n\nThe actions waiting to dispatch in this session, oldest first. Each can\nbe edited or removed until it dispatches.\n\n#### Returns\n\n`Promise`\\<[`QueuedAction`](../../queued-action/classes/QueuedAction.md)[]\\>\n\n***\n\n### refreshChanges()\n\n> **refreshChanges**(): `Promise`\\<[`AgentSessionChangesResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionChangesResponse.md)\\>\n\nRequest a fresh capture and return the current state while it runs.\n\n#### Returns\n\n`Promise`\\<[`AgentSessionChangesResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionChangesResponse.md)\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename this session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setSandboxSize()\n\n> **setSandboxSize**(`size`): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nResize this session's sandbox and remember the size as the owner's default.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `size` | [`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md) |\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/agent-harness/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/agent-harness/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`AgentSessionResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`AgentSessionResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`AgentSessionResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentSessionResponse.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### toolApprovalById()\n\n> **toolApprovalById**(`id`): [`ToolApproval`](../../tool-approval/classes/ToolApproval.md)\n\nConstruct an approval handle scoped to this session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`ToolApproval`](../../tool-approval/classes/ToolApproval.md)\n\n***\n\n### unarchive()\n\n> **unarchive**(): `Promise`\\<`void`\\>\n\nRestore an archived session so it can be edited and prompted again.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### unlinkPullRequest()\n\n> **unlinkPullRequest**(`url`): `Promise`\\<`void`\\>\n\nUnlink a GitHub pull request a person linked to this session. The pull\nrequest the session's agent opened stays linked.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### updateSharePermissions()\n\n> **updateSharePermissions**(`options`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/agent-harness/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nReplace sharing grants.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/agent-harness/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `AgentSession`\n\nA handle to an agent session 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`AgentSession`\n\n***\n\n### codingPreferences()\n\n> `static` **codingPreferences**(`client`): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nWhat the caller's new coding sessions are told to do beyond their assignment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### createManaged()\n\n> `static` **createManaged**(`client`, `opts?`): `Promise`\\<`AgentSession`\\>\n\nCreate a managed session, optionally delivering its first prompt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | [`CreateManagedSessionOptions`](../type-aliases/CreateManagedSessionOptions.md) |\n\n#### Returns\n\n`Promise`\\<`AgentSession`\\>\n\n***\n\n### defaultSandboxSize()\n\n> `static` **defaultSandboxSize**(`client`): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nThe caller's default sandbox size for new `@coder` sessions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n***\n\n### forPullRequest()\n\n> `static` **forPullRequest**(`client`, `url`): `Promise`\\<`AgentSession`[]\\>\n\nThe sessions linked to the GitHub pull request at `url` that the caller\ncan view, oldest link first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`AgentSession`[]\\>\n\n***\n\n### repositories()\n\n> `static` **repositories**(`client`): `Promise`\\<[`SelectableRepository`](../type-aliases/SelectableRepository.md)[]\\>\n\nThe GitHub repositories the caller can hand a managed session: every\nrepository under an installation of Macro's GitHub App they or their\nteams made, sorted by `owner/name`. Empty when the App is installed\nnowhere they reach.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<[`SelectableRepository`](../type-aliases/SelectableRepository.md)[]\\>\n\n***\n\n### repositoryBranches()\n\n> `static` **repositoryBranches**(`client`, `repoUrl`): `Promise`\\<`string`[]\\>\n\nBranch names on one repository the caller can start a managed session\nfrom, in the order GitHub listed them. Empty when the repository has\nno commits yet. `repoUrl` is one of the URLs [AgentSession.repositories](#repositories)\nlists.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `repoUrl` | `string` |\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### setCodingPreferences()\n\n> `static` **setCodingPreferences**(`client`, `preferences`): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nReplace the caller's coding preferences.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `preferences` | [`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md) |\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### setDefaultSandboxSize()\n\n> `static` **setDefaultSandboxSize**(`client`, `size`): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nSet the caller's default sandbox size for the next `@coder` mention.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `size` | [`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md) |\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n\n<!-- src/entities/agent-sessions/agent-session/type-aliases/CreateManagedSessionOptions.md -->\n# Type Alias: CreateManagedSessionOptions\n\n> **CreateManagedSessionOptions** = \\{ `instructions?`: `string`; `model?`: `string`; `prompt?`: `string`; `repoBranch?`: `string`; `repoUrl?`: `string`; \\}\n\nWhat a managed session is created with.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` | Instructions the session's runtime works under, fixed for its life. |\n| <a id=\"property-model\"></a> `model?` | `string` | The model the session runs on, instead of its persona's. The session's model from creation, read back as [AgentSession.model](../classes/AgentSession.md#property-model). |\n| <a id=\"property-prompt\"></a> `prompt?` | `string` | First prompt to deliver once the session is running. |\n| <a id=\"property-repobranch\"></a> `repoBranch?` | `string` | The branch the session starts on; needs `repoUrl`. Omitted, the repository's default branch. |\n| <a id=\"property-repourl\"></a> `repoUrl?` | `string` | The repository the session works on, as one of the URLs [AgentSession.repositories](../classes/AgentSession.md#repositories) lists for the caller. Omitted, the runtime chooses from the prompt. Honored for Cursor sessions. |\n\n\n<!-- src/entities/agent-sessions/agent-session/type-aliases/FoldedAgentSessionLog.md -->\n# Type Alias: FoldedAgentSessionLog\n\n> **FoldedAgentSessionLog** = \\{ `bot`: [`SessionBot`](../../../../../generated/agent-harness/types.gen/type-aliases/SessionBot.md); `messages`: `FoldedMessage`[]; \\}\n\nA session's history folded into readable messages, oldest first.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bot\"></a> `bot` | [`SessionBot`](../../../../../generated/agent-harness/types.gen/type-aliases/SessionBot.md) | The agent that sent every agent message. |\n| <a id=\"property-messages\"></a> `messages` | `FoldedMessage`[] | Prompts and replies with their tool calls, results, plans, permission requests and how each turn ended. |\n\n\n<!-- src/entities/agent-sessions/agent-session/type-aliases/SelectableRepository.md -->\n# Type Alias: SelectableRepository\n\n> **SelectableRepository** = \\{ `defaultBranch?`: `string`; `url`: `string`; \\}\n\nA GitHub repository the caller can point a managed session at.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-defaultbranch\"></a> `defaultBranch?` | `string` | The branch its clones check out, and where a session starts unless `createManaged` names another. Absent for a repository with no commits. |\n| <a id=\"property-url\"></a> `url` | `string` | The canonical `https://github.com/owner/name` URL, as `createManaged` takes it. |\n\n\n<!-- src/entities/agent-sessions/agent-session/type-aliases/SessionPullRequest.md -->\n# Type Alias: SessionPullRequest\n\n> **SessionPullRequest** = \\{ `createdAt`: `string`; `githubKey`: `string`; `linkedBy?`: [`User`](../../../users/user/classes/User.md); `source`: [`PullRequestLinkSource`](../../../../../generated/agent-harness/types.gen/type-aliases/PullRequestLinkSource.md); `url`: `string`; \\}\n\nA GitHub pull request linked to a session.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was linked. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The pull request's `owner/repo/pull/number` key. |\n| <a id=\"property-linkedby\"></a> `linkedBy?` | [`User`](../../../users/user/classes/User.md) | Who linked it, for pull requests a person linked. |\n| <a id=\"property-source\"></a> `source` | [`PullRequestLinkSource`](../../../../../generated/agent-harness/types.gen/type-aliases/PullRequestLinkSource.md) | Whether the session's agent opened it or a person linked it. |\n| <a id=\"property-url\"></a> `url` | `string` | The pull request's GitHub URL. |\n\n\n<!-- src/entities/agent-sessions/code-execution/classes/CodeExecution.md -->\n# Class: CodeExecution\n\nA saved code execution belonging to one agent session.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ExecutionRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ExecutionRecord.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-calls\"></a> `calls` | `readonly` | () => `Promise`\\<[`RecordedToolCall`](../../../../../generated/agent-harness/types.gen/type-aliases/RecordedToolCall.md)[]\\> | Legacy bridge calls; direct HTTP executions leave this empty. | - |\n| <a id=\"property-error\"></a> `error` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Execution failure text, when present. | - |\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-reviews\"></a> `reviews` | `readonly` | \\{ `create`: (`input`) => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)\\>; `list`: () => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)[]\\>; \\} | Persistent UI blocks, independent of the execution lifetime. | - |\n| `reviews.create` | `public` | (`input`) => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)\\> | - | - |\n| `reviews.list` | `public` | () => `Promise`\\<[`SessionReview`](../../review/classes/SessionReview.md)[]\\> | - | - |\n| <a id=\"property-source\"></a> `source` | `readonly` | () => `Promise`\\<`string`\\> | The submitted JavaScript module source. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`ExecutionStatus`](../../../../../generated/agent-harness/types.gen/type-aliases/ExecutionStatus.md)\\> | Saved execution state. Call refresh to observe subsequent changes. | - |\n\n## Methods\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`CodeExecution`\\>\n\nReload the saved state, for example after a running execution completes.\n\n#### Returns\n\n`Promise`\\<`CodeExecution`\\>\n\n***\n\n### result()\n\n> **result**(): `Promise`\\<`unknown`\\>\n\nThe program's returned JSON; preserves an explicit null result.\n\n#### Returns\n\n`Promise`\\<`unknown`\\>\n\n***\n\n### session()\n\n> **session**(): [`AgentSession`](../../agent-session/classes/AgentSession.md)\n\nThe session this execution belongs to.\n\n#### Returns\n\n[`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ExecutionRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ExecutionRecord.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ExecutionRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ExecutionRecord.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ExecutionRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ExecutionRecord.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`, `session`, `id`): `CodeExecution`\n\nConstruct a lazy execution handle within its owning session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n| `id` | `string` |\n\n#### Returns\n\n`CodeExecution`\n\n\n<!-- src/entities/agent-sessions/code-execution/type-aliases/CodeResult.md -->\n# Type Alias: CodeResult\n\n> **CodeResult** = \\{ `data`: [`JsonValue`](JsonValue.md); `reviews`: \\{ `id`: `string`; `kind`: `\"email\"` \\| `\"calendar\"`; \\}[]; \\}\n\nJSON data returned to the model, plus references to independently saved UI.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-data\"></a> `data` | [`JsonValue`](JsonValue.md) |\n| <a id=\"property-reviews\"></a> `reviews` | \\{ `id`: `string`; `kind`: `\"email\"` \\| `\"calendar\"`; \\}[] |\n\n\n<!-- src/entities/agent-sessions/code-execution/type-aliases/JsonValue.md -->\n# Type Alias: JsonValue\n\n> **JsonValue** = `null` \\| `boolean` \\| `number` \\| `string` \\| `JsonValue`[] \\| \\{\\[`key`: `string`\\]: `JsonValue`; \\}\n\n\n<!-- src/entities/agent-sessions/conversation/classes/AgentConversation.md -->\n# Class: AgentConversation\n\nAn agent's conversation in one channel.\n\n## Constructors\n\n### Constructor\n\n> **new AgentConversation**(`client`, `channel`, `record`): `AgentConversation`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `channel` | [`Channel`](../../../channels/channel/classes/Channel.md) | Parent channel. |\n| `record` | [`AgentConversationDto`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentConversationDto.md) | - |\n\n#### Returns\n\n`AgentConversation`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | [`Channel`](../../../channels/channel/classes/Channel.md) | Parent channel. |\n\n## Methods\n\n### agent()\n\n> **agent**(): [`Agent`](../../../agents/agent/classes/Agent.md)\n\nThe agent taking part.\n\n#### Returns\n\n[`Agent`](../../../agents/agent/classes/Agent.md)\n\n***\n\n### sessions()\n\n> **sessions**(): \\{ `createdAt`: `string`; `isCurrent`: `boolean`; `session`: [`AgentSession`](../../agent-session/classes/AgentSession.md); \\}[]\n\nConversation sessions with their current flag.\n\n#### Returns\n\n\\{ `createdAt`: `string`; `isCurrent`: `boolean`; `session`: [`AgentSession`](../../agent-session/classes/AgentSession.md); \\}[]\n\n***\n\n### startFresh()\n\n> **startFresh**(`session`): `Promise`\\<`void`\\>\n\nStart a fresh conversation from one of its sessions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `agentId`: `string`; `channelId`: `string`; \\}\n\nSerialize scoped identity.\n\n#### Returns\n\n\\{ `agentId`: `string`; `channelId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `agentId` | `string` |\n| `channelId` | `string` |\n\n***\n\n### turns()\n\n> **turns**(): [`ConversationTurn`](ConversationTurn.md)[]\n\nRecorded conversation turns.\n\n#### Returns\n\n[`ConversationTurn`](ConversationTurn.md)[]\n\n\n<!-- src/entities/agent-sessions/conversation/classes/ConversationTurn.md -->\n# Class: ConversationTurn\n\nOne agent conversation turn, identified by its source message.\n\n## Constructors\n\n### Constructor\n\n> **new ConversationTurn**(`client`, `conversation`, `record`): `ConversationTurn`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `conversation` | [`AgentConversation`](AgentConversation.md) | Parent conversation. |\n| `record` | [`AgentConversationTurnDto`](../../../../../generated/agent-harness/types.gen/type-aliases/AgentConversationTurnDto.md) | - |\n\n#### Returns\n\n`ConversationTurn`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-conversation\"></a> `conversation` | `readonly` | [`AgentConversation`](AgentConversation.md) | Parent conversation. |\n\n## Methods\n\n### retry()\n\n> **retry**(`actionId`): `Promise`\\<`void`\\>\n\nRetry with a caller persisted action nonce. Never retries automatically.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `actionId` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### session()\n\n> **session**(): [`AgentSession`](../../agent-session/classes/AgentSession.md)\n\nSession that handled this turn.\n\n#### Returns\n\n[`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n***\n\n### source()\n\n> **source**(): [`Message`](../../../channels/message/classes/Message.md)\n\nOriginating message.\n\n#### Returns\n\n[`Message`](../../../channels/message/classes/Message.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `channelId`: `string`; `sourceMessageId`: `string`; \\}\n\nSerialize scoped identity.\n\n#### Returns\n\n\\{ `channelId`: `string`; `sourceMessageId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `channelId` | `string` |\n| `sourceMessageId` | `string` |\n\n\n<!-- src/entities/agent-sessions/namespace/classes/AgentSessionNamespace.md -->\n# Class: AgentSessionNamespace\n\nEntry point for coding-agent sessions.\n\n## Constructors\n\n### Constructor\n\n> **new AgentSessionNamespace**(`client`): `AgentSessionNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AgentSessionNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`AgentSession`](../../agent-session/classes/AgentSession.md)\n\nA handle to an agent session by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n***\n\n### codingPreferences()\n\n> **codingPreferences**(): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nWhat the caller's new coding sessions are told to do beyond their assignment.\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### createManaged()\n\n> **createManaged**(`opts?`): `Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)\\>\n\nCreate a managed agent session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`CreateManagedSessionOptions`](../../agent-session/type-aliases/CreateManagedSessionOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)\\>\n\n***\n\n### defaultSandboxSize()\n\n> **defaultSandboxSize**(): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nThe caller's default sandbox size for new `@coder` sessions.\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n***\n\n### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)[]\\>\n\nThe sessions linked to the GitHub pull request at `url` that the caller\ncan view.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../agent-session/classes/AgentSession.md)[]\\>\n\n***\n\n### repositories()\n\n> **repositories**(): `Promise`\\<[`SelectableRepository`](../../agent-session/type-aliases/SelectableRepository.md)[]\\>\n\nThe GitHub repositories the caller can hand a managed session, with the\nbranch each one's sessions start on by default.\n\n#### Returns\n\n`Promise`\\<[`SelectableRepository`](../../agent-session/type-aliases/SelectableRepository.md)[]\\>\n\n***\n\n### repositoryBranches()\n\n> **repositoryBranches**(`repoUrl`): `Promise`\\<`string`[]\\>\n\nBranch names on one repository the caller can start a managed session\nfrom. `repoUrl` is one of the URLs [AgentSessionNamespace.repositories](#repositories)\nlists.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `repoUrl` | `string` |\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### setCodingPreferences()\n\n> **setCodingPreferences**(`preferences`): `Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\nReplace the caller's coding preferences.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `preferences` | [`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md) |\n\n#### Returns\n\n`Promise`\\<[`CodingPreferencesBody`](../../../../../generated/agent-harness/types.gen/type-aliases/CodingPreferencesBody.md)\\>\n\n***\n\n### setDefaultSandboxSize()\n\n> **setDefaultSandboxSize**(`size`): `Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\nSet the caller's default sandbox size for the next `@coder` mention.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `size` | [`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md) |\n\n#### Returns\n\n`Promise`\\<[`SandboxSize`](../../../../../generated/agent-harness/types.gen/type-aliases/SandboxSize.md)\\>\n\n\n<!-- src/entities/agent-sessions/queued-action/classes/QueuedAction.md -->\n# Class: QueuedAction\n\nOne action waiting in an agent session's server-side queue: a prompt or a\ncompact accepted while a turn was running, dispatching when that turn\nends. Until then it can be edited (prompts only), steered, or removed; once\nit has dispatched, these actions answer 404 — there is no un-sending.\n\nList-sourced only - there is no per-action GET, only the queue snapshot -\nso this wraps whatever DTO the caller already has, the same shape\n`CrmComment` wraps a list-sourced record, rather than `MacroEntity`'s\nlazy-fetch-by-id.\n\n## Accessors\n\n### actionId\n\n#### Get Signature\n\n> **get** **actionId**(): `string`\n\nThe id the action was accepted under. Once it dispatches, this equals\n`requestId` on the folded message the action derives.\n\n##### Returns\n\n`string`\n\n***\n\n### actorUserId\n\n#### Get Signature\n\n> **get** **actorUserId**(): `string` \\| `undefined`\n\nThe user who queued it, absent when a bot acted on nobody's behalf.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### attachments\n\n#### Get Signature\n\n> **get** **attachments**(): [`PromptAttachment`](../../../../../generated/agent-harness/types.gen/type-aliases/PromptAttachment.md)[]\n\nFiles the prompt refers to; empty for a compact. Kept through an edit.\n\n##### Returns\n\n[`PromptAttachment`](../../../../../generated/agent-harness/types.gen/type-aliases/PromptAttachment.md)[]\n\n***\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen the action was accepted, as an RFC 3339 timestamp.\n\n##### Returns\n\n`string`\n\n***\n\n### kind\n\n#### Get Signature\n\n> **get** **kind**(): `string`\n\n`prompt` or `compact`; only turn-occupying actions are ever queued.\n\n##### Returns\n\n`string`\n\n***\n\n### prompt\n\n#### Get Signature\n\n> **get** **prompt**(): `string` \\| `undefined`\n\nThe prompt's raw text, present for prompts only. What an edit replaces.\n\n##### Returns\n\n`string` \\| `undefined`\n\n## Methods\n\n### edit()\n\n> **edit**(`prompt`): `Promise`\\<`QueuedAction`\\>\n\nReplace this queued prompt's text before it dispatches. Returns this\nhandle for chaining; the edit endpoint answers 204, so `prompt` is\napplied locally rather than reread from a response body.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `prompt` | `string` |\n\n#### Returns\n\n`Promise`\\<`QueuedAction`\\>\n\n***\n\n### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this action from the queue before it dispatches.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### steer()\n\n> **steer**(): `Promise`\\<`void`\\>\n\nMove this action to the front and interrupt the current turn to run it next.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### from()\n\n> `static` **from**(`client`, `sessionId`, `dto`): `QueuedAction`\n\nWrap a queue entry already in hand (e.g. from `AgentSession.queue()`).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `sessionId` | `string` |\n| `dto` | [`QueuedActionDto`](../../../../../generated/agent-harness/types.gen/type-aliases/QueuedActionDto.md) |\n\n#### Returns\n\n`QueuedAction`\n\n\n<!-- src/entities/agent-sessions/review/classes/ReviewItem.md -->\n# Class: ReviewItem\n\nAn item handle scopes edits and decisions to its persisted review.\n\n## Constructors\n\n### Constructor\n\n> **new ReviewItem**(`snapshot`, `actions`): `ReviewItem`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `snapshot` | [`ReviewItem`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewItem.md) |\n| `actions` | \\{ `dismiss`: () => `Promise`\\<`void`\\>; `edit`: (`draft`) => `Promise`\\<`void`\\>; `submit`: () => `Promise`\\<`void`\\>; \\} |\n| `actions.dismiss` | () => `Promise`\\<`void`\\> |\n| `actions.edit` | (`draft`) => `Promise`\\<`void`\\> |\n| `actions.submit` | () => `Promise`\\<`void`\\> |\n\n#### Returns\n\n`ReviewItem`\n\n## Accessors\n\n### draft\n\n#### Get Signature\n\n> **get** **draft**(): `unknown`\n\n##### Returns\n\n`unknown`\n\n***\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\n##### Returns\n\n`string`\n\n***\n\n### result\n\n#### Get Signature\n\n> **get** **result**(): `unknown`\n\n##### Returns\n\n`unknown`\n\n***\n\n### status\n\n#### Get Signature\n\n> **get** **status**(): [`ReviewItemStatus`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewItemStatus.md)\n\n##### Returns\n\n[`ReviewItemStatus`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewItemStatus.md)\n\n## Methods\n\n### dismiss()\n\n> **dismiss**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`draft`): `Promise`\\<`void`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `draft` | `unknown` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### submit()\n\n> **submit**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n\n<!-- src/entities/agent-sessions/review/classes/SessionReview.md -->\n# Class: SessionReview\n\nA persistent review remains actionable after the code execution ends.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ReviewRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewRecord.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Inherited from |\n| ------ | ------ | ------ | ------ |\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-kind\"></a> `kind` | `readonly` | () => `Promise`\\<[`ReviewKind`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewKind.md)\\> | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | - |\n\n## Methods\n\n### dismissAll()\n\n> **dismissAll**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### items()\n\n> **items**(): `Promise`\\<[`ReviewItem`](ReviewItem.md)[]\\>\n\n#### Returns\n\n`Promise`\\<[`ReviewItem`](ReviewItem.md)[]\\>\n\n***\n\n### reference()\n\n> **reference**(): `Promise`\\<\\{ `id`: `string`; `kind`: [`ReviewKind`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewKind.md); \\}\\>\n\nCompact reference for main()'s returned reviews array.\n\n#### Returns\n\n`Promise`\\<\\{ `id`: `string`; `kind`: [`ReviewKind`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewKind.md); \\}\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`SessionReview`\\>\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>\n\n***\n\n### session()\n\n> **session**(): [`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n#### Returns\n\n[`AgentSession`](../../agent-session/classes/AgentSession.md)\n\n***\n\n### submitAll()\n\n> **submitAll**(): `Promise`\\<`void`\\>\n\nSubmit the saved pending drafts. Never retries a conflict or ambiguous send.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ReviewRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewRecord.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ReviewRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewRecord.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ReviewRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewRecord.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`, `session`, `id`): `SessionReview`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n| `id` | `string` |\n\n#### Returns\n\n`SessionReview`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `execution`, `input`): `Promise`\\<`SessionReview`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `execution` | [`CodeExecution`](../../code-execution/classes/CodeExecution.md) |\n| `input` | [`CreateReviewOptions`](../type-aliases/CreateReviewOptions.md) |\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>\n\n***\n\n### createForSession()\n\n> `static` **createForSession**(`client`, `session`, `input`, `execution?`): `Promise`\\<`SessionReview`\\>\n\nPresent a review in a session without requiring a code execution.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n| `input` | [`CreateReviewOptions`](../type-aliases/CreateReviewOptions.md) |\n| `execution?` | [`CodeExecution`](../../code-execution/classes/CodeExecution.md) |\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `session`, `record`): `SessionReview`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n| `record` | [`ReviewRecord`](../../../../../generated/agent-harness/types.gen/type-aliases/ReviewRecord.md) |\n\n#### Returns\n\n`SessionReview`\n\n***\n\n### list()\n\n> `static` **list**(`client`, `execution`): `Promise`\\<`SessionReview`[]\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `execution` | [`CodeExecution`](../../code-execution/classes/CodeExecution.md) |\n\n#### Returns\n\n`Promise`\\<`SessionReview`[]\\>\n\n\n<!-- src/entities/agent-sessions/review/type-aliases/CreateReviewOptions.md -->\n# Type Alias: CreateReviewOptions\n\n> **CreateReviewOptions** = \\{ `drafts`: [`ReviewEmailDraft`](ReviewEmailDraft.md)[]; `kind`: `\"email\"`; `title`: `string`; \\} \\| \\{ `drafts`: [`ReviewCalendarDraft`](ReviewCalendarDraft.md)[]; `kind`: `\"calendar\"`; `title`: `string`; \\}\n\n\n<!-- src/entities/agent-sessions/review/type-aliases/ReviewCalendarDraft.md -->\n# Type Alias: ReviewCalendarDraft\n\n> **ReviewCalendarDraft** = \\{ `addGoogleMeet?`: `boolean`; `addMacroCall?`: `boolean`; `attendees?`: \\{ `email`: `string`; `isOptional?`: `boolean`; \\}[]; `calendarId?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `\"default\"` \\| `\"out_of_office\"`; `location?`: `string` \\| `null`; `outOfOffice?`: \\{ `autoDeclineMode?`: `\"decline_none\"` \\| `\"decline_all\"` \\| `\"decline_new_only\"`; `declineMessage?`: `string` \\| `null`; \\} \\| `null`; `recurrenceLines?`: `string`[]; `reminders?`: \\{ `overrides?`: \\{ `method`: `string`; `minutes`: `number`; \\}[]; `useDefault`: `boolean`; \\} \\| `null`; `time`: [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md); `title`: `string`; \\}\n\nCalendar drafts use the existing calendar composer and creation action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-addgooglemeet\"></a> `addGoogleMeet?` | `boolean` |\n| <a id=\"property-addmacrocall\"></a> `addMacroCall?` | `boolean` |\n| <a id=\"property-attendees\"></a> `attendees?` | \\{ `email`: `string`; `isOptional?`: `boolean`; \\}[] |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` |\n| <a id=\"property-eventtype\"></a> `eventType?` | `\"default\"` \\| `\"out_of_office\"` |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | \\{ `autoDeclineMode?`: `\"decline_none\"` \\| `\"decline_all\"` \\| `\"decline_new_only\"`; `declineMessage?`: `string` \\| `null`; \\} \\| `null` |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] |\n| <a id=\"property-reminders\"></a> `reminders?` | \\{ `overrides?`: \\{ `method`: `string`; `minutes`: `number`; \\}[]; `useDefault`: `boolean`; \\} \\| `null` |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) |\n| <a id=\"property-title\"></a> `title` | `string` |\n\n\n<!-- src/entities/agent-sessions/review/type-aliases/ReviewEmailDraft.md -->\n# Type Alias: ReviewEmailDraft\n\n> **ReviewEmailDraft** = \\{ `attachments?`: \\{ `documentId`: `string`; \\}[]; `bcc?`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; `body`: `string`; `cc?`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; `includeSignature?`: `boolean` \\| `null`; `replyingToId?`: `string` \\| `null`; `subject`: `string`; `to`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; \\}\n\nMarkdown is rendered by the ordinary email action; the UI can edit each draft.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments?` | \\{ `documentId`: `string`; \\}[] |\n| <a id=\"property-bcc\"></a> `bcc?` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |\n| <a id=\"property-body\"></a> `body` | `string` |\n| <a id=\"property-cc\"></a> `cc?` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |\n| <a id=\"property-includesignature\"></a> `includeSignature?` | `boolean` \\| `null` |\n| <a id=\"property-replyingtoid\"></a> `replyingToId?` | `string` \\| `null` |\n| <a id=\"property-subject\"></a> `subject` | `string` |\n| <a id=\"property-to\"></a> `to` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |\n\n\n<!-- src/entities/agent-sessions/tool-approval/classes/ToolApproval.md -->\n# Class: ToolApproval\n\nA permission request scoped to its originating agent session.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Approval identity. |\n| <a id=\"property-session\"></a> `session` | `readonly` | [`AgentSession`](../../agent-session/classes/AgentSession.md) | Owning session. |\n\n## Methods\n\n### answer()\n\n> **answer**(`answer`): `Promise`\\<[`AnswerToolApprovalResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AnswerToolApprovalResponse.md)\\>\n\nAnswer the approval using the generated discriminated answer contract.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answer` | [`ToolApprovalAnswerDto`](../../../../../generated/agent-harness/types.gen/type-aliases/ToolApprovalAnswerDto.md) |\n\n#### Returns\n\n`Promise`\\<[`AnswerToolApprovalResponse`](../../../../../generated/agent-harness/types.gen/type-aliases/AnswerToolApprovalResponse.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `sessionId`: `string`; \\}\n\nSerialize scoped identity only.\n\n#### Returns\n\n\\{ `id`: `string`; `sessionId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `sessionId` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `session`, `id`): `ToolApproval`\n\nConstruct a scoped approval handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | [`AgentSession`](../../agent-session/classes/AgentSession.md) |\n| `id` | `string` |\n\n#### Returns\n\n`ToolApproval`\n"- },- {- "name": "agents",- "description": "Configure agents, pair hosts and inspect their sessions.",- "overview": "<!-- src/entities/agents/agent/type-aliases/AgentOptions.md -->\n# Type Alias: AgentOptions\n\n> **AgentOptions** = `Omit`\\<[`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md), `\"channel_ids\"` \\| `\"team_id\"` \\| `\"harness_id\"` \\| `\"auto_accept_permissions\"` \\| `\"avatar_url\"` \\| `\"channel_scope\"` \\| `\"default_model\"` \\| `\"is_coding\"`\\> & \\{ `autoAcceptPermissions?`: `boolean`; `avatarUrl?`: `string`; `channels?`: [`Channel`](../../../channels/channel/classes/Channel.md)[]; `channelScope`: [`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\\[`\"channel_scope\"`\\]; `defaultModel`: `string`; `host?`: [`Harness`](../../../harnesses/harness/classes/Harness.md); `isCoding`: `boolean`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\}\n\nAgent creation and replacement settings.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `autoAcceptPermissions?` | `boolean` | Whether tool permissions are automatically accepted. |\n| `avatarUrl?` | `string` | Avatar URL. |\n| `channels?` | [`Channel`](../../../channels/channel/classes/Channel.md)[] | Channels the agent can access. |\n| `channelScope` | [`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\\[`\"channel_scope\"`\\] | Channel visibility policy. |\n| `defaultModel` | `string` | Default model. |\n| `host?` | [`Harness`](../../../harnesses/harness/classes/Harness.md) | Host running the agent. |\n| `isCoding` | `boolean` | Whether this is a coding agent. |\n| `team?` | [`Team`](../../../teams/team/classes/Team.md) | Owning team. |\n\n\n<!-- src/entities/agents/namespace/classes/AgentNamespace.md -->\n# Class: AgentNamespace\n\nConfigurable agents.\n\n## Constructors\n\n### Constructor\n\n> **new AgentNamespace**(`client`): `AgentNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AgentNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Agent`](../../agent/classes/Agent.md)\n\nConstruct a lazy agent handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Agent`](../../agent/classes/Agent.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Agent`](../../agent/classes/Agent.md)\\>\n\nCreate an agent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`AgentOptions`](../../agent/type-aliases/AgentOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../agent/classes/Agent.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Agent`](../../agent/classes/Agent.md)[]\\>\n\nAll accessible agents.\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../agent/classes/Agent.md)[]\\>\n\n\n<!-- src/entities/harnesses/namespace/classes/HarnessNamespace.md -->\n# Class: HarnessNamespace\n\nHosts and device pairing. Self operations require host credentials.\n\n## Constructors\n\n### Constructor\n\n> **new HarnessNamespace**(`client`): `HarnessNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`HarnessNamespace`\n\n## Methods\n\n### agents()\n\n> **agents**(): `Promise`\\<[`Agent`](../../../agents/agent/classes/Agent.md)[]\\>\n\nAgent handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../../agents/agent/classes/Agent.md)[]\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`Harness`](../../harness/classes/Harness.md)\n\nConstruct a lazy host handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Harness`](../../harness/classes/Harness.md)\n\n***\n\n### createPairing()\n\n> **createPairing**(`options`): `Promise`\\<\\{ `device`: [`DevicePairing`](../../pairing/classes/DevicePairing.md); `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: [`HarnessPairing`](../../pairing/classes/HarnessPairing.md); `pollIntervalSeconds`: `number`; \\}\\>\n\nStart pairing a device; persist the secret separately from the handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreatePairingRequest`](../../../../../generated/storage/types.gen/type-aliases/CreatePairingRequest.md) |\n\n#### Returns\n\n`Promise`\\<\\{ `device`: [`DevicePairing`](../../pairing/classes/DevicePairing.md); `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: [`HarnessPairing`](../../pairing/classes/HarnessPairing.md); `pollIntervalSeconds`: `number`; \\}\\>\n\n***\n\n### deleteSelf()\n\n> **deleteSelf**(): `Promise`\\<`void`\\>\n\nRevoke the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Harness`](../../harness/classes/Harness.md)[]\\>\n\nAll hosts visible to the caller.\n\n#### Returns\n\n`Promise`\\<[`Harness`](../../harness/classes/Harness.md)[]\\>\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\nThe currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\n***\n\n### pairing()\n\n> **pairing**(`code`): [`HarnessPairing`](../../pairing/classes/HarnessPairing.md)\n\nConstruct a lazy pairing from its displayed code.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `code` | `string` |\n\n#### Returns\n\n[`HarnessPairing`](../../pairing/classes/HarnessPairing.md)\n\n***\n\n### sessions()\n\n> **sessions**(): `Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md)[]\\>\n\nSession handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md)[]\\>\n",- "documentation": "# Macro SDK: agents\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/Agent.md -->\n# Type Alias: Agent\n\n> **Agent** = \\{ `auto_accept_permissions?`: `boolean` \\| `null`; `bot`: [`Bot`](Bot.md); `channel_ids`: `string`[]; `channel_scope`: [`AgentChannelScope`](AgentChannelScope.md); `default_model`: `string`; `harness`: `string`; `harness_id?`: `null` \\| [`HarnessId`](HarnessId.md); `instructions`: `string`; `is_coding`: `boolean`; `mcp`: [`AgentMcpServers`](AgentMcpServers.md); \\}\n\nA persisted user- or team-owned AI agent.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auto_accept_permissions\"></a> `auto_accept_permissions?` | `boolean` \\| `null` | Whether the agent's sessions approve ACP permission requests without asking. `None` means always prompt. Bypass also requires the harness's opt-in. |\n| <a id=\"property-bot\"></a> `bot` | [`Bot`](Bot.md) | The bot identity used for mentions and channel participation. |\n| <a id=\"property-channel_ids\"></a> `channel_ids` | `string`[] | Selected channel ids. Empty for a global agent. |\n| <a id=\"property-channel_scope\"></a> `channel_scope` | [`AgentChannelScope`](AgentChannelScope.md) | Whether the agent is global or channel-specific. |\n| <a id=\"property-default_model\"></a> `default_model` | `string` | Model selected specifically for this agent. |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness used to run the agent. |\n| <a id=\"property-harness_id\"></a> `harness_id?` | `null` \\| [`HarnessId`](HarnessId.md) | - |\n| <a id=\"property-instructions\"></a> `instructions` | `string` | Instructions supplied to the agent at the start of a conversation. |\n| <a id=\"property-is_coding\"></a> `is_coding` | `boolean` | Whether the agent works in a repository, which decides how it answers a channel mention: a coding agent posts a magic chip into its live session, a chat agent replies in the thread. Chosen in the agent's settings; the persona's word, not the runtime's. |\n| <a id=\"property-mcp\"></a> `mcp` | [`AgentMcpServers`](AgentMcpServers.md) | Which MCP servers sessions of this agent are handed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AgentChannelScope.md -->\n# Type Alias: AgentChannelScope\n\n> **AgentChannelScope** = `\"all\"` \\| `\"selected\"`\n\nWhether an agent is available everywhere or only in selected channels.\n\n\n<!-- generated/storage/types.gen/type-aliases/AgentMcpServer.md -->\n# Type Alias: AgentMcpServer\n\n> **AgentMcpServer** = \\{ `app_slug`: `string`; `server_name`: `string`; \\}\n\nOne Pipedream app an agent lists under [`AgentMcpServers::Selected`].\n\nOnly the catalog identity is stored. Whether a given person has connected\nthe app is theirs, resolved at call time by the egress proxy, never here.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-app_slug\"></a> `app_slug` | `string` | Pipedream app slug, e.g. `linear`. |\n| <a id=\"property-server_name\"></a> `server_name` | `string` | Display name, e.g. `Linear`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AgentMcpServers.md -->\n# Type Alias: AgentMcpServers\n\n> **AgentMcpServers** = \\{ `scope`: `\"owner_connections\"`; \\} \\| \\{ `scope`: `\"selected\"`; `servers`: [`AgentMcpServer`](AgentMcpServer.md)[]; \\}\n\nWhich Pipedream MCP servers an agent's sessions are handed.\n\nOne value for the whole choice, so a selection can never travel without\nits scope or a scope without its selection. Serialized with a `scope` tag,\nwhich the generated TypeScript sees as a discriminated union.\n\n## Union Members\n\n### Type Literal\n\n\\{ `scope`: `\"owner_connections\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `scope`: `\"selected\"`; `servers`: [`AgentMcpServer`](AgentMcpServer.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `scope` | `\"selected\"` | - |\n| `servers` | [`AgentMcpServer`](AgentMcpServer.md)[] | The apps, in the order the agent's author picked them. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Bot.md -->\n# Type Alias: Bot\n\n> **Bot** = \\{ `avatar_url?`: `string` \\| `null`; `created_at`: `string`; `created_by?`: `string` \\| `null`; `deleted_at?`: `string` \\| `null`; `description?`: `string` \\| `null`; `handle`: `string`; `has_agent`: `boolean`; `id`: [`BotId`](BotId.md); `kind`: [`BotKind`](BotKind.md); `name`: `string`; `owner?`: `null` \\| [`BotOwner`](BotOwner.md); `updated_at`: `string`; \\}\n\nBot row.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Optional avatar URL. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by\"></a> `created_by?` | `string` \\| `null` | User that created this bot. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Soft-delete timestamp. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable handle. |\n| <a id=\"property-has_agent\"></a> `has_agent` | `boolean` | Whether mentioning this bot opens a sandboxed coding-agent session. |\n| <a id=\"property-id\"></a> `id` | [`BotId`](BotId.md) | Bot id. |\n| <a id=\"property-kind\"></a> `kind` | [`BotKind`](BotKind.md) | Bot kind. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner\"></a> `owner?` | `null` \\| [`BotOwner`](BotOwner.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |\n\n\n<!-- generated/storage/types.gen/type-aliases/BotId.md -->\n# Type Alias: BotId\n\n> **BotId** = `string`\n\n\n<!-- generated/storage/types.gen/type-aliases/BotKind.md -->\n# Type Alias: BotKind\n\n> **BotKind** = `\"owned\"` \\| `\"system\"`\n\nBot kind.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotOwner.md -->\n# Type Alias: BotOwner\n\n> **BotOwner** = \\{ `type`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\nBot owner.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"user\"`; `user_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"user\"` | - |\n| `user_id` | `string` | Owner user id. |\n\n***\n\n### Type Literal\n\n\\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `team_id` | `string` | Owner team id. |\n| `type` | `\"team\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/CreateAgentRequest.md -->\n# Type Alias: CreateAgentRequest\n\n> **CreateAgentRequest** = \\{ `auto_accept_permissions?`: `boolean` \\| `null`; `avatar_url?`: `string` \\| `null`; `channel_ids?`: `string`[]; `channel_scope`: [`AgentChannelScope`](AgentChannelScope.md); `default_model`: `string`; `description?`: `string` \\| `null`; `handle`: `string`; `harness`: `string`; `harness_id?`: `null` \\| [`HarnessId`](HarnessId.md); `instructions`: `string`; `is_coding`: `boolean`; `mcp?`: [`AgentMcpServers`](AgentMcpServers.md); `name`: `string`; `team_id?`: `string` \\| `null`; \\}\n\nRequest to create a persisted AI agent.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auto_accept_permissions\"></a> `auto_accept_permissions?` | `boolean` \\| `null` | Whether the agent's sessions approve ACP permission requests without asking. Omit to always prompt. |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Optional avatar URL or data URL. |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Selected channels. Must be non-empty only for `selected` scope. |\n| <a id=\"property-channel_scope\"></a> `channel_scope` | [`AgentChannelScope`](AgentChannelScope.md) | Whether the agent is global or channel-specific. |\n| <a id=\"property-default_model\"></a> `default_model` | `string` | Model selected specifically for this agent. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable `@` handle. |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness used to run the agent. |\n| <a id=\"property-harness_id\"></a> `harness_id?` | `null` \\| [`HarnessId`](HarnessId.md) | - |\n| <a id=\"property-instructions\"></a> `instructions` | `string` | Instructions supplied to the agent at the start of a conversation. |\n| <a id=\"property-is_coding\"></a> `is_coding` | `boolean` | Whether the agent is a coding agent: a mention is answered with a magic chip into its live session (`true`) or a reply in the thread (`false`). |\n| <a id=\"property-mcp\"></a> `mcp?` | [`AgentMcpServers`](AgentMcpServers.md) | Which MCP servers sessions of this agent are handed. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-team_id\"></a> `team_id?` | `string` \\| `null` | Team owner. Omit for a private, user-owned agent. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CreatePairingRequest.md -->\n# Type Alias: CreatePairingRequest\n\n> **CreatePairingRequest** = \\{ `allow_permission_bypass?`: `boolean` \\| `null`; `host?`: `string` \\| `null`; `name`: `string`; `scope?`: `null` \\| [`RequestedHarnessScope`](RequestedHarnessScope.md); \\}\n\nRequest to open a pairing: the daemon asks for a code the user approves.\n\nThe daemon serializes this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_permission_bypass\"></a> `allow_permission_bypass?` | `boolean` \\| `null` | Daemon operator consent ceiling. Omitted by older clients; web approval decides. |\n| <a id=\"property-host\"></a> `host?` | `string` \\| `null` | Display-only description of the machine, e.g. `eric@macbook / darwin`. |\n| <a id=\"property-name\"></a> `name` | `string` | Requested harness display name (typically the machine's hostname). |\n| <a id=\"property-scope\"></a> `scope?` | `null` \\| [`RequestedHarnessScope`](RequestedHarnessScope.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Harness.md -->\n# Type Alias: Harness\n\n> **Harness** = \\{ `allow_permission_bypass?`: `boolean`; `connected`: `boolean`; `created_at`: `string`; `created_by`: `string`; `id`: [`HarnessId`](HarnessId.md); `kind`: `string`; `last_connected_at?`: `string` \\| `null`; `name`: `string`; `owner`: [`HarnessOwner`](HarnessOwner.md); `updated_at`: `string`; \\}\n\nA registered user-run harness.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_permission_bypass\"></a> `allow_permission_bypass?` | `boolean` | Whether agents may bypass ACP permission requests on this harness. |\n| <a id=\"property-connected\"></a> `connected` | `boolean` | Whether the daemon currently holds a runtime connection. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by\"></a> `created_by` | `string` | User that registered this harness. |\n| <a id=\"property-id\"></a> `id` | [`HarnessId`](HarnessId.md) | Harness id. |\n| <a id=\"property-kind\"></a> `kind` | `string` | Runtime kind. Currently always `macrod`. |\n| <a id=\"property-last_connected_at\"></a> `last_connected_at?` | `string` \\| `null` | When the daemon last attached a runtime connection. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner\"></a> `owner` | [`HarnessOwner`](HarnessOwner.md) | Owner. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |\n\n\n<!-- generated/storage/types.gen/type-aliases/HarnessId.md -->\n# Type Alias: HarnessId\n\n> **HarnessId** = `string`\n\n\n<!-- generated/storage/types.gen/type-aliases/HarnessOwner.md -->\n# Type Alias: HarnessOwner\n\n> **HarnessOwner** = \\{ `type`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\nHarness owner.\n\nExactly one of a user or a team, mirroring the bots owner pattern. There\nare no system harnesses.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"user\"`; `user_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"user\"` | - |\n| `user_id` | `string` | Owner user id. |\n\n***\n\n### Type Literal\n\n\\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `team_id` | `string` | Owner team id. |\n| `type` | `\"team\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/PairingDetails.md -->\n# Type Alias: PairingDetails\n\n> **PairingDetails** = \\{ `code`: `string`; `created_at`: `string`; `expires_at`: `string`; `host?`: `string` \\| `null`; `requested_allow_permission_bypass?`: `boolean` \\| `null`; `requested_name`: `string`; `requested_scope?`: `null` \\| [`RequestedHarnessScope`](RequestedHarnessScope.md); \\}\n\nA pending pairing, as shown to the approving user.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-code\"></a> `code` | `string` | The pairing code, normalized to `XXXX-XXXX`. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the pairing was created. |\n| <a id=\"property-expires_at\"></a> `expires_at` | `string` | When the pairing expires. |\n| <a id=\"property-host\"></a> `host?` | `string` \\| `null` | Display-only description of the machine. |\n| <a id=\"property-requested_allow_permission_bypass\"></a> `requested_allow_permission_bypass?` | `boolean` \\| `null` | Daemon operator consent ceiling; false forbids bypass at approval. |\n| <a id=\"property-requested_name\"></a> `requested_name` | `string` | Harness display name the daemon asked for. |\n| <a id=\"property-requested_scope\"></a> `requested_scope?` | `null` \\| [`RequestedHarnessScope`](RequestedHarnessScope.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/RequestedHarnessScope.md -->\n# Type Alias: RequestedHarnessScope\n\n> **RequestedHarnessScope** = `\"private\"` \\| `\"team\"`\n\nThe ownership scope a daemon's config asks for.\n\nAdvisory, not binding: the approving user confirms it in the dialog, which\narrives preselected to this. Approval is what actually sets ownership.\n\n\n<!-- src/entities/agents/agent/classes/Agent.md -->\n# Class: Agent\n\nA configurable agent backed by a bot identity.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Agent`](../../../../../generated/storage/types.gen/type-aliases/Agent.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channels\"></a> `channels` | `readonly` | () => `Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md)[]\\> | Visible channels. | - |\n| <a id=\"property-defaultmodel\"></a> `defaultModel` | `readonly` | () => `Promise`\\<`string`\\> | Default model. | - |\n| <a id=\"property-host\"></a> `host` | `readonly` | () => `Promise`\\<[`Harness`](../../../harnesses/harness/classes/Harness.md) \\| `undefined`\\> | Host running this agent. | - |\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-instructions\"></a> `instructions` | `readonly` | () => `Promise`\\<`string`\\> | Agent instructions. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Agent`](../../../../../generated/storage/types.gen/type-aliases/Agent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Agent`](../../../../../generated/storage/types.gen/type-aliases/Agent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Agent`](../../../../../generated/storage/types.gen/type-aliases/Agent.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### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace agent settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`AgentOptions`](../type-aliases/AgentOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Agent`\n\nConstruct a lazy agent handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Agent`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `Agent`\n\nSeed from a listed or created agent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`Agent`](../../../../../generated/storage/types.gen/type-aliases/Agent.md) |\n\n#### Returns\n\n`Agent`\n\n\n<!-- src/entities/agents/agent/functions/agentBody.md -->\n# Function: agentBody()\n\n> **agentBody**(`options`): [`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\n\nConvert entity references into the generated agent request.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`AgentOptions`](../type-aliases/AgentOptions.md) |\n\n## Returns\n\n[`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\n\n\n<!-- src/entities/agents/agent/type-aliases/AgentOptions.md -->\n# Type Alias: AgentOptions\n\n> **AgentOptions** = `Omit`\\<[`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md), `\"channel_ids\"` \\| `\"team_id\"` \\| `\"harness_id\"` \\| `\"auto_accept_permissions\"` \\| `\"avatar_url\"` \\| `\"channel_scope\"` \\| `\"default_model\"` \\| `\"is_coding\"`\\> & \\{ `autoAcceptPermissions?`: `boolean`; `avatarUrl?`: `string`; `channels?`: [`Channel`](../../../channels/channel/classes/Channel.md)[]; `channelScope`: [`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\\[`\"channel_scope\"`\\]; `defaultModel`: `string`; `host?`: [`Harness`](../../../harnesses/harness/classes/Harness.md); `isCoding`: `boolean`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\}\n\nAgent creation and replacement settings.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `autoAcceptPermissions?` | `boolean` | Whether tool permissions are automatically accepted. |\n| `avatarUrl?` | `string` | Avatar URL. |\n| `channels?` | [`Channel`](../../../channels/channel/classes/Channel.md)[] | Channels the agent can access. |\n| `channelScope` | [`CreateAgentRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateAgentRequest.md)\\[`\"channel_scope\"`\\] | Channel visibility policy. |\n| `defaultModel` | `string` | Default model. |\n| `host?` | [`Harness`](../../../harnesses/harness/classes/Harness.md) | Host running the agent. |\n| `isCoding` | `boolean` | Whether this is a coding agent. |\n| `team?` | [`Team`](../../../teams/team/classes/Team.md) | Owning team. |\n\n\n<!-- src/entities/agents/namespace/classes/AgentNamespace.md -->\n# Class: AgentNamespace\n\nConfigurable agents.\n\n## Constructors\n\n### Constructor\n\n> **new AgentNamespace**(`client`): `AgentNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AgentNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Agent`](../../agent/classes/Agent.md)\n\nConstruct a lazy agent handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Agent`](../../agent/classes/Agent.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Agent`](../../agent/classes/Agent.md)\\>\n\nCreate an agent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`AgentOptions`](../../agent/type-aliases/AgentOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../agent/classes/Agent.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Agent`](../../agent/classes/Agent.md)[]\\>\n\nAll accessible agents.\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../agent/classes/Agent.md)[]\\>\n\n\n<!-- src/entities/harnesses/harness/classes/Harness.md -->\n# Class: Harness\n\nA registered host for coding agents.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Harness`](../../../../../generated/storage/types.gen/type-aliases/Harness.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-connected\"></a> `connected` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the host is connected. | - |\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-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`string`\\> | Runtime kind. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRemove the host.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Harness`](../../../../../generated/storage/types.gen/type-aliases/Harness.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Harness`](../../../../../generated/storage/types.gen/type-aliases/Harness.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Harness`](../../../../../generated/storage/types.gen/type-aliases/Harness.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`, `id`): `Harness`\n\nConstruct a lazy host handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Harness`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `Harness`\n\nSeed from a listed host.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`Harness`](../../../../../generated/storage/types.gen/type-aliases/Harness.md) |\n\n#### Returns\n\n`Harness`\n\n\n<!-- src/entities/harnesses/namespace/classes/HarnessNamespace.md -->\n# Class: HarnessNamespace\n\nHosts and device pairing. Self operations require host credentials.\n\n## Constructors\n\n### Constructor\n\n> **new HarnessNamespace**(`client`): `HarnessNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`HarnessNamespace`\n\n## Methods\n\n### agents()\n\n> **agents**(): `Promise`\\<[`Agent`](../../../agents/agent/classes/Agent.md)[]\\>\n\nAgent handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`Agent`](../../../agents/agent/classes/Agent.md)[]\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`Harness`](../../harness/classes/Harness.md)\n\nConstruct a lazy host handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Harness`](../../harness/classes/Harness.md)\n\n***\n\n### createPairing()\n\n> **createPairing**(`options`): `Promise`\\<\\{ `device`: [`DevicePairing`](../../pairing/classes/DevicePairing.md); `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: [`HarnessPairing`](../../pairing/classes/HarnessPairing.md); `pollIntervalSeconds`: `number`; \\}\\>\n\nStart pairing a device; persist the secret separately from the handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreatePairingRequest`](../../../../../generated/storage/types.gen/type-aliases/CreatePairingRequest.md) |\n\n#### Returns\n\n`Promise`\\<\\{ `device`: [`DevicePairing`](../../pairing/classes/DevicePairing.md); `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: [`HarnessPairing`](../../pairing/classes/HarnessPairing.md); `pollIntervalSeconds`: `number`; \\}\\>\n\n***\n\n### deleteSelf()\n\n> **deleteSelf**(): `Promise`\\<`void`\\>\n\nRevoke the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Harness`](../../harness/classes/Harness.md)[]\\>\n\nAll hosts visible to the caller.\n\n#### Returns\n\n`Promise`\\<[`Harness`](../../harness/classes/Harness.md)[]\\>\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\nThe currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\n***\n\n### pairing()\n\n> **pairing**(`code`): [`HarnessPairing`](../../pairing/classes/HarnessPairing.md)\n\nConstruct a lazy pairing from its displayed code.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `code` | `string` |\n\n#### Returns\n\n[`HarnessPairing`](../../pairing/classes/HarnessPairing.md)\n\n***\n\n### sessions()\n\n> **sessions**(): `Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md)[]\\>\n\nSession handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md)[]\\>\n\n\n<!-- src/entities/harnesses/pairing/classes/DevicePairing.md -->\n# Class: DevicePairing\n\nDevice side pairing identity. Keep the device secret outside the handle.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Pairing identifier. |\n\n## Methods\n\n### claim()\n\n> **claim**(`deviceSecret`): `Promise`\\<\\{ `harness`: [`Harness`](../../harness/classes/Harness.md); `token`: `string`; \\} \\| `undefined`\\>\n\nAttempt to claim an approved pairing. Pending claims return undefined.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `deviceSecret` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `harness`: [`Harness`](../../harness/classes/Harness.md); `token`: `string`; \\} \\| `undefined`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize identity only.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `DevicePairing`\n\nConstruct the device side handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`DevicePairing`\n\n\n<!-- src/entities/harnesses/pairing/classes/HarnessPairing.md -->\n# Class: HarnessPairing\n\nA short lived host pairing, addressed by its displayed code.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`PairingDetails`](../../../../../generated/storage/types.gen/type-aliases/PairingDetails.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-expiresat\"></a> `expiresAt` | `readonly` | () => `Promise`\\<`string`\\> | Expiration time. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Requested name. | - |\n\n## Methods\n\n### approve()\n\n> **approve**(`options?`): `Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\nApprove this pairing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `allowPermissionBypass?`: `boolean`; `name?`: `string`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `options.allowPermissionBypass?` | `boolean` |\n| `options.name?` | `string` |\n| `options.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<[`Harness`](../../harness/classes/Harness.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`PairingDetails`](../../../../../generated/storage/types.gen/type-aliases/PairingDetails.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`PairingDetails`](../../../../../generated/storage/types.gen/type-aliases/PairingDetails.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`PairingDetails`](../../../../../generated/storage/types.gen/type-aliases/PairingDetails.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`, `code`): `HarnessPairing`\n\nConstruct a lazy pairing from a pairing code.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `code` | `string` |\n\n#### Returns\n\n`HarnessPairing`\n"- },- {- "name": "apiKeys",- "description": "Create, list and revoke user API keys.",- "overview": "<!-- src/entities/api-keys/namespace/classes/ApiKeyNamespace.md -->\n# Class: ApiKeyNamespace\n\nUser API key management.\n\n## Constructors\n\n### Constructor\n\n> **new ApiKeyNamespace**(`client`): `ApiKeyNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ApiKeyNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`UserApiKey`](../../api-key/classes/UserApiKey.md)\n\nConstruct a lazy key handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`UserApiKey`](../../api-key/classes/UserApiKey.md)\n\n***\n\n### create()\n\n> **create**(`name`): `Promise`\\<\\{ `key`: [`UserApiKey`](../../api-key/classes/UserApiKey.md); `secret`: `string`; \\}\\>\n\nCreate a key. Save the secret now; it cannot be retrieved later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `key`: [`UserApiKey`](../../api-key/classes/UserApiKey.md); `secret`: `string`; \\}\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`UserApiKey`](../../api-key/classes/UserApiKey.md)[]\\>\n\nList metadata for the caller's API keys.\n\n#### Returns\n\n`Promise`\\<[`UserApiKey`](../../api-key/classes/UserApiKey.md)[]\\>\n\n***\n\n### tokenForEmail()\n\n> **tokenForEmail**(`email`): `Promise`\\<[`MacroApiTokenResponse`](../../../../../generated/auth/types.gen/type-aliases/MacroApiTokenResponse.md)\\>\n\nExchange an email address for a Macro API token, subject to server authorization.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<[`MacroApiTokenResponse`](../../../../../generated/auth/types.gen/type-aliases/MacroApiTokenResponse.md)\\>\n",- "documentation": "# Macro SDK: apiKeys\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/auth/types.gen/type-aliases/MacroApiTokenResponse.md -->\n# Type Alias: MacroApiTokenResponse\n\n> **MacroApiTokenResponse** = \\{ `macro_api_token`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-macro_api_token\"></a> `macro_api_token` | `string` | The newly created macro_api_token |\n\n\n<!-- generated/storage/types.gen/type-aliases/UserApiKeyId.md -->\n# Type Alias: UserApiKeyId\n\n> **UserApiKeyId** = `string`\n\nOpaque identifier for a stored user API key.\n\n\n<!-- generated/storage/types.gen/type-aliases/UserApiKeyInfo.md -->\n# Type Alias: UserApiKeyInfo\n\n> **UserApiKeyInfo** = \\{ `createdAt`: `string`; `id`: [`UserApiKeyId`](UserApiKeyId.md); `name`: `string`; \\}\n\nSafe metadata for a stored key. Never contains the secret or its hash.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the key was created. |\n| <a id=\"property-id\"></a> `id` | [`UserApiKeyId`](UserApiKeyId.md) | Opaque identifier used to address the key after create. |\n| <a id=\"property-name\"></a> `name` | `string` | User-facing name. |\n\n\n<!-- src/entities/api-keys/api-key/classes/UserApiKey.md -->\n# Class: UserApiKey\n\nA user API key's metadata. Secrets are returned only at creation.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`UserApiKeyInfo`](../../../../../generated/storage/types.gen/type-aliases/UserApiKeyInfo.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | Creation time. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Human readable label. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRevoke this key.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`UserApiKeyInfo`](../../../../../generated/storage/types.gen/type-aliases/UserApiKeyInfo.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`UserApiKeyInfo`](../../../../../generated/storage/types.gen/type-aliases/UserApiKeyInfo.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`UserApiKeyInfo`](../../../../../generated/storage/types.gen/type-aliases/UserApiKeyInfo.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`, `id`): `UserApiKey`\n\nConstruct a lazy key handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`UserApiKey`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `UserApiKey`\n\nSeed from metadata, deliberately excluding the secret.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`UserApiKeyInfo`](../../../../../generated/storage/types.gen/type-aliases/UserApiKeyInfo.md) |\n\n#### Returns\n\n`UserApiKey`\n\n\n<!-- src/entities/api-keys/namespace/classes/ApiKeyNamespace.md -->\n# Class: ApiKeyNamespace\n\nUser API key management.\n\n## Constructors\n\n### Constructor\n\n> **new ApiKeyNamespace**(`client`): `ApiKeyNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ApiKeyNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`UserApiKey`](../../api-key/classes/UserApiKey.md)\n\nConstruct a lazy key handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`UserApiKey`](../../api-key/classes/UserApiKey.md)\n\n***\n\n### create()\n\n> **create**(`name`): `Promise`\\<\\{ `key`: [`UserApiKey`](../../api-key/classes/UserApiKey.md); `secret`: `string`; \\}\\>\n\nCreate a key. Save the secret now; it cannot be retrieved later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `key`: [`UserApiKey`](../../api-key/classes/UserApiKey.md); `secret`: `string`; \\}\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`UserApiKey`](../../api-key/classes/UserApiKey.md)[]\\>\n\nList metadata for the caller's API keys.\n\n#### Returns\n\n`Promise`\\<[`UserApiKey`](../../api-key/classes/UserApiKey.md)[]\\>\n\n***\n\n### tokenForEmail()\n\n> **tokenForEmail**(`email`): `Promise`\\<[`MacroApiTokenResponse`](../../../../../generated/auth/types.gen/type-aliases/MacroApiTokenResponse.md)\\>\n\nExchange an email address for a Macro API token, subject to server authorization.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<[`MacroApiTokenResponse`](../../../../../generated/auth/types.gen/type-aliases/MacroApiTokenResponse.md)\\>\n"- },- {- "name": "entityMentions",- "description": "Create and delete typed resource mention relationships.",- "overview": "<!-- src/entities/entity-mentions/namespace/classes/EntityMentionNamespace.md -->\n# Class: EntityMentionNamespace\n\nStored entity mention relationships.\n\n## Constructors\n\n### Constructor\n\n> **new EntityMentionNamespace**(`client`): `EntityMentionNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EntityMentionNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`EntityMention`](../../mention/classes/EntityMention.md)\n\nConstruct a stored mention handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EntityMention`](../../mention/classes/EntityMention.md)\n\n***\n\n### create()\n\n> **create**(`source`, `target`): `Promise`\\<[`EntityMention`](../../mention/classes/EntityMention.md)\\>\n\nCreate a mention from a source resource to a target resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md) |\n| `target` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md) |\n\n#### Returns\n\n`Promise`\\<[`EntityMention`](../../mention/classes/EntityMention.md)\\>\n",- "documentation": "# Macro SDK: entityMentions\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<!-- src/entities/entity-mentions/mention/classes/EntityMention.md -->\n# Class: EntityMention\n\nA stored mention connecting two resources.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Mention identity. |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRemove this mention.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize identity only.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EntityMention`\n\nConstruct a mention handle for removal.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EntityMention`\n\n\n<!-- src/entities/entity-mentions/namespace/classes/EntityMentionNamespace.md -->\n# Class: EntityMentionNamespace\n\nStored entity mention relationships.\n\n## Constructors\n\n### Constructor\n\n> **new EntityMentionNamespace**(`client`): `EntityMentionNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EntityMentionNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`EntityMention`](../../mention/classes/EntityMention.md)\n\nConstruct a stored mention handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EntityMention`](../../mention/classes/EntityMention.md)\n\n***\n\n### create()\n\n> **create**(`source`, `target`): `Promise`\\<[`EntityMention`](../../mention/classes/EntityMention.md)\\>\n\nCreate a mention from a source resource to a target resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md) |\n| `target` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md) |\n\n#### Returns\n\n`Promise`\\<[`EntityMention`](../../mention/classes/EntityMention.md)\\>\n"- },- {- "name": "githubPullRequests",- "description": "Read stored GitHub pull request snapshots and captured diffs.",- "overview": "<!-- src/entities/github-pull-requests/namespace/classes/GithubPullRequestNamespace.md -->\n# Class: GithubPullRequestNamespace\n\nGitHub pull request snapshots and captured diffs.\n\n## Constructors\n\n### Constructor\n\n> **new GithubPullRequestNamespace**(`client`): `GithubPullRequestNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`GithubPullRequestNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\nConstruct from a Macro foreign entity's identity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\n***\n\n### forEntity()\n\n> **forEntity**(`entity`): [`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\nResolve a foreign entity as a pull request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`ForeignEntity`](../../../foreign/foreign-entity/classes/ForeignEntity.md) |\n\n#### Returns\n\n[`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n",- "documentation": "# Macro SDK: githubPullRequests\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/ChangedFileDto.md -->\n# Type Alias: ChangedFileDto\n\n> **ChangedFileDto** = \\{ `additions`: `number`; `binary`: `boolean`; `deletions`: `number`; `kind`: [`FileChangeKindDto`](FileChangeKindDto.md); `patchOmitted`: `boolean`; `path`: `string`; `previousPath?`: `string` \\| `null`; \\}\n\nOne changed file.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added. |\n| <a id=\"property-binary\"></a> `binary` | `boolean` | The diff carries no text for this file. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed. |\n| <a id=\"property-kind\"></a> `kind` | [`FileChangeKindDto`](FileChangeKindDto.md) | What happened to the file. |\n| <a id=\"property-patchomitted\"></a> `patchOmitted` | `boolean` | The file's hunks were left out of the patch to fit the size budget. |\n| <a id=\"property-path\"></a> `path` | `string` | The file's path after the change, or before it for a deletion. |\n| <a id=\"property-previouspath\"></a> `previousPath?` | `string` \\| `null` | Where a renamed file came from. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChangesetDto.md -->\n# Type Alias: ChangesetDto\n\n> **ChangesetDto** = \\{ `additions`: `number`; `base`: [`GitRefDto`](GitRefDto.md); `capturedAt`: `string`; `deletions`: `number`; `files`: [`ChangedFileDto`](ChangedFileDto.md)[]; `head`: [`GitRefDto`](GitRefDto.md); `id`: `string`; `patchBytes`: `number`; `repository?`: `string` \\| `null`; `source`: [`ChangesetSourceDto`](ChangesetSourceDto.md); `truncated`: `boolean`; \\}\n\nOne changeset: the files a patch touches and what happened to each.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added across all files. |\n| <a id=\"property-base\"></a> `base` | [`GitRefDto`](GitRefDto.md) | The side the work started from. |\n| <a id=\"property-capturedat\"></a> `capturedAt` | `string` | When the diff was taken. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed across all files. |\n| <a id=\"property-files\"></a> `files` | [`ChangedFileDto`](ChangedFileDto.md)[] | Every changed file, in patch order. |\n| <a id=\"property-head\"></a> `head` | [`GitRefDto`](GitRefDto.md) | The side carrying the work. |\n| <a id=\"property-id\"></a> `id` | `string` | The changeset's id; a different id means different changes. |\n| <a id=\"property-patchbytes\"></a> `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| <a id=\"property-repository\"></a> `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| <a id=\"property-source\"></a> `source` | [`ChangesetSourceDto`](ChangesetSourceDto.md) | Where the diff was read from. |\n| <a id=\"property-truncated\"></a> `truncated` | `boolean` | Some files' hunks were left out of the patch. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChangesetSourceDto.md -->\n# Type Alias: ChangesetSourceDto\n\n> **ChangesetSourceDto** = `\"github_pull_request\"`\n\nThe source of a changeset's diff, on the wire.\n\n\n<!-- generated/storage/types.gen/type-aliases/FileChangeKindDto.md -->\n# Type Alias: FileChangeKindDto\n\n> **FileChangeKindDto** = `\"added\"` \\| `\"modified\"` \\| `\"deleted\"` \\| `\"renamed\"`\n\nWhat happened to a file, on the wire.\n\n\n<!-- generated/storage/types.gen/type-aliases/GitRefDto.md -->\n# Type Alias: GitRefDto\n\n> **GitRefDto** = \\{ `name?`: `string` \\| `null`; `sha?`: `string` \\| `null`; \\}\n\nOne end of the compared range.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The branch name, when known. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The commit, when known. |\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/GithubPullRequestLabel.md -->\n# Type Alias: GithubPullRequestLabel\n\n> **GithubPullRequestLabel** = \\{ `color?`: `string` \\| `null`; `name`: `string`; \\}\n\nA label on a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | The label color as six hex digits without a leading `#`, when known. |\n| <a id=\"property-name\"></a> `name` | `string` | The label name, unique within its repository regardless of case. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestReview.md -->\n# Type Alias: GithubPullRequestReview\n\n> **GithubPullRequestReview** = \\{ `reviewerGithubUserId`: `string`; `reviewerLogin?`: `string` \\| `null`; `state`: [`GithubPullRequestReviewState`](GithubPullRequestReviewState.md); `submittedAt?`: `string` \\| `null`; \\}\n\nA reviewer's latest submitted review on a pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-reviewergithubuserid\"></a> `reviewerGithubUserId` | `string` | The stable numeric GitHub user id of the reviewer, as a string. |\n| <a id=\"property-reviewerlogin\"></a> `reviewerLogin?` | `string` \\| `null` | The reviewer's GitHub login, when known. |\n| <a id=\"property-state\"></a> `state` | [`GithubPullRequestReviewState`](GithubPullRequestReviewState.md) | What the review said. |\n| <a id=\"property-submittedat\"></a> `submittedAt?` | `string` \\| `null` | When the review was submitted, when known. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestReviewDecision.md -->\n# Type Alias: GithubPullRequestReviewDecision\n\n> **GithubPullRequestReviewDecision** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"review_required\"`\n\nWhere a pull request's review stands, from its reviewers' latest reviews.\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestReviewState.md -->\n# Type Alias: GithubPullRequestReviewState\n\n> **GithubPullRequestReviewState** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"commented\"` \\| `\"dismissed\"`\n\nWhat a reviewer's latest review on a pull request said.\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubPullRequestUser.md -->\n# Type Alias: GithubPullRequestUser\n\n> **GithubPullRequestUser** = \\{ `githubUserId`: `string`; `login?`: `string` \\| `null`; \\}\n\nA GitHub user named on a pull request, such as an assignee.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-githubuserid\"></a> `githubUserId` | `string` | The stable numeric GitHub user id, as a string. |\n| <a id=\"property-login\"></a> `login?` | `string` \\| `null` | The user's GitHub login, when known. |\n\n\n<!-- generated/storage/types.gen/type-aliases/StoredGithubPullRequest.md -->\n# Type Alias: StoredGithubPullRequest\n\n> **StoredGithubPullRequest** = \\{ `additions?`: `number` \\| `null`; `assignees`: [`GithubPullRequestUser`](GithubPullRequestUser.md)[]; `authorGithubUserId?`: `string` \\| `null`; `authorLogin?`: `string` \\| `null`; `base?`: `null` \\| [`GitRefDto`](GitRefDto.md); `checks`: [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[]; `comments`: [`GithubPullRequestComment`](GithubPullRequestComment.md)[]; `deletions?`: `number` \\| `null`; `description?`: `string` \\| `null`; `draft`: `boolean`; `githubKey`: `string`; `githubUpdatedAt?`: `string` \\| `null`; `head?`: `null` \\| [`GitRefDto`](GitRefDto.md); `id`: `string`; `labels`: [`GithubPullRequestLabel`](GithubPullRequestLabel.md)[]; `number`: `number`; `owner`: `string`; `repo`: `string`; `requestedReviewerGithubUserIds`: `string`[]; `reviewDecision?`: `null` \\| [`GithubPullRequestReviewDecision`](GithubPullRequestReviewDecision.md); `reviews`: [`GithubPullRequestReview`](GithubPullRequestReview.md)[]; `status?`: `null` \\| `\"open\"` \\| `\"closed\"` \\| `\"merged\"`; `title?`: `string` \\| `null`; `url`: `string`; \\}\n\nA GitHub pull request as Macro stores it, read through one of the caller's records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions?` | `number` \\| `null` | Lines added across the pull request's changes. |\n| <a id=\"property-assignees\"></a> `assignees` | [`GithubPullRequestUser`](GithubPullRequestUser.md)[] | The users assigned to the pull request. |\n| <a id=\"property-authorgithubuserid\"></a> `authorGithubUserId?` | `string` \\| `null` | Stable numeric GitHub user id of the author. |\n| <a id=\"property-authorlogin\"></a> `authorLogin?` | `string` \\| `null` | The author's GitHub login when the pull request was last synced. |\n| <a id=\"property-base\"></a> `base?` | `null` \\| [`GitRefDto`](GitRefDto.md) | - |\n| <a id=\"property-checks\"></a> `checks` | [`GithubPullRequestCheckRun`](GithubPullRequestCheckRun.md)[] | The latest check runs on the pull request's head commit. |\n| <a id=\"property-comments\"></a> `comments` | [`GithubPullRequestComment`](GithubPullRequestComment.md)[] | Comments from the pull request's conversation, reviews, and review threads. Comment `authorId` intentionally retains the shared numeric GitHub comment contract; convert it to a decimal string before comparing it with `authorGithubUserId`. |\n| <a id=\"property-deletions\"></a> `deletions?` | `number` \\| `null` | Lines deleted across the pull request's changes. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | The pull request body, as GitHub markdown. |\n| <a id=\"property-draft\"></a> `draft` | `boolean` | Whether the pull request is a draft. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The pull request's `owner/repo/pull/number` key. |\n| <a id=\"property-githubupdatedat\"></a> `githubUpdatedAt?` | `string` \\| `null` | When GitHub last updated the pull request. |\n| <a id=\"property-head\"></a> `head?` | `null` \\| [`GitRefDto`](GitRefDto.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | The caller's record for the pull request. |\n| <a id=\"property-labels\"></a> `labels` | [`GithubPullRequestLabel`](GithubPullRequestLabel.md)[] | The pull request's labels. |\n| <a id=\"property-number\"></a> `number` | `number` | The pull request number within its repository. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The repository owner the pull request was last synced under. |\n| <a id=\"property-repo\"></a> `repo` | `string` | The repository name the pull request was last synced under. |\n| <a id=\"property-requestedreviewergithubuserids\"></a> `requestedReviewerGithubUserIds` | `string`[] | Stable numeric GitHub user ids of the users asked to review. |\n| <a id=\"property-reviewdecision\"></a> `reviewDecision?` | `null` \\| [`GithubPullRequestReviewDecision`](GithubPullRequestReviewDecision.md) | - |\n| <a id=\"property-reviews\"></a> `reviews` | [`GithubPullRequestReview`](GithubPullRequestReview.md)[] | Each reviewer's latest submitted review. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| `\"open\"` \\| `\"closed\"` \\| `\"merged\"` | The normalized pull request status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | The pull request title. |\n| <a id=\"property-url\"></a> `url` | `string` | The pull request's page on GitHub. |\n\n\n<!-- src/entities/github-pull-requests/namespace/classes/GithubPullRequestNamespace.md -->\n# Class: GithubPullRequestNamespace\n\nGitHub pull request snapshots and captured diffs.\n\n## Constructors\n\n### Constructor\n\n> **new GithubPullRequestNamespace**(`client`): `GithubPullRequestNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`GithubPullRequestNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\nConstruct from a Macro foreign entity's identity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\n***\n\n### forEntity()\n\n> **forEntity**(`entity`): [`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\nResolve a foreign entity as a pull request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`ForeignEntity`](../../../foreign/foreign-entity/classes/ForeignEntity.md) |\n\n#### Returns\n\n[`GithubPullRequest`](../../pull-request/classes/GithubPullRequest.md)\n\n\n<!-- src/entities/github-pull-requests/pull-request/classes/GithubPullRequest.md -->\n# Class: GithubPullRequest\n\nA stored GitHub pull request addressed by its Macro foreign entity.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`StoredGithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/StoredGithubPullRequest.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\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-status\"></a> `status` | `readonly` | () => `Promise`\\<`NonNullable`\\<`\"open\"` \\| `\"closed\"` \\| `\"merged\"` \\| `null` \\| `undefined`\\> \\| `undefined`\\> | Current state. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Pull request title. | - |\n| <a id=\"property-url\"></a> `url` | `readonly` | () => `Promise`\\<`string`\\> | GitHub URL. | - |\n\n## Methods\n\n### changes()\n\n> **changes**(): `Promise`\\<\\{ `changeset?`: [`PullRequestChangeset`](PullRequestChangeset.md); `error?`: `string`; \\}\\>\n\nCaptured change metadata, when available.\n\n#### Returns\n\n`Promise`\\<\\{ `changeset?`: [`PullRequestChangeset`](PullRequestChangeset.md); `error?`: `string`; \\}\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`StoredGithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/StoredGithubPullRequest.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`StoredGithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/StoredGithubPullRequest.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`StoredGithubPullRequest`](../../../../../generated/storage/types.gen/type-aliases/StoredGithubPullRequest.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`, `id`): `GithubPullRequest`\n\nConstruct a lazy pull request handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`GithubPullRequest`\n\n\n<!-- src/entities/github-pull-requests/pull-request/classes/PullRequestChangeset.md -->\n# Class: PullRequestChangeset\n\nOne captured diff belonging to a pull request.\n\n## Constructors\n\n### Constructor\n\n> **new PullRequestChangeset**(`client`, `pullRequest`, `record`): `PullRequestChangeset`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `pullRequest` | [`GithubPullRequest`](GithubPullRequest.md) | Parent pull request. |\n| `record` | [`ChangesetDto`](../../../../../generated/storage/types.gen/type-aliases/ChangesetDto.md) | Captured metadata. |\n\n#### Returns\n\n`PullRequestChangeset`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-pullrequest\"></a> `pullRequest` | `readonly` | [`GithubPullRequest`](GithubPullRequest.md) | Parent pull request. |\n| <a id=\"property-record\"></a> `record` | `readonly` | [`ChangesetDto`](../../../../../generated/storage/types.gen/type-aliases/ChangesetDto.md) | Captured metadata. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\nCaptured identity.\n\n##### Returns\n\n`string`\n\n## Methods\n\n### patch()\n\n> **patch**(): `Promise`\\<`string`\\>\n\nRead the captured unified patch.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `additions`: `number`; `base`: [`GitRefDto`](../../../../../generated/storage/types.gen/type-aliases/GitRefDto.md); `capturedAt`: `string`; `deletions`: `number`; `files`: [`ChangedFileDto`](../../../../../generated/storage/types.gen/type-aliases/ChangedFileDto.md)[]; `head`: [`GitRefDto`](../../../../../generated/storage/types.gen/type-aliases/GitRefDto.md); `id`: `string`; `patchBytes`: `number`; `pullRequestId`: `string`; `repository?`: `string` \\| `null`; `source`: `\"github_pull_request\"`; `truncated`: `boolean`; \\}\n\nSerialize captured metadata and parent identity.\n\n#### Returns\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `additions` | `number` | Lines added across all files. |\n| `base` | [`GitRefDto`](../../../../../generated/storage/types.gen/type-aliases/GitRefDto.md) | The side the work started from. |\n| `capturedAt` | `string` | When the diff was taken. |\n| `deletions` | `number` | Lines removed across all files. |\n| `files` | [`ChangedFileDto`](../../../../../generated/storage/types.gen/type-aliases/ChangedFileDto.md)[] | Every changed file, in patch order. |\n| `head` | [`GitRefDto`](../../../../../generated/storage/types.gen/type-aliases/GitRefDto.md) | The side carrying the work. |\n| `id` | `string` | The changeset's id; a different id means different changes. |\n| `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| `pullRequestId` | `string` | - |\n| `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| `source` | `\"github_pull_request\"` | Where the diff was read from. |\n| `truncated` | `boolean` | Some files' hunks were left out of the patch. |\n"- },- {- "name": "initiatives",- "description": "Group tasks and members into initiatives.",- "overview": "<!-- src/entities/initiatives/initiative/interfaces/InitiativeOptions.md -->\n# Interface: InitiativeOptions\n\nInitiative creation settings.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` | Collaborative description. |\n| <a id=\"property-members\"></a> `members?` | [`User`](../../../users/user/classes/User.md)[] | Members assigned to this initiative. |\n| <a id=\"property-name\"></a> `name` | `string` | Initiative name. |\n| <a id=\"property-propertyvalues\"></a> `propertyValues?` | [`InitialPropertyValue`](../../../../../generated/storage/types.gen/type-aliases/InitialPropertyValue.md)[] | Initial properties. |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam?` | `boolean` | Whether the current team can access it. |\n\n\n<!-- src/entities/initiatives/namespace/classes/InitiativeNamespace.md -->\n# Class: InitiativeNamespace\n\nInitiatives in the caller's workspace.\n\n## Constructors\n\n### Constructor\n\n> **new InitiativeNamespace**(`client`): `InitiativeNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`InitiativeNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Initiative`](../../initiative/classes/Initiative.md)\n\nConstruct a lazy initiative handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Initiative`](../../initiative/classes/Initiative.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)\\>\n\nCreate an initiative.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InitiativeOptions`](../../initiative/interfaces/InitiativeOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)[]\\>\n\nList accessible initiatives.\n\n#### Returns\n\n`Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)[]\\>\n",- "documentation": "# Macro SDK: initiatives\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/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/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/storage/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/storage/types.gen/type-aliases/InitialPropertyValue.md -->\n# Type Alias: InitialPropertyValue\n\n> **InitialPropertyValue** = \\{ `propertyDefinitionId`: `string`; `value`: [`SetPropertyValue`](SetPropertyValue.md); \\}\n\nA property value set on a new initiative as part of its create.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-propertydefinitionid\"></a> `propertyDefinitionId` | `string` | Property definition to set. |\n| <a id=\"property-value\"></a> `value` | [`SetPropertyValue`](SetPropertyValue.md) | Value, validated by the properties service like any other property write. |\n\n\n<!-- generated/storage/types.gen/type-aliases/InitiativeDetail.md -->\n# Type Alias: InitiativeDetail\n\n> **InitiativeDetail** = \\{ `createdAt`: `string`; `id`: [`InitiativeId`](InitiativeId.md); `memberIds`: [`MacroUserIdStr`](MacroUserIdStr.md)[]; `name`: `string`; `ownerId`: [`MacroUserIdStr`](MacroUserIdStr.md); `sharePermission`: [`SharePermissionV2`](SharePermissionV2.md); `taskIds`: `string`[]; `updatedAt`: `string`; `userAccessLevel`: [`AccessLevel`](AccessLevel.md); \\}\n\nFull initiative returned to a caller, including members, tasks, and share state.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the initiative was created. |\n| <a id=\"property-id\"></a> `id` | [`InitiativeId`](InitiativeId.md) | Opaque identifier. |\n| <a id=\"property-memberids\"></a> `memberIds` | [`MacroUserIdStr`](MacroUserIdStr.md)[] | Member user ids. The owner is never stored here. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | [`MacroUserIdStr`](MacroUserIdStr.md) | Owner of the initiative. |\n| <a id=\"property-sharepermission\"></a> `sharePermission` | [`SharePermissionV2`](SharePermissionV2.md) | Current share permission. |\n| <a id=\"property-taskids\"></a> `taskIds` | `string`[] | Task ids currently assigned to the initiative. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the initiative was last updated. |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel` | [`AccessLevel`](AccessLevel.md) | Caller's access level on this initiative. |\n\n\n<!-- generated/storage/types.gen/type-aliases/InitiativeId.md -->\n# Type Alias: InitiativeId\n\n> **InitiativeId** = `string`\n\nOpaque identifier for an initiative. Minted as UUIDv7 in application code.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/MacroUserIdStr.md -->\n# Type Alias: MacroUserIdStr\n\n> **MacroUserIdStr** = `string`\n\n\n<!-- generated/storage/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/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- src/entities/initiatives/initiative/classes/Initiative.md -->\n# Class: Initiative\n\nA group of tasks and members working toward an outcome.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`InitiativeDetail`](../../../../../generated/storage/types.gen/type-aliases/InitiativeDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | Access requests and direct user grants. | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)\\> | Current user's access. | - |\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-members\"></a> `members` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)[]\\> | Assigned members. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | Owner. | - |\n| <a id=\"property-sharepermissions\"></a> `sharePermissions` | `readonly` | () => `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\> | Sharing configuration. | - |\n| <a id=\"property-tasks\"></a> `tasks` | `readonly` | () => `Promise`\\<[`Task`](../../../tasks/task/classes/Task.md)[]\\> | Tasks in this initiative. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this initiative.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`InitiativeDetail`](../../../../../generated/storage/types.gen/type-aliases/InitiativeDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`InitiativeDetail`](../../../../../generated/storage/types.gen/type-aliases/InitiativeDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`InitiativeDetail`](../../../../../generated/storage/types.gen/type-aliases/InitiativeDetail.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### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nUpdate the name, membership or sharing configuration.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `members?`: [`User`](../../../users/user/classes/User.md)[]; `name?`: `string`; `sharePermission?`: [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md); \\} |\n| `options.members?` | [`User`](../../../users/user/classes/User.md)[] |\n| `options.name?` | `string` |\n| `options.sharePermission?` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Initiative`\n\nConstruct a lazy initiative handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Initiative`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `Initiative`\n\nSeed from an initiative detail response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`InitiativeDetail`](../../../../../generated/storage/types.gen/type-aliases/InitiativeDetail.md) |\n\n#### Returns\n\n`Initiative`\n\n\n<!-- src/entities/initiatives/initiative/interfaces/InitiativeOptions.md -->\n# Interface: InitiativeOptions\n\nInitiative creation settings.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` | Collaborative description. |\n| <a id=\"property-members\"></a> `members?` | [`User`](../../../users/user/classes/User.md)[] | Members assigned to this initiative. |\n| <a id=\"property-name\"></a> `name` | `string` | Initiative name. |\n| <a id=\"property-propertyvalues\"></a> `propertyValues?` | [`InitialPropertyValue`](../../../../../generated/storage/types.gen/type-aliases/InitialPropertyValue.md)[] | Initial properties. |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam?` | `boolean` | Whether the current team can access it. |\n\n\n<!-- src/entities/initiatives/namespace/classes/InitiativeNamespace.md -->\n# Class: InitiativeNamespace\n\nInitiatives in the caller's workspace.\n\n## Constructors\n\n### Constructor\n\n> **new InitiativeNamespace**(`client`): `InitiativeNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`InitiativeNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Initiative`](../../initiative/classes/Initiative.md)\n\nConstruct a lazy initiative handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Initiative`](../../initiative/classes/Initiative.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)\\>\n\nCreate an initiative.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InitiativeOptions`](../../initiative/interfaces/InitiativeOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)[]\\>\n\nList accessible initiatives.\n\n#### Returns\n\n`Promise`\\<[`Initiative`](../../initiative/classes/Initiative.md)[]\\>\n"- },- {- "name": "meetings",- "description": "Create and manage meeting schedules, invitations and sharing links.",- "overview": "<!-- src/entities/meetings/namespace/classes/MeetingNamespace.md -->\n# Class: MeetingNamespace\n\nMeeting schedules and invitation lookup.\n\n## Constructors\n\n### Constructor\n\n> **new MeetingNamespace**(`client`): `MeetingNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`MeetingNamespace`\n\n## Methods\n\n### active()\n\n> **active**(): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\nList active meetings.\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`Meeting`](../../meeting/classes/Meeting.md)\n\nConstruct a handle to one of the caller's newest 100 standalone meetings. Use lookup for invitations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Meeting`](../../meeting/classes/Meeting.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\nCreate a meeting.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`CreateMeetingRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateMeetingRequest.md), `\"preparationId\"`\\> |\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\nList the caller's newest 100 standalone meetings.\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\n***\n\n### lookup()\n\n> **lookup**(`token`): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\nResolve a meeting's invitation token.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n",- "documentation": "# Macro SDK: meetings\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/CreateMeetingRequest.md -->\n# Type Alias: CreateMeetingRequest\n\n> **CreateMeetingRequest** = \\{ `preparationId?`: `string` \\| `null`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `title?`: `string` \\| `null`; \\}\n\nInputs for creating a meeting without starting its RTC room.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-preparationid\"></a> `preparationId?` | `string` \\| `null` | Optional unused room reserved by this actor on the setup screen. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Optional scheduled end. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Optional scheduled start. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Optional display title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Meeting.md -->\n# Type Alias: Meeting\n\n> **Meeting** = \\{ `callId?`: `string` \\| `null`; `channelId?`: `string` \\| `null`; `id`: `string`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `shareToken`: [`MeetingToken`](MeetingToken.md); `title`: `string`; \\}\n\nPersistent meeting metadata. No channel contents or archived media are exposed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId?` | `string` \\| `null` | Currently active call session, if any. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | Associated channel, for links to existing channel calls only. |\n| <a id=\"property-id\"></a> `id` | `string` | Persistent meeting identifier. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Scheduled end, or none for an instant meeting. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Scheduled start, or none for an instant meeting. |\n| <a id=\"property-sharetoken\"></a> `shareToken` | [`MeetingToken`](MeetingToken.md) | Bearer capability embedded in the invitation URL. |\n| <a id=\"property-title\"></a> `title` | `string` | Human-readable meeting title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MeetingInvitePermissions.md -->\n# Type Alias: MeetingInvitePermissions\n\n> **MeetingInvitePermissions** = \\{ `canInvite`: `boolean`; \\}\n\nWhether the authenticated caller can invite teammates to this meeting.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninvite\"></a> `canInvite` | `boolean` | True for the owner of an uncancelled standalone meeting. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MeetingToken.md -->\n# Type Alias: MeetingToken\n\n> **MeetingToken** = `string`\n\nAn invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership.\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateMeetingRequest.md -->\n# Type Alias: UpdateMeetingRequest\n\n> **UpdateMeetingRequest** = \\{ `clearSchedule?`: `boolean`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `title?`: `string` \\| `null`; \\}\n\nChanges to a meeting's title or scheduled time; omitted values stay unchanged.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-clearschedule\"></a> `clearSchedule?` | `boolean` | Remove timed scheduling, for example when the calendar event becomes all-day. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Replacement scheduled end; requires a matching start. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Replacement scheduled start; requires a matching end. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Replacement title, when supplied. |\n\n\n<!-- src/entities/meetings/meeting/classes/Meeting.md -->\n# Class: Meeting\n\nA meeting's schedule and invitation link.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Meeting`](../../../../../generated/storage/types.gen/type-aliases/Meeting.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-call\"></a> `call` | `readonly` | () => `Promise`\\<[`CallRecord`](../../../calls/call-record/classes/CallRecord.md) \\| `undefined`\\> | Associated call record. | - |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | () => `Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md) \\| `undefined`\\> | Associated channel. | - |\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-scheduledend\"></a> `scheduledEnd` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled end. | - |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled start. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |\n\n## Methods\n\n### cancel()\n\n> **cancel**(): `Promise`\\<`void`\\>\n\nCancel this meeting.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### invite()\n\n> **invite**(`email`): `Promise`\\<`void`\\>\n\nInvite an email address.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### invitePermissions()\n\n> **invitePermissions**(): `Promise`\\<[`MeetingInvitePermissions`](../../../../../generated/storage/types.gen/type-aliases/MeetingInvitePermissions.md)\\>\n\nWhether the caller can send invitations.\n\n#### Returns\n\n`Promise`\\<[`MeetingInvitePermissions`](../../../../../generated/storage/types.gen/type-aliases/MeetingInvitePermissions.md)\\>\n\n***\n\n### inviteUsers()\n\n> **inviteUsers**(`users`): `Promise`\\<`void`\\>\n\nInvite Macro users.\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### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Meeting`](../../../../../generated/storage/types.gen/type-aliases/Meeting.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Meeting`](../../../../../generated/storage/types.gen/type-aliases/Meeting.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Meeting`](../../../../../generated/storage/types.gen/type-aliases/Meeting.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### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nUpdate schedule or title.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`UpdateMeetingRequest`](../../../../../generated/storage/types.gen/type-aliases/UpdateMeetingRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### webUrl()\n\n> **webUrl**(): `Promise`\\<`string`\\>\n\nShareable meeting link.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Meeting`\n\nConstruct a lazy meeting handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Meeting`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `Meeting`\n\nSeed a meeting from a server response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`Meeting`](../../../../../generated/storage/types.gen/type-aliases/Meeting.md) |\n\n#### Returns\n\n`Meeting`\n\n\n<!-- src/entities/meetings/namespace/classes/MeetingNamespace.md -->\n# Class: MeetingNamespace\n\nMeeting schedules and invitation lookup.\n\n## Constructors\n\n### Constructor\n\n> **new MeetingNamespace**(`client`): `MeetingNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`MeetingNamespace`\n\n## Methods\n\n### active()\n\n> **active**(): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\nList active meetings.\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`Meeting`](../../meeting/classes/Meeting.md)\n\nConstruct a handle to one of the caller's newest 100 standalone meetings. Use lookup for invitations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Meeting`](../../meeting/classes/Meeting.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\nCreate a meeting.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`CreateMeetingRequest`](../../../../../generated/storage/types.gen/type-aliases/CreateMeetingRequest.md), `\"preparationId\"`\\> |\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\nList the caller's newest 100 standalone meetings.\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)[]\\>\n\n***\n\n### lookup()\n\n> **lookup**(`token`): `Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n\nResolve a meeting's invitation token.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../meeting/classes/Meeting.md)\\>\n"- },- {- "name": "routines",- "description": "Create scheduled and event-triggered agent routines and inspect executions.",- "overview": "<!-- src/entities/routines/namespace/classes/RoutineNamespace.md -->\n# Class: RoutineNamespace\n\nScheduled and event-triggered routines.\n\n## Constructors\n\n### Constructor\n\n> **new RoutineNamespace**(`client`): `RoutineNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`RoutineNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Routine`](../../routine/classes/Routine.md)\n\nConstruct a lazy routine handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Routine`](../../routine/classes/Routine.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Routine`](../../routine/classes/Routine.md)\\>\n\nCreate an agent routine.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RoutineOptions`](../../routine/interfaces/RoutineOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Routine`](../../routine/classes/Routine.md)\\>\n\n***\n\n### list()\n\n> **list**(`options?`): `Promise`\\<[`Routine`](../../routine/classes/Routine.md)[]\\>\n\nList routines, optionally including event triggers.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `includeEvents?`: `boolean`; \\} |\n| `options.includeEvents?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`Routine`](../../routine/classes/Routine.md)[]\\>\n\n\n<!-- src/entities/routines/routine/interfaces/RoutineOptions.md -->\n# Interface: RoutineOptions\n\nConfiguration of an agent routine.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-agent\"></a> `agent?` | [`Agent`](../../../agents/agent/classes/Agent.md) | Agent to run the task. |\n| <a id=\"property-enabled\"></a> `enabled?` | `boolean` | Whether triggers can start executions. Defaults to true on creation. |\n| <a id=\"property-model\"></a> `model?` | `string` | Model override. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | Instructions delivered to the agent. |\n| <a id=\"property-runvisibility\"></a> `runVisibility?` | [`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md) | Whether runs appear in Home and the Agents list. Defaults to `unlisted` on creation; an update that omits it keeps the stored value. |\n| <a id=\"property-trigger\"></a> `trigger` | [`RoutineTriggerOptions`](../type-aliases/RoutineTriggerOptions.md) | Schedules or Macro events that start the routine. |\n| <a id=\"property-userprompt\"></a> `userPrompt` | `string` | Original user instructions. |\n\n\n<!-- src/entities/routines/routine/type-aliases/RoutineEventFilter.md -->\n# Type Alias: RoutineEventFilter\n\n> **RoutineEventFilter** = `Omit`\\<[`EventFilter`](../../../../../generated/scheduled-action/types.gen/type-aliases/EventFilter.md), `\"ids\"` \\| `\"condition\"`\\> & \\{ `condition?`: `string`; `entities?`: [`EntityReference`](../../../reference/type-aliases/EntityReference.md)[]; \\}\n\nAn event selector references resources by typed handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition?` | `string` | Optional yes/no condition on the triggering content. |\n| `entities?` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md)[] | Resource selectors for these events. Omit to match all resources. |\n\n\n<!-- src/entities/routines/routine/type-aliases/RoutineTriggerOptions.md -->\n# Type Alias: RoutineTriggerOptions\n\n> **RoutineTriggerOptions** = [`SingleRoutineTrigger`](SingleRoutineTrigger.md) \\| \\{ `triggers`: [`SingleRoutineTrigger`](SingleRoutineTrigger.md)[]; `type`: `\"multiple\"`; \\}\n\nOne or multiple routine triggers.\n\n\n<!-- src/entities/routines/routine/type-aliases/SingleRoutineTrigger.md -->\n# Type Alias: SingleRoutineTrigger\n\n> **SingleRoutineTrigger** = `Extract`\\<[`RoutineTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/RoutineTrigger.md), \\{ `type`: `\"cron\"`; \\}\\> \\| \\{ `filters`: [`RoutineEventFilter`](RoutineEventFilter.md)[]; `type`: `\"events\"`; \\}\n\nOne schedule or set of event selectors.\n",- "documentation": "# Macro SDK: routines\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/scheduled-action/types.gen/type-aliases/ActionExecutionRecord.md -->\n# Type Alias: ActionExecutionRecord\n\n> **ActionExecutionRecord** = \\{ `action_id`: `string`; `created_at`: `string`; `end_time`: `string`; `id?`: `string` \\| `null`; `is_success`: `boolean`; `resource_id?`: `string` \\| `null`; `result`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `start_time`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-action_id\"></a> `action_id` | `string` | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-end_time\"></a> `end_time` | `string` | - |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | - |\n| <a id=\"property-is_success\"></a> `is_success` | `boolean` | - |\n| <a id=\"property-resource_id\"></a> `resource_id?` | `string` \\| `null` | ID of the primary resource produced by this run. Its type is recorded in `result`, independently of the routine's current configuration. |\n| <a id=\"property-result\"></a> `result` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| <a id=\"property-start_time\"></a> `start_time` | `string` | - |\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/ActionKind.md -->\n# Type Alias: ActionKind\n\n> **ActionKind** = `\"Agent\"`\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/ActionTrigger.md -->\n# Type Alias: ActionTrigger\n\n> **ActionTrigger** = \\{ `schedule`: [`Schedule`](Schedule.md); `timezone`: `string`; `type`: `\"cron\"`; \\} \\| \\{ `filters`: [`EventFilters`](EventFilters.md); `type`: `\"events\"`; \\} \\| \\{ `triggers`: [`RoutineTriggers`](RoutineTriggers.md); `type`: `\"multiple\"`; \\}\n\nA routine may run on one trigger or any of several schedules and Macro events.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/AgentMcpServer.md -->\n# Type Alias: AgentMcpServer\n\n> **AgentMcpServer** = \\{ `app_slug`: `string`; `server_name`: `string`; \\}\n\nOne Pipedream app an agent lists under [`AgentMcpServers::Selected`].\n\nOnly the catalog identity is stored. Whether a given person has connected\nthe app is theirs, resolved at call time by the egress proxy, never here.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-app_slug\"></a> `app_slug` | `string` | Pipedream app slug, e.g. `linear`. |\n| <a id=\"property-server_name\"></a> `server_name` | `string` | Display name, e.g. `Linear`. |\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/AgentTaskAgent.md -->\n# Type Alias: AgentTaskAgent\n\n> **AgentTaskAgent** = \\{ `bot_id`: `string`; \\}\n\nA persona selection, independent of its runtime and current default model.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-bot_id\"></a> `bot_id` | `string` |\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/EventFilter.md -->\n# Type Alias: EventFilter\n\n> **EventFilter** = \\{ `condition?`: `string` \\| `null`; `events`: [`EventName`](EventName.md)[]; `ids?`: `string`[] \\| `null`; \\}\n\nAn event name AND an entity ID must match within the same filter. A\ncondition further requires the event's content to answer it with yes.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition?` | `string` \\| `null` | Yes/no question about the triggering content, e.g. \"Is this email an invoice?\". The routine runs only when the answer is yes. |\n| <a id=\"property-events\"></a> `events` | [`EventName`](EventName.md)[] | - |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | - |\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/EventFilters.md -->\n# Type Alias: EventFilters\n\n> **EventFilters** = [`EventFilter`](EventFilter.md)[]\n\nBounded nonempty OR of filters, canonicalized to remove duplicates.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/EventName.md -->\n# Type Alias: EventName\n\n> **EventName** = `\"document.created\"` \\| `\"document.updated\"` \\| `\"document.deleted\"` \\| `\"task.created\"` \\| `\"task.status_changed\"` \\| `\"task.priority_changed\"` \\| `\"task.property_changed\"` \\| `\"email.message_received\"` \\| `\"channel.created\"` \\| `\"channel.message_posted\"` \\| `\"channel.mentioned\"` \\| `\"channel.message_patched\"` \\| `\"channel.message_attachment_created\"` \\| `\"call.started\"` \\| `\"call.ended\"`\n\nClosed allowlist: unknown names, deletions and ambiguous attribution are not\nselectors. Adding a broker variant does not automatically enable routines.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/RoutineTrigger.md -->\n# Type Alias: RoutineTrigger\n\n> **RoutineTrigger** = \\{ `schedule`: [`Schedule`](Schedule.md); `timezone`: `string`; `type`: `\"cron\"`; \\} \\| \\{ `filters`: [`EventFilters`](EventFilters.md); `type`: `\"events\"`; \\}\n\nAn individual trigger in a routine's trigger list.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/RoutineTriggers.md -->\n# Type Alias: RoutineTriggers\n\n> **RoutineTriggers** = [`RoutineTrigger`](RoutineTrigger.md)[]\n\nBounded schedules and one combined set of event filters.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/RunVisibility.md -->\n# Type Alias: RunVisibility\n\n> **RunVisibility** = `\"listed\"` \\| `\"unlisted\"`\n\nWhether a routine's runs are listed in Home and the Agents list. Routines\nthat run often would bury the owner's own work, so runs start unlisted;\neither way they stay in the routine's history. The string form is the\n`scheduled_action.run_visibility` column's.\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/Schedule.md -->\n# Type Alias: Schedule\n\n> **Schedule** = `string`\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/ScheduledAction.md -->\n# Type Alias: ScheduledAction\n\n> **ScheduledAction** = \\{ `claimed?`: `string` \\| `null`; `configuration_revision`: `number`; `created_at`: `string`; `enabled`: `boolean`; `event_activated_at?`: `string` \\| `null`; `id?`: `string` \\| `null`; `kind`: [`ActionKind`](ActionKind.md); `name`: `string`; `next_run_at?`: `string` \\| `null`; `owner`: `string`; `run_visibility`: [`RunVisibility`](RunVisibility.md); `task`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `trigger`: [`ActionTrigger`](ActionTrigger.md); `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-claimed\"></a> `claimed?` | `string` \\| `null` | - |\n| <a id=\"property-configuration_revision\"></a> `configuration_revision` | `number` | Independent of execution bookkeeping in `updated_at`. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` | When false, automatic dispatch skips this action. `run_now` remains available regardless. |\n| <a id=\"property-event_activated_at\"></a> `event_activated_at?` | `string` \\| `null` | Event publication boundary; absent for cron actions. |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | - |\n| <a id=\"property-kind\"></a> `kind` | [`ActionKind`](ActionKind.md) | - |\n| <a id=\"property-name\"></a> `name` | `string` | - |\n| <a id=\"property-next_run_at\"></a> `next_run_at?` | `string` \\| `null` | Next cron firing, absent for event-triggered actions. |\n| <a id=\"property-owner\"></a> `owner` | `string` | Who the action belongs to. Every action is user-owned today, but the type no longer says so: the principal string on the wire and in the `owner` column is the same, and a bot- or team-owned row decodes rather than failing to parse. |\n| <a id=\"property-run_visibility\"></a> `run_visibility` | [`RunVisibility`](RunVisibility.md) | Whether the action's runs are listed in Home and the Agents list. |\n| <a id=\"property-task\"></a> `task` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| <a id=\"property-trigger\"></a> `trigger` | [`ActionTrigger`](ActionTrigger.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.md -->\n# Type Alias: ScheduledActionResponse\n\n> **ScheduledActionResponse** = [`ScheduledAction`](ScheduledAction.md) & \\{ `schedule?`: `string` \\| `null`; `timezone?`: `string` \\| `null`; \\}\n\nCanonical trigger plus deprecated cron fields for existing clients. Event\nresponses omit legacy fields rather than inventing a schedule or timezone.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `schedule?` | `string` \\| `null` | Deprecated: use `trigger.schedule`. Present only for cron actions. **Deprecated** |\n| `timezone?` | `string` \\| `null` | Deprecated: use `trigger.timezone`. Present only for cron actions. **Deprecated** |\n\n\n<!-- src/entities/routines/namespace/classes/RoutineNamespace.md -->\n# Class: RoutineNamespace\n\nScheduled and event-triggered routines.\n\n## Constructors\n\n### Constructor\n\n> **new RoutineNamespace**(`client`): `RoutineNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`RoutineNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Routine`](../../routine/classes/Routine.md)\n\nConstruct a lazy routine handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Routine`](../../routine/classes/Routine.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Routine`](../../routine/classes/Routine.md)\\>\n\nCreate an agent routine.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RoutineOptions`](../../routine/interfaces/RoutineOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`Routine`](../../routine/classes/Routine.md)\\>\n\n***\n\n### list()\n\n> **list**(`options?`): `Promise`\\<[`Routine`](../../routine/classes/Routine.md)[]\\>\n\nList routines, optionally including event triggers.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `includeEvents?`: `boolean`; \\} |\n| `options.includeEvents?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`Routine`](../../routine/classes/Routine.md)[]\\>\n\n\n<!-- src/entities/routines/routine/classes/Routine.md -->\n# Class: Routine\n\nA scheduled or event-triggered agent task.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ScheduledActionResponse`](../../../../../generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the routine is enabled. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Routine name. | - |\n| <a id=\"property-nextrunat\"></a> `nextRunAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Next scheduled execution. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | Routine owner. | - |\n| <a id=\"property-revision\"></a> `revision` | `readonly` | () => `Promise`\\<`number`\\> | Configuration revision. | - |\n| <a id=\"property-runvisibility\"></a> `runVisibility` | `readonly` | () => `Promise`\\<[`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md)\\> | Whether the routine's runs appear in Home and the Agents list. | - |\n| <a id=\"property-trigger\"></a> `trigger` | `readonly` | () => `Promise`\\<[`ActionTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionTrigger.md)\\> | Configured triggers. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the routine.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### execute()\n\n> **execute**(): `Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md) \\| [`Chat`](../../../chats/chat/classes/Chat.md) \\| `undefined`\\>\n\nStart an execution immediately and return its transcript handle if available.\n\n#### Returns\n\n`Promise`\\<[`AgentSession`](../../../agent-sessions/agent-session/classes/AgentSession.md) \\| [`Chat`](../../../chats/chat/classes/Chat.md) \\| `undefined`\\>\n\n***\n\n### history()\n\n> **history**(): `Promise`\\<[`RoutineExecution`](RoutineExecution.md)[]\\>\n\nCompleted executions, with their routine scoped identity.\n\n#### Returns\n\n`Promise`\\<[`RoutineExecution`](RoutineExecution.md)[]\\>\n\n***\n\n### setEnabled()\n\n> **setEnabled**(`enabled`): `Promise`\\<`void`\\>\n\nEnable or disable triggering.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `enabled` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ScheduledActionResponse`](../../../../../generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ScheduledActionResponse`](../../../../../generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ScheduledActionResponse`](../../../../../generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.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### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace the routine's task and trigger configuration.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RoutineOptions`](../interfaces/RoutineOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Routine`\n\nConstruct a lazy routine handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Routine`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `Routine`\n\nSeed a handle from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`ScheduledActionResponse`](../../../../../generated/scheduled-action/types.gen/type-aliases/ScheduledActionResponse.md) |\n\n#### Returns\n\n`Routine`\n\n\n<!-- src/entities/routines/routine/classes/RoutineExecution.md -->\n# Class: RoutineExecution\n\nA completed routine execution, as recorded by the service.\n\n## Constructors\n\n### Constructor\n\n> **new RoutineExecution**(`routine`, `record`): `RoutineExecution`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `routine` | [`Routine`](Routine.md) | Parent routine. |\n| `record` | [`ActionExecutionRecord`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionExecutionRecord.md) | Execution snapshot. |\n\n#### Returns\n\n`RoutineExecution`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-record\"></a> `record` | `readonly` | [`ActionExecutionRecord`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionExecutionRecord.md) | Execution snapshot. |\n| <a id=\"property-routine\"></a> `routine` | `readonly` | [`Routine`](Routine.md) | Parent routine. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string` \\| `undefined`\n\nExecution identity, when assigned.\n\n##### Returns\n\n`string` \\| `undefined`\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `action_id`: `string`; `created_at`: `string`; `end_time`: `string`; `id?`: `string` \\| `null`; `is_success`: `boolean`; `resource_id?`: `string` \\| `null`; `result`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `routine`: `string`; `start_time`: `string`; \\}\n\nSerialize without the authenticated client.\n\n#### Returns\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action_id` | `string` | - |\n| `created_at` | `string` | - |\n| `end_time` | `string` | - |\n| `id?` | `string` \\| `null` | - |\n| `is_success` | `boolean` | - |\n| `resource_id?` | `string` \\| `null` | ID of the primary resource produced by this run. Its type is recorded in `result`, independently of the routine's current configuration. |\n| `result` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| `routine` | `string` | - |\n| `start_time` | `string` | - |\n\n\n<!-- src/entities/routines/routine/functions/routineBody.md -->\n# Function: routineBody()\n\n> **routineBody**(`options`): \\{ `enabled`: `boolean` \\| `undefined`; `kind`: `\"Agent\"`; `name`: `string`; `run_visibility`: [`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md) \\| `undefined`; `task`: \\{ `agent?`: [`AgentTaskAgent`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentTaskAgent.md) \\| `null`; `mcp_servers?`: [`AgentMcpServer`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentMcpServer.md)[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\}; `trigger`: [`ActionTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionTrigger.md); \\}\n\nTranslate typed routine options into the generated wire contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RoutineOptions`](../interfaces/RoutineOptions.md) |\n\n## Returns\n\n\\{ `enabled`: `boolean` \\| `undefined`; `kind`: `\"Agent\"`; `name`: `string`; `run_visibility`: [`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md) \\| `undefined`; `task`: \\{ `agent?`: [`AgentTaskAgent`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentTaskAgent.md) \\| `null`; `mcp_servers?`: [`AgentMcpServer`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentMcpServer.md)[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\}; `trigger`: [`ActionTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionTrigger.md); \\}\n\n| Name | Type | Default value | Description |\n| ------ | ------ | ------ | ------ |\n| `enabled` | `boolean` \\| `undefined` | `options.enabled` | - |\n| `kind` | `\"Agent\"` | - | - |\n| `name` | `string` | `options.name` | - |\n| `run_visibility` | [`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md) \\| `undefined` | `options.runVisibility` | - |\n| `task` | \\{ `agent?`: [`AgentTaskAgent`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentTaskAgent.md) \\| `null`; `mcp_servers?`: [`AgentMcpServer`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentMcpServer.md)[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\} | - | - |\n| `task.agent?` | [`AgentTaskAgent`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentTaskAgent.md) \\| `null` | - | - |\n| `task.mcp_servers?` | [`AgentMcpServer`](../../../../../generated/scheduled-action/types.gen/type-aliases/AgentMcpServer.md)[] | - | Apps the routine requires on top of the agent's own. The owner must have each one connected to save the routine and for it to run. |\n| `task.model?` | `string` \\| `null` | - | - |\n| `task.prompt` | `string` | - | - |\n| `task.user_prompt` | `string` | - | - |\n| `trigger` | [`ActionTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/ActionTrigger.md) | - | - |\n\n\n<!-- src/entities/routines/routine/interfaces/RoutineOptions.md -->\n# Interface: RoutineOptions\n\nConfiguration of an agent routine.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-agent\"></a> `agent?` | [`Agent`](../../../agents/agent/classes/Agent.md) | Agent to run the task. |\n| <a id=\"property-enabled\"></a> `enabled?` | `boolean` | Whether triggers can start executions. Defaults to true on creation. |\n| <a id=\"property-model\"></a> `model?` | `string` | Model override. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | Instructions delivered to the agent. |\n| <a id=\"property-runvisibility\"></a> `runVisibility?` | [`RunVisibility`](../../../../../generated/scheduled-action/types.gen/type-aliases/RunVisibility.md) | Whether runs appear in Home and the Agents list. Defaults to `unlisted` on creation; an update that omits it keeps the stored value. |\n| <a id=\"property-trigger\"></a> `trigger` | [`RoutineTriggerOptions`](../type-aliases/RoutineTriggerOptions.md) | Schedules or Macro events that start the routine. |\n| <a id=\"property-userprompt\"></a> `userPrompt` | `string` | Original user instructions. |\n\n\n<!-- src/entities/routines/routine/type-aliases/RoutineEventFilter.md -->\n# Type Alias: RoutineEventFilter\n\n> **RoutineEventFilter** = `Omit`\\<[`EventFilter`](../../../../../generated/scheduled-action/types.gen/type-aliases/EventFilter.md), `\"ids\"` \\| `\"condition\"`\\> & \\{ `condition?`: `string`; `entities?`: [`EntityReference`](../../../reference/type-aliases/EntityReference.md)[]; \\}\n\nAn event selector references resources by typed handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition?` | `string` | Optional yes/no condition on the triggering content. |\n| `entities?` | [`EntityReference`](../../../reference/type-aliases/EntityReference.md)[] | Resource selectors for these events. Omit to match all resources. |\n\n\n<!-- src/entities/routines/routine/type-aliases/RoutineTriggerOptions.md -->\n# Type Alias: RoutineTriggerOptions\n\n> **RoutineTriggerOptions** = [`SingleRoutineTrigger`](SingleRoutineTrigger.md) \\| \\{ `triggers`: [`SingleRoutineTrigger`](SingleRoutineTrigger.md)[]; `type`: `\"multiple\"`; \\}\n\nOne or multiple routine triggers.\n\n\n<!-- src/entities/routines/routine/type-aliases/SingleRoutineTrigger.md -->\n# Type Alias: SingleRoutineTrigger\n\n> **SingleRoutineTrigger** = `Extract`\\<[`RoutineTrigger`](../../../../../generated/scheduled-action/types.gen/type-aliases/RoutineTrigger.md), \\{ `type`: `\"cron\"`; \\}\\> \\| \\{ `filters`: [`RoutineEventFilter`](RoutineEventFilter.md)[]; `type`: `\"events\"`; \\}\n\nOne schedule or set of event selectors.\n"- },- {- "name": "unfurls",- "description": "Read URL preview metadata.",- "overview": "<!-- src/entities/unfurls/namespace/classes/UnfurlNamespace.md -->\n# Class: UnfurlNamespace\n\nURL metadata lookup.\n\n## Constructors\n\n### Constructor\n\n> **new UnfurlNamespace**(`client`): `UnfurlNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`UnfurlNamespace`\n\n## Methods\n\n### bulk()\n\n> **bulk**(`urls`): `Promise`\\<[`GetUnfurlBulkResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlBulkResponse.md)\\>\n\nRead metadata for multiple URLs in one request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `urls` | `string`[] |\n\n#### Returns\n\n`Promise`\\<[`GetUnfurlBulkResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlBulkResponse.md)\\>\n\n***\n\n### get()\n\n> **get**(`url`): `Promise`\\<[`GetUnfurlResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlResponse.md)\\>\n\nRead title, description and preview metadata for a URL.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`GetUnfurlResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlResponse.md)\\>\n",- "documentation": "# Macro SDK: unfurls\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/unfurl/types.gen/type-aliases/GetUnfurlBulkResponse.md -->\n# Type Alias: GetUnfurlBulkResponse\n\n> **GetUnfurlBulkResponse** = \\{ `responses`: [`Vec`](Vec.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-responses\"></a> `responses` | [`Vec`](Vec.md) |\n\n\n<!-- generated/unfurl/types.gen/type-aliases/GetUnfurlResponse.md -->\n# Type Alias: GetUnfurlResponse\n\n> **GetUnfurlResponse** = \\{ `description?`: `string` \\| `null`; `embed_type?`: [`UnfurlEmbedType`](UnfurlEmbedType.md); `embed_url?`: `string` \\| `null`; `favicon_url?`: `string` \\| `null`; `image_url?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\}\n\nUnfurl response for a single URL: the URL itself plus any metadata that\nwas extracted from the page's `<head>` (title, description, image,\nfavicon).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | The page description (from `og:description`), if any. |\n| <a id=\"property-embed_type\"></a> `embed_type?` | [`UnfurlEmbedType`](UnfurlEmbedType.md) | The type of embeddable content, if the URL supports iframe embedding. |\n| <a id=\"property-embed_url\"></a> `embed_url?` | `string` \\| `null` | The iframe-embeddable URL for services like Loom or Supercut. |\n| <a id=\"property-favicon_url\"></a> `favicon_url?` | `string` \\| `null` | The page's favicon URL, if any. |\n| <a id=\"property-image_url\"></a> `image_url?` | `string` \\| `null` | The page's preview image URL (from `og:image`), if any. |\n| <a id=\"property-title\"></a> `title` | `string` | The page title (from custom URL parser, Open Graph, or `<title>`). |\n| <a id=\"property-url\"></a> `url` | `string` | The URL that was unfurled. |\n\n\n<!-- generated/unfurl/types.gen/type-aliases/UnfurlEmbedType.md -->\n# Type Alias: UnfurlEmbedType\n\n> **UnfurlEmbedType** = `\"None\"` \\| `\"Video\"`\n\nThe type of embeddable content for services that support iframe embedding.\n\n\n<!-- generated/unfurl/types.gen/type-aliases/Vec.md -->\n# Type Alias: Vec\n\n> **Vec** = (`null` \\| \\{ `description?`: `string` \\| `null`; `embed_type?`: [`UnfurlEmbedType`](UnfurlEmbedType.md); `embed_url?`: `string` \\| `null`; `favicon_url?`: `string` \\| `null`; `image_url?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\})[]\n\n\n<!-- src/entities/unfurls/namespace/classes/UnfurlNamespace.md -->\n# Class: UnfurlNamespace\n\nURL metadata lookup.\n\n## Constructors\n\n### Constructor\n\n> **new UnfurlNamespace**(`client`): `UnfurlNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`UnfurlNamespace`\n\n## Methods\n\n### bulk()\n\n> **bulk**(`urls`): `Promise`\\<[`GetUnfurlBulkResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlBulkResponse.md)\\>\n\nRead metadata for multiple URLs in one request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `urls` | `string`[] |\n\n#### Returns\n\n`Promise`\\<[`GetUnfurlBulkResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlBulkResponse.md)\\>\n\n***\n\n### get()\n\n> **get**(`url`): `Promise`\\<[`GetUnfurlResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlResponse.md)\\>\n\nRead title, description and preview metadata for a URL.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`GetUnfurlResponse`](../../../../../generated/unfurl/types.gen/type-aliases/GetUnfurlResponse.md)\\>\n"- },- {- "name": "ai",- "description": "Generate structured objects, classify supplied content with Jev and read AI usage.",- "overview": "<!-- src/entities/ai/namespace/classes/AiNamespace.md -->\n# Class: AiNamespace\n\nShared cognition endpoints, charged to the authenticated acting user.\n\n## Constructors\n\n### Constructor\n\n> **new AiNamespace**(`client`): `AiNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AiNamespace`\n\n## Methods\n\n### decide()\n\n> **decide**(`request`): `Promise`\\<[`DecisionResponse`](../../../../../generated/cognition/types.gen/type-aliases/DecisionResponse.md)\\>\n\nAsk named yes/no questions about JSON input. Each probability estimates\nyes, from 0 to 1. This classifies supplied data without running tools.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`DecisionRequest`](../../../../../generated/cognition/types.gen/type-aliases/DecisionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`DecisionResponse`](../../../../../generated/cognition/types.gen/type-aliases/DecisionResponse.md)\\>\n\n***\n\n### structuredCompletion()\n\n> **structuredCompletion**(`request`): `Promise`\\<[`StructuredCompletionResponse`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionResponse.md)\\>\n\nGenerate an answer matching a JSON Schema. Set toolset to { type: 'none' }\nto use only supplied context. Other toolsets can perform the requested\nactions; always inspect outcome and toolActivity, including interruptions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`StructuredCompletionRequest`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`StructuredCompletionResponse`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionResponse.md)\\>\n\n***\n\n### usage()\n\n> **usage**(`options?`): `Promise`\\<[`UsageSummary`](../../../../../generated/cognition/types.gen/type-aliases/UsageSummary.md)\\>\n\nRead AI usage over a time range, optionally restricting it to users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<[`UsageRequest`](../../../../../generated/cognition/types.gen/type-aliases/UsageRequest.md), `\"include_users\"`\\> & \\{ `users?`: [`User`](../../../users/user/classes/User.md)[]; \\} |\n\n#### Returns\n\n`Promise`\\<[`UsageSummary`](../../../../../generated/cognition/types.gen/type-aliases/UsageSummary.md)\\>\n",- "documentation": "# Macro SDK: ai\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/cognition/types.gen/type-aliases/AiFeature.md -->\n# Type Alias: AiFeature\n\n> **AiFeature** = `\"chat\"` \\| `\"memory\"` \\| `\"automation\"` \\| `\"dynamic_completions_api\"` \\| `\"chat_rename\"` \\| `\"call_summary\"` \\| `\"channel_bot\"` \\| `\"ai_projection\"` \\| `\"ai_editing\"` \\| `\"import\"` \\| `\"agent_session\"` \\| `\"agent_repository_choice\"` \\| `\"dictation\"` \\| `\"image_generation\"`\n\nEverything we use AI for. The wire / DB form of each variant is its\n`snake_case` name.\n\n\n<!-- generated/cognition/types.gen/type-aliases/CompletionUsage.md -->\n# Type Alias: CompletionUsage\n\n> **CompletionUsage** = \\{ `cost`: [`Usage`](Usage.md); `entity?`: `string` \\| `null`; `feature`: [`AiFeature`](AiFeature.md); `user`: [`MacroUserIdStr`](MacroUserIdStr.md); \\}\n\nUser and feature attribution for one invocation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cost\"></a> `cost` | [`Usage`](Usage.md) | Measured usage and resolved cost. |\n| <a id=\"property-entity\"></a> `entity?` | `string` \\| `null` | Related entity, if any. |\n| <a id=\"property-feature\"></a> `feature` | [`AiFeature`](AiFeature.md) | Feature that performed the invocation. |\n| <a id=\"property-user\"></a> `user` | [`MacroUserIdStr`](MacroUserIdStr.md) | User the invocation was performed for. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/DatabaseChange.md -->\n# Type Alias: DatabaseChange\n\n> **DatabaseChange** = \\{ `kind`: `\"none\"`; \\} \\| \\{ `kind`: `\"schema\"`; \\} \\| \\{ `count`: `number`; `kind`: `\"rows\"`; \\}\n\nWhat a successful tool call committed to the user's databases.\n\n\n<!-- generated/cognition/types.gen/type-aliases/DecisionRequest.md -->\n# Type Alias: DecisionRequest\n\n> **DecisionRequest** = \\{ `input`: `unknown`; `questions`: \\{\\[`key`: `string`\\]: `string`; \\}; \\}\n\nNamed yes/no questions to evaluate against one arbitrary JSON input.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-input\"></a> `input` | `unknown` | Data to classify. The entire compact request must fit in 64 KiB. |\n| <a id=\"property-questions\"></a> `questions` | \\{\\[`key`: `string`\\]: `string`; \\} | One to 32 questions, each at most 500 characters. Keys must be nonblank and at most 80 UTF-8 bytes; they are preserved in the response. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/DecisionResponse.md -->\n# Type Alias: DecisionResponse\n\n> **DecisionResponse** = \\{ `probabilities`: \\{\\[`key`: `string`\\]: `number`; \\}; \\}\n\nThe probability of yes for every requested question, under its original key.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-probabilities\"></a> `probabilities` | \\{\\[`key`: `string`\\]: `number`; \\} | Probabilities between zero and one, inclusive; not boolean decisions. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/DynamicSchema.md -->\n# Type Alias: DynamicSchema\n\n> **DynamicSchema** = \\{ `description?`: `string` \\| `null`; `name`: `string`; `schema`: `unknown`; \\}\n\nSchema definition for dynamic structured completions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description of what the schema represents. |\n| <a id=\"property-name\"></a> `name` | `string` | Name of the schema. |\n| <a id=\"property-schema\"></a> `schema` | `unknown` | The JSON schema to validate against. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/FeatureUsage.md -->\n# Type Alias: FeatureUsage\n\n> **FeatureUsage** = \\{ `entries`: [`CompletionUsage`](CompletionUsage.md)[]; `feature`: [`AiFeature`](AiFeature.md); `total`: `number`; \\}\n\nRecorded invocations and total for one feature.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entries\"></a> `entries` | [`CompletionUsage`](CompletionUsage.md)[] | Recorded invocations. |\n| <a id=\"property-feature\"></a> `feature` | [`AiFeature`](AiFeature.md) | Feature attribution. |\n| <a id=\"property-total\"></a> `total` | `number` | Total cost (USD). |\n\n\n<!-- generated/cognition/types.gen/type-aliases/MacroUserIdStr.md -->\n# Type Alias: MacroUserIdStr\n\n> **MacroUserIdStr** = `string`\n\n\n<!-- generated/cognition/types.gen/type-aliases/Price.md -->\n# Type Alias: Price\n\n> **Price** = \\{ `price_per_audio_minute?`: `number` \\| `null`; `price_per_million_cache_read?`: `number` \\| `null`; `price_per_million_cache_write?`: `number` \\| `null`; `price_per_million_in`: `number`; `price_per_million_out`: `number`; `total`: `number`; \\}\n\nRates applied to an invocation and its resolved dollar cost.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-price_per_audio_minute\"></a> `price_per_audio_minute?` | `number` \\| `null` | Price per audio minute (USD), absent for token billing. |\n| <a id=\"property-price_per_million_cache_read\"></a> `price_per_million_cache_read?` | `number` \\| `null` | Price per million cache-read input tokens (USD), absent when the model has no published rate and for audio billing. |\n| <a id=\"property-price_per_million_cache_write\"></a> `price_per_million_cache_write?` | `number` \\| `null` | Price per million cache-write input tokens (USD), absent when the model has no published rate and for audio billing. |\n| <a id=\"property-price_per_million_in\"></a> `price_per_million_in` | `number` | Price per million input tokens (USD); zero for audio billing. |\n| <a id=\"property-price_per_million_out\"></a> `price_per_million_out` | `number` | Price per million output tokens (USD); zero for audio billing. |\n| <a id=\"property-total\"></a> `total` | `number` | Total cost (USD). |\n\n\n<!-- generated/cognition/types.gen/type-aliases/StructuredCompletionOutcome.md -->\n# Type Alias: StructuredCompletionOutcome\n\n> **StructuredCompletionOutcome** = \\{ `result`: `unknown`; `status`: `\"completed\"`; \\} \\| \\{ `reason`: `string`; `status`: `\"interrupted\"`; \\}\n\n\n<!-- generated/cognition/types.gen/type-aliases/StructuredCompletionRequest.md -->\n# Type Alias: StructuredCompletionRequest\n\n> **StructuredCompletionRequest** = \\{ `additional_instructions?`: `string` \\| `null`; `model`: `string`; `output_schema`: [`DynamicSchema`](DynamicSchema.md); `prompt`: `string`; `toolset?`: [`ToolSet`](ToolSet.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-additional_instructions\"></a> `additional_instructions?` | `string` \\| `null` |\n| <a id=\"property-model\"></a> `model` | `string` |\n| <a id=\"property-output_schema\"></a> `output_schema` | [`DynamicSchema`](DynamicSchema.md) |\n| <a id=\"property-prompt\"></a> `prompt` | `string` |\n| <a id=\"property-toolset\"></a> `toolset?` | [`ToolSet`](ToolSet.md) |\n\n\n<!-- generated/cognition/types.gen/type-aliases/StructuredCompletionResponse.md -->\n# Type Alias: StructuredCompletionResponse\n\n> **StructuredCompletionResponse** = \\{ `outcome`: [`StructuredCompletionOutcome`](StructuredCompletionOutcome.md); `toolActivity`: [`StructuredToolActivity`](StructuredToolActivity.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-outcome\"></a> `outcome` | [`StructuredCompletionOutcome`](StructuredCompletionOutcome.md) | - |\n| <a id=\"property-toolactivity\"></a> `toolActivity` | [`StructuredToolActivity`](StructuredToolActivity.md)[] | Actual completed tools, independent of the model's claims. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/StructuredToolActivity.md -->\n# Type Alias: StructuredToolActivity\n\n> **StructuredToolActivity** = \\{ `name`: `string`; `outcome`: [`ToolOutcome`](ToolOutcome.md); \\}\n\nOne tool call the agent finished, and what it did.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-outcome\"></a> `outcome` | [`ToolOutcome`](ToolOutcome.md) |\n\n\n<!-- generated/cognition/types.gen/type-aliases/ToolOutcome.md -->\n# Type Alias: ToolOutcome\n\n> **ToolOutcome** = \\{ `changes`: [`DatabaseChange`](DatabaseChange.md); `status`: `\"succeeded\"`; \\} \\| \\{ `status`: `\"failed\"`; \\}\n\n\n<!-- generated/cognition/types.gen/type-aliases/ToolSet.md -->\n# Type Alias: ToolSet\n\n> **ToolSet** = \\{ `type`: `\"all\"`; \\} \\| \\{ `type`: `\"none\"`; \\} \\| \\{ `type`: `\"databases\"`; \\} \\| \\{ `type`: `\"databases_read_only\"`; \\}\n\n\n<!-- generated/cognition/types.gen/type-aliases/Usage.md -->\n# Type Alias: Usage\n\n> **Usage** = \\{ `audio_seconds?`: `number` \\| `null`; `cache_read_input_tokens`: `number`; `cache_write_input_tokens`: `number`; `created_at`: `string`; `input_tokens`: `number`; `model`: `string`; `output_tokens`: `number`; `price?`: `null` \\| [`Price`](Price.md); \\}\n\nMeasured usage for one invocation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audio_seconds\"></a> `audio_seconds?` | `number` \\| `null` | Audio duration in seconds, absent for token billing. |\n| <a id=\"property-cache_read_input_tokens\"></a> `cache_read_input_tokens` | `number` | Input tokens read from a prompt cache; zero for audio billing. |\n| <a id=\"property-cache_write_input_tokens\"></a> `cache_write_input_tokens` | `number` | Input tokens written to a prompt cache; zero for audio billing. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Recording timestamp. |\n| <a id=\"property-input_tokens\"></a> `input_tokens` | `number` | Uncached input tokens; zero for audio billing. |\n| <a id=\"property-model\"></a> `model` | `string` | Provider model identifier. |\n| <a id=\"property-output_tokens\"></a> `output_tokens` | `number` | Output tokens; zero for audio billing. |\n| <a id=\"property-price\"></a> `price?` | `null` \\| [`Price`](Price.md) | - |\n\n\n<!-- generated/cognition/types.gen/type-aliases/UsageRequest.md -->\n# Type Alias: UsageRequest\n\n> **UsageRequest** = \\{ `features?`: [`AiFeature`](AiFeature.md)[]; `from?`: `string` \\| `null`; `include_users?`: `string`[]; `until?`: `string` \\| `null`; \\}\n\nRequest body for [`get_usage_handler`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-features\"></a> `features?` | [`AiFeature`](AiFeature.md)[] | If empty, include all features. |\n| <a id=\"property-from\"></a> `from?` | `string` \\| `null` | Inclusive lower bound on `created_at`. |\n| <a id=\"property-include_users\"></a> `include_users?` | `string`[] | If empty, include all users. |\n| <a id=\"property-until\"></a> `until?` | `string` \\| `null` | Exclusive upper bound on `created_at`. |\n\n\n<!-- generated/cognition/types.gen/type-aliases/UsageSummary.md -->\n# Type Alias: UsageSummary\n\n> **UsageSummary** = \\{ `entries`: [`FeatureUsage`](FeatureUsage.md)[]; `total`: `number`; \\}\n\nPer-feature breakdown and grand total.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entries\"></a> `entries` | [`FeatureUsage`](FeatureUsage.md)[] | Per-feature usage. |\n| <a id=\"property-total\"></a> `total` | `number` | Grand total (USD). |\n\n\n<!-- src/entities/ai/namespace/classes/AiNamespace.md -->\n# Class: AiNamespace\n\nShared cognition endpoints, charged to the authenticated acting user.\n\n## Constructors\n\n### Constructor\n\n> **new AiNamespace**(`client`): `AiNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`AiNamespace`\n\n## Methods\n\n### decide()\n\n> **decide**(`request`): `Promise`\\<[`DecisionResponse`](../../../../../generated/cognition/types.gen/type-aliases/DecisionResponse.md)\\>\n\nAsk named yes/no questions about JSON input. Each probability estimates\nyes, from 0 to 1. This classifies supplied data without running tools.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`DecisionRequest`](../../../../../generated/cognition/types.gen/type-aliases/DecisionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`DecisionResponse`](../../../../../generated/cognition/types.gen/type-aliases/DecisionResponse.md)\\>\n\n***\n\n### structuredCompletion()\n\n> **structuredCompletion**(`request`): `Promise`\\<[`StructuredCompletionResponse`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionResponse.md)\\>\n\nGenerate an answer matching a JSON Schema. Set toolset to { type: 'none' }\nto use only supplied context. Other toolsets can perform the requested\nactions; always inspect outcome and toolActivity, including interruptions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`StructuredCompletionRequest`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`StructuredCompletionResponse`](../../../../../generated/cognition/types.gen/type-aliases/StructuredCompletionResponse.md)\\>\n\n***\n\n### usage()\n\n> **usage**(`options?`): `Promise`\\<[`UsageSummary`](../../../../../generated/cognition/types.gen/type-aliases/UsageSummary.md)\\>\n\nRead AI usage over a time range, optionally restricting it to users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<[`UsageRequest`](../../../../../generated/cognition/types.gen/type-aliases/UsageRequest.md), `\"include_users\"`\\> & \\{ `users?`: [`User`](../../../users/user/classes/User.md)[]; \\} |\n\n#### Returns\n\n`Promise`\\<[`UsageSummary`](../../../../../generated/cognition/types.gen/type-aliases/UsageSummary.md)\\>\n"- },- {- "name": "bots",- "description": "Inspect and manage bots.",- "overview": "<!-- src/entities/bots/namespace/classes/BotsNamespace.md -->\n# Class: BotsNamespace\n\nThe authenticated bot's identity. Only meaningful with bot auth\n(`auth: { type: 'bot', token }`).\n\n## Constructors\n\n### Constructor\n\n> **new BotsNamespace**(`client`): `BotsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`BotsNamespace`\n\n## Methods\n\n### channels()\n\n> **channels**(): `Promise`\\<[`BotChannel`](../../../../../generated/storage/types.gen/type-aliases/BotChannel.md)[]\\>\n\nChannels containing the authenticated bot. Requires bot auth.\n\n#### Returns\n\n`Promise`\\<[`BotChannel`](../../../../../generated/storage/types.gen/type-aliases/BotChannel.md)[]\\>\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`Bot`](../../../../../generated/storage/types.gen/type-aliases/Bot.md)\\>\n\nThe authenticated bot's own record. Requires bot auth; with a user API\nkey this throws (a user token has no bot identity).\n\n#### Returns\n\n`Promise`\\<[`Bot`](../../../../../generated/storage/types.gen/type-aliases/Bot.md)\\>\n\n***\n\n### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated bot's canonical principal id (`bot|<uuid>`) — the form\nused for bot mentions, senders, and webhook `ids` filters. Cached on the\nclient; see MacroClient.myPrincipalId.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n",- "documentation": "# Macro SDK: bots\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/Bot.md -->\n# Type Alias: Bot\n\n> **Bot** = \\{ `avatar_url?`: `string` \\| `null`; `created_at`: `string`; `created_by?`: `string` \\| `null`; `deleted_at?`: `string` \\| `null`; `description?`: `string` \\| `null`; `handle`: `string`; `has_agent`: `boolean`; `id`: [`BotId`](BotId.md); `kind`: [`BotKind`](BotKind.md); `name`: `string`; `owner?`: `null` \\| [`BotOwner`](BotOwner.md); `updated_at`: `string`; \\}\n\nBot row.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Optional avatar URL. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by\"></a> `created_by?` | `string` \\| `null` | User that created this bot. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Soft-delete timestamp. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable handle. |\n| <a id=\"property-has_agent\"></a> `has_agent` | `boolean` | Whether mentioning this bot opens a sandboxed coding-agent session. |\n| <a id=\"property-id\"></a> `id` | [`BotId`](BotId.md) | Bot id. |\n| <a id=\"property-kind\"></a> `kind` | [`BotKind`](BotKind.md) | Bot kind. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner\"></a> `owner?` | `null` \\| [`BotOwner`](BotOwner.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |\n\n\n<!-- generated/storage/types.gen/type-aliases/BotChannel.md -->\n# Type Alias: BotChannel\n\n> **BotChannel** = \\{ `channel_id`: `string`; `channel_type`: [`BotChannelType`](BotChannelType.md); `joined_at`: `string`; `name?`: `string` \\| `null`; \\}\n\nChannel containing a bot.\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_type\"></a> `channel_type` | [`BotChannelType`](BotChannelType.md) | Channel type. |\n| <a id=\"property-joined_at\"></a> `joined_at` | `string` | Timestamp when the bot joined the channel. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Channel display name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/BotChannelType.md -->\n# Type Alias: BotChannelType\n\n> **BotChannelType** = `\"public\"` \\| `\"private\"` \\| `\"direct_message\"` \\| `\"team\"`\n\nChannel type for a channel containing a bot.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotId.md -->\n# Type Alias: BotId\n\n> **BotId** = `string`\n\n\n<!-- generated/storage/types.gen/type-aliases/BotKind.md -->\n# Type Alias: BotKind\n\n> **BotKind** = `\"owned\"` \\| `\"system\"`\n\nBot kind.\n\n\n<!-- generated/storage/types.gen/type-aliases/BotOwner.md -->\n# Type Alias: BotOwner\n\n> **BotOwner** = \\{ `type`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\nBot owner.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"user\"`; `user_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"user\"` | - |\n| `user_id` | `string` | Owner user id. |\n\n***\n\n### Type Literal\n\n\\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `team_id` | `string` | Owner team id. |\n| `type` | `\"team\"` | - |\n\n\n<!-- src/entities/bots/namespace/classes/BotsNamespace.md -->\n# Class: BotsNamespace\n\nThe authenticated bot's identity. Only meaningful with bot auth\n(`auth: { type: 'bot', token }`).\n\n## Constructors\n\n### Constructor\n\n> **new BotsNamespace**(`client`): `BotsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`BotsNamespace`\n\n## Methods\n\n### channels()\n\n> **channels**(): `Promise`\\<[`BotChannel`](../../../../../generated/storage/types.gen/type-aliases/BotChannel.md)[]\\>\n\nChannels containing the authenticated bot. Requires bot auth.\n\n#### Returns\n\n`Promise`\\<[`BotChannel`](../../../../../generated/storage/types.gen/type-aliases/BotChannel.md)[]\\>\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`Bot`](../../../../../generated/storage/types.gen/type-aliases/Bot.md)\\>\n\nThe authenticated bot's own record. Requires bot auth; with a user API\nkey this throws (a user token has no bot identity).\n\n#### Returns\n\n`Promise`\\<[`Bot`](../../../../../generated/storage/types.gen/type-aliases/Bot.md)\\>\n\n***\n\n### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated bot's canonical principal id (`bot|<uuid>`) — the form\nused for bot mentions, senders, and webhook `ids` filters. Cached on the\nclient; see MacroClient.myPrincipalId.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n"- },- {- "name": "calendar",- "description": "Find and manage calendar events.",- "overview": "<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\nA meeting on more than one of the user's inboxes is one event per inbox;\n[CalendarNamespace.occurrences](#occurrences) lists each copy with its `inbox` and\n`role`. Before changing such a meeting's details, guests or guest\npermissions, or deleting it, ask the user which inbox's copy to change, then\npass that copy's `inbox` to [CalendarEvent.update](../../event/classes/CalendarEvent.md#update),\n[CalendarEvent.inviteGuests](../../event/classes/CalendarEvent.md#inviteguests) or [CalendarEvent.delete](../../event/classes/CalendarEvent.md#delete). Never\nchoose between the user's inboxes yourself, whatever they look like: a\ntest, secondary or unfamiliar address is still the user's own inbox. Skip\nthe question only when the user already named the inbox, when only one copy\ncan make the change, or when adding guests from the copy the user\norganizes, and say why. Reminders may go to one copy; name its inbox. Read\nthose three methods' documentation before changing a meeting held through\nseveral inboxes: it says what each change does from each copy.\n\n[CalendarEvent.addToCalendar](../../event/classes/CalendarEvent.md#addtocalendar) adds a shared meeting only while none\nof the user's calendars holds it. Refused with `already_on_calendar`, it is\nrefused on every calendar, so tell the user the meeting is already on their\ncalendar and never offer to add it to another one.\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### noteDocuments()\n\n> **noteDocuments**(`query?`): `Promise`\\<\\{ `documents`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md); `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: [`Team`](../../../teams/team/classes/Team.md); \\}[]; \\}\\>\n\nFind up to 30 owned markdown documents for meeting notes, plus available extra team audiences.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `query?` | `string` | `''` |\n\n#### Returns\n\n`Promise`\\<\\{ `documents`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md); `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: [`Team`](../../../teams/team/classes/Team.md); \\}[]; \\}\\>\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `inbox`: `string` \\| `undefined`; `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); `role`: [`CalendarEventRole`](../type-aliases/CalendarEventRole.md) \\| `undefined`; \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated. Each names\nthe address of the connected inbox holding that copy of the event\n(`inbox`) and whether the user organizes it or is a guest there (`role`,\nabsent when neither). A meeting on several of the user's inboxes appears\nonce per inbox, each with its own event; describe them by inbox and role,\nnever by id.\n\nBefore changing or deleting such a meeting, ask the user which inbox's\ncopy to change, unless they named it, only one copy can make the change,\nor you add guests from the copy they organize. Never choose between the\nuser's inboxes yourself, whatever they look like. Pass the chosen copy's\n`inbox` to its `update`, `inviteGuests` or `delete`; without it the call\nis refused with `copy_choice_required`, which names each copy's inbox and\nevent and gives the question to ask. An occurrence whose calendar is no\nlonger listed has no `inbox`; take it from that refusal.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `inbox`: `string` \\| `undefined`; `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); `role`: [`CalendarEventRole`](../type-aliases/CalendarEventRole.md) \\| `undefined`; \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | What guests may do; omit for Google's defaults. Google calendars only. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n\n\n<!-- src/entities/calendar/namespace/type-aliases/CalendarEventRole.md -->\n# Type Alias: CalendarEventRole\n\n> **CalendarEventRole** = `\"organizer\"` \\| `\"guest\"`\n\nWhat the user is on one copy of an event, through the inbox holding it:\nits organizer (or the owner of an event without guests), or a guest.\n",- "documentation": "# Macro SDK: calendar\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/calendar/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md -->\n# Type Alias: CalendarAttendeeInputBody\n\n> **CalendarAttendeeInputBody** = \\{ `email`: `string`; `isOptional?`: `boolean`; \\}\n\nAn attendee supplied to a calendar mutation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Attendee email address. |\n| <a id=\"property-isoptional\"></a> `isOptional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarCapabilities.md -->\n# Type Alias: CalendarCapabilities\n\n> **CalendarCapabilities** = \\{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `guestPolicy`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \\}\n\nActual provider capabilities used by calendar editors.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodecline\"></a> `autoDecline` | `boolean` | Whether event-level automatic invitation declines are supported. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-customrecurrence\"></a> `customRecurrence` | `boolean` | Whether arbitrary RFC 5545 recurrence properties can be written. |\n| <a id=\"property-emailreminders\"></a> `emailReminders` | `boolean` | Whether email reminders are delivered by the provider or Macro. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `boolean` | Whether the organizer can set what guests may do. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | Whether an existing conference can be detached. |\n| <a id=\"property-resetrsvp\"></a> `resetRsvp` | `boolean` | Whether an attendee can reset their RSVP to unanswered. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md -->\n# Type Alias: CalendarDeletionScopeParam\n\n> **CalendarDeletionScopeParam** = `\"all\"` \\| `\"this_event\"` \\| `\"this_and_following\"`\n\nHow much of a recurring series a deletion removes.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md -->\n# Type Alias: CalendarGuestInputBody\n\n> **CalendarGuestInputBody** = \\{ `email`: `string`; `optional?`: `boolean`; \\}\n\nA guest added to an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Guest email address. |\n| <a id=\"property-optional\"></a> `optional?` | `boolean` | Whether attendance is optional. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarJoinRequestStatus.md -->\n# Type Alias: CalendarJoinRequestStatus\n\n> **CalendarJoinRequestStatus** = `\"pending\"` \\| `\"accepted\"` \\| `\"declined\"`\n\nLifecycle of a request to be added as a guest of a shared event.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarMentionEvent.md -->\n# Type Alias: CalendarMentionEvent\n\n> **CalendarMentionEvent** = \\{ `attendeeCount`: `number`; `canRequestToJoin?`: `boolean`; `description?`: `string` \\| `null`; `isRecurring`: `boolean`; `joinRequestStatus?`: `null` \\| [`CalendarJoinRequestStatus`](CalendarJoinRequestStatus.md); `location?`: `string` \\| `null`; `occurrenceKey?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); `title`: `string`; `updatedAt`: `string`; `viewerCopy?`: `null` \\| [`CalendarMentionViewerCopy`](CalendarMentionViewerCopy.md); `viewerEventId?`: `string` \\| `null`; \\}\n\nMeeting-level fields shown in a calendar event mention preview, taken from\nthe requester's own projection of the meeting, or — when the requester has\nnone — from the mentioned projection a channel they belong to was given.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Number of attendees on the previewed copy. |\n| <a id=\"property-canrequesttojoin\"></a> `canRequestToJoin?` | `boolean` | For a channel-shared preview, whether the person who shared it can add the requester as a guest. Always false for the requester's own copy. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Provider description, plain text or HTML, truncated for the preview. Clients must sanitize it before rendering. |\n| <a id=\"property-isrecurring\"></a> `isRecurring` | `boolean` | Whether the event repeats. |\n| <a id=\"property-joinrequeststatus\"></a> `joinRequestStatus?` | `null` \\| [`CalendarJoinRequestStatus`](CalendarJoinRequestStatus.md) | - |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location label, when set. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey?` | `string` \\| `null` | Key of the previewed instance, absent when no occurrence is materialized. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Time of the previewed instance: the requested occurrence when it exists, else the next upcoming one, else the latest past one, else the series start. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time of the previewed copy. |\n| <a id=\"property-viewercopy\"></a> `viewerCopy?` | `null` \\| [`CalendarMentionViewerCopy`](CalendarMentionViewerCopy.md) | - |\n| <a id=\"property-viewereventid\"></a> `viewerEventId?` | `string` \\| `null` | The requester's own event entity for the mentioned meeting. Differs from the mentioned id when the mention came from another attendee. Absent when the meeting is on none of the requester's calendars and they see it only because it was shared with one of their channels: that preview is read-only and there is no event of theirs to open. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarMentionViewerCopy.md -->\n# Type Alias: CalendarMentionViewerCopy\n\n> **CalendarMentionViewerCopy** = `\"snapshot\"` \\| `\"invitation\"` \\| `\"event\"`\n\nHow a requester holds a mentioned meeting on their own calendar, decided\nby the copy's own inbox, the way viewer capabilities decide organizer and\nguest.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarProvider.md -->\n# Type Alias: CalendarProvider\n\n> **CalendarProvider** = `\"google\"` \\| `\"outlook\"`\n\nProvider selected from the persisted calendar account and email binding.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarReplacementView.md -->\n# Type Alias: CalendarReplacementView\n\n> **CalendarReplacementView** = \\{ `attendeeCount`: `number`; `completedSteps`: `number`; `event?`: `null` \\| [`CalendarEvent`](CalendarEvent.md); `isSeries`: `boolean`; `operationId`: `string`; `providerUrl?`: `string` \\| `null`; `removeConference`: `boolean`; `replacementUrl?`: `string` \\| `null`; `status`: [`ReplacementStatus`](ReplacementStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `totalSteps`: `number`; \\}\n\nSafe preview and recovery response; never exposes the opaque provider snapshot.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Guest count for cancellation and reinvitation confirmation. |\n| <a id=\"property-completedsteps\"></a> `completedSteps` | `number` | Number of completed provider steps. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| [`CalendarEvent`](CalendarEvent.md) | - |\n| <a id=\"property-isseries\"></a> `isSeries` | `boolean` | Entire recurring series, including exceptions, is replaced. |\n| <a id=\"property-operationid\"></a> `operationId` | `string` | Use this identity when confirming or checking progress. |\n| <a id=\"property-providerurl\"></a> `providerUrl?` | `string` \\| `null` | Original event for manual review. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | The provider conference is removed. |\n| <a id=\"property-replacementurl\"></a> `replacementUrl?` | `string` \\| `null` | New provider event, when creation was confirmed. |\n| <a id=\"property-status\"></a> `status` | [`ReplacementStatus`](ReplacementStatus.md) | Current durable state. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Frozen time. |\n| <a id=\"property-title\"></a> `title` | `string` | Frozen title. |\n| <a id=\"property-totalsteps\"></a> `totalSteps` | `number` | Number of provider steps in this operation. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md -->\n# Type Alias: CalendarRsvpScopeParam\n\n> **CalendarRsvpScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an RSVP applies to.\n\nUnlike deletion there is no this-and-following variant: the provider\ncannot express a forward-scoped response, so offering one would be a\npromise sync could not keep.\n\n\n<!-- generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md -->\n# Type Alias: CalendarUpdateScopeParam\n\n> **CalendarUpdateScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an update applies to.\n\nLike RSVPs there is no this-and-following variant: the provider cannot\nexpress a forward-scoped edit as one write, and emulating it (truncate\nthe series, insert an edited clone) is non-atomic and re-invites the\nattendees of the clone. Compose it from a this-and-following deletion\nand a create when that shape is wanted.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceChange.md -->\n# Type Alias: ConferenceChange\n\n> **ConferenceChange** = `\"provider_default\"` \\| `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"none\"`\n\nA requested change to an event's conferencing. Omitting the field leaves\nthe existing conference untouched; only these values change it.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/DocumentNoteLink.md -->\n# Type Alias: DocumentNoteLink\n\n> **DocumentNoteLink** = \\{ `canViewMeeting`: `boolean`; `documentName`: `string`; `event?`: `null` \\| [`CalendarMentionEvent`](CalendarMentionEvent.md); `eventId`: `string`; `eventTitle`: `string`; `occurrenceKey`: `string`; `team?`: `null` \\| [`NoteTeam`](NoteTeam.md); `teamEvent?`: `null` \\| [`TeamCalendarItem`](TeamCalendarItem.md); \\}\n\nA visible meeting link, or an owner's durable grant they can no longer open.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canviewmeeting\"></a> `canViewMeeting` | `boolean` | Whether the reader may resolve this exact meeting's details right now. |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | Current name of the markdown document. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| [`CalendarMentionEvent`](CalendarMentionEvent.md) | - |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Linked calendar copy. |\n| <a id=\"property-eventtitle\"></a> `eventTitle` | `string` | Current title, or a safe placeholder when meeting details are unavailable. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Original occurrence start, or `single` for a one-time meeting. |\n| <a id=\"property-team\"></a> `team?` | `null` \\| [`NoteTeam`](NoteTeam.md) | - |\n| <a id=\"property-teamevent\"></a> `teamEvent?` | `null` \\| [`TeamCalendarItem`](TeamCalendarItem.md) | - |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/calendar/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/calendar/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/MeetingNote.md -->\n# Type Alias: MeetingNote\n\n> **MeetingNote** = \\{ `canManage`: `boolean`; `documentId`: `string`; `name`: `string`; `team?`: `null` \\| [`NoteTeam`](NoteTeam.md); \\}\n\nOne linked document and the extra access this link grants.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canmanage\"></a> `canManage` | `boolean` | Whether this viewer can change this document's sharing. |\n| <a id=\"property-documentid\"></a> `documentId` | `string` | Markdown document identity. |\n| <a id=\"property-name\"></a> `name` | `string` | Current document name. |\n| <a id=\"property-team\"></a> `team?` | `null` \\| [`NoteTeam`](NoteTeam.md) | - |\n\n\n<!-- generated/calendar/types.gen/type-aliases/NoteTeam.md -->\n# Type Alias: NoteTeam\n\n> **NoteTeam** = \\{ `id`: `string`; `name`: `string`; \\}\n\nAn additional team audience, separate from the meeting's audience.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Team identity. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeAutoDeclineMode.md -->\n# Type Alias: OutOfOfficeAutoDeclineMode\n\n> **OutOfOfficeAutoDeclineMode** = `\"decline_none\"` \\| `\"decline_all_conflicting_invitations\"` \\| `\"decline_only_new_conflicting_invitations\"`\n\nHow an out-of-office event responds to conflicting invitations, mirroring\nGoogle's `autoDeclineMode`.\n\n\n<!-- generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md -->\n# Type Alias: OutOfOfficeProperties\n\n> **OutOfOfficeProperties** = \\{ `autoDeclineMode?`: [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md); `declineMessage?`: `string` \\| `null`; \\}\n\nThe extra properties Google requires on an out-of-office event, mirroring\nits `outOfOfficeProperties` block. Their presence on a draft or patch is\nwhat marks the mutation as out-of-office.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodeclinemode\"></a> `autoDeclineMode?` | [`OutOfOfficeAutoDeclineMode`](OutOfOfficeAutoDeclineMode.md) | How conflicting invitations are handled while the user is out. |\n| <a id=\"property-declinemessage\"></a> `declineMessage?` | `string` \\| `null` | Message returned to organizers whose invitations are auto-declined. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/ReplacementStatus.md -->\n# Type Alias: ReplacementStatus\n\n> **ReplacementStatus** = `\"needs_confirmation\"` \\| `\"in_progress\"` \\| `\"complete\"`\n\nUser-visible workflow state.\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarContent.md -->\n# Type Alias: TeamCalendarContent\n\n> **TeamCalendarContent** = \\{ `kind`: `\"busy\"`; \\} \\| \\{ `details`: [`TeamCalendarDetails`](TeamCalendarDetails.md); `kind`: `\"details\"`; \\}\n\nDisjoint busy/detail shapes prevent new event fields leaking by default.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"busy\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `details`: [`TeamCalendarDetails`](TeamCalendarDetails.md); `kind`: `\"details\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `details` | [`TeamCalendarDetails`](TeamCalendarDetails.md) | Detail projection. |\n| `kind` | `\"details\"` | - |\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarDetails.md -->\n# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarItem.md -->\n# Type Alias: TeamCalendarItem\n\n> **TeamCalendarItem** = [`TeamCalendarContent`](TeamCalendarContent.md) & \\{ `contributesToAvailability`: `boolean`; `id`: `string`; `ownerId`: `string`; `time`: [`EventTime`](EventTime.md); \\}\n\nA read-only team calendar occurrence.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `contributesToAvailability` | `boolean` | Whether this occurrence blocks the sharer's personal availability. A subscribed calendar's block can be shared without occupying the sharer. |\n| `id` | `string` | Stable opaque projection identity, never an event entity id. |\n| `ownerId` | `string` | The person sharing access to the source. |\n| `time` | [`EventTime`](EventTime.md) | Occurrence interval. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- generated/calendar/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |\n\n\n<!-- generated/calendar/types.gen/type-aliases/VisibleCalendar.md -->\n# Type Alias: VisibleCalendar\n\n> **VisibleCalendar** = \\{ `capabilities`: [`CalendarCapabilities`](CalendarCapabilities.md); `color?`: `string` \\| `null`; `defaultReminders`: [`EventReminderOverride`](EventReminderOverride.md)[]; `emailAddress`: `string`; `emailLinkId`: `string`; `id`: `string`; `isPrimary`: `boolean`; `isSubscription`: `boolean`; `isWritable`: `boolean`; `name`: `string`; `provider`: [`CalendarProvider`](CalendarProvider.md); `syncError?`: `string` \\| `null`; \\}\n\nA calendar visible to a requester, listed for pickers and filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-capabilities\"></a> `capabilities` | [`CalendarCapabilities`](CalendarCapabilities.md) | Provider features available on this actual calendar. |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | Provider color. |\n| <a id=\"property-defaultreminders\"></a> `defaultReminders` | [`EventReminderOverride`](EventReminderOverride.md)[] | Default reminders applied to events that keep `useDefault`. |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | Connected inbox address, for grouping in multi-inbox pickers. |\n| <a id=\"property-emaillinkid\"></a> `emailLinkId` | `string` | Connected inbox that syncs this calendar. |\n| <a id=\"property-id\"></a> `id` | `string` | Persisted Macro calendar identifier. |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `boolean` | Whether this is its account's primary calendar. |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `boolean` | Whether this is one of Google's shared system calendars (holidays, birthdays) the account subscribes to rather than one a person maintains. |\n| <a id=\"property-iswritable\"></a> `isWritable` | `boolean` | Whether the grant can create and modify events on this calendar. |\n| <a id=\"property-name\"></a> `name` | `string` | Provider display name. |\n| <a id=\"property-provider\"></a> `provider` | [`CalendarProvider`](CalendarProvider.md) | Calendar provider, for display and reconnect routing. |\n| <a id=\"property-syncerror\"></a> `syncError?` | `string` \\| `null` | A persistent sync failure isolated to this calendar, surfaced so the settings row can badge it. `None` while the calendar is syncing normally or a failure has not yet crossed the persistence threshold. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ListOccurrencesData.md -->\n# Type Alias: ListOccurrencesData\n\n> **ListOccurrencesData** = \\{ `body?`: `never`; `path?`: `never`; `query`: \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\}; `url`: `\"/calendar-events\"`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-body\"></a> `body?` | `never` | - |\n| <a id=\"property-path\"></a> `path?` | `never` | - |\n| <a id=\"property-query\"></a> `query` | \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `query.cursor?` | `string` | Opaque continuation cursor returned by the previous page. |\n| `query.end` | `string` | Exclusive UTC viewport end. |\n| `query.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `query.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `query.start` | `string` | Inclusive UTC viewport start. |\n| `query.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n| <a id=\"property-url\"></a> `url` | `\"/calendar-events\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md -->\n# Type Alias: TeamCalendarCoverage\n\n> **TeamCalendarCoverage** = `\"ready\"` \\| `\"unavailable\"` \\| `\"hidden\"`\n\nWhether a member's calendar projection can establish availability.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarDetails.md -->\n# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamCalendarSharing.md -->\n# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.\n\n\n<!-- src/entities/calendar/calendar/classes/Calendar.md -->\n# Class: Calendar\n\nA calendar visible to the requester across their connected inboxes: a\nfree-to-construct handle whose detail resolves from the caller's calendar\nlist. There is no fetch-by-id endpoint, so a bare [Calendar.byId](#byid)\nhandle loads its detail by listing the caller's calendars and matching on id.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Provider color, when set. | - |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | Connected inbox address that syncs this calendar. | - |\n| <a id=\"property-emaillink\"></a> `emailLink` | `readonly` | () => `Promise`\\<[`Link`](../../../email/link/classes/Link.md)\\> | The connected inbox (email link) that syncs this calendar. | - |\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-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is its account's primary calendar. | - |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is a subscribed system calendar (holidays, birthdays). | - |\n| <a id=\"property-iswritable\"></a> `isWritable` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the grant can create and modify events on this calendar. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Provider display name. | - |\n| <a id=\"property-syncerror\"></a> `syncError` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A persistent per-calendar sync failure, surfaced for settings badges. | - |\n\n## Methods\n\n### setContributesToAvailability()\n\n> **setContributesToAvailability**(`contributesToAvailability`): `Promise`\\<`void`\\>\n\nSet whether this calendar contributes to the caller's availability.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `contributesToAvailability` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`VisibleCalendar`](../../../../../generated/calendar/types.gen/type-aliases/VisibleCalendar.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`, `id`): `Calendar`\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Calendar`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Calendar`[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Calendar`[]\\>\n\n\n<!-- src/entities/calendar/event/classes/CalendarEvent.md -->\n# Class: CalendarEvent\n\nA Macro calendar event: a handle exposing the event's synced fields and the\nmutations that act on it ([CalendarEvent.update](#update),\n[CalendarEvent.delete](#delete), [CalendarEvent.rsvp](#rsvp)).\n\nThe calendar service has no fetch-by-id endpoint, so a handle reads its\nfields only when seeded with a record — as returned by\n[CalendarEvent.update](#update), [CalendarEvent.rsvp](#rsvp), or\n`calendar.createEvent`. A bare [CalendarEvent.byId](#byid) handle can drive\nmutations, but reading a field on it throws.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `readonly` | () => `Promise`\\<[`CalendarAttendee`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendee.md)[]\\> | Attendees on the canonical copy. | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | () => `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md) \\| `undefined`\\> | The calendar the canonical source belongs to, when known. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional event body. | - |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `readonly` | () => `Promise`\\<[`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md)\\> | What the organizer lets guests do: modify, invite others, see the guest list. | - |\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-isreadonly\"></a> `isReadOnly` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the canonical source's calendar prohibits editing. | - |\n| <a id=\"property-location\"></a> `location` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional physical or virtual location label. | - |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `readonly` | () => `Promise`\\<`string`[]\\> | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`EventStatus`](../../../../../generated/calendar/types.gen/type-aliases/EventStatus.md)\\> | Event status. | - |\n| <a id=\"property-time\"></a> `time` | `readonly` | () => `Promise`\\<[`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md)\\> | Timed or all-day shape. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |\n| <a id=\"property-transparency\"></a> `transparency` | `readonly` | () => `Promise`\\<[`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md)\\> | Availability behavior. | - |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `readonly` | () => `Promise`\\<[`ViewerCapabilities`](../../../../../generated/calendar/types.gen/type-aliases/ViewerCapabilities.md)\\> | What the connected account may do with this event under its guest policy. | - |\n\n## Methods\n\n### addToCalendar()\n\n> **addToCalendar**(`options?`): `Promise`\\<`CalendarEvent`\\>\n\nAdd a snapshot of an event shared with one of the requester's\nchannels to one of their Google calendars, and return a handle to the\nsynced snapshot. The snapshot keeps the meeting's iCalendar UID and\norganizer, lists only the requester as a guest, and carries no join link;\nnobody is notified, and answers or guests on it never reach the meeting.\nRefused with `already_on_calendar` when the meeting is already on one of\ntheir calendars, whichever calendar is named, so it cannot be added to\nanother of their calendars either; with `join_request_open` while their\nrequest to join it is pending or accepted (the meeting then arrives as an\ninvitation); and with `copy_refused` when Google will not import it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### delete()\n\n> **delete**(`options?`): `Promise`\\<`void`\\>\n\nDelete the event (or a scoped part of a recurring series) at its provider.\n\nA meeting on more than one of the user's inboxes is one event per inbox.\nBefore deleting any of them, ask the user which inbox's copy to delete,\nthen pass that copy's `inbox`. Never choose between the user's inboxes\nyourself, whatever they look like: a test, secondary or unfamiliar address\nis still the user's own inbox. Skip the question only when the user\nalready named the inbox, or when only one copy can be deleted; then delete\nthat copy and say why. Without `inbox` the call is refused with\n`copy_choice_required`, listing each copy and the question to ask.\n\nDeleting the copy the user organizes cancels the meeting for every guest.\nDeleting a copy where they are a guest takes the meeting off that inbox's\ncalendar: on Google it also declines the invitation and tells the\norganizer, while on Outlook the organizer is not told and still sees the\ninvitation unanswered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | [`DeleteEventOptions`](../interfaces/DeleteEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### ics()\n\n> **ics**(): `Promise`\\<`string`\\>\n\nThe event as an iCalendar (`.ics`) document: its series, title,\ndescription, location and organizer, never its guests or join link.\nAvailable for the requester's own events and ones shared with a channel\nthey belong to.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### inviteGuests()\n\n> **inviteGuests**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nAdd guests without touching anyone already invited, and return a handle\nto the synced record.\n\nWhen the meeting is on more than one of the user's inboxes, add from the\ncopy the user organizes when there is one (it invites directly, while a\nguest's copy invites only as far as the organizer allows) and say why;\notherwise ask the user which inbox's copy to add them from. Never choose\nbetween the user's inboxes any other way, whatever they look like. Pass\nthat copy's `inbox`; without it the call is refused with\n`copy_choice_required`, listing each copy and the question to ask.\n\nThe organizer may add guests, and so may a guest the organizer lets\ninvite others (see [CalendarEvent.viewerCan](#property-viewercan)); Google emails the\nnew guests.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InviteGuestsOptions`](../interfaces/InviteGuestsOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### linkNote()\n\n> **linkNote**(`document`, `occurrence`, `options?`): `Promise`\\<[`CalendarNote`](../../note/classes/CalendarNote.md)\\>\n\nLink a markdown document you own. Meeting-detail viewers gain read access;\nan optional team gains read access too. Editing and other sharing are preserved.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `document` | [`Document`](../../../documents/document/classes/Document.md) |\n| `occurrence` | [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md) |\n| `options?` | \\{ `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `options.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarNote`](../../note/classes/CalendarNote.md)\\>\n\n***\n\n### notes()\n\n> **notes**(`occurrence`): `Promise`\\<[`CalendarNote`](../../note/classes/CalendarNote.md)[]\\>\n\nNotes linked to a specific occurrence returned by `calendar.occurrences()`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `occurrence` | [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarNote`](../../note/classes/CalendarNote.md)[]\\>\n\n***\n\n### prepareReplacement()\n\n> **prepareReplacement**(`options`): `Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\nPreview an organizer replacement without cancelling or sending invitations.\nReview replacement.status() before explicitly calling replacement.confirm().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; `removeConference`: `boolean`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n| `options.removeConference` | `boolean` |\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\\>\n\n***\n\n### providerUrl()\n\n> **providerUrl**(`options?`): `Promise`\\<`string` \\| `undefined`\\>\n\nOpen this calendar copy in its provider for actions unavailable through its API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../calendar/classes/Calendar.md); `recurrenceId?`: `string`; \\} |\n| `options.calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) |\n| `options.recurrenceId?` | `string` |\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### record()\n\n> **record**(): `Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\nThe full synced event record. Available on a seeded handle (from create /\nupdate / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint).\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md)\\>\n\n***\n\n### rsvp()\n\n> **rsvp**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nRecord the requester's RSVP and return a handle to the synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`RsvpEventOptions`](../interfaces/RsvpEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.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### update()\n\n> **update**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nUpdate the event and return a handle to its synced record.\n\nA meeting on more than one of the user's inboxes is one event per inbox,\neach with its own id (see the occurrence listing's `inbox` and `role`).\nBefore changing its details, guests or guest permissions, ask the user\nwhich inbox's copy to change, then pass that copy's `inbox`. Never choose\nbetween the user's inboxes yourself, whatever they look like: a test,\nsecondary or unfamiliar address is still the user's own inbox. Skip the\nquestion only when the user already named the inbox, when only one copy's\n`viewerCan` allows the change (use it and say why), or when adding guests\nto a meeting the user organizes from one of the inboxes (add them from\nthat copy and say why). Reminders belong to one copy, so set them on one\ncopy and say which inbox you used. Without `inbox` the call is refused\nwith `copy_choice_required`, listing each copy and the question to ask.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`UpdateEventOptions`](../interfaces/UpdateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CalendarEvent`\n\nA handle to a calendar event by id, for driving mutations. Reading a\nfield on it throws (there is no fetch-by-id endpoint).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarEvent`\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `CalendarEvent`\n\nA handle seeded with a synced event record; reads resolve without a fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`CalendarEvent`](../../../../../generated/calendar/types.gen/type-aliases/CalendarEvent.md) |\n\n#### Returns\n\n`CalendarEvent`\n\n\n<!-- src/entities/calendar/event/interfaces/DeleteEventOptions.md -->\n# Interface: DeleteEventOptions\n\nHow a deletion is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is deleted, for a multi-calendar event. Omit to delete the canonical copy. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call deletes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence a scoped deletion targets. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarDeletionScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarDeletionScopeParam.md) | Deletion scope; defaults to the entire event or series. |\n\n\n<!-- src/entities/calendar/event/interfaces/InviteGuestsOptions.md -->\n# Interface: InviteGuestsOptions\n\nGuests to add and how much of a recurring series gains them.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is written, for a multi-calendar event. Omit to write the canonical copy. |\n| <a id=\"property-guests\"></a> `guests` | [`CalendarGuestInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarGuestInputBody.md)[] | Guests to add; anyone already on the event is skipped. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call changes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the guests are added to. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series gains the guests. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/RsvpEventOptions.md -->\n# Interface: RsvpEventOptions\n\nThe RSVP to record and how it is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is answered, for a multi-calendar event. Omit to answer on the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the response targets. |\n| <a id=\"property-response\"></a> `response` | [`AttendeeResponseStatus`](../../../../../generated/calendar/types.gen/type-aliases/AttendeeResponseStatus.md) | The response to record for the connected account. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarRsvpScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarRsvpScopeParam.md) | How much of a recurring series the response covers. Omit to let `recurrenceId` decide. |\n\n\n<!-- src/entities/calendar/event/interfaces/UpdateEventOptions.md -->\n# Interface: UpdateEventOptions\n\nFields to change on an event; omitted fields are left untouched.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Replacement attendee list. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Calendar whose copy of the event is patched, for a multi-calendar event. Omit to patch the canonical copy. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Provider conference change; omit to retain it. Outlook removal requires a separately confirmed replacement via prepareReplacement(). |\n| <a id=\"property-description\"></a> `description?` | `string` | Replacement description; an empty string clears it. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | Replacement guest policy; only the organizer of a Google event may change it (`viewerCan.setGuestPolicy`). It applies to the whole series, so an update scoped to one occurrence (`scope: 'this_event'`, or a `recurrenceId`) that changes it is rejected; use scope `'all'`. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call changes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` | Replacement location; an empty string clears it. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Replacement out-of-office properties, applied only to an event that is already out-of-office. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the update targets. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Replacement recurrence properties; an empty list clears them. |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Replacement reminder configuration. |\n| <a id=\"property-scope\"></a> `scope?` | [`CalendarUpdateScopeParam`](../../../../../generated/calendar/types.gen/type-aliases/CalendarUpdateScopeParam.md) | How much of a recurring series the update covers. Omit to let `recurrenceId` decide. |\n| <a id=\"property-time\"></a> `time?` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Replacement time. |\n| <a id=\"property-title\"></a> `title?` | `string` | Replacement title; an empty string clears it. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Replacement availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Replacement visibility. |\n\n\n<!-- src/entities/calendar/namespace/classes/CalendarNamespace.md -->\n# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\nA meeting on more than one of the user's inboxes is one event per inbox;\n[CalendarNamespace.occurrences](#occurrences) lists each copy with its `inbox` and\n`role`. Before changing such a meeting's details, guests or guest\npermissions, or deleting it, ask the user which inbox's copy to change, then\npass that copy's `inbox` to [CalendarEvent.update](../../event/classes/CalendarEvent.md#update),\n[CalendarEvent.inviteGuests](../../event/classes/CalendarEvent.md#inviteguests) or [CalendarEvent.delete](../../event/classes/CalendarEvent.md#delete). Never\nchoose between the user's inboxes yourself, whatever they look like: a\ntest, secondary or unfamiliar address is still the user's own inbox. Skip\nthe question only when the user already named the inbox, when only one copy\ncan make the change, or when adding guests from the copy the user\norganizes, and say why. Reminders may go to one copy; name its inbox. Read\nthose three methods' documentation before changing a meeting held through\nseveral inboxes: it says what each change does from each copy.\n\n[CalendarEvent.addToCalendar](../../event/classes/CalendarEvent.md#addtocalendar) adds a shared meeting only while none\nof the user's calendars holds it. Refused with `already_on_calendar`, it is\nrefused on every calendar, so tell the user the meeting is already on their\ncalendar and never offer to add it to another one.\n\n## Constructors\n\n### Constructor\n\n> **new CalendarNamespace**(`client`): `CalendarNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`CalendarNamespace`\n\n## Methods\n\n### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: [`Calendar`](../../calendar/classes/Calendar.md); `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\n***\n\n### calendar()\n\n> **calendar**(`id`): [`Calendar`](../../calendar/classes/Calendar.md)\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Calendar`](../../calendar/classes/Calendar.md)\n\n***\n\n### calendars()\n\n> **calendars**(): `Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<[`Calendar`](../../calendar/classes/Calendar.md)[]\\>\n\n***\n\n### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreateEventOptions`](../interfaces/CreateEventOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../event/classes/CalendarEvent.md)\\>\n\n***\n\n### event()\n\n> **event**(`id`): [`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CalendarEvent`](../../event/classes/CalendarEvent.md)\n\n***\n\n### noteDocuments()\n\n> **noteDocuments**(`query?`): `Promise`\\<\\{ `documents`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md); `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: [`Team`](../../../teams/team/classes/Team.md); \\}[]; \\}\\>\n\nFind up to 30 owned markdown documents for meeting notes, plus available extra team audiences.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `query?` | `string` | `''` |\n\n#### Returns\n\n`Promise`\\<\\{ `documents`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md); `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: [`Team`](../../../teams/team/classes/Team.md); \\}[]; \\}\\>\n\n***\n\n### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `inbox`: `string` \\| `undefined`; `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); `role`: [`CalendarEventRole`](../type-aliases/CalendarEventRole.md) \\| `undefined`; \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated. Each names\nthe address of the connected inbox holding that copy of the event\n(`inbox`) and whether the user organizes it or is a guest there (`role`,\nabsent when neither). A meeting on several of the user's inboxes appears\nonce per inbox, each with its own event; describe them by inbox and role,\nnever by id.\n\nBefore changing or deleting such a meeting, ask the user which inbox's\ncopy to change, unless they named it, only one copy can make the change,\nor you add guests from the copy they organize. Never choose between the\nuser's inboxes yourself, whatever they look like. Pass the chosen copy's\n`inbox` to its `update`, `inviteGuests` or `delete`; without it the call\nis refused with `copy_choice_required`, which names each copy's inbox and\nevent and gives the question to ask. An occurrence whose calendar is no\nlonger listed has no `inbox`; take it from that refusal.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`ListOccurrencesData`](../../../../../generated/storage/types.gen/type-aliases/ListOccurrencesData.md)\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `inbox`: `string` \\| `undefined`; `occurrence`: [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md); `role`: [`CalendarEventRole`](../type-aliases/CalendarEventRole.md) \\| `undefined`; \\}, `any`, `any`\\>\n\n***\n\n### replacement()\n\n> **replacement**(`operationId`): [`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n[`CalendarReplacement`](../../replacement/classes/CalendarReplacement.md)\n\n***\n\n### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md) |\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n***\n\n### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: [`CalendarEvent`](../../event/classes/CalendarEvent.md); `occurrenceKey`: `string`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\n***\n\n### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: [`TeamCalendarDetails`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarDetails.md); `id`: `string`; `kind`: `\"details\"`; `owner`: [`User`](../../../users/user/classes/User.md); `time`: [`EventTime`](../../../../../generated/storage/types.gen/type-aliases/EventTime.md); \\})[]; `members`: \\{ `coverage`: [`TeamCalendarCoverage`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarCoverage.md); `sharing`: [`TeamCalendarSharing`](../../../../../generated/storage/types.gen/type-aliases/TeamCalendarSharing.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\n***\n\n### teamSharing()\n\n> **teamSharing**(): `Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<[`TeamCalendarSharing`](../../../../../generated/calendar/types.gen/type-aliases/TeamCalendarSharing.md)\\>\n\n\n<!-- src/entities/calendar/namespace/interfaces/CreateEventOptions.md -->\n# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | [`CalendarAttendeeInputBody`](../../../../../generated/calendar/types.gen/type-aliases/CalendarAttendeeInputBody.md)[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | [`Calendar`](../../calendar/classes/Calendar.md) | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | [`ConferenceChange`](../../../../../generated/calendar/types.gen/type-aliases/ConferenceChange.md) | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | [`Link`](../../../email/link/classes/Link.md) | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | [`GuestPolicy`](../../../../../generated/calendar/types.gen/type-aliases/GuestPolicy.md) | What guests may do; omit for Google's defaults. Google calendars only. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | [`OutOfOfficeProperties`](../../../../../generated/calendar/types.gen/type-aliases/OutOfOfficeProperties.md) | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](../../../../../generated/calendar/types.gen/type-aliases/EventReminders.md) | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](../../../../../generated/calendar/types.gen/type-aliases/EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | [`EventTransparency`](../../../../../generated/calendar/types.gen/type-aliases/EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | [`EventVisibility`](../../../../../generated/calendar/types.gen/type-aliases/EventVisibility.md) | Event visibility. |\n\n\n<!-- src/entities/calendar/namespace/type-aliases/CalendarEventRole.md -->\n# Type Alias: CalendarEventRole\n\n> **CalendarEventRole** = `\"organizer\"` \\| `\"guest\"`\n\nWhat the user is on one copy of an event, through the inbox holding it:\nits organizer (or the owner of an event without guests), or a guest.\n\n\n<!-- src/entities/calendar/note/classes/CalendarNote.md -->\n# Class: CalendarNote\n\nA markdown document linked to one meeting occurrence, with view-only access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`MeetingNote`](../../../../../generated/calendar/types.gen/type-aliases/MeetingNote.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-canmanage\"></a> `canManage` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the caller may change this link's sharing. | - |\n| <a id=\"property-document\"></a> `document` | `readonly` | () => `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\> | The original markdown document; unlinking never deletes it. | - |\n| <a id=\"property-event\"></a> `event` | `readonly` | [`CalendarEvent`](../../event/classes/CalendarEvent.md) | - | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Current document name. | - |\n| <a id=\"property-occurrence\"></a> `occurrence` | `readonly` | `Pick`\\<[`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md), `\"eventId\"` \\| `\"occurrenceKey\"`\\> | - | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<[`Team`](../../../teams/team/classes/Team.md) \\| `undefined`\\> | Optional extra team audience. Meeting-detail viewers already have view access. | - |\n\n## Methods\n\n### setTeam()\n\n> **setTeam**(`team?`): `Promise`\\<`void`\\>\n\nChange the extra team view grant; omit the team to remove it. Requires document ownership.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`MeetingNote`](../../../../../generated/calendar/types.gen/type-aliases/MeetingNote.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`MeetingNote`](../../../../../generated/calendar/types.gen/type-aliases/MeetingNote.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`MeetingNote`](../../../../../generated/calendar/types.gen/type-aliases/MeetingNote.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### unlink()\n\n> **unlink**(): `Promise`\\<`void`\\>\n\nRemove this occurrence's link and view grants, preserving the document and other sharing.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### forDocument()\n\n> `static` **forDocument**(`client`, `event`, `occurrence`, `document`): `CalendarNote`\n\nConstruct a handle for a document already linked to this occurrence.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `event` | [`CalendarEvent`](../../event/classes/CalendarEvent.md) |\n| `occurrence` | [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md) |\n| `document` | [`Document`](../../../documents/document/classes/Document.md) |\n\n#### Returns\n\n`CalendarNote`\n\n***\n\n### fromDocumentLink()\n\n> `static` **fromDocumentLink**(`client`, `document`, `link`): `CalendarNote`\n\nSeed an owner-visible link that can be revoked even if the meeting is unavailable.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | [`Document`](../../../documents/document/classes/Document.md) |\n| `link` | [`DocumentNoteLink`](../../../../../generated/calendar/types.gen/type-aliases/DocumentNoteLink.md) |\n\n#### Returns\n\n`CalendarNote`\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `event`, `occurrence`, `record`): `CalendarNote`\n\nSeed a handle with a record returned by the meeting-note API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `event` | [`CalendarEvent`](../../event/classes/CalendarEvent.md) |\n| `occurrence` | [`CalendarOccurrence`](../../../../../generated/storage/types.gen/type-aliases/CalendarOccurrence.md) |\n| `record` | [`MeetingNote`](../../../../../generated/calendar/types.gen/type-aliases/MeetingNote.md) |\n\n#### Returns\n\n`CalendarNote`\n\n\n<!-- src/entities/calendar/replacement/classes/CalendarReplacement.md -->\n# Class: CalendarReplacement\n\nDurable organizer replacement, recoverable even after the original event is retired.\n\n## Constructors\n\n### Constructor\n\n> **new CalendarReplacement**(`client`, `id`): `CalendarReplacement`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarReplacement`\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Methods\n\n### confirm()\n\n> **confirm**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nConfirm the reviewed cancellation and reinvitation, or resume that same operation.\nPresent the preview and obtain the organizer's confirmation before the first call.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\n***\n\n### discard()\n\n> **discard**(): `Promise`\\<`void`\\>\n\nDiscard an unconfirmed preview. Confirmed operations must be recovered, not discarded.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n\nRead progress without initiating provider writes.\n\n#### Returns\n\n`Promise`\\<[`CalendarReplacementView`](../../../../../generated/calendar/types.gen/type-aliases/CalendarReplacementView.md)\\>\n"- },- {- "name": "calls",- "description": "Read and edit call records, transcripts and meeting links.",- "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/CallProvider.md -->\n# Type Alias: CallProvider\n\n> **CallProvider** = `\"macro\"` \\| `\"granola\"`\n\nSupported call and transcript providers. Add variants as integrations grow.\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` \\| `null`; `shareWithTeam`: `boolean`; `source?`: `null` \\| [`CallRecordSource`](CallRecordSource.md); `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` \\| `null` | The RTC room name. `None` for imported calls, which never had a room. |\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-source\"></a> `source?` | `null` \\| [`CallRecordSource`](CallRecordSource.md) | - |\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/CallRecordSource.md -->\n# Type Alias: CallRecordSource\n\n> **CallRecordSource** = \\{ `externalUrl?`: `string` \\| `null`; `provider`: [`CallProvider`](CallProvider.md); \\}\n\nWhere an imported call came from.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-externalurl\"></a> `externalUrl?` | `string` \\| `null` | Link to the call in the provider's app, if it has one. |\n| <a id=\"property-provider\"></a> `provider` | [`CallProvider`](CallProvider.md) | Provider that supplied the call. |\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/CustomSpeakerAssignment.md -->\n# Type Alias: CustomSpeakerAssignment\n\n> **CustomSpeakerAssignment** = \\{ `customSpeaker`: `string`; `diarizedSpeakerId`: `string`; \\}\n\nOne per-diarized-speaker override, used in [`EditCallTranscriptRequest`].\n\n`custom_speaker = None` clears any existing override for this\n`diarized_speaker_id`; `Some(macro_user_id)` sets it. The string is\nexpected to parse as a `MacroUserId` (e.g. `macro|[email protected]`);\nthe service layer rejects malformed values with `400 Bad Request`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-customspeaker\"></a> `customSpeaker` | `string` | Macro user id to attribute matching rows to, or `None` to clear. |\n| <a id=\"property-diarizedspeakerid\"></a> `diarizedSpeakerId` | `string` | The diarization label whose rows this assignment targets. |\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/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\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/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\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/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\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/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\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-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\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` \\| `undefined`\\> | `...` | 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### editTranscript()\n\n> **editTranscript**(`assignments`): `Promise`\\<`void`\\>\n\nUpdate custom speaker assignments in the transcript.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignments` | [`CustomSpeakerAssignment`](../../../../../generated/storage/types.gen/type-aliases/CustomSpeakerAssignment.md)[] |\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### meeting()\n\n> **meeting**(): `Promise`\\<[`Meeting`](../../../meetings/meeting/classes/Meeting.md)\\>\n\nGet or create a shareable meeting for this call.\n\n#### Returns\n\n`Promise`\\<[`Meeting`](../../../meetings/meeting/classes/Meeting.md)\\>\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### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`permission`](../../../entity/classes/FavoritableEntity.md#permission)\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### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CallMessage`](../../message/classes/CallMessage.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`CallMessage`](../../message/classes/CallMessage.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CallMessage`](../../message/classes/CallMessage.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\n***\n\n### toggleTeamShare()\n\n> **toggleTeamShare**(): `Promise`\\<`boolean`\\>\n\nToggle the server's share-with-team setting and return its new value.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\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; list the WhatsApp chat list (groups and direct chats), add chats to Macro, read and share added chats, and send from the credential owner's own account with mentions, media and delivery. Pairing stays in the app.",- "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### activity()\n\n> **activity**(): `Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)[]\\>\n\nRecent channel activity, with channel and user handles.\n\n#### Returns\n\n`Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)[]\\>\n\n***\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/whatsapp/namespace/classes/WhatsAppNamespace.md -->\n# Class: WhatsAppNamespace\n\nOperate on an account already paired through the Macro app.\n\n## Constructors\n\n### Constructor\n\n> **new WhatsAppNamespace**(`client`): `WhatsAppNamespace`\n\nBind existing-account operations to this authenticated client.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`WhatsAppNamespace`\n\n## Methods\n\n### account()\n\n> **account**(): `Promise`\\<[`WhatsAppAccount`](../../account/classes/WhatsAppAccount.md) \\| `undefined`\\>\n\nCurrent owner's account, or undefined when no account has been connected.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppAccount`](../../account/classes/WhatsAppAccount.md) \\| `undefined`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\n\nReference an adopted entity without fetching it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\n\n***\n\n### groups()\n\n> **groups**(): `Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)[]\\>\n\nAdopted groups shared with the caller, including without WhatsApp.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.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/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/ActivityType.md -->\n# Type Alias: ActivityType\n\n> **ActivityType** = `\"view\"` \\| `\"interact\"`\n\nThe kind of activity a user performs in a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/ApiActivity.md -->\n# Type Alias: ApiActivity\n\n> **ApiActivity** = \\{ `channel_id`: `string`; `created_at`: `string`; `id`: `string`; `interacted_at?`: `string` \\| `null`; `updated_at`: `string`; `user_id`: `string`; `viewed_at?`: `string` \\| `null`; \\}\n\nA user's activity (view/interaction) within a channel.\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 activity row was created. |\n| <a id=\"property-id\"></a> `id` | `string` | Activity id. |\n| <a id=\"property-interacted_at\"></a> `interacted_at?` | `string` \\| `null` | The last time the user interacted with the channel. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | When the activity row was last updated. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User id. |\n| <a id=\"property-viewed_at\"></a> `viewed_at?` | `string` \\| `null` | The last time the user viewed the channel. |\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/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\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/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\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/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedAccount.md -->\n# Type Alias: LinkedAccount\n\n> **LinkedAccount** = \\{ `authorizationGeneration`: `number`; `id`: `string`; `identityJid?`: `string` \\| `null`; `state`: [`LinkedAccountState`](LinkedAccountState.md); `userId`: `string`; \\}\n\nOne person's account, never owned by a workspace.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-authorizationgeneration\"></a> `authorizationGeneration` | `number` | Explicit consent generation; reconnecting a socket never changes it. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable account identity. |\n| <a id=\"property-identityjid\"></a> `identityJid?` | `string` \\| `null` | WhatsApp-verified identity, absent until the first pairing succeeds. |\n| <a id=\"property-state\"></a> `state` | [`LinkedAccountState`](LinkedAccountState.md) | Lifecycle. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Authenticated owner. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedAccountState.md -->\n# Type Alias: LinkedAccountState\n\n> **LinkedAccountState** = `\"pairing\"` \\| `\"connected\"` \\| `\"logged_out\"` \\| `\"disconnected\"`\n\nAccount lifecycle. Transport outages are not stored: a connected account\nstays connected while its session service reconnects.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedAttachment.md -->\n# Type Alias: LinkedAttachment\n\n> **LinkedAttachment** = \\{ `documentId?`: `string` \\| `null`; `durationSeconds?`: `number` \\| `null`; `fileName`: `string`; `height?`: `number` \\| `null`; `mime`: `string`; `ordinal`: `number`; `presentation?`: `null` \\| [`LinkedMediaPresentation`](LinkedMediaPresentation.md); `size`: `number`; `state`: [`LinkedAttachmentState`](LinkedAttachmentState.md); `width?`: `number` \\| `null`; \\}\n\nOne attachment of a linked message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentid\"></a> `documentId?` | `string` \\| `null` | The private document, once ready. |\n| <a id=\"property-durationseconds\"></a> `durationSeconds?` | `number` \\| `null` | Length of audio or video in whole seconds, when declared. |\n| <a id=\"property-filename\"></a> `fileName` | `string` | Display filename. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Pixel height, when declared. |\n| <a id=\"property-mime\"></a> `mime` | `string` | Declared MIME type. |\n| <a id=\"property-ordinal\"></a> `ordinal` | `number` | Position within the message. |\n| <a id=\"property-presentation\"></a> `presentation?` | `null` \\| [`LinkedMediaPresentation`](LinkedMediaPresentation.md) | - |\n| <a id=\"property-size\"></a> `size` | `number` | Declared size in bytes. |\n| <a id=\"property-state\"></a> `state` | [`LinkedAttachmentState`](LinkedAttachmentState.md) | Current state. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Pixel width of an image, sticker or video, when WhatsApp declared it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedAttachmentState.md -->\n# Type Alias: LinkedAttachmentState\n\n> **LinkedAttachmentState** = `\"loading\"` \\| `\"ready\"` \\| `\"unavailable\"` \\| `\"unsupported\"`\n\nWhere an attachment of a linked message stands.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedBackfill.md -->\n# Type Alias: LinkedBackfill\n\n> **LinkedBackfill** = \\{ `imported`: `number`; `state`: [`LinkedBackfillState`](LinkedBackfillState.md); \\}\n\nEarlier messages imported after adding a group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-imported\"></a> `imported` | `number` | Messages received from the phone so far (including ones already shown). |\n| <a id=\"property-state\"></a> `state` | [`LinkedBackfillState`](LinkedBackfillState.md) | Progress. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedBackfillState.md -->\n# Type Alias: LinkedBackfillState\n\n> **LinkedBackfillState** = `\"waiting_for_message\"` \\| `\"pending\"` \\| `\"running\"` \\| `\"waiting_for_phone\"` \\| `\"done\"` \\| `\"partial\"`\n\nWhere importing a group's earlier messages stands.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedCannotAdd.md -->\n# Type Alias: LinkedCannotAdd\n\n> **LinkedCannotAdd** = `\"not_in_group\"` \\| `\"community\"` \\| `\"own_chat\"` \\| `\"not_in_chat_list\"`\n\nWhy a chat can't be added to Macro; the app words it from the code.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedCapabilities.md -->\n# Type Alias: LinkedCapabilities\n\n> **LinkedCapabilities** = \\{ `attachmentLimitBytes`: `number`; `attachmentTypes`: `string`[]; `maxAttachments`: `number`; `mutations`: [`LinkedMutation`](LinkedMutation.md)[]; `mutationWindowSeconds`: `number`; `textLimitBytes`: `number`; \\}\n\nOperations implemented for linked groups, independent of current permission.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachmentlimitbytes\"></a> `attachmentLimitBytes` | `number` | Largest attachment in bytes. |\n| <a id=\"property-attachmenttypes\"></a> `attachmentTypes` | `string`[] | Supported attachment MIME types. |\n| <a id=\"property-maxattachments\"></a> `maxAttachments` | `number` | Attachments per send. |\n| <a id=\"property-mutations\"></a> `mutations` | [`LinkedMutation`](LinkedMutation.md)[] | Supported message operations. |\n| <a id=\"property-mutationwindowseconds\"></a> `mutationWindowSeconds` | `number` | Edits and deletes are offered this long after sending. |\n| <a id=\"property-textlimitbytes\"></a> `textLimitBytes` | `number` | Maximum UTF-8 bytes per text send. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedChat.md -->\n# Type Alias: LinkedChat\n\n> **LinkedChat** = \\{ `archived`: `boolean`; `canAdd`: `boolean`; `cannotAddReason?`: `null` \\| [`LinkedCannotAdd`](LinkedCannotAdd.md); `community?`: `null` \\| [`LinkedCommunityReference`](LinkedCommunityReference.md); `group?`: `null` \\| [`LinkedGroupReference`](LinkedGroupReference.md); `jid`: `string`; `kind`: [`LinkedChatKind`](LinkedChatKind.md); `lastActivityAt?`: `string` \\| `null`; `name`: `string`; `pinned`: `boolean`; `shared?`: `null` \\| [`LinkedSharedGroupReference`](LinkedSharedGroupReference.md); \\}\n\nOne chat of the caller's WhatsApp chat list, as WhatsApp Web lists it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-archived\"></a> `archived` | `boolean` | Archived in WhatsApp. |\n| <a id=\"property-canadd\"></a> `canAdd` | `boolean` | \"Add to Macro\" works now. |\n| <a id=\"property-cannotaddreason\"></a> `cannotAddReason?` | `null` \\| [`LinkedCannotAdd`](LinkedCannotAdd.md) | - |\n| <a id=\"property-community\"></a> `community?` | `null` \\| [`LinkedCommunityReference`](LinkedCommunityReference.md) | - |\n| <a id=\"property-group\"></a> `group?` | `null` \\| [`LinkedGroupReference`](LinkedGroupReference.md) | - |\n| <a id=\"property-jid\"></a> `jid` | `string` | WhatsApp chat JID: a group, or the other person's phone-number JID (LID when WhatsApp never told us the number). |\n| <a id=\"property-kind\"></a> `kind` | [`LinkedChatKind`](LinkedChatKind.md) | Group or direct chat. |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt?` | `string` \\| `null` | Newest activity WhatsApp reported (message or history sync); `null` when unknown. The list is sorted by it, newest first, unknown last. |\n| <a id=\"property-name\"></a> `name` | `string` | Group: the subject, or member names for an unnamed group. Direct: the contact or WhatsApp name, else `+<phone>`. Always non-empty. |\n| <a id=\"property-pinned\"></a> `pinned` | `boolean` | Pinned in WhatsApp. |\n| <a id=\"property-shared\"></a> `shared?` | `null` \\| [`LinkedSharedGroupReference`](LinkedSharedGroupReference.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedChatKind.md -->\n# Type Alias: LinkedChatKind\n\n> **LinkedChatKind** = `\"group\"` \\| `\"direct\"`\n\nWhether a WhatsApp chat is a group or a one-to-one chat.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedCommunityReference.md -->\n# Type Alias: LinkedCommunityReference\n\n> **LinkedCommunityReference** = \\{ `announcements`: `boolean`; `id`: `string`; `name`: `string`; \\}\n\nThe WhatsApp community a group belongs to.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcements\"></a> `announcements` | `boolean` | This group is the community's announcement group. |\n| <a id=\"property-id\"></a> `id` | `string` | The community's WhatsApp JID. |\n| <a id=\"property-name\"></a> `name` | `string` | The community's name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedDeliveryState.md -->\n# Type Alias: LinkedDeliveryState\n\n> **LinkedDeliveryState** = `\"pending\"` \\| `\"sending\"` \\| `\"unknown\"` \\| `\"accepted\"` \\| `\"failed\"`\n\nObserved send state. `unknown` means the request may have reached WhatsApp;\nit is never sent again automatically.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedGroupReference.md -->\n# Type Alias: LinkedGroupReference\n\n> **LinkedGroupReference** = \\{ `id`: `string`; `name`: `string`; \\}\n\nA group entity bound to a remote group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Group entity id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, following WhatsApp. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedMediaKind.md -->\n# Type Alias: LinkedMediaKind\n\n> **LinkedMediaKind** = `\"image\"` \\| `\"audio\"` \\| `\"video\"` \\| `\"document\"`\n\nAttachment categories WhatsApp distinguishes.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedMediaPresentation.md -->\n# Type Alias: LinkedMediaPresentation\n\n> **LinkedMediaPresentation** = `\"sticker\"` \\| `\"gif\"` \\| `\"voice_note\"`\n\nHow WhatsApp shows an attachment, when not as a plain file of its kind.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedMutation.md -->\n# Type Alias: LinkedMutation\n\n> **LinkedMutation** = `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`\n\nDeliberate operations on an existing linked-group message.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedReplyBlock.md -->\n# Type Alias: LinkedReplyBlock\n\n> **LinkedReplyBlock** = `\"sending_disabled\"` \\| `\"no_account\"` \\| `\"disconnected\"` \\| `\"not_observing\"` \\| `\"not_allowed_in_group\"` \\| `\"group_unavailable\"`\n\nWhy the viewer cannot send now.\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedReplyContent.md -->\n# Type Alias: LinkedReplyContent\n\n> **LinkedReplyContent** = \\{ `mentions?`: `string`[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string` \\| `null`; `type`: `\"media\"`; `uploadId`: `string`; \\} \\| \\{ `messageId`: `string`; `operation`: [`LinkedMutation`](LinkedMutation.md); `text?`: `string` \\| `null`; `type`: `\"mutation\"`; \\}\n\nContent of a deliberate send.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mentions?`: `string`[]; `text`: `string`; `type`: `\"text\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mentions?` | `string`[] | Group participants the text @-mentions, by their WhatsApp id (`jid` of a roster participant); the text must contain `@<digits before the @ of the id>` for each. |\n| `text` | `string` | UTF-8 text, at most [`TEXT_LIMIT_BYTES`] bytes. |\n| `type` | `\"text\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `caption?`: `string` \\| `null`; `type`: `\"media\"`; `uploadId`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `caption?` | `string` \\| `null` | Optional caption; audio has none. |\n| `type` | `\"media\"` | - |\n| `uploadId` | `string` | The staged upload, which becomes the message's private document. |\n\n***\n\n### Type Literal\n\n\\{ `messageId`: `string`; `operation`: [`LinkedMutation`](LinkedMutation.md); `text?`: `string` \\| `null`; `type`: `\"mutation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageId` | `string` | Existing group message, resolved to its WhatsApp source by the server. |\n| `operation` | [`LinkedMutation`](LinkedMutation.md) | Explicit operation. |\n| `text?` | `string` \\| `null` | Replacement text or emoji; absent for delete, empty to remove a reaction. |\n| `type` | `\"mutation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedSendProgress.md -->\n# Type Alias: LinkedSendProgress\n\n> **LinkedSendProgress** = \\{ `createdAt`: `string`; `errorCode?`: `string` \\| `null`; `groupId`: `string`; `id`: `string`; `messageId?`: `string` \\| `null`; `payload`: [`LinkedSendReply`](LinkedSendReply.md); `state`: [`LinkedDeliveryState`](LinkedDeliveryState.md); `userId`: `string`; \\}\n\nDurable result of a deliberate send.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Intent creation time. |\n| <a id=\"property-errorcode\"></a> `errorCode?` | `string` \\| `null` | Sanitized failure code. |\n| <a id=\"property-groupid\"></a> `groupId` | `string` | Group entity. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable intent id. |\n| <a id=\"property-messageid\"></a> `messageId?` | `string` \\| `null` | Group message, once WhatsApp accepted it. |\n| <a id=\"property-payload\"></a> `payload` | [`LinkedSendReply`](LinkedSendReply.md) | The original request, so a failed draft can be recovered. |\n| <a id=\"property-state\"></a> `state` | [`LinkedDeliveryState`](LinkedDeliveryState.md) | Current state. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Person who submitted it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedSendReply.md -->\n# Type Alias: LinkedSendReply\n\n> **LinkedSendReply** = \\{ `idempotencyKey`: `string`; `message`: [`LinkedReplyContent`](LinkedReplyContent.md); `replyTo?`: `string` \\| `null`; \\}\n\nExplicit send action from a person. Only deliberate sends reach WhatsApp.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-idempotencykey\"></a> `idempotencyKey` | `string` | Stable client intent key. A changed payload with this key is a conflict. |\n| <a id=\"property-message\"></a> `message` | [`LinkedReplyContent`](LinkedReplyContent.md) | Content. |\n| <a id=\"property-replyto\"></a> `replyTo?` | `string` \\| `null` | Group message being quoted, within this group. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedSharedGroupReference.md -->\n# Type Alias: LinkedSharedGroupReference\n\n> **LinkedSharedGroupReference** = \\{ `id`: `string`; `name`: `string`; `ownerId`: `string`; \\}\n\nAnother person's group entity the caller can view.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Group entity id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, following WhatsApp. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who added the group and shared it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkedUploadedAttachment.md -->\n# Type Alias: LinkedUploadedAttachment\n\n> **LinkedUploadedAttachment** = \\{ `filename`: `string`; `kind`: [`LinkedMediaKind`](LinkedMediaKind.md); `uploadId`: `string`; \\}\n\nA staged attachment, sent only by a later deliberate send.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filename\"></a> `filename` | `string` | Display filename. |\n| <a id=\"property-kind\"></a> `kind` | [`LinkedMediaKind`](LinkedMediaKind.md) | Category. |\n| <a id=\"property-uploadid\"></a> `uploadId` | `string` | Use as `upload_id` in a media send; also the future document id. |\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/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\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/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\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<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppCall.md -->\n# Type Alias: WhatsAppCall\n\n> **WhatsAppCall** = \\{ `durationSeconds?`: `number` \\| `null`; `outcome`: [`WhatsAppCallOutcome`](WhatsAppCallOutcome.md); `video`: `boolean`; \\}\n\nA call in the group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-durationseconds\"></a> `durationSeconds?` | `number` \\| `null` | Length, when it connected. |\n| <a id=\"property-outcome\"></a> `outcome` | [`WhatsAppCallOutcome`](WhatsAppCallOutcome.md) | How it went for the account that saw it. |\n| <a id=\"property-video\"></a> `video` | `boolean` | Video rather than voice. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppCallOutcome.md -->\n# Type Alias: WhatsAppCallOutcome\n\n> **WhatsAppCallOutcome** = `\"answered\"` \\| `\"missed\"` \\| `\"rejected\"` \\| `\"other\"`\n\nHow a call went.\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppContactCard.md -->\n# Type Alias: WhatsAppContactCard\n\n> **WhatsAppContactCard** = \\{ `name`: `string`; `phones`: `string`[]; \\}\n\nOne contact card, from its vCard.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-phones\"></a> `phones` | `string`[] | Phone numbers as written on the card. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppContacts.md -->\n# Type Alias: WhatsAppContacts\n\n> **WhatsAppContacts** = \\{ `contacts`: [`WhatsAppContactCard`](WhatsAppContactCard.md)[]; \\}\n\nContact cards.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contacts\"></a> `contacts` | [`WhatsAppContactCard`](WhatsAppContactCard.md)[] | The cards, in order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppEvent.md -->\n# Type Alias: WhatsAppEvent\n\n> **WhatsAppEvent** = \\{ `canceled?`: `boolean`; `description?`: `string` \\| `null`; `endAt?`: `string` \\| `null`; `joinLink?`: `string` \\| `null`; `location?`: `string` \\| `null`; `name`: `string`; `startAt?`: `string` \\| `null`; \\}\n\nA WhatsApp event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canceled\"></a> `canceled?` | `boolean` | Canceled by its organizer. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Description. |\n| <a id=\"property-endat\"></a> `endAt?` | `string` \\| `null` | End. |\n| <a id=\"property-joinlink\"></a> `joinLink?` | `string` \\| `null` | Call link for an online event. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Place name or address. |\n| <a id=\"property-name\"></a> `name` | `string` | Title. |\n| <a id=\"property-startat\"></a> `startAt?` | `string` \\| `null` | Start. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppGroupDetail.md -->\n# Type Alias: WhatsAppGroupDetail\n\n> **WhatsAppGroupDetail** = [`WhatsAppGroupSummary`](WhatsAppGroupSummary.md) & \\{ `accessLevel`: [`AccessLevel`](AccessLevel.md); `disappearingSeconds?`: `number` \\| `null`; `limits`: [`LinkedCapabilities`](LinkedCapabilities.md); `roster?`: `null` \\| [`WhatsAppRoster`](WhatsAppRoster.md); `sendingIdentity?`: `string` \\| `null`; `sharePermission`: [`SharePermissionV2`](SharePermissionV2.md); \\}\n\nFull group detail and current viewer capabilities.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `accessLevel` | [`AccessLevel`](AccessLevel.md) | Caller's effective permission. |\n| `disappearingSeconds?` | `number` \\| `null` | WhatsApp's disappearing-messages timer in seconds while it is on; Macro keeps the messages anyway. `null` when off or unknown. |\n| `limits` | [`LinkedCapabilities`](LinkedCapabilities.md) | Size and mutation limits. |\n| `roster?` | `null` \\| [`WhatsAppRoster`](WhatsAppRoster.md) | - |\n| `sendingIdentity?` | `string` \\| `null` | Caller's own phone identity, never another account's identity. |\n| `sharePermission` | [`SharePermissionV2`](SharePermissionV2.md) | Owner-controlled standard sharing configuration. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.md -->\n# Type Alias: WhatsAppGroupMessage\n\n> **WhatsAppGroupMessage** = \\{ `attachments`: [`LinkedAttachment`](LinkedAttachment.md)[]; `body`: `string`; `deleted`: `boolean`; `deliveryState?`: `null` \\| [`LinkedDeliveryState`](LinkedDeliveryState.md); `editedAt?`: `string` \\| `null`; `forwarded`: `boolean`; `id`: `string`; `kind`: [`WhatsAppMessageKind`](WhatsAppMessageKind.md); `mentions`: [`WhatsAppMention`](WhatsAppMention.md)[]; `reactions`: [`WhatsAppGroupReaction`](WhatsAppGroupReaction.md)[]; `receivedAt`: `string`; `replyTo?`: `string` \\| `null`; `rich?`: `null` \\| [`WhatsAppRichContent`](WhatsAppRichContent.md); `sender`: [`WhatsAppGroupSender`](WhatsAppGroupSender.md); `sentAt`: `string`; `viewOnce`: `boolean`; \\}\n\nOne message in an adopted group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`LinkedAttachment`](LinkedAttachment.md)[] | Imported or pending attachments. |\n| <a id=\"property-body\"></a> `body` | `string` | Plain WhatsApp text. |\n| <a id=\"property-deleted\"></a> `deleted` | `boolean` | Deleted for everyone. |\n| <a id=\"property-deliverystate\"></a> `deliveryState?` | `null` \\| [`LinkedDeliveryState`](LinkedDeliveryState.md) | - |\n| <a id=\"property-editedat\"></a> `editedAt?` | `string` \\| `null` | Last edit timestamp. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `boolean` | Forwarded from another chat. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable message id. |\n| <a id=\"property-kind\"></a> `kind` | [`WhatsAppMessageKind`](WhatsAppMessageKind.md) | A message, or a system line. |\n| <a id=\"property-mentions\"></a> `mentions` | [`WhatsAppMention`](WhatsAppMention.md)[] | People the body @-mentions. |\n| <a id=\"property-reactions\"></a> `reactions` | [`WhatsAppGroupReaction`](WhatsAppGroupReaction.md)[] | Reactions grouped by emoji. |\n| <a id=\"property-receivedat\"></a> `receivedAt` | `string` | Timestamp first received by Macro. |\n| <a id=\"property-replyto\"></a> `replyTo?` | `string` \\| `null` | Message quoted by this one. |\n| <a id=\"property-rich\"></a> `rich?` | `null` \\| [`WhatsAppRichContent`](WhatsAppRichContent.md) | - |\n| <a id=\"property-sender\"></a> `sender` | [`WhatsAppGroupSender`](WhatsAppGroupSender.md) | Sender. |\n| <a id=\"property-sentat\"></a> `sentAt` | `string` | Timestamp assigned by WhatsApp. |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `boolean` | Sent as view-once in WhatsApp; Macro shows it like any media. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppGroupReaction.md -->\n# Type Alias: WhatsAppGroupReaction\n\n> **WhatsAppGroupReaction** = \\{ `count`: `number`; `emoji`: `string`; `mine`: `boolean`; \\}\n\nGrouped reactions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of reacting people. |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji. |\n| <a id=\"property-mine\"></a> `mine` | `boolean` | Caller has this reaction. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppGroupSender.md -->\n# Type Alias: WhatsAppGroupSender\n\n> **WhatsAppGroupSender** = \\{ `name`: `string`; `personId`: `string`; `userId?`: `string` \\| `null`; \\}\n\nMessage sender from protocol-verified identity evidence.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, never authentication evidence. |\n| <a id=\"property-personid\"></a> `personId` | `string` | External person identity. |\n| <a id=\"property-userid\"></a> `userId?` | `string` \\| `null` | Verified Macro user association, if present. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppGroupSummary.md -->\n# Type Alias: WhatsAppGroupSummary\n\n> **WhatsAppGroupSummary** = \\{ `backfill?`: `null` \\| [`LinkedBackfill`](LinkedBackfill.md); `canSend`: `boolean`; `community?`: `null` \\| [`LinkedCommunityReference`](LinkedCommunityReference.md); `id`: `string`; `kind`: [`LinkedChatKind`](LinkedChatKind.md); `lastMessageAt?`: `string` \\| `null`; `name`: `string`; `sendReason?`: `null` \\| [`LinkedReplyBlock`](LinkedReplyBlock.md); `unreadCount`: `number`; `userId`: `string`; \\}\n\nAdopted group visible through ordinary entity sharing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill?` | `null` \\| [`LinkedBackfill`](LinkedBackfill.md) | - |\n| <a id=\"property-cansend\"></a> `canSend` | `boolean` | Caller may currently send from their own account. |\n| <a id=\"property-community\"></a> `community?` | `null` \\| [`LinkedCommunityReference`](LinkedCommunityReference.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | Entity identifier. |\n| <a id=\"property-kind\"></a> `kind` | [`LinkedChatKind`](LinkedChatKind.md) | A group, or a direct chat with one person (only its owner sends). |\n| <a id=\"property-lastmessageat\"></a> `lastMessageAt?` | `string` \\| `null` | Latest message timestamp. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name: the group's, or a direct chat's other person. |\n| <a id=\"property-sendreason\"></a> `sendReason?` | `null` \\| [`LinkedReplyBlock`](LinkedReplyBlock.md) | - |\n| <a id=\"property-unreadcount\"></a> `unreadCount` | `number` | Unread live messages for this viewer, counted up to [`UNREAD_COUNT_CAP`]. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Actual entity owner. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppLocation.md -->\n# Type Alias: WhatsAppLocation\n\n> **WhatsAppLocation** = \\{ `address?`: `string` \\| `null`; `comment?`: `string` \\| `null`; `latitude`: `number`; `live?`: `boolean`; `longitude`: `number`; `name?`: `string` \\| `null`; `url?`: `string` \\| `null`; \\}\n\nA shared place.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-address\"></a> `address?` | `string` \\| `null` | Street address. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Caption or comment. |\n| <a id=\"property-latitude\"></a> `latitude` | `number` | Degrees. |\n| <a id=\"property-live\"></a> `live?` | `boolean` | Shared as a live location (this is where it started). |\n| <a id=\"property-longitude\"></a> `longitude` | `number` | Degrees. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Place name. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | Link the sender attached. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppMention.md -->\n# Type Alias: WhatsAppMention\n\n> **WhatsAppMention** = [`WhatsAppPersonRef`](WhatsAppPersonRef.md) & \\{ `token`: `string`; \\}\n\nAn @-mention in a message body.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `token` | `string` | What follows the `@` in the body (the digits of the person's WhatsApp id); replace `@<token>` with the name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppMessageKind.md -->\n# Type Alias: WhatsAppMessageKind\n\n> **WhatsAppMessageKind** = `\"message\"` \\| `\"system\"`\n\nWhat a timeline entry is.\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppParticipant.md -->\n# Type Alias: WhatsAppParticipant\n\n> **WhatsAppParticipant** = \\{ `admin`: `boolean`; `alternateJid?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `jid`: `string`; \\}\n\nSomeone in a WhatsApp chat; Macro access is a separate grant.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-admin\"></a> `admin` | `boolean` | Group admin. |\n| <a id=\"property-alternatejid\"></a> `alternateJid?` | `string` \\| `null` | The other address WhatsApp verified for them. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Their WhatsApp name, untrusted. |\n| <a id=\"property-jid\"></a> `jid` | `string` | Phone-number or LID JID. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppPersonRef.md -->\n# Type Alias: WhatsAppPersonRef\n\n> **WhatsAppPersonRef** = \\{ `name`: `string`; `userId?`: `string` \\| `null`; \\}\n\nA person named in a message: a Macro user when verified, else their\nWhatsApp name, else their phone number.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, never authentication evidence. |\n| <a id=\"property-userid\"></a> `userId?` | `string` \\| `null` | Verified Macro user, if any. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppPoll.md -->\n# Type Alias: WhatsAppPoll\n\n> **WhatsAppPoll** = \\{ `options`: [`WhatsAppPollOption`](WhatsAppPollOption.md)[]; `question`: `string`; `selectableCount`: `number`; `voters`: `number`; \\}\n\nA poll, read-only in Macro.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-options\"></a> `options` | [`WhatsAppPollOption`](WhatsAppPollOption.md)[] | Options in order, with tallies. |\n| <a id=\"property-question\"></a> `question` | `string` | The question. |\n| <a id=\"property-selectablecount\"></a> `selectableCount` | `number` | How many options one person may choose; 0 means any number. |\n| <a id=\"property-voters\"></a> `voters` | `number` | People who voted for anything. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppPollOption.md -->\n# Type Alias: WhatsAppPollOption\n\n> **WhatsAppPollOption** = \\{ `mine`: `boolean`; `name`: `string`; `voters`: [`WhatsAppPersonRef`](WhatsAppPersonRef.md)[]; `votes`: `number`; \\}\n\nOne option of a poll with its votes.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mine\"></a> `mine` | `boolean` | The caller chose it. |\n| <a id=\"property-name\"></a> `name` | `string` | Option text. |\n| <a id=\"property-voters\"></a> `voters` | [`WhatsAppPersonRef`](WhatsAppPersonRef.md)[] | Who chose it. |\n| <a id=\"property-votes\"></a> `votes` | `number` | People who chose it. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppRichContent.md -->\n# Type Alias: WhatsAppRichContent\n\n> **WhatsAppRichContent** = [`WhatsAppPoll`](WhatsAppPoll.md) & \\{ `type`: `\"poll\"`; \\} \\| [`WhatsAppLocation`](WhatsAppLocation.md) & \\{ `type`: `\"location\"`; \\} \\| [`WhatsAppContacts`](WhatsAppContacts.md) & \\{ `type`: `\"contacts\"`; \\} \\| [`WhatsAppEvent`](WhatsAppEvent.md) & \\{ `type`: `\"event\"`; \\} \\| [`WhatsAppSystemLine`](WhatsAppSystemLine.md) & \\{ `type`: `\"system\"`; \\}\n\nStructured content of a message besides its body.\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppRoster.md -->\n# Type Alias: WhatsAppRoster\n\n> **WhatsAppRoster** = \\{ `announce`: `boolean`; `name`: `string`; `observedAt`: `string`; `participants`: [`WhatsAppParticipant`](WhatsAppParticipant.md)[]; \\}\n\nA chat's WhatsApp metadata as the caller's account last read it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announce\"></a> `announce` | `boolean` | Only admins may post. |\n| <a id=\"property-name\"></a> `name` | `string` | WhatsApp subject. |\n| <a id=\"property-observedat\"></a> `observedAt` | `string` | When this was read from WhatsApp. |\n| <a id=\"property-participants\"></a> `participants` | [`WhatsAppParticipant`](WhatsAppParticipant.md)[] | Everyone in the chat. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppSystemAction.md -->\n# Type Alias: WhatsAppSystemAction\n\n> **WhatsAppSystemAction** = `\"group_created\"` \\| `\"participants_added\"` \\| `\"participants_removed\"` \\| `\"participants_left\"` \\| `\"participants_joined\"` \\| `\"participants_promoted\"` \\| `\"participants_demoted\"` \\| `\"subject_changed\"` \\| `\"icon_changed\"` \\| `\"description_changed\"` \\| `\"disappearing_changed\"` \\| `\"message_pinned\"` \\| `\"message_unpinned\"` \\| `\"call\"`\n\nKinds of system lines.\n\n\n<!-- generated/storage/types.gen/type-aliases/WhatsAppSystemLine.md -->\n# Type Alias: WhatsAppSystemLine\n\n> **WhatsAppSystemLine** = \\{ `action`: [`WhatsAppSystemAction`](WhatsAppSystemAction.md); `actor?`: `null` \\| [`WhatsAppPersonRef`](WhatsAppPersonRef.md); `call?`: `null` \\| [`WhatsAppCall`](WhatsAppCall.md); `participants`: [`WhatsAppPersonRef`](WhatsAppPersonRef.md)[]; `value?`: `string` \\| `null`; \\}\n\nSomething that happened in the group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-action\"></a> `action` | [`WhatsAppSystemAction`](WhatsAppSystemAction.md) | What happened. |\n| <a id=\"property-actor\"></a> `actor?` | `null` \\| [`WhatsAppPersonRef`](WhatsAppPersonRef.md) | - |\n| <a id=\"property-call\"></a> `call?` | `null` \\| [`WhatsAppCall`](WhatsAppCall.md) | - |\n| <a id=\"property-participants\"></a> `participants` | [`WhatsAppPersonRef`](WhatsAppPersonRef.md)[] | Who it happened to (added, removed, promoted, …). |\n| <a id=\"property-value\"></a> `value?` | `string` \\| `null` | New subject or description; disappearing-messages timer in seconds (`\"0\"` is off). |\n\n\n<!-- src/entities/channels/activity/classes/ChannelActivity.md -->\n# Class: ChannelActivity\n\nA user's channel activity marker.\n\n## Constructors\n\n### Constructor\n\n> **new ChannelActivity**(`client`, `channel`, `record`): `ChannelActivity`\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `channel` | [`Channel`](../../channel/classes/Channel.md) | Related channel. |\n| `record` | [`ApiActivity`](../../../../../generated/storage/types.gen/type-aliases/ApiActivity.md) | - |\n\n#### Returns\n\n`ChannelActivity`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | [`Channel`](../../channel/classes/Channel.md) | Related channel. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\nActivity identity.\n\n##### Returns\n\n`string`\n\n## Methods\n\n### createdAt()\n\n> **createdAt**(): `string`\n\nCreation time.\n\n#### Returns\n\n`string`\n\n***\n\n### recordInteraction()\n\n> **recordInteraction**(`type`): `Promise`\\<`ChannelActivity`\\>\n\nRecord a view or interaction in this channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | [`ActivityType`](../../../../../generated/storage/types.gen/type-aliases/ActivityType.md) |\n\n#### Returns\n\n`Promise`\\<`ChannelActivity`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): [`ApiActivity`](../../../../../generated/storage/types.gen/type-aliases/ApiActivity.md)\n\nSerialize activity without credentials.\n\n#### Returns\n\n[`ApiActivity`](../../../../../generated/storage/types.gen/type-aliases/ApiActivity.md)\n\n***\n\n### user()\n\n> **user**(): [`User`](../../../users/user/classes/User.md)\n\nUser who interacted.\n\n#### Returns\n\n[`User`](../../../users/user/classes/User.md)\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### agentConversations()\n\n> **agentConversations**(): `Promise`\\<[`AgentConversation`](../../../agent-sessions/conversation/classes/AgentConversation.md)[]\\>\n\nConversations maintained by agents in this channel.\n\n#### Returns\n\n`Promise`\\<[`AgentConversation`](../../../agent-sessions/conversation/classes/AgentConversation.md)[]\\>\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### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.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### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\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### recordActivity()\n\n> **recordActivity**(`type`): `Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)\\>\n\nRecord a view or interaction in this channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | [`ActivityType`](../../../../../generated/storage/types.gen/type-aliases/ActivityType.md) |\n\n#### Returns\n\n`Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)\\>\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### setPicture()\n\n> **setPicture**(`picture?`): `Promise`\\<`void`\\>\n\nSet an uploaded profile picture, or clear it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `picture?` | [`ChannelPicture`](../../picture/classes/ChannelPicture.md) |\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### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Message`](../../message/classes/Message.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`Message`](../../message/classes/Message.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Message`](../../message/classes/Message.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\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### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`permission`](../../../entity/classes/FavoritableEntity.md#permission)\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### activity()\n\n> **activity**(): `Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)[]\\>\n\nRecent channel activity, with channel and user handles.\n\n#### Returns\n\n`Promise`\\<[`ChannelActivity`](../../activity/classes/ChannelActivity.md)[]\\>\n\n***\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/picture/classes/ChannelPicture.md -->\n# Class: ChannelPicture\n\nAn uploaded channel profile picture in static file storage.\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize the uploaded picture reference.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`id`): `ChannelPicture`\n\nConstruct a reference from the upload receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`ChannelPicture`\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\n\n<!-- src/entities/whatsapp/account/classes/WhatsAppAccount.md -->\n# Class: WhatsAppAccount\n\nThe current user's WhatsApp account, connected through the Macro app.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`LinkedAccount`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccount.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\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-identity\"></a> `identity` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Verified remote identity, absent until pairing succeeds. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The Macro user who owns this account. | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<[`LinkedAccountState`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccountState.md)\\> | Account connection state; call refresh before polling it again. | - |\n\n## Methods\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppAccount`\\>\n\nDiscard cached connection state and load its current value.\n\n#### Returns\n\n`Promise`\\<`WhatsAppAccount`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`LinkedAccount`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccount.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`LinkedAccount`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccount.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`LinkedAccount`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccount.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`, `id`): `WhatsAppAccount`\n\nReference an account; reads still enforce the authenticated owner's scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppAccount`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `WhatsAppAccount`\n\nSeed an account handle from an API record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`LinkedAccount`](../../../../../generated/storage/types.gen/type-aliases/LinkedAccount.md) |\n\n#### Returns\n\n`WhatsAppAccount`\n\n\n<!-- src/entities/whatsapp/chat/classes/WhatsAppChat.md -->\n# Class: WhatsAppChat\n\nOne chat of the current user's WhatsApp chat list: a group or a direct chat.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`LinkedChat`](../../../../../generated/storage/types.gen/type-aliases/LinkedChat.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-archived\"></a> `archived` | `readonly` | () => `Promise`\\<`boolean`\\> | Archived in WhatsApp. | - |\n| <a id=\"property-canadd\"></a> `canAdd` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether adding it to Macro works now. | - |\n| <a id=\"property-cannotaddreason\"></a> `cannotAddReason` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedCannotAdd \\| null \\| undefined\\> \\| `undefined`\\> | Why it can't be added (`not_in_group`, `community`, `own_chat`, `not_in_chat_list`), when it is neither added, shared nor addable. | - |\n| <a id=\"property-community\"></a> `community` | `readonly` | () => `Promise`\\<[`WhatsAppCommunity`](../type-aliases/WhatsAppCommunity.md) \\| `undefined`\\> | The WhatsApp community a group belongs to, if any: the community's own chat, its name, and whether this is its announcement group. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | () => `Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) \\| `undefined`\\> | The current user's own Macro group for this chat, once added. | - |\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-kind\"></a> `kind` | `readonly` | () => `Promise`\\<[`LinkedChatKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedChatKind.md)\\> | `group` or `direct`. | - |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Newest activity WhatsApp reported, when known. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Group subject (or member names), or the other person's name or number. | - |\n| <a id=\"property-pinned\"></a> `pinned` | `readonly` | () => `Promise`\\<`boolean`\\> | Pinned in WhatsApp. | - |\n| <a id=\"property-shared\"></a> `shared` | `readonly` | () => `Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) \\| `undefined`\\> | Someone else's Macro group for this chat, shared with the current user. | - |\n\n## Methods\n\n### adopt()\n\n> **adopt**(): `Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\\>\n\nAdd the chat (a group or a direct chat) to Macro as the current user's\nown; its earlier messages are imported from the phone. Adding it again\nreturns the same chat. Only the owner sends in a direct chat.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppChat`\\>\n\nReload the chat's list entry.\n\n#### Returns\n\n`Promise`\\<`WhatsAppChat`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`LinkedChat`](../../../../../generated/storage/types.gen/type-aliases/LinkedChat.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`LinkedChat`](../../../../../generated/storage/types.gen/type-aliases/LinkedChat.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`LinkedChat`](../../../../../generated/storage/types.gen/type-aliases/LinkedChat.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`, `id`): `WhatsAppChat`\n\nReference a chat by its WhatsApp JID.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppChat`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `WhatsAppChat`\n\nSeed a chat handle from the chat list.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`LinkedChat`](../../../../../generated/storage/types.gen/type-aliases/LinkedChat.md) |\n\n#### Returns\n\n`WhatsAppChat`\n\n\n<!-- src/entities/whatsapp/chat/functions/communityOf.md -->\n# Function: communityOf()\n\n> **communityOf**(`client`, `record`): [`WhatsAppCommunity`](../type-aliases/WhatsAppCommunity.md)\n\nA community reference as a handle on the community's own chat.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`LinkedCommunityReference`](../../../../../generated/storage/types.gen/type-aliases/LinkedCommunityReference.md) |\n\n## Returns\n\n[`WhatsAppCommunity`](../type-aliases/WhatsAppCommunity.md)\n\n\n<!-- src/entities/whatsapp/chat/type-aliases/WhatsAppCommunity.md -->\n# Type Alias: WhatsAppCommunity\n\n> **WhatsAppCommunity** = \\{ `announcements`: `boolean`; `chat`: [`WhatsAppChat`](../classes/WhatsAppChat.md); `name`: `string`; \\}\n\nThe WhatsApp community a group belongs to.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcements\"></a> `announcements` | `boolean` | This group is the community's announcement group. |\n| <a id=\"property-chat\"></a> `chat` | [`WhatsAppChat`](../classes/WhatsAppChat.md) | The community itself, as a chat of the list (it can't be added). |\n| <a id=\"property-name\"></a> `name` | `string` | The community's name. |\n\n\n<!-- src/entities/whatsapp/group/classes/WhatsAppGroup.md -->\n# Class: WhatsAppGroup\n\nIndependently shareable added WhatsApp chat: a group or a direct chat.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<[`WhatsAppGroupDetail`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill` | `readonly` | () => `Promise`\\<[`LinkedBackfill`](../../../../../generated/storage/types.gen/type-aliases/LinkedBackfill.md) \\| `undefined`\\> | Importing earlier messages from the owner's phone after adding, if any. | - | - |\n| <a id=\"property-cansend\"></a> `canSend` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the caller can send from their own connected account. | - | - |\n| <a id=\"property-community\"></a> `community` | `readonly` | () => `Promise`\\<[`WhatsAppCommunity`](../../chat/type-aliases/WhatsAppCommunity.md) \\| `undefined`\\> | The WhatsApp community this group belongs to, if any: the community's own chat, its name, and whether this is its announcement group. | - | - |\n| <a id=\"property-disappearingseconds\"></a> `disappearingSeconds` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | WhatsApp's disappearing-messages timer in seconds while on; Macro keeps the messages. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"whatsapp_group\"` | Canonical sharing and favorites kind. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | - | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`id`](../../../entity/classes/FavoritableEntity.md#property-id) |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<[`LinkedChatKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedChatKind.md)\\> | `group`, or `direct` for a one-to-one chat (only its owner sends). | - | - |\n| <a id=\"property-limits\"></a> `limits` | `readonly` | () => `Promise`\\<[`LinkedCapabilities`](../../../../../generated/storage/types.gen/type-aliases/LinkedCapabilities.md)\\> | Supported sizes and mutation window. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name: the group's, or a direct chat's other person. | - | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | Actual owner, independent of WhatsApp membership. | - | - |\n| <a id=\"property-participants\"></a> `participants` | `readonly` | () => `Promise`\\<[`WhatsAppParticipant`](../../participant/classes/WhatsAppParticipant.md)[]\\> | Everyone in the chat, from its roster; empty when no roster is known. | - | - |\n| <a id=\"property-roster\"></a> `roster` | `readonly` | () => `Promise`\\<[`WhatsAppRoster`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppRoster.md) \\| `undefined`\\> | Current remote roster (name, participants, announce), when available. | - | - |\n| <a id=\"property-sendingidentity\"></a> `sendingIdentity` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Caller's own verified sending identity. | - | - |\n| <a id=\"property-sendreason\"></a> `sendReason` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedReplyBlock \\| null \\| undefined\\> \\| `undefined`\\> | Reason sending is blocked. | - | - |\n| <a id=\"property-unreadcount\"></a> `unreadCount` | `readonly` | () => `Promise`\\<`number`\\> | Per-user unread count. | - | - |\n\n## Methods\n\n### delivery()\n\n> **delivery**(`sends`): `Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)[]\\>\n\nRead delivery for selected caller-owned intents or messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sends` | ([`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md) \\| [`WhatsAppSend`](../../send/classes/WhatsAppSend.md))[] |\n\n#### Returns\n\n`Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)[]\\>\n\n***\n\n### detach()\n\n> **detach**(): `Promise`\\<`void`\\>\n\nStop observation while preserving history and established sharing.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`WhatsAppGroup`\\>\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`\\<`WhatsAppGroup`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### markRead()\n\n> **markRead**(`message`): `Promise`\\<`void`\\>\n\nAdvance the caller's own read cursor.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### messageAttachments()\n\n> **messageAttachments**(`messages`): `Promise`\\<\\{ `attachments`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md) \\| `undefined`; `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: [`LinkedAttachmentState`](../../../../../generated/storage/types.gen/type-aliases/LinkedAttachmentState.md); \\}[]; `message`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); \\}[]\\>\n\nRead attachment states for selected messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `messages` | [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md)[] |\n\n#### Returns\n\n`Promise`\\<\\{ `attachments`: \\{ `document`: [`Document`](../../../documents/document/classes/Document.md) \\| `undefined`; `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: [`LinkedAttachmentState`](../../../../../generated/storage/types.gen/type-aliases/LinkedAttachmentState.md); \\}[]; `message`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); \\}[]\\>\n\n***\n\n### messages()\n\n> **messages**(`options?`): `AsyncGenerator`\\<[`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md)\\>\n\nIterate newest-first timeline pages lazily.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `limit?`: `number`; \\} |\n| `options.limit?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md)\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`permission`](../../../entity/classes/FavoritableEntity.md#permission)\n\n***\n\n### permissions()\n\n> **permissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead standard link/team sharing settings.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppGroup`\\>\n\nReload detail, permissions and caller capabilities.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`\\>\n\n***\n\n### reply()\n\n> **reply**(`content`, `options`): `Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)\\>\n\nPersonal sessions and owner API credentials can send. Bots never send.\nPreserve the idempotency key; uncertain outcomes are never automatically resent.\nThe server enforces one request per second per user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `content` | [`WhatsAppReply`](../type-aliases/WhatsAppReply.md) |\n| `options` | \\{ `idempotencyKey`: `string`; `replyTo?`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); \\} |\n| `options.idempotencyKey` | `string` |\n| `options.replyTo?` | [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md) |\n\n#### Returns\n\n`Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)\\>\n\n***\n\n### sends()\n\n> **sends**(): `Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)[]\\>\n\nRead only the caller's pending, uncertain or failed sends.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppSend`](../../send/classes/WhatsAppSend.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`WhatsAppGroupDetail`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`WhatsAppGroupDetail`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`WhatsAppGroupDetail`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupDetail.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`\\<`WhatsAppGroup`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`unfavorite`](../../../entity/classes/FavoritableEntity.md#unfavorite)\n\n***\n\n### updatePermissions()\n\n> **updatePermissions**(`update`): `Promise`\\<`void`\\>\n\nActual owner updates standard link/team sharing settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `update` | [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upload()\n\n> **upload**(`file`): `Promise`\\<[`WhatsAppUpload`](../../upload/classes/WhatsAppUpload.md)\\>\n\nStage a supported attachment for a deliberate send.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `file` | `Blob` \\| `File` |\n\n#### Returns\n\n`Promise`\\<[`WhatsAppUpload`](../../upload/classes/WhatsAppUpload.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `WhatsAppGroup`\n\nReference an adopted group; access is checked on each request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppGroup`\n\n\n<!-- src/entities/whatsapp/group/type-aliases/WhatsAppReply.md -->\n# Type Alias: WhatsAppReply\n\n> **WhatsAppReply** = \\{ `mentions?`: [`WhatsAppParticipant`](../../participant/classes/WhatsAppParticipant.md)[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string`; `type`: `\"media\"`; `upload`: [`WhatsAppUpload`](../../upload/classes/WhatsAppUpload.md); \\} \\| \\{ `message`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}\n\nDeliberate content from the credential owner's own WhatsApp account.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mentions?`: [`WhatsAppParticipant`](../../participant/classes/WhatsAppParticipant.md)[]; `text`: `string`; `type`: `\"text\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mentions?` | [`WhatsAppParticipant`](../../participant/classes/WhatsAppParticipant.md)[] | Participants mentioned (from `participants()`); the text names each as `@<mentionToken>`. |\n| `text` | `string` | - |\n| `type` | `\"text\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `caption?`: `string`; `type`: `\"media\"`; `upload`: [`WhatsAppUpload`](../../upload/classes/WhatsAppUpload.md); \\}\n\n***\n\n### Type Literal\n\n\\{ `message`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}\n\n\n<!-- src/entities/whatsapp/message/classes/WhatsAppMessage.md -->\n# Class: WhatsAppMessage\n\nMessage in an independently shared WhatsApp group.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`WhatsAppGroupMessage`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `readonly` | () => `Promise`\\<\\{ `document`: [`Document`](../../../documents/document/classes/Document.md) \\| `undefined`; `durationSeconds`: `number` \\| `undefined`; `fileName`: `string`; `height`: `number` \\| `undefined`; `mime`: `string`; `ordinal`: `number`; `presentation`: [`LinkedMediaPresentation`](../../../../../generated/storage/types.gen/type-aliases/LinkedMediaPresentation.md) \\| `undefined`; `size`: `number`; `state`: [`LinkedAttachmentState`](../../../../../generated/storage/types.gen/type-aliases/LinkedAttachmentState.md); `width`: `number` \\| `undefined`; \\}[]\\> | Attachment state and imported document handles. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string`\\> | Plain WhatsApp text. | - |\n| <a id=\"property-deleted\"></a> `deleted` | `readonly` | () => `Promise`\\<`boolean`\\> | Deleted for everyone. | - |\n| <a id=\"property-deliverystate\"></a> `deliveryState` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedDeliveryState \\| null \\| undefined\\> \\| `undefined`\\> | Caller-owned send's delivery state, when present. | - |\n| <a id=\"property-editedat\"></a> `editedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Last edit time. | - |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | () => `Promise`\\<`boolean`\\> | Forwarded from another chat. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) | The chat this message is in. | - |\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-kind\"></a> `kind` | `readonly` | () => `Promise`\\<[`WhatsAppMessageKind`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppMessageKind.md)\\> | `message`, or `system` for something that happened in the group (see `rich`). | - |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | () => `Promise`\\<[`WhatsAppMention`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppMention.md)[]\\> | People the body @-mentions: `@<token>` in the body is this person. | - |\n| <a id=\"property-reactions\"></a> `reactions` | `readonly` | () => `Promise`\\<[`WhatsAppGroupReaction`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupReaction.md)[]\\> | Grouped emoji counts and caller's own reaction. | - |\n| <a id=\"property-replyto\"></a> `replyTo` | `readonly` | () => `Promise`\\<`WhatsAppMessage` \\| `undefined`\\> | Quoted message in this group. | - |\n| <a id=\"property-rich\"></a> `rich` | `readonly` | () => `Promise`\\<`NonNullable`\\<WhatsAppRichContent \\| null \\| undefined\\> \\| `undefined`\\> | Poll (with tallies), location, contact cards, event or system line. | - |\n| <a id=\"property-sender\"></a> `sender` | `readonly` | () => `Promise`\\<[`WhatsAppGroupSender`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupSender.md)\\> | Protocol-verified sender association and display name. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string`\\> | WhatsApp timestamp. | - |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `readonly` | () => `Promise`\\<`boolean`\\> | Sent as view-once in WhatsApp; Macro keeps and shows it like any media. | - |\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`WhatsAppGroupMessage`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`WhatsAppGroupMessage`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`WhatsAppGroupMessage`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.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`, `group`, `id`): `WhatsAppMessage`\n\nReference a message within its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `group`, `record`): `WhatsAppMessage`\n\nSeed a message handle from a timeline response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `record` | [`WhatsAppGroupMessage`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppGroupMessage.md) |\n\n#### Returns\n\n`WhatsAppMessage`\n\n\n<!-- src/entities/whatsapp/namespace/classes/WhatsAppNamespace.md -->\n# Class: WhatsAppNamespace\n\nOperate on an account already paired through the Macro app.\n\n## Constructors\n\n### Constructor\n\n> **new WhatsAppNamespace**(`client`): `WhatsAppNamespace`\n\nBind existing-account operations to this authenticated client.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`WhatsAppNamespace`\n\n## Methods\n\n### account()\n\n> **account**(): `Promise`\\<[`WhatsAppAccount`](../../account/classes/WhatsAppAccount.md) \\| `undefined`\\>\n\nCurrent owner's account, or undefined when no account has been connected.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppAccount`](../../account/classes/WhatsAppAccount.md) \\| `undefined`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\n\nReference an adopted entity without fetching it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)\n\n***\n\n### groups()\n\n> **groups**(): `Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)[]\\>\n\nAdopted groups shared with the caller, including without WhatsApp.\n\n#### Returns\n\n`Promise`\\<[`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md)[]\\>\n\n\n<!-- src/entities/whatsapp/participant/classes/WhatsAppParticipant.md -->\n# Class: WhatsAppParticipant\n\nSomeone in an added WhatsApp chat, from its roster; mention them in a text reply.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-group\"></a> `group` | `readonly` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) | The chat whose roster lists them. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Their WhatsApp id: correlation data, not a Macro user. |\n\n## Accessors\n\n### admin\n\n#### Get Signature\n\n> **get** **admin**(): `boolean` \\| `undefined`\n\nWhether they administer the group, when read from the roster.\n\n##### Returns\n\n`boolean` \\| `undefined`\n\n***\n\n### displayName\n\n#### Get Signature\n\n> **get** **displayName**(): `string` \\| `undefined`\n\nTheir WhatsApp name, untrusted, when the roster had one.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### mentionToken\n\n#### Get Signature\n\n> **get** **mentionToken**(): `string`\n\nThe digits a text reply writes as `@<digits>` to mention them.\n\n##### Returns\n\n`string`\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `admin`: `boolean` \\| `undefined`; `displayName`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; \\}\n\nSerialize the participant reference without credentials.\n\n#### Returns\n\n\\{ `admin`: `boolean` \\| `undefined`; `displayName`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `admin` | `boolean` \\| `undefined` |\n| `displayName` | `string` \\| `undefined` |\n| `group` | `string` |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`group`, `id`): `WhatsAppParticipant`\n\nReference a participant of a chat by WhatsApp id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppParticipant`\n\n***\n\n### from()\n\n> `static` **from**(`group`, `record`): `WhatsAppParticipant`\n\nSeed a participant from the chat's roster.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `record` | [`WhatsAppParticipant`](../../../../../generated/storage/types.gen/type-aliases/WhatsAppParticipant.md) |\n\n#### Returns\n\n`WhatsAppParticipant`\n\n\n<!-- src/entities/whatsapp/send/classes/WhatsAppSend.md -->\n# Class: WhatsAppSend\n\nOne deliberate send intent. Unknown outcomes must never be automatically resent.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`LinkedSendProgress`](../../../../../generated/storage/types.gen/type-aliases/LinkedSendProgress.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 send intent was created. | - |\n| <a id=\"property-errorcode\"></a> `errorCode` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Sanitized failure code, when present. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) | Group entity containing this send. | - |\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-message\"></a> `message` | `readonly` | () => `Promise`\\<[`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md) \\| `undefined`\\> | Group message once WhatsApp accepted the send. | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<[`LinkedDeliveryState`](../../../../../generated/storage/types.gen/type-aliases/LinkedDeliveryState.md)\\> | Last observed delivery state; refresh explicitly to poll again. | - |\n\n## Methods\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppSend`\\>\n\nFetch current delivery state without retrying or submitting the message.\n\n#### Returns\n\n`Promise`\\<`WhatsAppSend`\\>\n\n***\n\n### request()\n\n> **request**(): `Promise`\\<\\{ `idempotencyKey`: `string`; `message`: [`WhatsAppReply`](../../group/type-aliases/WhatsAppReply.md); `replyTo?`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); \\}\\>\n\nInspect the original intent for reconciliation; never resubmit an unknown outcome automatically.\n\n#### Returns\n\n`Promise`\\<\\{ `idempotencyKey`: `string`; `message`: [`WhatsAppReply`](../../group/type-aliases/WhatsAppReply.md); `replyTo?`: [`WhatsAppMessage`](../../message/classes/WhatsAppMessage.md); \\}\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`LinkedSendProgress`](../../../../../generated/storage/types.gen/type-aliases/LinkedSendProgress.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`LinkedSendProgress`](../../../../../generated/storage/types.gen/type-aliases/LinkedSendProgress.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`LinkedSendProgress`](../../../../../generated/storage/types.gen/type-aliases/LinkedSendProgress.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`, `group`, `id`): `WhatsAppSend`\n\nReference a send intent within its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppSend`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `group`, `record`): `WhatsAppSend`\n\nSeed a send handle from a server response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `record` | [`LinkedSendProgress`](../../../../../generated/storage/types.gen/type-aliases/LinkedSendProgress.md) |\n\n#### Returns\n\n`WhatsAppSend`\n\n\n<!-- src/entities/whatsapp/upload/classes/WhatsAppUpload.md -->\n# Class: WhatsAppUpload\n\nA staged attachment scoped to one adopted group; use it in a deliberate media send.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-filename\"></a> `filename?` | `readonly` | `string` | Display filename supplied by the server. |\n| <a id=\"property-group\"></a> `group` | `readonly` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) | The chat this upload can be sent to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Correlation identity of the staged upload. |\n| <a id=\"property-kind\"></a> `kind?` | `readonly` | [`LinkedMediaKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedMediaKind.md) | Media category supplied by the server. |\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `filename`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; `kind`: [`LinkedMediaKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedMediaKind.md) \\| `undefined`; \\}\n\nSerialize the upload reference without credentials.\n\n#### Returns\n\n\\{ `filename`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; `kind`: [`LinkedMediaKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedMediaKind.md) \\| `undefined`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `filename` | `string` \\| `undefined` |\n| `group` | `string` |\n| `id` | `string` |\n| `kind` | [`LinkedMediaKind`](../../../../../generated/storage/types.gen/type-aliases/LinkedMediaKind.md) \\| `undefined` |\n\n***\n\n### byId()\n\n> `static` **byId**(`group`, `id`): `WhatsAppUpload`\n\nReference a previously staged upload in its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppUpload`\n\n***\n\n### from()\n\n> `static` **from**(`group`, `record`): `WhatsAppUpload`\n\nSeed a handle from the server's upload receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | [`WhatsAppGroup`](../../group/classes/WhatsAppGroup.md) |\n| `record` | [`LinkedUploadedAttachment`](../../../../../generated/storage/types.gen/type-aliases/LinkedUploadedAttachment.md) |\n\n#### Returns\n\n`WhatsAppUpload`\n"- },- {- "name": "crm",- "description": "Work with CRM records and pipeline tables, columns, rows and sharing.",- "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## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-pipelines\"></a> `pipelines` | `readonly` | [`PipelineNamespace`](../../pipelines/classes/PipelineNamespace.md) | Pipelines, their records and sharing settings. |\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/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/AccessiblePipeline.md -->\n# Type Alias: AccessiblePipeline\n\n> **AccessiblePipeline** = [`Pipeline`](Pipeline.md) & \\{ `grant`: [`AccessLevel`](AccessLevel.md); \\}\n\nMetadata together with the caller's effective grant.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `grant` | [`AccessLevel`](AccessLevel.md) | Highest effective access. |\n\n\n<!-- generated/storage/types.gen/type-aliases/AppliedOps.md -->\n# Type Alias: AppliedOps\n\n> **AppliedOps** = \\{ `changes`: [`CommittedChange`](CommittedChange.md)[]; `results`: [`OpResult`](OpResult.md)[]; \\}\n\nWhat a committed batch answers: a result per op, and the journal's change\nfor each table version it produced.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-changes\"></a> `changes` | [`CommittedChange`](CommittedChange.md)[] | The journal's changes. |\n| <a id=\"property-results\"></a> `results` | [`OpResult`](OpResult.md)[] | One result per op, in order. |\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/CardPosition.md -->\n# Type Alias: CardPosition\n\n> **CardPosition** = \\{ `lane`: [`LaneKey`](LaneKey.md); `position`: `string`; `row`: `string`; \\}\n\nWhere one card sits on a board: its lane, and its fractional key there.\nA card whose row has since moved to another lane has no place until it is\nmoved again.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-lane\"></a> `lane` | [`LaneKey`](LaneKey.md) | The lane. |\n| <a id=\"property-position\"></a> `position` | `string` | The card's key in that lane. |\n| <a id=\"property-row\"></a> `row` | `string` | The card's row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CellValue.md -->\n# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionRef`](OptionRef.md)[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | [`EntityRef`](EntityRef.md)[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/CellWrite.md -->\n# Type Alias: CellWrite\n\n> **CellWrite** = \\{ `column`: `string`; `value`: [`CellValue`](CellValue.md); \\}\n\nOne cell of a row: which column, and its new value.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column placement. |\n| <a id=\"property-value\"></a> `value` | [`CellValue`](CellValue.md) | The value, or [`CellValue::Clear`] to empty the cell. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/Column.md -->\n# Type Alias: Column\n\n> **Column** = \\{ `config`: `null` \\| [`ColumnConfig`](ColumnConfig.md); `display_name`: `string` \\| `null`; `id`: `string`; `infer_type`: `boolean`; `nullable?`: `boolean`; `position`: `string`; `property_definition_id`: `string`; `protections?`: [`ColumnProtection`](ColumnProtection.md)[]; `table_id`: `string`; \\}\n\nA column: the placement of a property definition on a table.\n\nThe definition carries name, [`DataType`], multi-select flag, and options;\nthis carries only where it appears and column-kind configuration.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-config\"></a> `config` | `null` \\| [`ColumnConfig`](ColumnConfig.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` \\| `null` | The placement's own label, which also names it in SQL; `None` shows the definition's name. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier of the placement. |\n| <a id=\"property-infer_type\"></a> `infer_type` | `boolean` | Whether the first nonempty value may settle this new text column's type. |\n| <a id=\"property-nullable\"></a> `nullable?` | `boolean` | Whether a row may omit this cell; empty collections also count as absent. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for column ordering. |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` | The bound property definition. |\n| <a id=\"property-protections\"></a> `protections?` | [`ColumnProtection`](ColumnProtection.md)[] | Schema operations reserved by a feature; ordinary edits cannot clear them. |\n| <a id=\"property-table_id\"></a> `table_id` | `string` | Table the column appears on. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnChange.md -->\n# Type Alias: ColumnChange\n\n> **ColumnChange** = \\{ `after?`: `string`; `definition`: [`NewColumn`](NewColumn.md); `kind`: `\"create\"`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"change_type\"`; `to`: [`ColumnKind`](ColumnKind.md); \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"add_options\"`; `options`: [`NewOption`](NewOption.md)[]; \\} \\| \\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\} \\| \\{ `formula`: [`Formula`](Formula.md); `kind`: `\"set_formula\"`; \\} \\| \\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\nA change to one column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `after?`: `string`; `definition`: [`NewColumn`](NewColumn.md); `kind`: `\"create\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` | The column it goes right after; left out, it goes after the table's last column. |\n| `definition` | [`NewColumn`](NewColumn.md) | What the column holds. |\n| `kind` | `\"create\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the table ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the column goes by another one now. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"change_type\"`; `to`: [`ColumnKind`](ColumnKind.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"change_type\"` | - |\n| `to` | [`ColumnKind`](ColumnKind.md) | The type it becomes. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"add_options\"`; `options`: [`NewOption`](NewOption.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"add_options\"` | - |\n| `options` | [`NewOption`](NewOption.md)[] | The options, each under an id the client mints. |\n\n***\n\n### Type Literal\n\n\\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` \\| `null` | Its new colour, a hex string like `#RRGGBB`, or `null` to clear it; left out, it keeps its own. A tag option always has one. |\n| `kind` | `\"update_option\"` | - |\n| `label?` | `string` | Its new label; left out, it keeps its own. Labels are unique within a column, ignoring case. |\n| `option` | `string` | The option. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `kind`: `\"set_formula\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | The formula, over the table's other columns. |\n| `kind` | `\"set_formula\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete_option\"` | - |\n| `option` | `string` | The option. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnConfig.md -->\n# Type Alias: ColumnConfig\n\n> **ColumnConfig** = \\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\} \\| \\{ `formula`: [`Formula`](Formula.md); `kind`: `\"derived\"`; \\}\n\nColumn-kind specific configuration stored on the placement.\n\n## Union Members\n\n### Type Literal\n\n\\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database_id` | `string` | Target database. |\n| `kind` | `\"link\"` | - |\n| `table_id` | `string` | Target table. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `kind`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | How its cells are computed. |\n| `kind` | `\"derived\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnDetail.md -->\n# Type Alias: ColumnDetail\n\n> **ColumnDetail** = \\{ `column`: [`Column`](Column.md); `definition`: [`PropertyDefinitionWithOptions`](PropertyDefinitionWithOptions.md); `shared_outside_database`: `boolean`; `sql_name`: `string`; `writable`: `boolean`; \\}\n\nOne column placement with the definition behind it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`Column`](Column.md) | The placement. |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinitionWithOptions`](PropertyDefinitionWithOptions.md) | The bound definition (name, type, options). |\n| <a id=\"property-shared_outside_database\"></a> `shared_outside_database` | `boolean` | Whether the definition belongs to something beyond this database (a person's, a team's or a system property), so changing its options changes them everywhere that property is used. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the column by: its display name, quoted. |\n| <a id=\"property-writable\"></a> `writable` | `boolean` | Whether SQL may write this column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnKind.md -->\n# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | [`EntityKind`](EntityKind.md) | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnProtection.md -->\n# Type Alias: ColumnProtection\n\n> **ColumnProtection** = `\"delete\"` \\| `\"change_type\"`\n\nA schema operation reserved by a feature using a column.\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnResult.md -->\n# Type Alias: ColumnResult\n\n> **ColumnResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"type_changed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\} \\| \\{ `kind`: `\"option_updated\"`; \\} \\| \\{ `kind`: `\"option_deleted\"`; \\} \\| \\{ `kind`: `\"formula_set\"`; \\}\n\nWhat happened to a column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"type_changed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `added` | `string`[] | The options created, in order: those sent, less any whose label the column already had. |\n| `kind` | `\"options_added\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_updated\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"formula_set\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/CommittedChange.md -->\n# Type Alias: CommittedChange\n\n> **CommittedChange** = \\{ `change`: `number`; `table`: `string`; `version`: [`TableVersion`](TableVersion.md); \\}\n\nOne change a committed batch journaled: a table, the version the batch\nproduced, and the journal's id for it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-change\"></a> `change` | `number` | The journal's id of the change. |\n| <a id=\"property-table\"></a> `table` | `string` | The table. |\n| <a id=\"property-version\"></a> `version` | [`TableVersion`](TableVersion.md) | The version the batch produced. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Conjunction.md -->\n# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.\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/CreatePipeline.md -->\n# Type Alias: CreatePipeline\n\n> **CreatePipeline** = \\{ `name`: `string`; `recordType`: [`PipelineRecordType`](PipelineRecordType.md); `sharing?`: [`PipelineSharing`](PipelineSharing.md); \\}\n\nRequest to create an empty pipeline with the standard CRM columns.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Pipeline name. |\n| <a id=\"property-recordtype\"></a> `recordType` | [`PipelineRecordType`](PipelineRecordType.md) | Company or contact entries. |\n| <a id=\"property-sharing\"></a> `sharing?` | [`PipelineSharing`](PipelineSharing.md) | Defaults to private. |\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/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/storage/types.gen/type-aliases/DatabaseOp.md -->\n# Type Alias: DatabaseOp\n\n> **DatabaseOp** = \\{ `change`: [`TableChange`](TableChange.md); `kind`: `\"table\"`; `table`: `string`; \\} \\| \\{ `change`: [`ColumnChange`](ColumnChange.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\} \\| \\{ `change`: [`RowsChange`](RowsChange.md); `kind`: `\"rows\"`; `table`: `string`; \\} \\| \\{ `change`: [`ViewChange`](ViewChange.md); `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\nOne write to a database: its tables, columns, options, rows or views,\ngrouped by the resource it changes. A request's ops apply in order and\ntogether, or not at all, and every op names a table of the database the\nrequest is for (or, creating one, adds it there).\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: [`TableChange`](TableChange.md); `kind`: `\"table\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`TableChange`](TableChange.md) | What changes. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table; for a creation, its new id, minted by the client, which later ops of the request may name. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ColumnChange`](ColumnChange.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ColumnChange`](ColumnChange.md) | What changes. |\n| `column` | `string` | The column; for a creation, its new id, minted by the client, which later ops of the request may name. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`RowsChange`](RowsChange.md); `kind`: `\"rows\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`RowsChange`](RowsChange.md) | What changes. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table the rows belong to. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ViewChange`](ViewChange.md); `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ViewChange`](ViewChange.md) | What changes. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `view` | `string` | The view; for a creation, its new id, minted by the client. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `order` | `string`[] | Every table, in its new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseView.md -->\n# Type Alias: DatabaseView\n\n> **DatabaseView** = \\{ `createdAt`: `string`; `databaseId`: `string`; `id`: `string`; `layout`: [`ViewLayout`](ViewLayout.md); `name`: `string`; `position`: `string`; `query`: [`ViewQuery`](ViewQuery.md); `tableId`: `string`; `updatedAt`: `string`; \\}\n\nA view of one table, as stored.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database the table belongs to. |\n| <a id=\"property-id\"></a> `id` | `string` | The view. |\n| <a id=\"property-layout\"></a> `layout` | [`ViewLayout`](ViewLayout.md) | How it draws them. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name, unique among the table's views ignoring case. |\n| <a id=\"property-position\"></a> `position` | `string` | Where it sorts among the table's views: a fractional key. |\n| <a id=\"property-query\"></a> `query` | [`ViewQuery`](ViewQuery.md) | Which rows it shows, in what order. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table it shows. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When it last changed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DateOperator.md -->\n# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.\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/EntityKind.md -->\n# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityRef.md -->\n# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: [`EntityKind`](EntityKind.md); \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | [`EntityKind`](EntityKind.md) | What kind of entity it is; it must be the kind the column points at. |\n\n\n<!-- generated/storage/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/storage/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/storage/types.gen/type-aliases/FilterCondition.md -->\n# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: [`FilterTest`](FilterTest.md); \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | [`FilterTest`](FilterTest.md) | What its cell must be. The test's kind must fit the column's type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterGroup.md -->\n# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: [`FilterNode`](FilterNode.md)[]; `conjunction`: [`Conjunction`](Conjunction.md); \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | [`FilterNode`](FilterNode.md)[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`Conjunction`](Conjunction.md) | Whether every condition must hold, or any one. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterNode.md -->\n# Type Alias: FilterNode\n\n> **FilterNode** = [`FilterCondition`](FilterCondition.md) & \\{ `kind`: `\"condition\"`; \\} \\| [`FilterGroup`](FilterGroup.md) & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterTest.md -->\n# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\} \\| \\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | [`PresenceOperator`](PresenceOperator.md) | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | [`TextOperator`](TextOperator.md) | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | [`NumberOperator`](NumberOperator.md) | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | [`DateOperator`](DateOperator.md) | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's references relate to these. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Formula.md -->\n# Type Alias: Formula\n\n> **Formula** = \\{ `column`: `string`; `kind`: `\"column\"`; \\} \\| \\{ `kind`: `\"number\"`; `value`: `number`; \\} \\| \\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: [`Operator`](Operator.md); `right`: `Formula`; \\} \\| \\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\nAn expression over one row's cells.\n\n## Union Members\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"column\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column placement. |\n| `kind` | `\"column\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `value` | `number` | The value; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: [`Operator`](Operator.md); `right`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"binary\"` | - |\n| `left` | `Formula` | The left operand. |\n| `operator` | [`Operator`](Operator.md) | How. |\n| `right` | `Formula` | The right operand. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"negate\"` | - |\n| `operand` | `Formula` | The expression negated; a number. |\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/Lane.md -->\n# Type Alias: Lane\n\n> **Lane** = \\{ `hidden?`: `boolean`; `key`: [`LaneKey`](LaneKey.md); \\}\n\nHow one lane shows in a board layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-hidden\"></a> `hidden?` | `boolean` | Whether it is hidden. |\n| <a id=\"property-key\"></a> `key` | [`LaneKey`](LaneKey.md) | The lane. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LaneKey.md -->\n# Type Alias: LaneKey\n\n> **LaneKey** = \\{ `id`: `string`; `kind`: `\"option\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"user\"`; \\} \\| \\{ `kind`: `\"none\"`; \\}\n\nA lane of a board, named by what its cards' grouping cells hold: one\noption of a select, one person, or nothing.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"option\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards holding this option of the board's select column. |\n| `kind` | `\"option\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"user\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards naming this person in the board's person column. |\n| `kind` | `\"user\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"none\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\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/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\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/NewColumn.md -->\n# Type Alias: NewColumn\n\n> **NewColumn** = \\{ `inferType?`: `boolean`; `name`: `string`; `options?`: [`NewOption`](NewOption.md)[]; `source`: `\"new\"`; `type`: [`ColumnKind`](ColumnKind.md); \\} \\| \\{ `formula`: [`Formula`](Formula.md); `name`: `string`; `source`: `\"derived\"`; \\} \\| \\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\nWhat a new column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `inferType?`: `boolean`; `name`: `string`; `options?`: [`NewOption`](NewOption.md)[]; `source`: `\"new\"`; `type`: [`ColumnKind`](ColumnKind.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `inferType?` | `boolean` | Let the column's first value settle its type: only for a plain text column. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `options?` | [`NewOption`](NewOption.md)[] | For a select or tag column, the options it starts with, in order, each under an id the client mints. A select column with none accepts nothing until options are added. |\n| `source` | `\"new\"` | - |\n| `type` | [`ColumnKind`](ColumnKind.md) | Its type. A relation names the table whose rows it holds, one the caller can see. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `name`: `string`; `source`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | How its cells are computed: arithmetic over the table's number, date and other derived columns. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `source` | `\"derived\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `property` | `string` | The property's definition. |\n| `source` | `\"existing\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/NewOption.md -->\n# Type Alias: NewOption\n\n> **NewOption** = \\{ `id`: `string`; `label`: `string`; \\}\n\nA select or tag option to create.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Its id, minted by the client; later ops of the request may name it. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label, unique within the column ignoring case. A numeric select's labels are numbers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/NewView.md -->\n# Type Alias: NewView\n\n> **NewView** = \\{ `layout`: [`RequestedLayout`](RequestedLayout.md); `name`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\}\n\nA view's contents as an op creates it; the server gives it its id,\nposition and times.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-layout\"></a> `layout` | [`RequestedLayout`](RequestedLayout.md) | How it draws them; a board left without a card title gets the table's first column. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name. |\n| <a id=\"property-query\"></a> `query?` | [`ViewQuery`](ViewQuery.md) | Which rows it shows, in what order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/NumberOperator.md -->\n# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.\n\n\n<!-- generated/storage/types.gen/type-aliases/OpResult.md -->\n# Type Alias: OpResult\n\n> **OpResult** = \\{ `change`: [`TableResult`](TableResult.md); `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`ColumnResult`](ColumnResult.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`RowsResult`](RowsResult.md); `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`ViewResult`](ViewResult.md); `kind`: `\"view\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `tables`: [`VersionedTable`](VersionedTable.md)[]; \\}\n\nWhat one op did, in the order the ops were sent, grouped as the ops are:\na result's `kind` is its op's, naming the same resource, and its\n`change` says what happened to it.\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: [`TableResult`](TableResult.md); `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`TableResult`](TableResult.md) | What happened to it. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion?` | [`TableVersion`](TableVersion.md) | Its version once the request committed; left out when the op removed it. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ColumnResult`](ColumnResult.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ColumnResult`](ColumnResult.md) | What happened to it. |\n| `column` | `string` | The column. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`RowsResult`](RowsResult.md); `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`RowsResult`](RowsResult.md) | What happened to them. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ViewResult`](ViewResult.md); `kind`: `\"view\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ViewResult`](ViewResult.md) | What happened to it. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n| `view` | `string` | The view. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `tables`: [`VersionedTable`](VersionedTable.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `tables` | [`VersionedTable`](VersionedTable.md)[] | Every table, in its new order, with its version once the request committed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Operator.md -->\n# Type Alias: Operator\n\n> **Operator** = `\"add\"` \\| `\"subtract\"` \\| `\"multiply\"` \\| `\"divide\"`\n\nAn arithmetic operator.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionRef.md -->\n# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/Pipeline.md -->\n# Type Alias: Pipeline\n\n> **Pipeline** = \\{ `createdAt`: `string`; `databaseId`: `string`; `id`: `string`; `name`: `string`; `primaryColumnId`: `string`; `recordType`: [`PipelineRecordType`](PipelineRecordType.md); `sharing`: [`PipelineSharing`](PipelineSharing.md); `tableId`: `string`; `teamId`: `string`; `trashedAt`: `string` \\| `null`; `userId`: `string`; \\}\n\nPipeline metadata; table schema and data are read through the database service.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Creation time. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | Dedicated backing database. |\n| <a id=\"property-id\"></a> `id` | `string` | Entity identity, used with `CrmPipeline` access receipts. |\n| <a id=\"property-name\"></a> `name` | `string` | Pipeline display name. |\n| <a id=\"property-primarycolumnid\"></a> `primaryColumnId` | `string` | Protected primary column. |\n| <a id=\"property-recordtype\"></a> `recordType` | [`PipelineRecordType`](PipelineRecordType.md) | Kind of the primary reference. |\n| <a id=\"property-sharing\"></a> `sharing` | [`PipelineSharing`](PipelineSharing.md) | Whether the pipeline has a team grant. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | Table of entries. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | Team owning the pipeline; references retain their own access controls. |\n| <a id=\"property-trashedat\"></a> `trashedAt` | `string` \\| `null` | Trashed pipelines are omitted from navigation. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Owning user; sharing never changes ownership. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PipelineRecordType.md -->\n# Type Alias: PipelineRecordType\n\n> **PipelineRecordType** = `\"company\"` \\| `\"contact\"`\n\nWhich CRM entity each row references. Fixed when a pipeline is created.\n\n\n<!-- generated/storage/types.gen/type-aliases/PipelineSharing.md -->\n# Type Alias: PipelineSharing\n\n> **PipelineSharing** = `\"private\"` \\| `\"team\"`\n\nInitial sharing, or the desired team grant. Individual ownership is preserved.\n\n\n<!-- generated/storage/types.gen/type-aliases/PresenceOperator.md -->\n# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.\n\n\n<!-- generated/storage/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/storage/types.gen/type-aliases/PropertyDefinitionWithOptions.md -->\n# Type Alias: PropertyDefinitionWithOptions\n\n> **PropertyDefinitionWithOptions** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `property_options`: [`PropertyOption`](PropertyOption.md)[]; \\}\n\nProperty definition with its associated 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-property_options\"></a> `property_options` | [`PropertyOption`](PropertyOption.md)[] |\n\n\n<!-- generated/storage/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/storage/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/storage/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/storage/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/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/RequestedLayout.md -->\n# Type Alias: RequestedLayout\n\n> **RequestedLayout** = \\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title?`: `string`; \\}\n\nA layout as an op asks for it: a board may leave its card title out.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | [`ViewColumn`](ViewColumn.md)[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | [`Lane`](Lane.md)[] | How lanes show, in display order. |\n| `title?` | `string` | The column a card is titled by. Left out, a board keeps the title it has, and a new board takes the table's first column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowChange.md -->\n# Type Alias: RowChange\n\n> **RowChange** = \\{ `cells`: [`CellWrite`](CellWrite.md)[]; `row`: `string`; \\}\n\nOne row's cells in a [`RowChanges::PerRow`] update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | [`CellWrite`](CellWrite.md)[] | Its new cells. |\n| <a id=\"property-row\"></a> `row` | `string` | The row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowChanges.md -->\n# Type Alias: RowChanges\n\n> **RowChanges** = \\{ `cells`: [`CellWrite`](CellWrite.md)[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\} \\| \\{ `kind`: `\"per_row\"`; `rows`: [`RowChange`](RowChange.md)[]; \\}\n\nWhich rows an update writes, and with what.\n\n## Union Members\n\n### Type Literal\n\n\\{ `cells`: [`CellWrite`](CellWrite.md)[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cells` | [`CellWrite`](CellWrite.md)[] | The cells each of them gets. |\n| `kind` | `\"uniform\"` | - |\n| `rows` | `string`[] | The rows. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"per_row\"`; `rows`: [`RowChange`](RowChange.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"per_row\"` | - |\n| `rows` | [`RowChange`](RowChange.md)[] | The rows and their cells, in order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowId.md -->\n# Type Alias: RowId\n\n> **RowId** = `string`\n\nIdentifier of a row.\n\n\n<!-- generated/storage/types.gen/type-aliases/RowsChange.md -->\n# Type Alias: RowsChange\n\n> **RowsChange** = \\{ `kind`: `\"insert\"`; `rows`: [`CellWrite`](CellWrite.md)[][]; \\} \\| \\{ `changes`: [`RowChanges`](RowChanges.md); `kind`: `\"update\"`; \\} \\| \\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\nA write to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"`; `rows`: [`CellWrite`](CellWrite.md)[][]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` | - |\n| `rows` | [`CellWrite`](CellWrite.md)[][] | One entry per new row: the cells it starts with. Columns left out start empty. |\n\n***\n\n### Type Literal\n\n\\{ `changes`: [`RowChanges`](RowChanges.md); `kind`: `\"update\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `changes` | [`RowChanges`](RowChanges.md) | Which rows get which cells. |\n| `kind` | `\"update\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete\"` | - |\n| `rows` | `string`[] | The rows, each named once. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowsResult.md -->\n# Type Alias: RowsResult\n\n> **RowsResult** = \\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\} \\| \\{ `affected`: `number`; `kind`: `\"updated\"`; \\} \\| \\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\nWhat happened to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"inserted\"` | - |\n| `rows` | `string`[] | The new rows, in the order they were sent. |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"updated\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op updated. |\n| `kind` | `\"updated\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op deleted. |\n| `kind` | `\"deleted\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SetOperator.md -->\n# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\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/SortDirection.md -->\n# Type Alias: SortDirection\n\n> **SortDirection** = `\"ascending\"` \\| `\"descending\"`\n\nA sort direction. Empty cells sort last either way.\n\n\n<!-- generated/storage/types.gen/type-aliases/SortKey.md -->\n# Type Alias: SortKey\n\n> **SortKey** = \\{ `column`: `string`; `direction`: [`SortDirection`](SortDirection.md); \\}\n\nOne sort key.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column sorted on. |\n| <a id=\"property-direction\"></a> `direction` | [`SortDirection`](SortDirection.md) | Which way. |\n\n\n<!-- generated/storage/types.gen/type-aliases/StorageRow.md -->\n# Type Alias: StorageRow\n\n> **StorageRow** = \\{ `cells`: \\{\\[`key`: `string`\\]: [`PropertyValue`](PropertyValue.md); \\}; `rowId`: [`RowId`](RowId.md); \\}\n\nOne storage row, with cells keyed by column placement.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | \\{\\[`key`: `string`\\]: [`PropertyValue`](PropertyValue.md); \\} | Populated cells. |\n| <a id=\"property-rowid\"></a> `rowId` | [`RowId`](RowId.md) | Row identity, independent of any referenced entity. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Table.md -->\n# Type Alias: Table\n\n> **Table** = \\{ `database_id`: `string`; `id`: `string`; `name`: `string`; `position`: `string`; `version`: [`TableVersion`](TableVersion.md); \\}\n\nOne table (tab) of a database.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-database_id\"></a> `database_id` | `string` | Owning database. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name; also the basis of the table's SQL name. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for tab ordering. |\n| <a id=\"property-version\"></a> `version` | [`TableVersion`](TableVersion.md) | Current version. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableChange.md -->\n# Type Alias: TableChange\n\n> **TableChange** = \\{ `kind`: `\"create\"`; `name`: `string`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\} \\| \\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\nA change to a table itself.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `name`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `name` | `string` | Its name, unique within the database ignoring case. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the database ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the table goes by another one now, so a concurrent rename is not overwritten. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_columns\"` | - |\n| `order` | `string`[] | Its columns, in their new order. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_views\"` | - |\n| `order` | `string`[] | Its views, in their new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableDetail.md -->\n# Type Alias: TableDetail\n\n> **TableDetail** = \\{ `columns`: [`ColumnDetail`](ColumnDetail.md)[]; `sql_name`: `string`; `table`: [`Table`](Table.md); `views`: [`DatabaseView`](DatabaseView.md)[]; \\}\n\nOne table with its columns and SQL name.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | [`ColumnDetail`](ColumnDetail.md)[] | Columns in display order. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the table by: its display name quoted and qualified by the database's (`FROM \"Plans\".\"Table 1\"`). |\n| <a id=\"property-table\"></a> `table` | [`Table`](Table.md) | The table. |\n| <a id=\"property-views\"></a> `views` | [`DatabaseView`](DatabaseView.md)[] | The table's views, in their order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableResult.md -->\n# Type Alias: TableResult\n\n> **TableResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"columns_reordered\"`; \\} \\| \\{ `kind`: `\"views_reordered\"`; `positions`: [`ViewPosition`](ViewPosition.md)[]; \\}\n\nWhat happened to a table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"columns_reordered\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"views_reordered\"`; `positions`: [`ViewPosition`](ViewPosition.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"views_reordered\"` | - |\n| `positions` | [`ViewPosition`](ViewPosition.md)[] | Every view's key, in their new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableVersion.md -->\n# Type Alias: TableVersion\n\n> **TableVersion** = `number`\n\nMonotonic per-table version, bumped once by every committed change to a\ntable's schema or rows. Schema edits name the version they were made\nagainst, and change events carry the new one.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- generated/storage/types.gen/type-aliases/TextOperator.md -->\n# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.\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<!-- generated/storage/types.gen/type-aliases/VersionedTable.md -->\n# Type Alias: VersionedTable\n\n> **VersionedTable** = \\{ `table`: `string`; `version`: [`TableVersion`](TableVersion.md); \\}\n\nA table and its version.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | `string` | The table. |\n| <a id=\"property-version\"></a> `version` | [`TableVersion`](TableVersion.md) | Its version. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewChange.md -->\n# Type Alias: ViewChange\n\n> **ViewChange** = \\{ `kind`: `\"create\"`; `view`: [`NewView`](NewView.md); \\} \\| \\{ `kind`: `\"update\"`; `layout?`: [`RequestedLayout`](RequestedLayout.md); `name?`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: [`LaneKey`](LaneKey.md); `row`: `string`; \\}\n\nA change to one view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `view`: [`NewView`](NewView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `view` | [`NewView`](NewView.md) | What it shows and how. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"update\"`; `layout?`: [`RequestedLayout`](RequestedLayout.md); `name?`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"update\"` | - |\n| `layout?` | [`RequestedLayout`](RequestedLayout.md) | Its new layout. A board grouped by another column forgets where its cards were; a board left without a card title keeps the one it has, or takes the table's first column. |\n| `name?` | `string` | Its new name. |\n| `query?` | [`ViewQuery`](ViewQuery.md) | Its new query. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: [`LaneKey`](LaneKey.md); `row`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` \\| `null` | The card that ends up just after it, if any. Given with `before`, it must be the card right after `before`; with neither, the card goes to the end of the lane. |\n| `before?` | `string` \\| `null` | The card that ends up just before it (it lands right after this one), if any. |\n| `kind` | `\"move_card\"` | - |\n| `lane` | [`LaneKey`](LaneKey.md) | The lane it goes to: an option of a select board's column, a person for a board grouped by people, or the lane of empty cells. |\n| `row` | `string` | The card's row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewColumn.md -->\n# Type Alias: ViewColumn\n\n> **ViewColumn** = \\{ `column`: `string`; `width`: `number` \\| `null`; \\}\n\nHow one column shows in a table layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column. |\n| <a id=\"property-width\"></a> `width` | `number` \\| `null` | Its width in pixels; the default when unset. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewLayout.md -->\n# Type Alias: ViewLayout\n\n> **ViewLayout** = \\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title`: `string`; \\}\n\nHow a view draws its rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | [`ViewColumn`](ViewColumn.md)[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes; moving a card to another lane sets this column. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | [`Lane`](Lane.md)[] | How lanes show, in display order. A lane left out shows after the listed ones: the lane of empty cells first, then options in the column's order, or people by id. |\n| `title` | `string` | The column a card is titled by, of any type. Removing it titles the cards by the table's first remaining column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewPosition.md -->\n# Type Alias: ViewPosition\n\n> **ViewPosition** = \\{ `position`: `string`; `view`: `string`; \\}\n\nA view's place among its table's views.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-position\"></a> `position` | `string` | Its key. |\n| <a id=\"property-view\"></a> `view` | `string` | The view. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewQuery.md -->\n# Type Alias: ViewQuery\n\n> **ViewQuery** = \\{ `filter`: `null` \\| [`FilterGroup`](FilterGroup.md); `sort?`: [`SortKey`](SortKey.md)[]; \\}\n\nWhich rows of the table a view shows, and in what order: a filter and a\nsort, nothing that joins, groups or reshapes rows.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filter\"></a> `filter` | `null` \\| [`FilterGroup`](FilterGroup.md) | - |\n| <a id=\"property-sort\"></a> `sort?` | [`SortKey`](SortKey.md)[] | The sort keys, first key first. Rows the keys leave tied keep the table's own order; with no keys, the table's order is the view's. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewResult.md -->\n# Type Alias: ViewResult\n\n> **ViewResult** = \\{ `kind`: `\"created\"`; `view`: [`DatabaseView`](DatabaseView.md); \\} \\| \\{ `kind`: `\"updated\"`; `view`: [`DatabaseView`](DatabaseView.md); \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"card_moved\"`; `positions`: [`CardPosition`](CardPosition.md)[]; \\}\n\nWhat happened to a view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; `view`: [`DatabaseView`](DatabaseView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"created\"` | - |\n| `view` | [`DatabaseView`](DatabaseView.md) | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"updated\"`; `view`: [`DatabaseView`](DatabaseView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"updated\"` | - |\n| `view` | [`DatabaseView`](DatabaseView.md) | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"card_moved\"`; `positions`: [`CardPosition`](CardPosition.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"card_moved\"` | - |\n| `positions` | [`CardPosition`](CardPosition.md)[] | The positions written, the moved card's last. |\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### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\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### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CrmComment`](../../comment/classes/CrmComment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CrmComment`](../../comment/classes/CrmComment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\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### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`permission`](../../../entity/classes/FavoritableEntity.md#permission)\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### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CrmComment`](../../comment/classes/CrmComment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`CrmComment`](../../comment/classes/CrmComment.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`CrmComment`](../../comment/classes/CrmComment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\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## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-pipelines\"></a> `pipelines` | `readonly` | [`PipelineNamespace`](../../pipelines/classes/PipelineNamespace.md) | Pipelines, their records and sharing settings. |\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\n\n<!-- src/entities/crm/pipeline/classes/CrmPipeline.md -->\n# Class: CrmPipeline\n\nA CRM pipeline with its own sharing boundary and backing table.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`AccessiblePipeline`](../../../../../generated/storage/types.gen/type-aliases/AccessiblePipeline.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)\\> | Current caller's access level. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | Owner. | - |\n| <a id=\"property-recordtype\"></a> `recordType` | `readonly` | () => `Promise`\\<[`PipelineRecordType`](../../../../../generated/storage/types.gen/type-aliases/PipelineRecordType.md)\\> | CRM record type. | - |\n| <a id=\"property-sharing\"></a> `sharing` | `readonly` | () => `Promise`\\<[`PipelineSharing`](../../../../../generated/storage/types.gen/type-aliases/PipelineSharing.md)\\> | Sharing scope. | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<[`Team`](../../../teams/team/classes/Team.md)\\> | Owning team. | - |\n\n## Methods\n\n### applyOps()\n\n> **applyOps**(`ops`, `options?`): `Promise`\\<[`AppliedOps`](../../../../../generated/storage/types.gen/type-aliases/AppliedOps.md)\\>\n\nApply an atomic generated database operation batch through this pipeline.\nAs with Database.applyOps, batch-local UUIDs may name resources minted earlier in the batch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ops` | [`DatabaseOp`](../../../../../generated/storage/types.gen/type-aliases/DatabaseOp.md)[] |\n| `options?` | \\{ `baseVersions?`: \\{ `table`: [`PipelineTable`](PipelineTable.md); `version`: `number`; \\}[]; \\} |\n| `options.baseVersions?` | \\{ `table`: [`PipelineTable`](PipelineTable.md); `version`: `number`; \\}[] |\n\n#### Returns\n\n`Promise`\\<[`AppliedOps`](../../../../../generated/storage/types.gen/type-aliases/AppliedOps.md)\\>\n\n***\n\n### queryRows()\n\n> **queryRows**(`options?`): `AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\nQuery pipeline rows, optionally restricting the query to typed row handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `query?`: [`ViewQuery`](../../../../../generated/storage/types.gen/type-aliases/ViewQuery.md); `rows?`: [`PipelineRow`](PipelineRow.md)[]; \\} |\n| `options.query?` | [`ViewQuery`](../../../../../generated/storage/types.gen/type-aliases/ViewQuery.md) |\n| `options.rows?` | [`PipelineRow`](PipelineRow.md)[] |\n\n#### Returns\n\n`AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename this pipeline.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rows()\n\n> **rows**(): `AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\nRows in pipeline order, automatically paginated.\n\n#### Returns\n\n`AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\n***\n\n### setSharing()\n\n> **setSharing**(`sharing`): `Promise`\\<`void`\\>\n\nChange its sharing scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | [`PipelineSharing`](../../../../../generated/storage/types.gen/type-aliases/PipelineSharing.md) \\| `undefined` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setTrashed()\n\n> **setTrashed**(`trashed`): `Promise`\\<`void`\\>\n\nTrash or restore the pipeline.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `trashed` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead sharing grants.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### table()\n\n> **table**(): `Promise`\\<[`PipelineTable`](PipelineTable.md)\\>\n\nRead the backing table through the pipeline's authorization boundary.\n\n#### Returns\n\n`Promise`\\<[`PipelineTable`](PipelineTable.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`AccessiblePipeline`](../../../../../generated/storage/types.gen/type-aliases/AccessiblePipeline.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`AccessiblePipeline`](../../../../../generated/storage/types.gen/type-aliases/AccessiblePipeline.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`AccessiblePipeline`](../../../../../generated/storage/types.gen/type-aliases/AccessiblePipeline.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### updateSharePermissions()\n\n> **updateSharePermissions**(`options`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nUpdate sharing grants.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `CrmPipeline`\n\nConstruct a lazy pipeline handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CrmPipeline`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`): `CrmPipeline`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`AccessiblePipeline`](../../../../../generated/storage/types.gen/type-aliases/AccessiblePipeline.md) |\n\n#### Returns\n\n`CrmPipeline`\n\n\n<!-- src/entities/crm/pipeline/classes/PipelineColumn.md -->\n# Class: PipelineColumn\n\nA column belonging to a pipeline table.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\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-table\"></a> `table` | `readonly` | [`PipelineTable`](PipelineTable.md) | Parent table. | - |\n\n## Methods\n\n### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nCurrent column label.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md); `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: [`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md); `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md) |\n| `id` | `string` |\n| `pipelineId` | `string` |\n| `tableId` | `string` |\n\n#### Overrides\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### writable()\n\n> **writable**(): `Promise`\\<`boolean`\\>\n\nWhether the caller can write this column.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### from()\n\n> `static` **from**(`client`, `table`, `record`): `PipelineColumn`\n\nSeed a column handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `table` | [`PipelineTable`](PipelineTable.md) |\n| `record` | [`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md) |\n\n#### Returns\n\n`PipelineColumn`\n\n\n<!-- src/entities/crm/pipeline/classes/PipelineRow.md -->\n# Class: PipelineRow\n\nOne pipeline row.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`StorageRow`](../../../../../generated/storage/types.gen/type-aliases/StorageRow.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | `readonly` | () => `Promise`\\<\\{\\[`key`: `string`\\]: [`PropertyValue`](../../../../../generated/storage/types.gen/type-aliases/PropertyValue.md); \\}\\> | Values keyed by property definition. | - |\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-pipeline\"></a> `pipeline` | `readonly` | [`CrmPipeline`](CrmPipeline.md) | Parent pipeline. | - |\n\n## Methods\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`void`\\>\n\nReload this row after an operation batch.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`StorageRow`](../../../../../generated/storage/types.gen/type-aliases/StorageRow.md); `id`: `string`; `pipelineId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: [`StorageRow`](../../../../../generated/storage/types.gen/type-aliases/StorageRow.md); `id`: `string`; `pipelineId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`StorageRow`](../../../../../generated/storage/types.gen/type-aliases/StorageRow.md) |\n| `id` | `string` |\n| `pipelineId` | `string` |\n\n#### Overrides\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `pipeline`, `id`): `PipelineRow`\n\nConstruct a scoped row handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | [`CrmPipeline`](CrmPipeline.md) |\n| `id` | `string` |\n\n#### Returns\n\n`PipelineRow`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `pipeline`, `record`): `PipelineRow`\n\nSeed a listed row.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | [`CrmPipeline`](CrmPipeline.md) |\n| `record` | [`StorageRow`](../../../../../generated/storage/types.gen/type-aliases/StorageRow.md) |\n\n#### Returns\n\n`PipelineRow`\n\n\n<!-- src/entities/crm/pipeline/classes/PipelineTable.md -->\n# Class: PipelineTable\n\nBacking table of a CRM pipeline.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\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-pipeline\"></a> `pipeline` | `readonly` | [`CrmPipeline`](CrmPipeline.md) | Parent pipeline. | - |\n\n## Methods\n\n### columns()\n\n> **columns**(): `Promise`\\<[`PipelineColumn`](PipelineColumn.md)[]\\>\n\nColumns in this table.\n\n#### Returns\n\n`Promise`\\<[`PipelineColumn`](PipelineColumn.md)[]\\>\n\n***\n\n### rowById()\n\n> **rowById**(`id`): [`PipelineRow`](PipelineRow.md)\n\nA scoped row handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`PipelineRow`](PipelineRow.md)\n\n***\n\n### rows()\n\n> **rows**(): `AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\nRows from the authorized pipeline surface.\n\n#### Returns\n\n`AsyncGenerator`\\<[`PipelineRow`](PipelineRow.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md); `id`: `string`; `pipelineId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: [`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md); `id`: `string`; `pipelineId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md) |\n| `id` | `string` |\n| `pipelineId` | `string` |\n\n#### Overrides\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### version()\n\n> **version**(): `Promise`\\<`number`\\>\n\nTable version for optimistic operation batches.\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### from()\n\n> `static` **from**(`client`, `pipeline`, `record`): `PipelineTable`\n\nSeed a table from a pipeline table response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | [`CrmPipeline`](CrmPipeline.md) |\n| `record` | [`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md) |\n\n#### Returns\n\n`PipelineTable`\n\n\n<!-- src/entities/crm/pipelines/classes/PipelineNamespace.md -->\n# Class: PipelineNamespace\n\nCRM pipelines in the caller's team.\n\n## Constructors\n\n### Constructor\n\n> **new PipelineNamespace**(`client`): `PipelineNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`PipelineNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)\n\nConstruct a lazy pipeline handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)\\>\n\nCreate a pipeline and its backing storage.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`CreatePipeline`](../../../../../generated/storage/types.gen/type-aliases/CreatePipeline.md) |\n\n#### Returns\n\n`Promise`\\<[`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)[]\\>\n\nList accessible pipelines.\n\n#### Returns\n\n`Promise`\\<[`CrmPipeline`](../../pipeline/classes/CrmPipeline.md)[]\\>\n"- },- {- "name": "databases",- "description": "Read and edit database schemas, rows, and cells.",- "overview": "<!-- src/entities/databases/namespace/classes/DatabaseNamespace.md -->\n# Class: DatabaseNamespace\n\nMacro databases: named collections of tables, owned and shared as one\nentity.\n\n## Constructors\n\n### Constructor\n\n> **new DatabaseNamespace**(`client`): `DatabaseNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`DatabaseNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Database`](../../database/classes/Database.md)\n\nA handle to a database by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Database`](../../database/classes/Database.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Database`](../../database/classes/Database.md)\\>\n\nCreate a database owned by the caller.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Database`](../../database/classes/Database.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Database`](../../database/classes/Database.md)[]\\>\n\nThe databases the caller can see.\n\n#### Returns\n\n`Promise`\\<[`Database`](../../database/classes/Database.md)[]\\>\n\n***\n\n### query()\n\n> **query**(`sql`, `options?`): `Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\nRun one SQL statement over the caller's visible databases. Writes execute once.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sql` | `string` |\n| `options?` | [`DatabaseQueryOptions`](../../query/interfaces/DatabaseQueryOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\n\n<!-- src/entities/databases/query/interfaces/DatabaseQueryOptions.md -->\n# Interface: DatabaseQueryOptions\n\nScope and optimistic concurrency for one SQL statement.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversions\"></a> `baseVersions?` | [`QueryTableVersion`](QueryTableVersion.md)[] | Refuse writes if these tables changed since they were read. |\n| <a id=\"property-database\"></a> `database?` | [`Database`](../../database/classes/Database.md) | Default database for unqualified table names; visible databases remain joinable. |\n\n\n<!-- src/entities/databases/query/interfaces/DatabaseQueryResult.md -->\n# Interface: DatabaseQueryResult\n\nThe committed outcome of one statement; write calls are never automatically retried.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-changesapplied\"></a> `changesApplied` | `number` | Number of changes committed by the statement. |\n| <a id=\"property-insertedrows\"></a> `insertedRows` | [`DatabaseRow`](../../row/classes/DatabaseRow.md)[] | Handles for newly inserted rows, in insertion order. |\n| <a id=\"property-newversions\"></a> `newVersions` | [`QueryTableVersion`](QueryTableVersion.md)[] | Versions of tables after committed writes. |\n| <a id=\"property-readversions\"></a> `readVersions` | [`QueryTableVersion`](QueryTableVersion.md)[] | Observed table versions, reusable as guards for a later write. |\n| <a id=\"property-result\"></a> `result?` | [`QueryResultSet`](QueryResultSet.md) | Returned result set, when the statement produces one. |\n| <a id=\"property-statement\"></a> `statement` | [`QueryStatement`](../type-aliases/QueryStatement.md) | Statement classification with typed handles for its targets. |\n| <a id=\"property-truncatedtables\"></a> `truncatedTables` | `string`[] | SQL table names whose input hit the server row cap; aggregates may be partial. |\n\n\n<!-- src/entities/databases/query/interfaces/QueryResultSet.md -->\n# Interface: QueryResultSet\n\nSQL returns dynamically shaped, discriminated cells and optional source row handles.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | [`QueryColumn`](../type-aliases/QueryColumn.md)[] | Ordered metadata corresponding to each cell in a result row. |\n| <a id=\"property-rowhandles\"></a> `rowHandles` | [`DatabaseRow`](../../row/classes/DatabaseRow.md)[] | Source row handles in result order; empty for aggregates and virtual tables. |\n| <a id=\"property-rows\"></a> `rows` | ([`SqlCell`](../../../../../generated/storage/types.gen/type-aliases/SqlCell.md) \\| `null`)[][] | Dynamic tagged cells in column order; empty cells are null. |\n| <a id=\"property-sourcetable\"></a> `sourceTable?` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Persisted source table when results correspond to individual rows. |\n\n\n<!-- src/entities/databases/query/interfaces/QueryTableVersion.md -->\n# Interface: QueryTableVersion\n\nA version observed on a typed table handle, reusable as a write guard.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table whose version was observed. |\n| <a id=\"property-version\"></a> `version` | `number` | Opaque version to pass back as an optimistic write guard. |\n\n\n<!-- src/entities/databases/query/type-aliases/QueryColumn.md -->\n# Type Alias: QueryColumn\n\n> **QueryColumn** = `Omit`\\<[`ResultColumn`](../../../../../generated/storage/types.gen/type-aliases/ResultColumn.md), `\"relatedTable\"`\\> & \\{ `relatedTable?`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); \\}\n\nResult column metadata, including a typed relation target when visible.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `relatedTable?` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Visible target table for a relation column. |\n\n\n<!-- src/entities/databases/query/type-aliases/QueryStatement.md -->\n# Type Alias: QueryStatement\n\n> **QueryStatement** = `Extract`\\<[`SqlStatement`](../../../../../generated/storage/types.gen/type-aliases/SqlStatement.md), \\{ `kind`: `\"select\"`; \\}\\> \\| \\{ `database`: [`Database`](../../database/classes/Database.md); `kind`: `\"schema\"`; `summary`: `string`; \\} \\| \\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; \\} \\| \\{ `column`: [`DatabaseColumn`](../../column/classes/DatabaseColumn.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; `to`: `string`; \\}\n\nWhat ran, with typed handles for resources written by the statement.\n\n## Union Members\n\n`Extract`\\<[`SqlStatement`](../../../../../generated/storage/types.gen/type-aliases/SqlStatement.md), \\{ `kind`: `\"select\"`; \\}\\>\n\n***\n\n### Type Literal\n\n\\{ `database`: [`Database`](../../database/classes/Database.md); `kind`: `\"schema\"`; `summary`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | [`Database`](../../database/classes/Database.md) | Database whose schema changed. |\n| `kind` | `\"schema\"` | Schema change discriminator. |\n| `summary` | `string` | Human-readable description of the schema change. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` \\| `\"update\"` \\| `\"delete\"` | Row mutation discriminator. |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table targeted by the mutation, including zero-match writes. |\n| `tableName` | `string` | SQL name of the target table. |\n\n***\n\n### Type Literal\n\n\\{ `column`: [`DatabaseColumn`](../../column/classes/DatabaseColumn.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; `to`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) | Column whose type changed. |\n| `columnName` | `string` | SQL name of the changed column. |\n| `kind` | `\"alterColumnType\"` | Column type change discriminator. |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table containing the changed column. |\n| `tableName` | `string` | SQL name of the target table. |\n| `to` | `string` | SQL type requested by the statement. |\n",- "documentation": "# Macro SDK: databases\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/CardPosition.md -->\n# Type Alias: CardPosition\n\n> **CardPosition** = \\{ `lane`: [`LaneKey`](LaneKey.md); `position`: `string`; `row`: `string`; \\}\n\nWhere one card sits on a board: its lane, and its fractional key there.\nA card whose row has since moved to another lane has no place until it is\nmoved again.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-lane\"></a> `lane` | [`LaneKey`](LaneKey.md) | The lane. |\n| <a id=\"property-position\"></a> `position` | `string` | The card's key in that lane. |\n| <a id=\"property-row\"></a> `row` | `string` | The card's row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CastVerdict.md -->\n# Type Alias: CastVerdict\n\n> **CastVerdict** = `\"safe\"` \\| `\"checked\"` \\| `\"never\"`\n\nWhether a column's values convert to a type.\n\n\n<!-- generated/storage/types.gen/type-aliases/CellValue.md -->\n# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionRef`](OptionRef.md)[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | [`EntityRef`](EntityRef.md)[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/CellWrite.md -->\n# Type Alias: CellWrite\n\n> **CellWrite** = \\{ `column`: `string`; `value`: [`CellValue`](CellValue.md); \\}\n\nOne cell of a row: which column, and its new value.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column placement. |\n| <a id=\"property-value\"></a> `value` | [`CellValue`](CellValue.md) | The value, or [`CellValue::Clear`] to empty the cell. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/Column.md -->\n# Type Alias: Column\n\n> **Column** = \\{ `config`: `null` \\| [`ColumnConfig`](ColumnConfig.md); `display_name`: `string` \\| `null`; `id`: `string`; `infer_type`: `boolean`; `nullable?`: `boolean`; `position`: `string`; `property_definition_id`: `string`; `protections?`: [`ColumnProtection`](ColumnProtection.md)[]; `table_id`: `string`; \\}\n\nA column: the placement of a property definition on a table.\n\nThe definition carries name, [`DataType`], multi-select flag, and options;\nthis carries only where it appears and column-kind configuration.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-config\"></a> `config` | `null` \\| [`ColumnConfig`](ColumnConfig.md) | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` \\| `null` | The placement's own label, which also names it in SQL; `None` shows the definition's name. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier of the placement. |\n| <a id=\"property-infer_type\"></a> `infer_type` | `boolean` | Whether the first nonempty value may settle this new text column's type. |\n| <a id=\"property-nullable\"></a> `nullable?` | `boolean` | Whether a row may omit this cell; empty collections also count as absent. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for column ordering. |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` | The bound property definition. |\n| <a id=\"property-protections\"></a> `protections?` | [`ColumnProtection`](ColumnProtection.md)[] | Schema operations reserved by a feature; ordinary edits cannot clear them. |\n| <a id=\"property-table_id\"></a> `table_id` | `string` | Table the column appears on. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnCast.md -->\n# Type Alias: ColumnCast\n\n> **ColumnCast** = \\{ `cast`: [`CastVerdict`](CastVerdict.md); `data_type`: [`DataType`](DataType.md); `examples`: `string`[]; `failures`: `number`; `is_multi_select`: `boolean`; `reason`: `string` \\| `null`; `relation`: `boolean`; `specific_entity_type`: `null` \\| [`EntityType`](EntityType.md); `summary`: `string` \\| `null`; \\}\n\nWhat changing a column to one type would do to its values: the dry run\nof a type change, for one target.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cast\"></a> `cast` | [`CastVerdict`](CastVerdict.md) | Whether the values convert. |\n| <a id=\"property-data_type\"></a> `data_type` | [`DataType`](DataType.md) | The target property type. |\n| <a id=\"property-examples\"></a> `examples` | `string`[] | Up to three of the values that would not convert. |\n| <a id=\"property-failures\"></a> `failures` | `number` | For a `checked` cast, how many cells would not convert. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | Whether the target holds several values. |\n| <a id=\"property-reason\"></a> `reason` | `string` \\| `null` | Why nothing converts, for a `never` cast. |\n| <a id=\"property-relation\"></a> `relation` | `boolean` | Whether the target is a relation to another table's rows. |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| [`EntityType`](EntityType.md) | - |\n| <a id=\"property-summary\"></a> `summary` | `string` \\| `null` | For a `checked` cast with failures, what is wrong with them, as in `3 values aren't numbers`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnChange.md -->\n# Type Alias: ColumnChange\n\n> **ColumnChange** = \\{ `after?`: `string`; `definition`: [`NewColumn`](NewColumn.md); `kind`: `\"create\"`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"change_type\"`; `to`: [`ColumnKind`](ColumnKind.md); \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"add_options\"`; `options`: [`NewOption`](NewOption.md)[]; \\} \\| \\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\} \\| \\{ `formula`: [`Formula`](Formula.md); `kind`: `\"set_formula\"`; \\} \\| \\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\nA change to one column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `after?`: `string`; `definition`: [`NewColumn`](NewColumn.md); `kind`: `\"create\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` | The column it goes right after; left out, it goes after the table's last column. |\n| `definition` | [`NewColumn`](NewColumn.md) | What the column holds. |\n| `kind` | `\"create\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the table ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the column goes by another one now. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"change_type\"`; `to`: [`ColumnKind`](ColumnKind.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"change_type\"` | - |\n| `to` | [`ColumnKind`](ColumnKind.md) | The type it becomes. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"add_options\"`; `options`: [`NewOption`](NewOption.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"add_options\"` | - |\n| `options` | [`NewOption`](NewOption.md)[] | The options, each under an id the client mints. |\n\n***\n\n### Type Literal\n\n\\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` \\| `null` | Its new colour, a hex string like `#RRGGBB`, or `null` to clear it; left out, it keeps its own. A tag option always has one. |\n| `kind` | `\"update_option\"` | - |\n| `label?` | `string` | Its new label; left out, it keeps its own. Labels are unique within a column, ignoring case. |\n| `option` | `string` | The option. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `kind`: `\"set_formula\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | The formula, over the table's other columns. |\n| `kind` | `\"set_formula\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete_option\"` | - |\n| `option` | `string` | The option. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnConfig.md -->\n# Type Alias: ColumnConfig\n\n> **ColumnConfig** = \\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\} \\| \\{ `formula`: [`Formula`](Formula.md); `kind`: `\"derived\"`; \\}\n\nColumn-kind specific configuration stored on the placement.\n\n## Union Members\n\n### Type Literal\n\n\\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database_id` | `string` | Target database. |\n| `kind` | `\"link\"` | - |\n| `table_id` | `string` | Target table. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `kind`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | How its cells are computed. |\n| `kind` | `\"derived\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnConversion.md -->\n# Type Alias: ColumnConversion\n\n> **ColumnConversion** = \\{ `cells`: [`ConvertedCell`](ConvertedCell.md)[]; `misfits`: `number`; `options`: `string`[]; `tableVersion`: [`TableVersion`](TableVersion.md); \\}\n\nWhat a column's values become under another type, for a new column of\nthat type beside it: the values that convert, the options they need,\nand how many do not convert. Nothing is changed by reading it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | [`ConvertedCell`](ConvertedCell.md)[] | Each row whose value converts, with that value, options named by label. |\n| <a id=\"property-misfits\"></a> `misfits` | `number` | How many values do not convert, and are left out. |\n| <a id=\"property-options\"></a> `options` | `string`[] | The option labels a new select or tag column needs, in order. |\n| <a id=\"property-tableversion\"></a> `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version the cells were read at; a batch writing the new column sends it as its base version. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnDetail.md -->\n# Type Alias: ColumnDetail\n\n> **ColumnDetail** = \\{ `column`: [`Column`](Column.md); `definition`: [`PropertyDefinitionWithOptions`](PropertyDefinitionWithOptions.md); `shared_outside_database`: `boolean`; `sql_name`: `string`; `writable`: `boolean`; \\}\n\nOne column placement with the definition behind it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`Column`](Column.md) | The placement. |\n| <a id=\"property-definition\"></a> `definition` | [`PropertyDefinitionWithOptions`](PropertyDefinitionWithOptions.md) | The bound definition (name, type, options). |\n| <a id=\"property-shared_outside_database\"></a> `shared_outside_database` | `boolean` | Whether the definition belongs to something beyond this database (a person's, a team's or a system property), so changing its options changes them everywhere that property is used. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the column by: its display name, quoted. |\n| <a id=\"property-writable\"></a> `writable` | `boolean` | Whether SQL may write this column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnId.md -->\n# Type Alias: ColumnId\n\n> **ColumnId** = `string`\n\nIdentifier of a column placement within a table.\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnKind.md -->\n# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | [`EntityKind`](EntityKind.md) | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnProtection.md -->\n# Type Alias: ColumnProtection\n\n> **ColumnProtection** = `\"delete\"` \\| `\"change_type\"`\n\nA schema operation reserved by a feature using a column.\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnResult.md -->\n# Type Alias: ColumnResult\n\n> **ColumnResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"type_changed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\} \\| \\{ `kind`: `\"option_updated\"`; \\} \\| \\{ `kind`: `\"option_deleted\"`; \\} \\| \\{ `kind`: `\"formula_set\"`; \\}\n\nWhat happened to a column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"type_changed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `added` | `string`[] | The options created, in order: those sent, less any whose label the column already had. |\n| `kind` | `\"options_added\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_updated\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"formula_set\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/Conjunction.md -->\n# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.\n\n\n<!-- generated/storage/types.gen/type-aliases/ConvertedCell.md -->\n# Type Alias: ConvertedCell\n\n> **ConvertedCell** = \\{ `row`: `string`; `value`: [`CellValue`](CellValue.md); \\}\n\nOne row's converted value.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-row\"></a> `row` | `string` | The row. |\n| <a id=\"property-value\"></a> `value` | [`CellValue`](CellValue.md) | Its value under the new type. |\n\n\n<!-- generated/storage/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/storage/types.gen/type-aliases/Database.md -->\n# Type Alias: Database\n\n> **Database** = \\{ `created_at`: `string`; `id`: `string`; `name`: `string`; `owner_id`: `string`; `trashed_at`: `string` \\| `null`; \\}\n\nA database: a named collection of tables, owned and shared as one entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner_id\"></a> `owner_id` | `string` | Owning user. |\n| <a id=\"property-trashed_at\"></a> `trashed_at` | `string` \\| `null` | Set when trashed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseDetail.md -->\n# Type Alias: DatabaseDetail\n\n> **DatabaseDetail** = \\{ `database`: [`Database`](Database.md); `grant`: [`AccessLevel`](AccessLevel.md); `tables`: [`TableDetail`](TableDetail.md)[]; \\}\n\nEverything a client needs to render and edit one database: tables,\ncolumn placements with their definitions, and the SQL names the query\nsurface exposes them under.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-database\"></a> `database` | [`Database`](Database.md) | The database. |\n| <a id=\"property-grant\"></a> `grant` | [`AccessLevel`](AccessLevel.md) | The viewer's access. |\n| <a id=\"property-tables\"></a> `tables` | [`TableDetail`](TableDetail.md)[] | Tables in tab order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseId.md -->\n# Type Alias: DatabaseId\n\n> **DatabaseId** = `string`\n\nIdentifier of reusable database storage. Its optional Macro entity uses\nthe same identity, so existing routes and grants keep their IDs.\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseOp.md -->\n# Type Alias: DatabaseOp\n\n> **DatabaseOp** = \\{ `change`: [`TableChange`](TableChange.md); `kind`: `\"table\"`; `table`: `string`; \\} \\| \\{ `change`: [`ColumnChange`](ColumnChange.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\} \\| \\{ `change`: [`RowsChange`](RowsChange.md); `kind`: `\"rows\"`; `table`: `string`; \\} \\| \\{ `change`: [`ViewChange`](ViewChange.md); `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\nOne write to a database: its tables, columns, options, rows or views,\ngrouped by the resource it changes. A request's ops apply in order and\ntogether, or not at all, and every op names a table of the database the\nrequest is for (or, creating one, adds it there).\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: [`TableChange`](TableChange.md); `kind`: `\"table\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`TableChange`](TableChange.md) | What changes. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table; for a creation, its new id, minted by the client, which later ops of the request may name. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ColumnChange`](ColumnChange.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ColumnChange`](ColumnChange.md) | What changes. |\n| `column` | `string` | The column; for a creation, its new id, minted by the client, which later ops of the request may name. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`RowsChange`](RowsChange.md); `kind`: `\"rows\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`RowsChange`](RowsChange.md) | What changes. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table the rows belong to. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ViewChange`](ViewChange.md); `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ViewChange`](ViewChange.md) | What changes. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `view` | `string` | The view; for a creation, its new id, minted by the client. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `order` | `string`[] | Every table, in its new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseView.md -->\n# Type Alias: DatabaseView\n\n> **DatabaseView** = \\{ `createdAt`: `string`; `databaseId`: `string`; `id`: `string`; `layout`: [`ViewLayout`](ViewLayout.md); `name`: `string`; `position`: `string`; `query`: [`ViewQuery`](ViewQuery.md); `tableId`: `string`; `updatedAt`: `string`; \\}\n\nA view of one table, as stored.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database the table belongs to. |\n| <a id=\"property-id\"></a> `id` | `string` | The view. |\n| <a id=\"property-layout\"></a> `layout` | [`ViewLayout`](ViewLayout.md) | How it draws them. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name, unique among the table's views ignoring case. |\n| <a id=\"property-position\"></a> `position` | `string` | Where it sorts among the table's views: a fractional key. |\n| <a id=\"property-query\"></a> `query` | [`ViewQuery`](ViewQuery.md) | Which rows it shows, in what order. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table it shows. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When it last changed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DatabaseWebhookResponse.md -->\n# Type Alias: DatabaseWebhookResponse\n\n> **DatabaseWebhookResponse** = \\{ `createdAt`: `string`; `createdBy`: `string`; `databaseId`: `string`; `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\nA webhook of a database. Its token is never shown again after creation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Creation time. |\n| <a id=\"property-createdby\"></a> `createdBy` | `string` | Who created it; its calls write with their access. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table its calls insert rows into. |\n| <a id=\"property-tokenprefix\"></a> `tokenPrefix` | `string` | The token's first characters, to tell webhooks apart. |\n\n\n<!-- generated/storage/types.gen/type-aliases/DateOperator.md -->\n# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityKind.md -->\n# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityRef.md -->\n# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: [`EntityKind`](EntityKind.md); \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | [`EntityKind`](EntityKind.md) | What kind of entity it is; it must be the kind the column points at. |\n\n\n<!-- generated/storage/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/storage/types.gen/type-aliases/FilterCondition.md -->\n# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: [`FilterTest`](FilterTest.md); \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | [`FilterTest`](FilterTest.md) | What its cell must be. The test's kind must fit the column's type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterGroup.md -->\n# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: [`FilterNode`](FilterNode.md)[]; `conjunction`: [`Conjunction`](Conjunction.md); \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | [`FilterNode`](FilterNode.md)[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`Conjunction`](Conjunction.md) | Whether every condition must hold, or any one. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterNode.md -->\n# Type Alias: FilterNode\n\n> **FilterNode** = [`FilterCondition`](FilterCondition.md) & \\{ `kind`: `\"condition\"`; \\} \\| [`FilterGroup`](FilterGroup.md) & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterTest.md -->\n# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\} \\| \\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | [`PresenceOperator`](PresenceOperator.md) | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | [`TextOperator`](TextOperator.md) | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | [`NumberOperator`](NumberOperator.md) | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | [`DateOperator`](DateOperator.md) | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's references relate to these. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Formula.md -->\n# Type Alias: Formula\n\n> **Formula** = \\{ `column`: `string`; `kind`: `\"column\"`; \\} \\| \\{ `kind`: `\"number\"`; `value`: `number`; \\} \\| \\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: [`Operator`](Operator.md); `right`: `Formula`; \\} \\| \\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\nAn expression over one row's cells.\n\n## Union Members\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"column\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column placement. |\n| `kind` | `\"column\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `value` | `number` | The value; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: [`Operator`](Operator.md); `right`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"binary\"` | - |\n| `left` | `Formula` | The left operand. |\n| `operator` | [`Operator`](Operator.md) | How. |\n| `right` | `Formula` | The right operand. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"negate\"` | - |\n| `operand` | `Formula` | The expression negated; a number. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ImportTable.md -->\n# Type Alias: ImportTable\n\n> **ImportTable** = \\{ `columns`: `string`[]; `name`: `string`; `requestId`: `string`; `rows`: `string`[][]; \\}\n\nAn import is identified once, before sending, so retries cannot duplicate rows.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | `string`[] | Header names, in order. All imported values remain text. |\n| <a id=\"property-name\"></a> `name` | `string` | New table's display name. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable key for this import, retained through retries. |\n| <a id=\"property-rows\"></a> `rows` | `string`[][] | Rectangular text rows. Empty fields are preserved. |\n\n\n<!-- generated/storage/types.gen/type-aliases/InferColumnTypeOutcome.md -->\n# Type Alias: InferColumnTypeOutcome\n\n> **InferColumnTypeOutcome** = \\{ `column`: [`ColumnDetail`](ColumnDetail.md); `table_version`: [`TableVersion`](TableVersion.md); \\}\n\nSettled schema and the version against which its first value can be written.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`ColumnDetail`](ColumnDetail.md) | Updated placement, property definition, and SQL name. |\n| <a id=\"property-table_version\"></a> `table_version` | [`TableVersion`](TableVersion.md) | Version after settling the column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/InferColumnTypeRequest.md -->\n# Type Alias: InferColumnTypeRequest\n\n> **InferColumnTypeRequest** = \\{ `baseVersion`: [`TableVersion`](TableVersion.md); `dataType`: [`DataType`](DataType.md); `specificEntityType?`: `null` \\| [`EntityType`](EntityType.md); \\}\n\nRequest to settle an empty column's first-value type.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversion\"></a> `baseVersion` | [`TableVersion`](TableVersion.md) | Table version used when interpreting the first value. |\n| <a id=\"property-datatype\"></a> `dataType` | [`DataType`](DataType.md) | First-value type: STRING, NUMBER, or ENTITY. |\n| <a id=\"property-specificentitytype\"></a> `specificEntityType?` | `null` \\| [`EntityType`](EntityType.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Lane.md -->\n# Type Alias: Lane\n\n> **Lane** = \\{ `hidden?`: `boolean`; `key`: [`LaneKey`](LaneKey.md); \\}\n\nHow one lane shows in a board layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-hidden\"></a> `hidden?` | `boolean` | Whether it is hidden. |\n| <a id=\"property-key\"></a> `key` | [`LaneKey`](LaneKey.md) | The lane. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LaneKey.md -->\n# Type Alias: LaneKey\n\n> **LaneKey** = \\{ `id`: `string`; `kind`: `\"option\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"user\"`; \\} \\| \\{ `kind`: `\"none\"`; \\}\n\nA lane of a board, named by what its cards' grouping cells hold: one\noption of a select, one person, or nothing.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"option\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards holding this option of the board's select column. |\n| `kind` | `\"option\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"user\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards naming this person in the board's person column. |\n| `kind` | `\"user\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"none\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/NewColumn.md -->\n# Type Alias: NewColumn\n\n> **NewColumn** = \\{ `inferType?`: `boolean`; `name`: `string`; `options?`: [`NewOption`](NewOption.md)[]; `source`: `\"new\"`; `type`: [`ColumnKind`](ColumnKind.md); \\} \\| \\{ `formula`: [`Formula`](Formula.md); `name`: `string`; `source`: `\"derived\"`; \\} \\| \\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\nWhat a new column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `inferType?`: `boolean`; `name`: `string`; `options?`: [`NewOption`](NewOption.md)[]; `source`: `\"new\"`; `type`: [`ColumnKind`](ColumnKind.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `inferType?` | `boolean` | Let the column's first value settle its type: only for a plain text column. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `options?` | [`NewOption`](NewOption.md)[] | For a select or tag column, the options it starts with, in order, each under an id the client mints. A select column with none accepts nothing until options are added. |\n| `source` | `\"new\"` | - |\n| `type` | [`ColumnKind`](ColumnKind.md) | Its type. A relation names the table whose rows it holds, one the caller can see. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: [`Formula`](Formula.md); `name`: `string`; `source`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | [`Formula`](Formula.md) | How its cells are computed: arithmetic over the table's number, date and other derived columns. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `source` | `\"derived\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `property` | `string` | The property's definition. |\n| `source` | `\"existing\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/NewOption.md -->\n# Type Alias: NewOption\n\n> **NewOption** = \\{ `id`: `string`; `label`: `string`; \\}\n\nA select or tag option to create.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Its id, minted by the client; later ops of the request may name it. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label, unique within the column ignoring case. A numeric select's labels are numbers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/NewView.md -->\n# Type Alias: NewView\n\n> **NewView** = \\{ `layout`: [`RequestedLayout`](RequestedLayout.md); `name`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\}\n\nA view's contents as an op creates it; the server gives it its id,\nposition and times.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-layout\"></a> `layout` | [`RequestedLayout`](RequestedLayout.md) | How it draws them; a board left without a card title gets the table's first column. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name. |\n| <a id=\"property-query\"></a> `query?` | [`ViewQuery`](ViewQuery.md) | Which rows it shows, in what order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/NumberOperator.md -->\n# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.\n\n\n<!-- generated/storage/types.gen/type-aliases/OpRefusalResponse.md -->\n# Type Alias: OpRefusalResponse\n\n> **OpRefusalResponse** = \\{ `column`: `string` \\| `null`; `message`: `string`; `op`: `number`; `row`: `number` \\| `null`; `taken`: `null` \\| [`TakenId`](TakenId.md); \\}\n\nWhy an op of a batch was refused. Nothing in the batch was written.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` \\| `null` | The column placement at fault, when one is. |\n| <a id=\"property-message\"></a> `message` | `string` | What is wrong. |\n| <a id=\"property-op\"></a> `op` | `number` | The refused op's index in the request. |\n| <a id=\"property-row\"></a> `row` | `number` \\| `null` | The row's index within the op, when one row is at fault. |\n| <a id=\"property-taken\"></a> `taken` | `null` \\| [`TakenId`](TakenId.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/OpResult.md -->\n# Type Alias: OpResult\n\n> **OpResult** = \\{ `change`: [`TableResult`](TableResult.md); `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`ColumnResult`](ColumnResult.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`RowsResult`](RowsResult.md); `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\} \\| \\{ `change`: [`ViewResult`](ViewResult.md); `kind`: `\"view\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `tables`: [`VersionedTable`](VersionedTable.md)[]; \\}\n\nWhat one op did, in the order the ops were sent, grouped as the ops are:\na result's `kind` is its op's, naming the same resource, and its\n`change` says what happened to it.\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: [`TableResult`](TableResult.md); `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`TableResult`](TableResult.md) | What happened to it. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion?` | [`TableVersion`](TableVersion.md) | Its version once the request committed; left out when the op removed it. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ColumnResult`](ColumnResult.md); `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ColumnResult`](ColumnResult.md) | What happened to it. |\n| `column` | `string` | The column. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`RowsResult`](RowsResult.md); `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`RowsResult`](RowsResult.md) | What happened to them. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: [`ViewResult`](ViewResult.md); `kind`: `\"view\"`; `table`: `string`; `tableVersion`: [`TableVersion`](TableVersion.md); `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | [`ViewResult`](ViewResult.md) | What happened to it. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `tableVersion` | [`TableVersion`](TableVersion.md) | The table's version once the request committed. |\n| `view` | `string` | The view. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `tables`: [`VersionedTable`](VersionedTable.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `tables` | [`VersionedTable`](VersionedTable.md)[] | Every table, in its new order, with its version once the request committed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Operator.md -->\n# Type Alias: Operator\n\n> **Operator** = `\"add\"` \\| `\"subtract\"` \\| `\"multiply\"` \\| `\"divide\"`\n\nAn arithmetic operator.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionId.md -->\n# Type Alias: OptionId\n\n> **OptionId** = `string`\n\nIdentifier of an option of a select or tag column.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionRef.md -->\n# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresenceOperator.md -->\n# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.\n\n\n<!-- generated/storage/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/storage/types.gen/type-aliases/PropertyDefinitionWithOptions.md -->\n# Type Alias: PropertyDefinitionWithOptions\n\n> **PropertyDefinitionWithOptions** = \\{ `definition`: [`PropertyDefinition`](PropertyDefinition.md); `property_options`: [`PropertyOption`](PropertyOption.md)[]; \\}\n\nProperty definition with its associated 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-property_options\"></a> `property_options` | [`PropertyOption`](PropertyOption.md)[] |\n\n\n<!-- generated/storage/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/storage/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/storage/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/storage/types.gen/type-aliases/RequestedLayout.md -->\n# Type Alias: RequestedLayout\n\n> **RequestedLayout** = \\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title?`: `string`; \\}\n\nA layout as an op asks for it: a board may leave its card title out.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | [`ViewColumn`](ViewColumn.md)[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | [`Lane`](Lane.md)[] | How lanes show, in display order. |\n| `title?` | `string` | The column a card is titled by. Left out, a board keeps the title it has, and a new board takes the table's first column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ResultColumn.md -->\n# Type Alias: ResultColumn\n\n> **ResultColumn** = \\{ `kind`: [`SqlOutcomeKind`](SqlOutcomeKind.md); `name`: `string`; `options?`: [`SqlSelectOption`](SqlSelectOption.md)[]; `relatedTable?`: `null` \\| [`TableId`](TableId.md); `target?`: `null` \\| [`SqlEntityKind`](SqlEntityKind.md); \\}\n\nOne result column, with what its cells mean.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-kind\"></a> `kind` | [`SqlOutcomeKind`](SqlOutcomeKind.md) | What its cells hold. |\n| <a id=\"property-name\"></a> `name` | `string` | The name or alias the statement gave it. |\n| <a id=\"property-options\"></a> `options?` | [`SqlSelectOption`](SqlSelectOption.md)[] | For a select column, its options: its cells hold their ids. |\n| <a id=\"property-relatedtable\"></a> `relatedTable?` | `null` \\| [`TableId`](TableId.md) | - |\n| <a id=\"property-target\"></a> `target?` | `null` \\| [`SqlEntityKind`](SqlEntityKind.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowChange.md -->\n# Type Alias: RowChange\n\n> **RowChange** = \\{ `cells`: [`CellWrite`](CellWrite.md)[]; `row`: `string`; \\}\n\nOne row's cells in a [`RowChanges::PerRow`] update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | [`CellWrite`](CellWrite.md)[] | Its new cells. |\n| <a id=\"property-row\"></a> `row` | `string` | The row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowChangeKind.md -->\n# Type Alias: RowChangeKind\n\n> **RowChangeKind** = `\"insert\"` \\| `\"update\"` \\| `\"delete\"`\n\nHow a change touched a row.\n\n\n<!-- generated/storage/types.gen/type-aliases/RowChanges.md -->\n# Type Alias: RowChanges\n\n> **RowChanges** = \\{ `cells`: [`CellWrite`](CellWrite.md)[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\} \\| \\{ `kind`: `\"per_row\"`; `rows`: [`RowChange`](RowChange.md)[]; \\}\n\nWhich rows an update writes, and with what.\n\n## Union Members\n\n### Type Literal\n\n\\{ `cells`: [`CellWrite`](CellWrite.md)[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cells` | [`CellWrite`](CellWrite.md)[] | The cells each of them gets. |\n| `kind` | `\"uniform\"` | - |\n| `rows` | `string`[] | The rows. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"per_row\"`; `rows`: [`RowChange`](RowChange.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"per_row\"` | - |\n| `rows` | [`RowChange`](RowChange.md)[] | The rows and their cells, in order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowHistoryEntry.md -->\n# Type Alias: RowHistoryEntry\n\n> **RowHistoryEntry** = \\{ `actingBot`: `string` \\| `null`; `actor`: `string` \\| `null`; `after`: \\{\\[`key`: `string`\\]: [`CellValue`](CellValue.md); \\}; `at`: `string`; `before`: \\{\\[`key`: `string`\\]: [`CellValue`](CellValue.md); \\}; `change`: `number`; `columns`: `string`[]; `kind`: [`RowChangeKind`](RowChangeKind.md); `version`: `number`; \\}\n\nOne change of a row, as its history shows it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actingbot\"></a> `actingBot` | `string` \\| `null` | The agent acting for them, if one was. |\n| <a id=\"property-actor\"></a> `actor` | `string` \\| `null` | Who made it; `null` for an internal caller, or a removed user. |\n| <a id=\"property-after\"></a> `after` | \\{\\[`key`: `string`\\]: [`CellValue`](CellValue.md); \\} | Those columns' values it wrote, by column id; a cell it emptied is left out. |\n| <a id=\"property-at\"></a> `at` | `string` | When it committed. |\n| <a id=\"property-before\"></a> `before` | \\{\\[`key`: `string`\\]: [`CellValue`](CellValue.md); \\} | Those columns' values before it, by column id; an empty cell is left out. |\n| <a id=\"property-change\"></a> `change` | `number` | The change's id in the journal. |\n| <a id=\"property-columns\"></a> `columns` | `string`[] | The columns it wrote; for a removal, those the row had values in. |\n| <a id=\"property-kind\"></a> `kind` | [`RowChangeKind`](RowChangeKind.md) | How it touched the row. |\n| <a id=\"property-version\"></a> `version` | `number` | The table version it produced. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowId.md -->\n# Type Alias: RowId\n\n> **RowId** = `string`\n\nIdentifier of a row.\n\n\n<!-- generated/storage/types.gen/type-aliases/RowsChange.md -->\n# Type Alias: RowsChange\n\n> **RowsChange** = \\{ `kind`: `\"insert\"`; `rows`: [`CellWrite`](CellWrite.md)[][]; \\} \\| \\{ `changes`: [`RowChanges`](RowChanges.md); `kind`: `\"update\"`; \\} \\| \\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\nA write to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"`; `rows`: [`CellWrite`](CellWrite.md)[][]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` | - |\n| `rows` | [`CellWrite`](CellWrite.md)[][] | One entry per new row: the cells it starts with. Columns left out start empty. |\n\n***\n\n### Type Literal\n\n\\{ `changes`: [`RowChanges`](RowChanges.md); `kind`: `\"update\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `changes` | [`RowChanges`](RowChanges.md) | Which rows get which cells. |\n| `kind` | `\"update\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete\"` | - |\n| `rows` | `string`[] | The rows, each named once. |\n\n\n<!-- generated/storage/types.gen/type-aliases/RowsResult.md -->\n# Type Alias: RowsResult\n\n> **RowsResult** = \\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\} \\| \\{ `affected`: `number`; `kind`: `\"updated\"`; \\} \\| \\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\nWhat happened to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"inserted\"` | - |\n| `rows` | `string`[] | The new rows, in the order they were sent. |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"updated\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op updated. |\n| `kind` | `\"updated\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op deleted. |\n| `kind` | `\"deleted\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SetOperator.md -->\n# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/SortDirection.md -->\n# Type Alias: SortDirection\n\n> **SortDirection** = `\"ascending\"` \\| `\"descending\"`\n\nA sort direction. Empty cells sort last either way.\n\n\n<!-- generated/storage/types.gen/type-aliases/SortKey.md -->\n# Type Alias: SortKey\n\n> **SortKey** = \\{ `column`: `string`; `direction`: [`SortDirection`](SortDirection.md); \\}\n\nOne sort key.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column sorted on. |\n| <a id=\"property-direction\"></a> `direction` | [`SortDirection`](SortDirection.md) | Which way. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SqlCell.md -->\n# Type Alias: SqlCell\n\n> **SqlCell** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"bool\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionId`](OptionId.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"row\"`; `value`: [`RowId`](RowId.md); \\}\n\nA cell as fetched. An absent cell is `NULL`; an absent multi-valued cell\nis the empty set.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Text or link. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"bool\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"bool\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionId`](OptionId.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionId`](OptionId.md)[] | The selected option ids; one for single-select columns. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | `string`[] | The referenced entity ids; one for single-valued columns. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"row\"`; `value`: [`RowId`](RowId.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"row\"` | - |\n| `value` | [`RowId`](RowId.md) | A table row's own id, the `row_id` column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SqlEntityKind.md -->\n# Type Alias: SqlEntityKind\n\n> **SqlEntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"` \\| `\"DATABASE_ROW\"`\n\nWhat an entity column's references point at: a kind of Macro entity, or\nthe rows of another table for a relation.\n\nSpelled as the properties system spells entity types (`USER`,\n`DATABASE_ROW`), on the wire and in SQL, where it parses\ncase-insensitively.\n\n\n<!-- generated/storage/types.gen/type-aliases/SqlOutcomeKind.md -->\n# Type Alias: SqlOutcomeKind\n\n> **SqlOutcomeKind** = `\"text\"` \\| `\"number\"` \\| `\"boolean\"` \\| `\"date\"` \\| `\"select\"` \\| `\"entity\"` \\| `\"row\"`\n\nThe value kind of a result column.\n\n\n<!-- generated/storage/types.gen/type-aliases/SqlSelectOption.md -->\n# Type Alias: SqlSelectOption\n\n> **SqlSelectOption** = \\{ `id`: [`OptionId`](OptionId.md); `label`: `string`; \\}\n\nOne option of a select column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | [`OptionId`](OptionId.md) | The option id. |\n| <a id=\"property-label\"></a> `label` | `string` | The label users type in SQL. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SqlStatement.md -->\n# Type Alias: SqlStatement\n\n> **SqlStatement** = \\{ `databaseId`: [`DatabaseId`](DatabaseId.md); `kind`: `\"schema\"`; `summary`: `string`; \\} \\| \\{ `kind`: `\"select\"`; \\} \\| \\{ `kind`: `\"insert\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\} \\| \\{ `kind`: `\"update\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\} \\| \\{ `kind`: `\"delete\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\} \\| \\{ `columnId`: [`ColumnId`](ColumnId.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; `to`: `string`; \\}\n\nThe statement that ran: a read, or the table (and for a type change, the\ncolumn) it wrote.\n\n## Union Members\n\n### Type Literal\n\n\\{ `databaseId`: [`DatabaseId`](DatabaseId.md); `kind`: `\"schema\"`; `summary`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `databaseId` | [`DatabaseId`](DatabaseId.md) | Owning database. |\n| `kind` | `\"schema\"` | - |\n| `summary` | `string` | What changed and how to read the resulting schema. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"select\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` | - |\n| `tableId` | [`TableId`](TableId.md) | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"update\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"update\"` | - |\n| `tableId` | [`TableId`](TableId.md) | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete\"` | - |\n| `tableId` | [`TableId`](TableId.md) | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `columnId`: [`ColumnId`](ColumnId.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `tableId`: [`TableId`](TableId.md); `tableName`: `string`; `to`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columnId` | [`ColumnId`](ColumnId.md) | The column placement; its id survives the change. |\n| `columnName` | `string` | The column's name. |\n| `kind` | `\"alterColumnType\"` | - |\n| `tableId` | [`TableId`](TableId.md) | The table. |\n| `tableName` | `string` | Its name. |\n| `to` | `string` | The type it became, as SQL spells it, e.g. `select[]`. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Table.md -->\n# Type Alias: Table\n\n> **Table** = \\{ `database_id`: `string`; `id`: `string`; `name`: `string`; `position`: `string`; `version`: [`TableVersion`](TableVersion.md); \\}\n\nOne table (tab) of a database.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-database_id\"></a> `database_id` | `string` | Owning database. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name; also the basis of the table's SQL name. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for tab ordering. |\n| <a id=\"property-version\"></a> `version` | [`TableVersion`](TableVersion.md) | Current version. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableChange.md -->\n# Type Alias: TableChange\n\n> **TableChange** = \\{ `kind`: `\"create\"`; `name`: `string`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\} \\| \\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\nA change to a table itself.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `name`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `name` | `string` | Its name, unique within the database ignoring case. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the database ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the table goes by another one now, so a concurrent rename is not overwritten. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_columns\"` | - |\n| `order` | `string`[] | Its columns, in their new order. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_views\"` | - |\n| `order` | `string`[] | Its views, in their new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableDetail.md -->\n# Type Alias: TableDetail\n\n> **TableDetail** = \\{ `columns`: [`ColumnDetail`](ColumnDetail.md)[]; `sql_name`: `string`; `table`: [`Table`](Table.md); `views`: [`DatabaseView`](DatabaseView.md)[]; \\}\n\nOne table with its columns and SQL name.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | [`ColumnDetail`](ColumnDetail.md)[] | Columns in display order. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the table by: its display name quoted and qualified by the database's (`FROM \"Plans\".\"Table 1\"`). |\n| <a id=\"property-table\"></a> `table` | [`Table`](Table.md) | The table. |\n| <a id=\"property-views\"></a> `views` | [`DatabaseView`](DatabaseView.md)[] | The table's views, in their order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableId.md -->\n# Type Alias: TableId\n\n> **TableId** = `string`\n\nIdentifier of one table (tab) within a database.\n\n\n<!-- generated/storage/types.gen/type-aliases/TableResult.md -->\n# Type Alias: TableResult\n\n> **TableResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"columns_reordered\"`; \\} \\| \\{ `kind`: `\"views_reordered\"`; `positions`: [`ViewPosition`](ViewPosition.md)[]; \\}\n\nWhat happened to a table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"columns_reordered\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"views_reordered\"`; `positions`: [`ViewPosition`](ViewPosition.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"views_reordered\"` | - |\n| `positions` | [`ViewPosition`](ViewPosition.md)[] | Every view's key, in their new order. |\n\n\n<!-- generated/storage/types.gen/type-aliases/TableVersion.md -->\n# Type Alias: TableVersion\n\n> **TableVersion** = `number`\n\nMonotonic per-table version, bumped once by every committed change to a\ntable's schema or rows. Schema edits name the version they were made\nagainst, and change events carry the new one.\n\n\n<!-- generated/storage/types.gen/type-aliases/TakenId.md -->\n# Type Alias: TakenId\n\n> **TakenId** = \\{ `id`: `string`; `kind`: `\"table\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"column\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"option\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"view\"`; \\}\n\nAn id a request minted for something new that already names something,\nwhich refuses the request: a retried request whose first attempt\ncommitted, or an id minted twice.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A table's. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"column\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A column's. |\n| `kind` | `\"column\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"option\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option's. |\n| `kind` | `\"option\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"view\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A view's. |\n| `kind` | `\"view\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TextOperator.md -->\n# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/VersionedTable.md -->\n# Type Alias: VersionedTable\n\n> **VersionedTable** = \\{ `table`: `string`; `version`: [`TableVersion`](TableVersion.md); \\}\n\nA table and its version.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | `string` | The table. |\n| <a id=\"property-version\"></a> `version` | [`TableVersion`](TableVersion.md) | Its version. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewChange.md -->\n# Type Alias: ViewChange\n\n> **ViewChange** = \\{ `kind`: `\"create\"`; `view`: [`NewView`](NewView.md); \\} \\| \\{ `kind`: `\"update\"`; `layout?`: [`RequestedLayout`](RequestedLayout.md); `name?`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: [`LaneKey`](LaneKey.md); `row`: `string`; \\}\n\nA change to one view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `view`: [`NewView`](NewView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `view` | [`NewView`](NewView.md) | What it shows and how. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"update\"`; `layout?`: [`RequestedLayout`](RequestedLayout.md); `name?`: `string`; `query?`: [`ViewQuery`](ViewQuery.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"update\"` | - |\n| `layout?` | [`RequestedLayout`](RequestedLayout.md) | Its new layout. A board grouped by another column forgets where its cards were; a board left without a card title keeps the one it has, or takes the table's first column. |\n| `name?` | `string` | Its new name. |\n| `query?` | [`ViewQuery`](ViewQuery.md) | Its new query. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: [`LaneKey`](LaneKey.md); `row`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` \\| `null` | The card that ends up just after it, if any. Given with `before`, it must be the card right after `before`; with neither, the card goes to the end of the lane. |\n| `before?` | `string` \\| `null` | The card that ends up just before it (it lands right after this one), if any. |\n| `kind` | `\"move_card\"` | - |\n| `lane` | [`LaneKey`](LaneKey.md) | The lane it goes to: an option of a select board's column, a person for a board grouped by people, or the lane of empty cells. |\n| `row` | `string` | The card's row. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewColumn.md -->\n# Type Alias: ViewColumn\n\n> **ViewColumn** = \\{ `column`: `string`; `width`: `number` \\| `null`; \\}\n\nHow one column shows in a table layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column. |\n| <a id=\"property-width\"></a> `width` | `number` \\| `null` | Its width in pixels; the default when unset. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewLayout.md -->\n# Type Alias: ViewLayout\n\n> **ViewLayout** = \\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title`: `string`; \\}\n\nHow a view draws its rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: [`ViewColumn`](ViewColumn.md)[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | [`ViewColumn`](ViewColumn.md)[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: [`Lane`](Lane.md)[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes; moving a card to another lane sets this column. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | [`Lane`](Lane.md)[] | How lanes show, in display order. A lane left out shows after the listed ones: the lane of empty cells first, then options in the column's order, or people by id. |\n| `title` | `string` | The column a card is titled by, of any type. Removing it titles the cards by the table's first remaining column. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewPosition.md -->\n# Type Alias: ViewPosition\n\n> **ViewPosition** = \\{ `position`: `string`; `view`: `string`; \\}\n\nA view's place among its table's views.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-position\"></a> `position` | `string` | Its key. |\n| <a id=\"property-view\"></a> `view` | `string` | The view. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewQuery.md -->\n# Type Alias: ViewQuery\n\n> **ViewQuery** = \\{ `filter`: `null` \\| [`FilterGroup`](FilterGroup.md); `sort?`: [`SortKey`](SortKey.md)[]; \\}\n\nWhich rows of the table a view shows, and in what order: a filter and a\nsort, nothing that joins, groups or reshapes rows.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filter\"></a> `filter` | `null` \\| [`FilterGroup`](FilterGroup.md) | - |\n| <a id=\"property-sort\"></a> `sort?` | [`SortKey`](SortKey.md)[] | The sort keys, first key first. Rows the keys leave tied keep the table's own order; with no keys, the table's order is the view's. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ViewResult.md -->\n# Type Alias: ViewResult\n\n> **ViewResult** = \\{ `kind`: `\"created\"`; `view`: [`DatabaseView`](DatabaseView.md); \\} \\| \\{ `kind`: `\"updated\"`; `view`: [`DatabaseView`](DatabaseView.md); \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"card_moved\"`; `positions`: [`CardPosition`](CardPosition.md)[]; \\}\n\nWhat happened to a view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; `view`: [`DatabaseView`](DatabaseView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"created\"` | - |\n| `view` | [`DatabaseView`](DatabaseView.md) | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"updated\"`; `view`: [`DatabaseView`](DatabaseView.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"updated\"` | - |\n| `view` | [`DatabaseView`](DatabaseView.md) | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"card_moved\"`; `positions`: [`CardPosition`](CardPosition.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"card_moved\"` | - |\n| `positions` | [`CardPosition`](CardPosition.md)[] | The positions written, the moved card's last. |\n\n\n<!-- src/entities/databases/column/classes/DatabaseColumn.md -->\n# Class: DatabaseColumn\n\nOne column of a [DatabaseTable](../../table/classes/DatabaseTable.md): the placement of a property\ndefinition on the table.\n\nA column is not an entity of its own — it has no permissions and no\nendpoint to read it directly. The handle resolves through the owning\ndatabase's schema, so a fresh read after a write sees the new value.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the column placement. |\n| <a id=\"property-table\"></a> `table` | `readonly` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | The table this column belongs to. |\n\n## Methods\n\n### addOptions()\n\n> **addOptions**(`labels`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd select options to the column. Labels it already has are skipped, so\nthe call is safe to repeat. Only select and tag columns accept options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `labels` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>\n\n***\n\n### casts()\n\n> **casts**(): `Promise`\\<[`ColumnCast`](../../../../../generated/storage/types.gen/type-aliases/ColumnCast.md)[]\\>\n\nWhat changing this column to each type would do to its values: `safe`,\n`checked` (with how many would not convert, and a few of them), or\n`never` (with why). Changes nothing.\n\n#### Returns\n\n`Promise`\\<[`ColumnCast`](../../../../../generated/storage/types.gen/type-aliases/ColumnCast.md)[]\\>\n\n***\n\n### changeType()\n\n> **changeType**(`options`): `Promise`\\<[`OpResultOf`](../../database/type-aliases/OpResultOf.md)\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\nChange this column's type. See Database.changeColumnType.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`ChangeColumnTypeOptions`](../../database/type-aliases/ChangeColumnTypeOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`OpResultOf`](../../database/type-aliases/OpResultOf.md)\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\n***\n\n### config()\n\n> **config**(): `Promise`\\<[`ColumnConfig`](../../../../../generated/storage/types.gen/type-aliases/ColumnConfig.md) \\| `undefined`\\>\n\nColumn-kind configuration (a link), or `undefined` for a plain\nvalue column.\n\n#### Returns\n\n`Promise`\\<[`ColumnConfig`](../../../../../generated/storage/types.gen/type-aliases/ColumnConfig.md) \\| `undefined`\\>\n\n***\n\n### convertIntoNewColumn()\n\n> **convertIntoNewColumn**(`options`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd a column of another type right after this one, filled with the\nvalues that convert, leaving this one as it is. See\nDatabase.convertColumnIntoNewColumn.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`ConvertIntoNewColumnOptions`](../../database/type-aliases/ConvertIntoNewColumnOptions.md) |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>\n\n***\n\n### dataType()\n\n> **dataType**(): `Promise`\\<[`DataType`](../../../../../generated/storage/types.gen/type-aliases/DataType.md)\\>\n\nThe value type the column holds.\n\n#### Returns\n\n`Promise`\\<[`DataType`](../../../../../generated/storage/types.gen/type-aliases/DataType.md)\\>\n\n***\n\n### definition()\n\n> **definition**(): `Promise`\\<[`PropertyDefinitionWithOptions`](../../../../../generated/storage/types.gen/type-aliases/PropertyDefinitionWithOptions.md)\\>\n\nThe bound property definition together with its select options — the\nsource of the column's name, type, and allowed values.\n\n#### Returns\n\n`Promise`\\<[`PropertyDefinitionWithOptions`](../../../../../generated/storage/types.gen/type-aliases/PropertyDefinitionWithOptions.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this placement and its cells at the table version last read.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md)\\>\n\nThe column's record as the API returns it: the placement and the bound\nproperty definition.\n\n#### Returns\n\n`Promise`\\<[`ColumnDetail`](../../../../../generated/storage/types.gen/type-aliases/ColumnDetail.md)\\>\n\n***\n\n### inferType()\n\n> **inferType**(`options`): `Promise`\\<`DatabaseColumn`\\>\n\nSettle the type of an empty column created with inferType enabled.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`InferColumnTypeOptions`](../../database/type-aliases/InferColumnTypeOptions.md) |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>\n\n***\n\n### isMultiSelect()\n\n> **isMultiSelect**(): `Promise`\\<`boolean`\\>\n\nWhether the column holds multiple values.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe placement's display name, falling back to its property definition.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe column's fractional index within the table's column order.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`DatabaseColumn`\\>\n\nRename this placement, only if its last-read name is still current,\nwithout changing its shared property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseColumn`\n\nA handle to a column by id, within a table. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseColumn`\n\n\n<!-- src/entities/databases/database/classes/Database.md -->\n# Class: Database\n\nA Macro database: a named collection of tables, owned and shared as one\nentity.\n\nA free-to-construct `(client, id)` handle like any other entity — the schema\nloads lazily on first field access and is dropped after any mutation.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | Access requests and direct user grants. | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the database was created. | - |\n| <a id=\"property-grant\"></a> `grant` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)\\> | The caller's access on the database. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The database's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The user who owns the database. | - |\n| <a id=\"property-tables\"></a> `tables` | `readonly` | () => `Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)[]\\> | The database's tables, in tab order. | - |\n| <a id=\"property-trashedat\"></a> `trashedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the database was trashed, if it has been. | - |\n\n## Methods\n\n### addColumn()\n\n> **addColumn**(`table`, `options`): `Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\nAdd a column to one of the database's tables, under an id minted here,\neither creating a property definition for it or binding an existing one.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `options` | [`AddColumnOptions`](../type-aliases/AddColumnOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\n***\n\n### addColumnOptions()\n\n> **addColumnOptions**(`column`, `labels`): `Promise`\\<[`OpResultOf`](../type-aliases/OpResultOf.md)\\<`\"column\"`, `\"options_added\"`\\>\\>\n\nAdd select options to one of the database's columns, each under an id\nminted here. Labels the column already has are skipped, so the call is\nsafe to repeat; the result lists the options it did create. Only select\nand tag columns accept options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `labels` | `string`[] |\n\n#### Returns\n\n`Promise`\\<[`OpResultOf`](../type-aliases/OpResultOf.md)\\<`\"column\"`, `\"options_added\"`\\>\\>\n\n***\n\n### applyOps()\n\n> **applyOps**(`ops`, `options?`): `Promise`\\<[`OpResult`](../../../../../generated/storage/types.gen/type-aliases/OpResult.md)[]\\>\n\nApply ops to the database in one transaction: create, rename, reorder,\nor delete tables and columns; change a column's type; add, edit, or\ndelete select options; insert, update, or delete rows; create, change,\nreorder, or delete views; move board cards. Later ops see what earlier\nones did, so a table or column created by one op (under an id the caller\nmints, as a UUIDv7) can be named by the next. A refused op leaves the\nwhole batch unwritten and throws [MacroOpRefusedError](MacroOpRefusedError.md). Returns one\nresult per op, in the order sent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ops` | [`DatabaseOp`](../../../../../generated/storage/types.gen/type-aliases/DatabaseOp.md)[] |\n| `options?` | [`ApplyOpsOptions`](../type-aliases/ApplyOpsOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`OpResult`](../../../../../generated/storage/types.gen/type-aliases/OpResult.md)[]\\>\n\n***\n\n### changeColumnType()\n\n> **changeColumnType**(`column`, `options`): `Promise`\\<[`OpResultOf`](../type-aliases/OpResultOf.md)\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\nChange a column's type at the table version last read. Every value must\nconvert: one that does not refuses the change, naming how many and a few\nof them, and nothing is written. To keep the original column, see\n[Database.convertColumnIntoNewColumn](#convertcolumnintonewcolumn).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `options` | [`ChangeColumnTypeOptions`](../type-aliases/ChangeColumnTypeOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`OpResultOf`](../type-aliases/OpResultOf.md)\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\n***\n\n### columnCasts()\n\n> **columnCasts**(`column`): `Promise`\\<[`ColumnCast`](../../../../../generated/storage/types.gen/type-aliases/ColumnCast.md)[]\\>\n\nWhat changing a column to each type would do to its values. Changes\nnothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n\n#### Returns\n\n`Promise`\\<[`ColumnCast`](../../../../../generated/storage/types.gen/type-aliases/ColumnCast.md)[]\\>\n\n***\n\n### columnConversion()\n\n> **columnConversion**(`column`, `to`): `Promise`\\<[`ColumnConversion`](../../../../../generated/storage/types.gen/type-aliases/ColumnConversion.md)\\>\n\nWhat a column's values become under another type: the values that\nconvert, the option labels a new select or tag column of that type needs,\nand how many values do not convert. Changes nothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `to` | [`ColumnType`](../type-aliases/ColumnType.md) |\n\n#### Returns\n\n`Promise`\\<[`ColumnConversion`](../../../../../generated/storage/types.gen/type-aliases/ColumnConversion.md)\\>\n\n***\n\n### convertColumnIntoNewColumn()\n\n> **convertColumnIntoNewColumn**(`column`, `options`): `Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\nAdd a column of another type right after this one, filled with the\nvalues that convert, in one batch at the table version the conversion\nwas read at. The original column is left as it is; values that do not\nconvert stay only there.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `options` | [`ConvertIntoNewColumnOptions`](../type-aliases/ConvertIntoNewColumnOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\n***\n\n### createTable()\n\n> **createTable**(`options`): `Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)\\>\n\nCreate a table in the database, under an id minted here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)\\>\n\n***\n\n### createWebhook()\n\n> **createWebhook**(`table`): `Promise`\\<\\{ `token`: `string`; `webhook`: [`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md); \\}\\>\n\nCreate a webhook that inserts rows into `table`, writing with the\ncaller's access. POST a JSON object (one row) or an array of objects to\n`/databases/webhooks/{token}` on the storage service; keys name columns.\nThe token is the whole credential and is answered only here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<\\{ `token`: `string`; `webhook`: [`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md); \\}\\>\n\n***\n\n### deleteColumn()\n\n> **deleteColumn**(`column`): `Promise`\\<`number`\\>\n\nRemove a column and its cells at the table version last read. Returns\nthe table's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### deleteTable()\n\n> **deleteTable**(`table`): `Promise`\\<`void`\\>\n\nDelete one of the database's tables with its columns, rows, and views.\nA database keeps at least one table, and a table another table's\nrelation column points at cannot be deleted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteWebhook()\n\n> **deleteWebhook**(`webhook`): `Promise`\\<`void`\\>\n\nDelete one of the database's webhooks; its URL stops working.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `webhook` | [`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### importTable()\n\n> **importTable**(`request`): `Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)\\>\n\nImport text rows atomically. Keep requestId unchanged when retrying.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ImportTable`](../../../../../generated/storage/types.gen/type-aliases/ImportTable.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)\\>\n\n***\n\n### inferColumnType()\n\n> **inferColumnType**(`column`, `options`): `Promise`\\<[`InferColumnTypeOutcome`](../../../../../generated/storage/types.gen/type-aliases/InferColumnTypeOutcome.md)\\>\n\nAdopt a first-value type only while the owned column is empty and inferable.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `options` | [`InferColumnTypeOptions`](../type-aliases/InferColumnTypeOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`InferColumnTypeOutcome`](../../../../../generated/storage/types.gen/type-aliases/InferColumnTypeOutcome.md)\\>\n\n***\n\n### query()\n\n> **query**(`sql`, `options?`): `Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\nRun one SQL statement with this database as the default name scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sql` | `string` |\n| `options?` | `Omit`\\<[`DatabaseQueryOptions`](../../query/interfaces/DatabaseQueryOptions.md), `\"database\"`\\> |\n\n#### Returns\n\n`Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\n***\n\n### renameColumn()\n\n> **renameColumn**(`column`, `name`): `Promise`\\<`number`\\>\n\nRename this column placement, only if its last-read name is still\ncurrent, without changing its shared property definition. Returns the\ntable's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### renameTable()\n\n> **renameTable**(`table`, `name`): `Promise`\\<`number`\\>\n\nRename a table only if its last-read name is still current. Returns the\ntable's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### reorderColumns()\n\n> **reorderColumns**(`table`, `columns`): `Promise`\\<`number`\\>\n\nPersist a complete column order at the table version last read. Pass\nevery column of the table exactly once.\nReturns the table's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `columns` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md)[] |\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### reorderTables()\n\n> **reorderTables**(`tables`): `Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)[]\\>\n\nPersist a new tab order. Pass every table of the database exactly once.\nReturns the tables in their new order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `tables` | [`DatabaseTable`](../../table/classes/DatabaseTable.md)[] |\n\n#### Returns\n\n`Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md)[]\\>\n\n***\n\n### rowHistory()\n\n> **rowHistory**(`row`): `Promise`\\<[`RowHistoryEntry`](../../../../../generated/storage/types.gen/type-aliases/RowHistoryEntry.md)[]\\>\n\nA row's history: every committed change that touched it, newest first.\nSee [DatabaseRow.history](../../row/classes/DatabaseRow.md#history).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `row` | [`DatabaseRow`](../../row/classes/DatabaseRow.md) |\n\n#### Returns\n\n`Promise`\\<[`RowHistoryEntry`](../../../../../generated/storage/types.gen/type-aliases/RowHistoryEntry.md)[]\\>\n\n***\n\n### schema()\n\n> **schema**(): `Promise`\\<[`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.md)\\>\n\nThe full schema: the database record, the caller's access, and every\ntable with its columns and views. Cached until the next write.\n\n#### Returns\n\n`Promise`\\<[`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.md)\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead direct recipients. Only the database owner can manage sharing.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### table()\n\n> **table**(`name`): `Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md) \\| `undefined`\\>\n\nThe table with the given display name, or `undefined` if there is none.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`DatabaseTable`](../../table/classes/DatabaseTable.md) \\| `undefined`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`DatabaseDetail`](../../../../../generated/storage/types.gen/type-aliases/DatabaseDetail.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### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nAdd, replace, or remove recipient grants without transferring ownership.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### viewPositions()\n\n> **viewPositions**(`view`): `Promise`\\<[`CardPosition`](../../../../../generated/storage/types.gen/type-aliases/CardPosition.md)[]\\>\n\nWhere a board view's cards sit: each placed card's lane and key.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `view` | [`DatabaseView`](../../view/classes/DatabaseView.md) |\n\n#### Returns\n\n`Promise`\\<[`CardPosition`](../../../../../generated/storage/types.gen/type-aliases/CardPosition.md)[]\\>\n\n***\n\n### webhooks()\n\n> **webhooks**(): `Promise`\\<[`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md)[]\\>\n\nThe database's webhooks, oldest first. Takes edit access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md)[]\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Database`\n\nA handle to a database 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`Database`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Database`\\>\n\nCreate a database owned by the caller.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Database`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Database`[]\\>\n\nThe databases the caller can see, each with the caller's access level.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Database`[]\\>\n\n\n<!-- src/entities/databases/database/classes/MacroOpRefusedError.md -->\n# Class: MacroOpRefusedError\n\nA batch of ops was refused (HTTP 400): nothing in it was written. Names the\nop at fault and, when the batch minted an id that already names something\n(a retry of a batch that committed, or an id minted twice), that id.\n\n## Extends\n\n- [`MacroApiError`](../../../../utils/unwrap/classes/MacroApiError.md)\n\n## Constructors\n\n### Constructor\n\n> **new MacroOpRefusedError**(`status`, `refusal`): `MacroOpRefusedError`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `status` | `number` |\n| `refusal` | [`OpRefusalResponse`](../../../../../generated/storage/types.gen/type-aliases/OpRefusalResponse.md) |\n\n#### Returns\n\n`MacroOpRefusedError`\n\n#### Overrides\n\n[`MacroApiError`](../../../../utils/unwrap/classes/MacroApiError.md).[`constructor`](../../../../utils/unwrap/classes/MacroApiError.md#constructor)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `readonly` | `string` \\| `null` | The column placement at fault, when one is. | - |\n| <a id=\"property-data\"></a> `data` | `readonly` | `unknown` | - | [`MacroApiError`](../../../../utils/unwrap/classes/MacroApiError.md).[`data`](../../../../utils/unwrap/classes/MacroApiError.md#property-data) |\n| <a id=\"property-op\"></a> `op` | `readonly` | `number` | The refused op's index in the batch. | - |\n| <a id=\"property-row\"></a> `row` | `readonly` | `number` \\| `null` | The row's index within the op, when one row is at fault. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | `number` | - | [`MacroApiError`](../../../../utils/unwrap/classes/MacroApiError.md).[`status`](../../../../utils/unwrap/classes/MacroApiError.md#property-status) |\n| <a id=\"property-taken\"></a> `taken` | `readonly` | [`TakenId`](../../../../../generated/storage/types.gen/type-aliases/TakenId.md) \\| `null` | The minted id that is already taken, when that is the reason. | - |\n\n\n<!-- src/entities/databases/database/type-aliases/AddColumnOptions.md -->\n# Type Alias: AddColumnOptions\n\n> **AddColumnOptions** = \\{ `inferType?`: `boolean`; `name`: `string`; `options?`: `string`[]; `type`: [`ColumnType`](ColumnType.md); \\} \\| \\{ `property`: [`PropertyDefinition`](../../../properties/property-definition/classes/PropertyDefinition.md); \\} & \\{ `after?`: [`DatabaseColumn`](../../column/classes/DatabaseColumn.md); \\}\n\nOptions for [Database.addColumn](../classes/Database.md#addcolumn).\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) | The column the new one goes right after; by default, the last one. |\n\n\n<!-- src/entities/databases/database/type-aliases/ApplyOpsOptions.md -->\n# Type Alias: ApplyOpsOptions\n\n> **ApplyOpsOptions** = \\{ `baseVersions?`: \\{ `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `version`: [`TableVersion`](../../../../../generated/storage/types.gen/type-aliases/TableVersion.md); \\}[]; \\}\n\nOptions for [Database.applyOps](../classes/Database.md#applyops).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversions\"></a> `baseVersions?` | \\{ `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `version`: [`TableVersion`](../../../../../generated/storage/types.gen/type-aliases/TableVersion.md); \\}[] | The version each table must still be at, as the caller read it. A table that moved refuses the whole batch with a 409, so an edit made against what the caller saw does not overwrite another's. |\n\n\n<!-- src/entities/databases/database/type-aliases/ChangeColumnTypeOptions.md -->\n# Type Alias: ChangeColumnTypeOptions\n\n> **ChangeColumnTypeOptions** = \\{ `to`: [`ColumnType`](ColumnType.md); \\}\n\nOptions for [Database.changeColumnType](../classes/Database.md#changecolumntype).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-to\"></a> `to` | [`ColumnType`](ColumnType.md) | The type to change the column to. |\n\n\n<!-- src/entities/databases/database/type-aliases/ColumnType.md -->\n# Type Alias: ColumnType\n\n> **ColumnType** = `Exclude`\\<[`ColumnKind`](../../../../../generated/storage/types.gen/type-aliases/ColumnKind.md), \\{ `type`: `\"relation\"`; \\}\\> \\| \\{ `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `type`: `\"relation\"`; \\}\n\nA type a column can have. A relation names the related table by handle;\nthe table may live in any database the caller can reach.\n\n\n<!-- src/entities/databases/database/type-aliases/ConvertIntoNewColumnOptions.md -->\n# Type Alias: ConvertIntoNewColumnOptions\n\n> **ConvertIntoNewColumnOptions** = \\{ `name?`: `string`; `to`: [`ColumnType`](ColumnType.md); \\}\n\nOptions for [Database.convertColumnIntoNewColumn](../classes/Database.md#convertcolumnintonewcolumn).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` | Display name of the new column; by default the original's name followed by the type, as in `Due (Date)`. |\n| <a id=\"property-to\"></a> `to` | [`ColumnType`](ColumnType.md) | The type of the new column. |\n\n\n<!-- src/entities/databases/database/type-aliases/InferColumnTypeOptions.md -->\n# Type Alias: InferColumnTypeOptions\n\n> **InferColumnTypeOptions** = \\{ `baseVersion`: [`TableVersion`](../../../../../generated/storage/types.gen/type-aliases/TableVersion.md); `dataType`: `\"STRING\"` \\| `\"NUMBER\"` \\| `\"ENTITY\"`; `specificEntityType?`: [`InferColumnTypeRequest`](../../../../../generated/storage/types.gen/type-aliases/InferColumnTypeRequest.md)\\[`\"specificEntityType\"`\\]; \\}\n\nSettle an empty inferred column using the table version the caller read.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-baseversion\"></a> `baseVersion` | [`TableVersion`](../../../../../generated/storage/types.gen/type-aliases/TableVersion.md) |\n| <a id=\"property-datatype\"></a> `dataType` | `\"STRING\"` \\| `\"NUMBER\"` \\| `\"ENTITY\"` |\n| <a id=\"property-specificentitytype\"></a> `specificEntityType?` | [`InferColumnTypeRequest`](../../../../../generated/storage/types.gen/type-aliases/InferColumnTypeRequest.md)\\[`\"specificEntityType\"`\\] |\n\n\n<!-- src/entities/databases/database/type-aliases/OpResultOf.md -->\n# Type Alias: OpResultOf\\<Kind, Change\\>\n\n> **OpResultOf**\\<`Kind`, `Change`\\> = `Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\> & \\{ `change`: `Extract`\\<`Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\>\\[`\"change\"`\\], \\{ `kind`: `Change`; \\}\\>; \\}\n\nThe result of a `Kind` op whose change answered `Change`.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-kind\"></a> `Kind` *extends* keyof `ResultChanges` |\n| <a id=\"type-parameter-change\"></a> `Change` *extends* `ResultChanges`\\[`Kind`\\] |\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `change` | `Extract`\\<`Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\>\\[`\"change\"`\\], \\{ `kind`: `Change`; \\}\\> |\n\n\n<!-- src/entities/databases/namespace/classes/DatabaseNamespace.md -->\n# Class: DatabaseNamespace\n\nMacro databases: named collections of tables, owned and shared as one\nentity.\n\n## Constructors\n\n### Constructor\n\n> **new DatabaseNamespace**(`client`): `DatabaseNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`DatabaseNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Database`](../../database/classes/Database.md)\n\nA handle to a database by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Database`](../../database/classes/Database.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Database`](../../database/classes/Database.md)\\>\n\nCreate a database owned by the caller.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Database`](../../database/classes/Database.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Database`](../../database/classes/Database.md)[]\\>\n\nThe databases the caller can see.\n\n#### Returns\n\n`Promise`\\<[`Database`](../../database/classes/Database.md)[]\\>\n\n***\n\n### query()\n\n> **query**(`sql`, `options?`): `Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\nRun one SQL statement over the caller's visible databases. Writes execute once.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sql` | `string` |\n| `options?` | [`DatabaseQueryOptions`](../../query/interfaces/DatabaseQueryOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseQueryResult`](../../query/interfaces/DatabaseQueryResult.md)\\>\n\n\n<!-- src/entities/databases/query/interfaces/DatabaseQueryOptions.md -->\n# Interface: DatabaseQueryOptions\n\nScope and optimistic concurrency for one SQL statement.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversions\"></a> `baseVersions?` | [`QueryTableVersion`](QueryTableVersion.md)[] | Refuse writes if these tables changed since they were read. |\n| <a id=\"property-database\"></a> `database?` | [`Database`](../../database/classes/Database.md) | Default database for unqualified table names; visible databases remain joinable. |\n\n\n<!-- src/entities/databases/query/interfaces/DatabaseQueryResult.md -->\n# Interface: DatabaseQueryResult\n\nThe committed outcome of one statement; write calls are never automatically retried.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-changesapplied\"></a> `changesApplied` | `number` | Number of changes committed by the statement. |\n| <a id=\"property-insertedrows\"></a> `insertedRows` | [`DatabaseRow`](../../row/classes/DatabaseRow.md)[] | Handles for newly inserted rows, in insertion order. |\n| <a id=\"property-newversions\"></a> `newVersions` | [`QueryTableVersion`](QueryTableVersion.md)[] | Versions of tables after committed writes. |\n| <a id=\"property-readversions\"></a> `readVersions` | [`QueryTableVersion`](QueryTableVersion.md)[] | Observed table versions, reusable as guards for a later write. |\n| <a id=\"property-result\"></a> `result?` | [`QueryResultSet`](QueryResultSet.md) | Returned result set, when the statement produces one. |\n| <a id=\"property-statement\"></a> `statement` | [`QueryStatement`](../type-aliases/QueryStatement.md) | Statement classification with typed handles for its targets. |\n| <a id=\"property-truncatedtables\"></a> `truncatedTables` | `string`[] | SQL table names whose input hit the server row cap; aggregates may be partial. |\n\n\n<!-- src/entities/databases/query/interfaces/QueryResultSet.md -->\n# Interface: QueryResultSet\n\nSQL returns dynamically shaped, discriminated cells and optional source row handles.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | [`QueryColumn`](../type-aliases/QueryColumn.md)[] | Ordered metadata corresponding to each cell in a result row. |\n| <a id=\"property-rowhandles\"></a> `rowHandles` | [`DatabaseRow`](../../row/classes/DatabaseRow.md)[] | Source row handles in result order; empty for aggregates and virtual tables. |\n| <a id=\"property-rows\"></a> `rows` | ([`SqlCell`](../../../../../generated/storage/types.gen/type-aliases/SqlCell.md) \\| `null`)[][] | Dynamic tagged cells in column order; empty cells are null. |\n| <a id=\"property-sourcetable\"></a> `sourceTable?` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Persisted source table when results correspond to individual rows. |\n\n\n<!-- src/entities/databases/query/interfaces/QueryTableVersion.md -->\n# Interface: QueryTableVersion\n\nA version observed on a typed table handle, reusable as a write guard.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table whose version was observed. |\n| <a id=\"property-version\"></a> `version` | `number` | Opaque version to pass back as an optimistic write guard. |\n\n\n<!-- src/entities/databases/query/type-aliases/QueryColumn.md -->\n# Type Alias: QueryColumn\n\n> **QueryColumn** = `Omit`\\<[`ResultColumn`](../../../../../generated/storage/types.gen/type-aliases/ResultColumn.md), `\"relatedTable\"`\\> & \\{ `relatedTable?`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); \\}\n\nResult column metadata, including a typed relation target when visible.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `relatedTable?` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Visible target table for a relation column. |\n\n\n<!-- src/entities/databases/query/type-aliases/QueryStatement.md -->\n# Type Alias: QueryStatement\n\n> **QueryStatement** = `Extract`\\<[`SqlStatement`](../../../../../generated/storage/types.gen/type-aliases/SqlStatement.md), \\{ `kind`: `\"select\"`; \\}\\> \\| \\{ `database`: [`Database`](../../database/classes/Database.md); `kind`: `\"schema\"`; `summary`: `string`; \\} \\| \\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; \\} \\| \\{ `column`: [`DatabaseColumn`](../../column/classes/DatabaseColumn.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; `to`: `string`; \\}\n\nWhat ran, with typed handles for resources written by the statement.\n\n## Union Members\n\n`Extract`\\<[`SqlStatement`](../../../../../generated/storage/types.gen/type-aliases/SqlStatement.md), \\{ `kind`: `\"select\"`; \\}\\>\n\n***\n\n### Type Literal\n\n\\{ `database`: [`Database`](../../database/classes/Database.md); `kind`: `\"schema\"`; `summary`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | [`Database`](../../database/classes/Database.md) | Database whose schema changed. |\n| `kind` | `\"schema\"` | Schema change discriminator. |\n| `summary` | `string` | Human-readable description of the schema change. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` \\| `\"update\"` \\| `\"delete\"` | Row mutation discriminator. |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table targeted by the mutation, including zero-match writes. |\n| `tableName` | `string` | SQL name of the target table. |\n\n***\n\n### Type Literal\n\n\\{ `column`: [`DatabaseColumn`](../../column/classes/DatabaseColumn.md); `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: [`DatabaseTable`](../../table/classes/DatabaseTable.md); `tableName`: `string`; `to`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md) | Column whose type changed. |\n| `columnName` | `string` | SQL name of the changed column. |\n| `kind` | `\"alterColumnType\"` | Column type change discriminator. |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | Table containing the changed column. |\n| `tableName` | `string` | SQL name of the target table. |\n| `to` | `string` | SQL type requested by the statement. |\n\n\n<!-- src/entities/databases/row/classes/DatabaseRow.md -->\n# Class: DatabaseRow\n\nOne row of a [DatabaseTable](../../table/classes/DatabaseTable.md).\n\nA row is not an entity of its own — it is owned and shared as part of its\ndatabase. Its cells are written with ops; see Database.applyOps.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the row. |\n| <a id=\"property-table\"></a> `table` | `readonly` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | The table this row belongs to. |\n\n## Methods\n\n### history()\n\n> **history**(): `Promise`\\<[`RowHistoryEntry`](../../../../../generated/storage/types.gen/type-aliases/RowHistoryEntry.md)[]\\>\n\nEvery committed change that touched the row, newest first: who made it,\nwhen, how, and the values of the columns it touched before and after.\nA removed row's history still reads.\n\n#### Returns\n\n`Promise`\\<[`RowHistoryEntry`](../../../../../generated/storage/types.gen/type-aliases/RowHistoryEntry.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseRow`\n\nA handle to a row by id, within a table.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseRow`\n\n\n<!-- src/entities/databases/table/classes/DatabaseTable.md -->\n# Class: DatabaseTable\n\nOne table (tab) of a [Database](../../database/classes/Database.md).\n\nA table is not an entity of its own — it is owned and shared as part of its\ndatabase, and has no endpoint to read it directly. The handle resolves\nthrough [Database.schema](../../database/classes/Database.md#schema), so reads after a write see the new state.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-database\"></a> `database` | `readonly` | [`Database`](../../database/classes/Database.md) | The database this table belongs to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the table. |\n\n## Methods\n\n### addColumn()\n\n> **addColumn**(`options`): `Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\nAdd a column to this table. See [Database.addColumn](../../database/classes/Database.md#addcolumn).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`AddColumnOptions`](../../database/type-aliases/AddColumnOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)\\>\n\n***\n\n### columns()\n\n> **columns**(): `Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)[]\\>\n\nThe table's columns, in display order.\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../column/classes/DatabaseColumn.md)[]\\>\n\n***\n\n### createWebhook()\n\n> **createWebhook**(): `Promise`\\<\\{ `token`: `string`; `webhook`: [`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md); \\}\\>\n\nCreate a webhook that inserts rows here. See [Database.createWebhook](../../database/classes/Database.md#createwebhook).\n\n#### Returns\n\n`Promise`\\<\\{ `token`: `string`; `webhook`: [`DatabaseWebhook`](../../webhook/classes/DatabaseWebhook.md); \\}\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this table. See [Database.deleteTable](../../database/classes/Database.md#deletetable).\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md)\\>\n\nThe table's record as the API returns it: the table, its columns, and\nits views.\n\n#### Returns\n\n`Promise`\\<[`TableDetail`](../../../../../generated/storage/types.gen/type-aliases/TableDetail.md)\\>\n\n***\n\n### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe table's display name.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe table's fractional index within the database's tab order.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`DatabaseTable`\\>\n\nRename only if the last-read display name is still current.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>\n\n***\n\n### reorderColumns()\n\n> **reorderColumns**(`columns`): `Promise`\\<`DatabaseTable`\\>\n\nPersist a new column order. See [Database.reorderColumns](../../database/classes/Database.md#reordercolumns).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `columns` | [`DatabaseColumn`](../../column/classes/DatabaseColumn.md)[] |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>\n\n***\n\n### row()\n\n> **row**(`id`): [`DatabaseRow`](../../row/classes/DatabaseRow.md)\n\nA handle to one of the table's rows, by the id an insert answered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`DatabaseRow`](../../row/classes/DatabaseRow.md)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `databaseId`: `string`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `databaseId`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `databaseId` | `string` |\n| `id` | `string` |\n\n***\n\n### version()\n\n> **version**(): `Promise`\\<`number`\\>\n\nThe table's current version, bumped by every committed change to its\nschema or rows. Schema edits such as [reorderColumns](#reordercolumns) send it as\nthe base version they were made against, so a table that moved since\nrefuses the edit with a 409.\n\n#### Returns\n\n`Promise`\\<`number`\\>\n\n***\n\n### views()\n\n> **views**(): `Promise`\\<[`DatabaseView`](../../view/classes/DatabaseView.md)[]\\>\n\nThe table's views, in their order.\n\n#### Returns\n\n`Promise`\\<[`DatabaseView`](../../view/classes/DatabaseView.md)[]\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`database`, `id`): `DatabaseTable`\n\nA handle to a table by id, within a database. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database` | [`Database`](../../database/classes/Database.md) |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseTable`\n\n\n<!-- src/entities/databases/view/classes/DatabaseView.md -->\n# Class: DatabaseView\n\nOne view of a [DatabaseTable](../../table/classes/DatabaseTable.md): which of its rows to show, in what\norder, drawn as a table or a board.\n\nA view is not an entity of its own — it is owned and shared as part of its\ndatabase. The handle resolves through the database's schema, so a fresh\nread after a write sees the new value. Views are created, changed, and\nreordered with ops; see Database.applyOps.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the view. |\n| <a id=\"property-table\"></a> `table` | `readonly` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | The table this view shows. |\n\n## Methods\n\n### detail()\n\n> **detail**(): `Promise`\\<[`DatabaseView`](../../../../../generated/storage/types.gen/type-aliases/DatabaseView.md)\\>\n\nThe view's record as the API returns it.\n\n#### Returns\n\n`Promise`\\<[`DatabaseView`](../../../../../generated/storage/types.gen/type-aliases/DatabaseView.md)\\>\n\n***\n\n### layout()\n\n> **layout**(): `Promise`\\<[`ViewLayout`](../../../../../generated/storage/types.gen/type-aliases/ViewLayout.md)\\>\n\nHow the view draws its rows: a table, or a board grouped by a column.\n\n#### Returns\n\n`Promise`\\<[`ViewLayout`](../../../../../generated/storage/types.gen/type-aliases/ViewLayout.md)\\>\n\n***\n\n### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe view's name, unique among its table's views ignoring case.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe view's fractional index within its table's views.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### positions()\n\n> **positions**(): `Promise`\\<[`CardPosition`](../../../../../generated/storage/types.gen/type-aliases/CardPosition.md)[]\\>\n\nWhere a board's cards sit: each placed card's lane and its key there.\nCards without a place show after the placed ones of their lane, oldest\nfirst.\n\n#### Returns\n\n`Promise`\\<[`CardPosition`](../../../../../generated/storage/types.gen/type-aliases/CardPosition.md)[]\\>\n\n***\n\n### query()\n\n> **query**(): `Promise`\\<[`ViewQuery`](../../../../../generated/storage/types.gen/type-aliases/ViewQuery.md)\\>\n\nWhich rows the view shows, and in what order.\n\n#### Returns\n\n`Promise`\\<[`ViewQuery`](../../../../../generated/storage/types.gen/type-aliases/ViewQuery.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseView`\n\nA handle to a view by id, within a table. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseView`\n\n\n<!-- src/entities/databases/webhook/classes/DatabaseWebhook.md -->\n# Class: DatabaseWebhook\n\nA webhook of a [DatabaseTable](../../table/classes/DatabaseTable.md): a secret URL that anyone holding it\ncan POST JSON to, each object becoming a row, written with the access of\nthe user who created it. Its token is shown only when it is created; see\nDatabase.createWebhook.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-createdby\"></a> `createdBy` | `readonly` | [`User`](../../../users/user/classes/User.md) | Who created it; its calls write with their access. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the webhook. |\n| <a id=\"property-table\"></a> `table` | `readonly` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) | The table its calls insert rows into. |\n\n## Accessors\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen it was created.\n\n##### Returns\n\n`string`\n\n***\n\n### tokenPrefix\n\n#### Get Signature\n\n> **get** **tokenPrefix**(): `string`\n\nThe token's first characters, to tell webhooks apart without the secret.\n\n##### Returns\n\n`string`\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the webhook; its URL stops working.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |\n| `tokenPrefix` | `string` |\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`table`, `createdBy`, `record`): `DatabaseWebhook`\n\nA handle from the record the API answered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | [`DatabaseTable`](../../table/classes/DatabaseTable.md) |\n| `createdBy` | [`User`](../../../users/user/classes/User.md) |\n| `record` | [`DatabaseWebhookResponse`](../../../../../generated/storage/types.gen/type-aliases/DatabaseWebhookResponse.md) |\n\n#### Returns\n\n`DatabaseWebhook`\n"- },- {- "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### byTeamSlug()\n\n> **byTeamSlug**(`slug`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nResolve a team task reference such as ENG-42.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `slug` | `string` |\n\n#### Returns\n\n`Promise`\\<[`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### createCanvas()\n\n> **createCanvas**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a native Canvas with shared content ready for reading and editing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\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### createUpload()\n\n> **createUpload**(`options`): `Promise`\\<\\{ `content`: [`DocumentContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentContent.md); `contentType`: `string`; `document`: [`Document`](../../document/classes/Document.md); `uploadUrl`: `string` \\| `undefined`; \\}\\>\n\nReserve a binary document and return upload instructions. Upload content before saving.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `attachment?`: [`EmailAttachment`](../../../email/attachment/classes/EmailAttachment.md); `branchedFrom?`: [`Document`](../../document/classes/Document.md); `fileType?`: `string`; `isTask?`: `boolean`; `mimeType?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); `sha`: `string`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `options.attachment?` | [`EmailAttachment`](../../../email/attachment/classes/EmailAttachment.md) |\n| `options.branchedFrom?` | [`Document`](../../document/classes/Document.md) |\n| `options.fileType?` | `string` |\n| `options.isTask?` | `boolean` |\n| `options.mimeType?` | `string` |\n| `options.name` | `string` |\n| `options.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n| `options.sha` | `string` |\n| `options.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<\\{ `content`: [`DocumentContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentContent.md); `contentType`: `string`; `document`: [`Document`](../../document/classes/Document.md); `uploadUrl`: `string` \\| `undefined`; \\}\\>\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\n### validatePermissionsToken()\n\n> **validatePermissionsToken**(`token`): `Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `document`: [`Document`](../../document/classes/Document.md); `expiresAt`: `number`; `issuer`: `string`; `user`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; \\}\\>\n\nValidate a permissions token, returning its document and optional user handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `document`: [`Document`](../../document/classes/Document.md); `expiresAt`: `number`; `issuer`: `string`; `user`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; \\}\\>\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/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/Anchor.md -->\n# Type Alias: Anchor\n\n> **Anchor** = [`PdfAnchor`](PdfAnchor.md)\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/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\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/DocumentResponseMetadata.md -->\n# Type Alias: DocumentResponseMetadata\n\n> **DocumentResponseMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `documentBom?`: [`BomPart`](BomPart.md)[] \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentId`: `string`; `documentName`: `string`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `modificationData?`: `unknown`; `owner`: `string`; `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-documentbom\"></a> `documentBom?` | [`BomPart`](BomPart.md)[] \\| `null` | If the document is a DOCX document, 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 |\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-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/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/EditPdfPlaceableCommentAnchorRequest.md -->\n# Type Alias: EditPdfPlaceableCommentAnchorRequest\n\n> **EditPdfPlaceableCommentAnchorRequest** = \\{ `allowableEdits?`: `unknown`; `heightPct?`: `number` \\| `null`; `originalIndex?`: `number` \\| `null`; `originalPage?`: `number` \\| `null`; `page?`: `number` \\| `null`; `rotation?`: `number` \\| `null`; `shouldLockOnSave?`: `boolean` \\| `null`; `uuid`: `string`; `wasDeleted?`: `boolean` \\| `null`; `wasEdited?`: `boolean` \\| `null`; `widthPct?`: `number` \\| `null`; `xPct?`: `number` \\| `null`; `yPct?`: `number` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-allowableedits\"></a> `allowableEdits?` | `unknown` |\n| <a id=\"property-heightpct\"></a> `heightPct?` | `number` \\| `null` |\n| <a id=\"property-originalindex\"></a> `originalIndex?` | `number` \\| `null` |\n| <a id=\"property-originalpage\"></a> `originalPage?` | `number` \\| `null` |\n| <a id=\"property-page\"></a> `page?` | `number` \\| `null` |\n| <a id=\"property-rotation\"></a> `rotation?` | `number` \\| `null` |\n| <a id=\"property-shouldlockonsave\"></a> `shouldLockOnSave?` | `boolean` \\| `null` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |\n| <a id=\"property-wasdeleted\"></a> `wasDeleted?` | `boolean` \\| `null` |\n| <a id=\"property-wasedited\"></a> `wasEdited?` | `boolean` \\| `null` |\n| <a id=\"property-widthpct\"></a> `widthPct?` | `number` \\| `null` |\n| <a id=\"property-xpct\"></a> `xPct?` | `number` \\| `null` |\n| <a id=\"property-ypct\"></a> `yPct?` | `number` \\| `null` |\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/GetDocumentResponseData.md -->\n# Type Alias: GetDocumentResponseData\n\n> **GetDocumentResponseData** = \\{ `documentMetadata`: [`DocumentMetadata`](DocumentMetadata.md); `userAccessLevel`: [`AccessLevel`](AccessLevel.md); `viewLocation?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentmetadata\"></a> `documentMetadata` | [`DocumentMetadata`](DocumentMetadata.md) | The metadata of the document |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel` | [`AccessLevel`](AccessLevel.md) | The users level of access to the document |\n| <a id=\"property-viewlocation\"></a> `viewLocation?` | `string` \\| `null` | The users view location if there is one |\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/HighlightType.md -->\n# Type Alias: HighlightType\n\n> **HighlightType** = `1` \\| `2` \\| `3`\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/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\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/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\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/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfAnchor.md -->\n# Type Alias: PdfAnchor\n\n> **PdfAnchor** = [`PdfPlaceableCommentAnchor`](PdfPlaceableCommentAnchor.md) & \\{ `anchorType`: `\"placeable\"`; \\} \\| [`PdfHighlightAnchor`](PdfHighlightAnchor.md) & \\{ `anchorType`: `\"highlight\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightAnchor.md -->\n# Type Alias: PdfHighlightAnchor\n\n> **PdfHighlightAnchor** = \\{ `alpha`: `number`; `blue`: `number`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentId`: `string`; `green`: `number`; `highlightRects`: [`PdfHighlightRect`](PdfHighlightRect.md)[]; `highlightType`: [`HighlightType`](HighlightType.md); `owner`: `string`; `page`: `number`; `pageViewportHeight`: `number`; `pageViewportWidth`: `number`; `red`: `number`; `rootId?`: `string` \\| `null`; `text`: `string`; `updatedAt?`: `string` \\| `null`; `uuid`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-alpha\"></a> `alpha` | `number` |\n| <a id=\"property-blue\"></a> `blue` | `number` |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` |\n| <a id=\"property-documentid\"></a> `documentId` | `string` |\n| <a id=\"property-green\"></a> `green` | `number` |\n| <a id=\"property-highlightrects\"></a> `highlightRects` | [`PdfHighlightRect`](PdfHighlightRect.md)[] |\n| <a id=\"property-highlighttype\"></a> `highlightType` | [`HighlightType`](HighlightType.md) |\n| <a id=\"property-owner\"></a> `owner` | `string` |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-pageviewportheight\"></a> `pageViewportHeight` | `number` |\n| <a id=\"property-pageviewportwidth\"></a> `pageViewportWidth` | `number` |\n| <a id=\"property-red\"></a> `red` | `number` |\n| <a id=\"property-rootid\"></a> `rootId?` | `string` \\| `null` |\n| <a id=\"property-text\"></a> `text` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightAnchorRequest.md -->\n# Type Alias: PdfHighlightAnchorRequest\n\n> **PdfHighlightAnchorRequest** = \\{ `alpha`: `number`; `blue`: `number`; `green`: `number`; `highlightRects`: [`PdfHighlightRectAnchorRequest`](PdfHighlightRectAnchorRequest.md)[]; `highlightType`: [`HighlightType`](HighlightType.md); `page`: `number`; `pageViewportHeight`: `number`; `pageViewportWidth`: `number`; `red`: `number`; `text`: `string`; `uuid?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-alpha\"></a> `alpha` | `number` |\n| <a id=\"property-blue\"></a> `blue` | `number` |\n| <a id=\"property-green\"></a> `green` | `number` |\n| <a id=\"property-highlightrects\"></a> `highlightRects` | [`PdfHighlightRectAnchorRequest`](PdfHighlightRectAnchorRequest.md)[] |\n| <a id=\"property-highlighttype\"></a> `highlightType` | [`HighlightType`](HighlightType.md) |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-pageviewportheight\"></a> `pageViewportHeight` | `number` |\n| <a id=\"property-pageviewportwidth\"></a> `pageViewportWidth` | `number` |\n| <a id=\"property-red\"></a> `red` | `number` |\n| <a id=\"property-text\"></a> `text` | `string` |\n| <a id=\"property-uuid\"></a> `uuid?` | `string` \\| `null` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightRect.md -->\n# Type Alias: PdfHighlightRect\n\n> **PdfHighlightRect** = \\{ `height`: `number`; `id`: `number`; `left`: `number`; `top`: `number`; `width`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `number` |\n| <a id=\"property-id\"></a> `id` | `number` |\n| <a id=\"property-left\"></a> `left` | `number` |\n| <a id=\"property-top\"></a> `top` | `number` |\n| <a id=\"property-width\"></a> `width` | `number` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightRectAnchorRequest.md -->\n# Type Alias: PdfHighlightRectAnchorRequest\n\n> **PdfHighlightRectAnchorRequest** = \\{ `height`: `number`; `left`: `number`; `top`: `number`; `width`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `number` |\n| <a id=\"property-left\"></a> `left` | `number` |\n| <a id=\"property-top\"></a> `top` | `number` |\n| <a id=\"property-width\"></a> `width` | `number` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfPlaceableCommentAnchor.md -->\n# Type Alias: PdfPlaceableCommentAnchor\n\n> **PdfPlaceableCommentAnchor** = \\{ `allowableEdits?`: `unknown`; `documentId`: `string`; `heightPct`: `number`; `originalIndex`: `number`; `originalPage`: `number`; `owner`: `string`; `page`: `number`; `rootId?`: `string` \\| `null`; `rotation`: `number`; `shouldLockOnSave`: `boolean`; `uuid`: `string`; `wasDeleted`: `boolean`; `wasEdited`: `boolean`; `widthPct`: `number`; `xPct`: `number`; `yPct`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-allowableedits\"></a> `allowableEdits?` | `unknown` |\n| <a id=\"property-documentid\"></a> `documentId` | `string` |\n| <a id=\"property-heightpct\"></a> `heightPct` | `number` |\n| <a id=\"property-originalindex\"></a> `originalIndex` | `number` |\n| <a id=\"property-originalpage\"></a> `originalPage` | `number` |\n| <a id=\"property-owner\"></a> `owner` | `string` |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-rootid\"></a> `rootId?` | `string` \\| `null` |\n| <a id=\"property-rotation\"></a> `rotation` | `number` |\n| <a id=\"property-shouldlockonsave\"></a> `shouldLockOnSave` | `boolean` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |\n| <a id=\"property-wasdeleted\"></a> `wasDeleted` | `boolean` |\n| <a id=\"property-wasedited\"></a> `wasEdited` | `boolean` |\n| <a id=\"property-widthpct\"></a> `widthPct` | `number` |\n| <a id=\"property-xpct\"></a> `xPct` | `number` |\n| <a id=\"property-ypct\"></a> `yPct` | `number` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.md -->\n# Type Alias: PreSaveDocumentResponseData\n\n> **PreSaveDocumentResponseData** = \\{ `presignedUrls`: [`PresignedUrl`](PresignedUrl.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurls\"></a> `presignedUrls` | [`PresignedUrl`](PresignedUrl.md)[] | Contains any presigned urls you need to upload specific bom parts with. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresignedUrl.md -->\n# Type Alias: PresignedUrl\n\n> **PresignedUrl** = \\{ `presignedUrl`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurl\"></a> `presignedUrl` | `string` | The presigned url used to upload the sha |\n| <a id=\"property-sha\"></a> `sha` | `string` | The sha of the item |\n\n\n<!-- generated/storage/types.gen/type-aliases/SaveBomPart.md -->\n# Type Alias: SaveBomPart\n\n> **SaveBomPart** = \\{ `path`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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/SaveDocumentRequest.md -->\n# Type Alias: SaveDocumentRequest\n\n> **SaveDocumentRequest** = \\{ `modificationData?`: `unknown`; `newBom?`: [`SaveBomPart`](SaveBomPart.md)[] \\| `null`; `sha?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-modificationdata\"></a> `modificationData?` | `unknown` | The modification data for the document instance. Used to store highlights and other overlays onto a static file |\n| <a id=\"property-newbom\"></a> `newBom?` | [`SaveBomPart`](SaveBomPart.md)[] \\| `null` | **DOCX ONLY** The updated BOM for the document. Containing the file path and the sha. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The sha of the new document. This is used to generate a presigned url to upload the new document content to s3. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md -->\n# Type Alias: SaveDocumentResponseData\n\n> **SaveDocumentResponseData** = \\{ `documentMetadata`: [`DocumentResponseMetadata`](DocumentResponseMetadata.md); `presignedUrl?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentmetadata\"></a> `documentMetadata` | [`DocumentResponseMetadata`](DocumentResponseMetadata.md) | The updated document metadata |\n| <a id=\"property-presignedurl\"></a> `presignedUrl?` | `string` \\| `null` | If the document is an editable file, we provide a presigned url to save the updated file to. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\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/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\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/anchor/classes/DocumentAnchor.md -->\n# Class: DocumentAnchor\n\nA PDF annotation scoped to its document.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Anchor`](../../../../../generated/storage/types.gen/type-aliases/Anchor.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-document\"></a> `document` | `readonly` | [`Document`](../../document/classes/Document.md) | Owning document. | - |\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-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`\"highlight\"` \\| `\"placeable\"`\\> | Annotation kind. | - |\n| <a id=\"property-page\"></a> `page` | `readonly` | () => `Promise`\\<`number`\\> | Page containing the annotation. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete a standalone highlight annotation.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### edit()\n\n> **edit**(`options`): `Promise`\\<`void`\\>\n\nEdit a placeable comment's position and display settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`EditPdfPlaceableCommentAnchorRequest`](../../../../../generated/storage/types.gen/type-aliases/EditPdfPlaceableCommentAnchorRequest.md), `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`PdfAnchor`](../../../../../generated/storage/types.gen/type-aliases/PdfAnchor.md); `documentId`: `string`; `id`: `string`; \\}\n\nSerialize identity with its owning resource.\n\n#### Returns\n\n\\{ `detail?`: [`PdfAnchor`](../../../../../generated/storage/types.gen/type-aliases/PdfAnchor.md); `documentId`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`PdfAnchor`](../../../../../generated/storage/types.gen/type-aliases/PdfAnchor.md) |\n| `documentId` | `string` |\n| `id` | `string` |\n\n#### Overrides\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `document`, `id`): `DocumentAnchor`\n\nConstruct a document scoped annotation handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | [`Document`](../../document/classes/Document.md) |\n| `id` | `string` |\n\n#### Returns\n\n`DocumentAnchor`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `document`, `record`): `DocumentAnchor`\n\nSeed an annotation from a document annotation listing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | [`Document`](../../document/classes/Document.md) |\n| `record` | [`PdfAnchor`](../../../../../generated/storage/types.gen/type-aliases/PdfAnchor.md) |\n\n#### Returns\n\n`DocumentAnchor`\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-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\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### anchors()\n\n> **anchors**(): `Promise`\\<[`DocumentAnchor`](../../anchor/classes/DocumentAnchor.md)[]\\>\n\nPDF annotations in this document.\n\n#### Returns\n\n`Promise`\\<[`DocumentAnchor`](../../anchor/classes/DocumentAnchor.md)[]\\>\n\n***\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### createHighlight()\n\n> **createHighlight**(`options`): `Promise`\\<[`DocumentAnchor`](../../anchor/classes/DocumentAnchor.md)\\>\n\nCreate a standalone PDF highlight.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`PdfHighlightAnchorRequest`](../../../../../generated/storage/types.gen/type-aliases/PdfHighlightAnchorRequest.md), `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<[`DocumentAnchor`](../../anchor/classes/DocumentAnchor.md)\\>\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### meetingNotes()\n\n> **meetingNotes**(): `Promise`\\<\\{ `eventTitle`: `string`; `note`: [`CalendarNote`](../../../calendar/note/classes/CalendarNote.md); \\}[]\\>\n\nMeeting links visible to the reader. Owners also receive unavailable grants and may unlink them to revoke meeting/team access.\n\n#### Returns\n\n`Promise`\\<\\{ `eventTitle`: `string`; `note`: [`CalendarNote`](../../../calendar/note/classes/CalendarNote.md); \\}[]\\>\n\n***\n\n### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.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### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\n\n***\n\n### permissionsToken()\n\n> **permissionsToken**(): `Promise`\\<`string`\\>\n\nMint a scoped permissions token.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### prepareSave()\n\n> **prepareSave**(`parts`): `Promise`\\<[`PreSaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.md)\\>\n\nPrepare multipart content saving and return the service's upload instructions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `parts` | [`SaveBomPart`](../../../../../generated/storage/types.gen/type-aliases/SaveBomPart.md)[] |\n\n#### Returns\n\n`Promise`\\<[`PreSaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.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### 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### save()\n\n> **save**(`options`): `Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\nCommit uploaded content. Does not retry uncertain writes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`SaveDocumentRequest`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.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### 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### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\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### simpleSave()\n\n> **simpleSave**(): `Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\nCommit a simple document save.\n\n#### Returns\n\n`Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\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### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Comment`](../../comment/classes/Comment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`Comment`](../../comment/classes/Comment.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Comment`](../../comment/classes/Comment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\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### version()\n\n> **version**(`version`): [`DocumentVersion`](../../version/classes/DocumentVersion.md)\n\nA handle to an immutable version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `version` | `number` |\n\n#### Returns\n\n[`DocumentVersion`](../../version/classes/DocumentVersion.md)\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### byTeamSlug()\n\n> **byTeamSlug**(`slug`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nResolve a team task reference such as ENG-42.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `slug` | `string` |\n\n#### Returns\n\n`Promise`\\<[`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### createCanvas()\n\n> **createCanvas**(`opts`): `Promise`\\<[`Document`](../../document/classes/Document.md)\\>\n\nCreate a native Canvas with shared content ready for reading and editing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); \\} |\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### createUpload()\n\n> **createUpload**(`options`): `Promise`\\<\\{ `content`: [`DocumentContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentContent.md); `contentType`: `string`; `document`: [`Document`](../../document/classes/Document.md); `uploadUrl`: `string` \\| `undefined`; \\}\\>\n\nReserve a binary document and return upload instructions. Upload content before saving.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `attachment?`: [`EmailAttachment`](../../../email/attachment/classes/EmailAttachment.md); `branchedFrom?`: [`Document`](../../document/classes/Document.md); `fileType?`: `string`; `isTask?`: `boolean`; `mimeType?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); `sha`: `string`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `options.attachment?` | [`EmailAttachment`](../../../email/attachment/classes/EmailAttachment.md) |\n| `options.branchedFrom?` | [`Document`](../../document/classes/Document.md) |\n| `options.fileType?` | `string` |\n| `options.isTask?` | `boolean` |\n| `options.mimeType?` | `string` |\n| `options.name` | `string` |\n| `options.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n| `options.sha` | `string` |\n| `options.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<\\{ `content`: [`DocumentContent`](../../../../../generated/storage/types.gen/type-aliases/DocumentContent.md); `contentType`: `string`; `document`: [`Document`](../../document/classes/Document.md); `uploadUrl`: `string` \\| `undefined`; \\}\\>\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\n### validatePermissionsToken()\n\n> **validatePermissionsToken**(`token`): `Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `document`: [`Document`](../../document/classes/Document.md); `expiresAt`: `number`; `issuer`: `string`; `user`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; \\}\\>\n\nValidate a permissions token, returning its document and optional user handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `document`: [`Document`](../../document/classes/Document.md); `expiresAt`: `number`; `issuer`: `string`; `user`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; \\}\\>\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\n\n<!-- src/entities/documents/version/classes/DocumentVersion.md -->\n# Class: DocumentVersion\n\nAn immutable document version, scoped to its document.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-document\"></a> `document` | `readonly` | [`Document`](../../document/classes/Document.md) | Parent document. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `number` | Version number. |\n\n## Methods\n\n### read()\n\n> **read**(): `Promise`\\<[`GetDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/GetDocumentResponseData.md)\\>\n\nVersion metadata and the caller's access.\n\n#### Returns\n\n`Promise`\\<[`GetDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/GetDocumentResponseData.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `documentId`: `string`; `id`: `number`; \\}\n\nSerialize only scoped identity.\n\n#### Returns\n\n\\{ `documentId`: `string`; `id`: `number`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `documentId` | `string` |\n| `id` | `number` |\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `document`, `id`): `DocumentVersion`\n\nConstruct a version handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | [`Document`](../../document/classes/Document.md) |\n| `id` | `number` |\n\n#### Returns\n\n`DocumentVersion`\n"- },- {- "name": "email",- "description": "Search, read, draft, and send email.",- "overview": "<!-- src/entities/email/draft/type-aliases/DraftOptions.md -->\n# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md), `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: [`EmailMessage`](../../message/classes/EmailMessage.md); `thread?`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | Message being replied to. |\n| `thread?` | [`EmailThread`](../../thread/classes/EmailThread.md) | Thread receiving this draft. |\n\n\n<!-- src/entities/email/filter/interfaces/EmailFilterOptions.md -->\n# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |\n\n\n<!-- src/entities/email/message/interfaces/SendEmailOptions.md -->\n# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n\n\n<!-- src/entities/email/namespace/classes/EmailNamespace.md -->\n# Class: EmailNamespace\n\n## Constructors\n\n### Constructor\n\n> **new EmailNamespace**(`client`): `EmailNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EmailNamespace`\n\n## Methods\n\n### archive()\n\n> **archive**(`threads`, `archived?`): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)[]\\>\n\nArchive many threads (or unarchive with `false`). Resolves to the threads\nwhose state could not change.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `threads` | [`EmailThread`](../../thread/classes/EmailThread.md)[] | `undefined` |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)[]\\>\n\n***\n\n### attachment()\n\n> **attachment**(`id`): [`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\n***\n\n### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`EmailThread`](../../thread/classes/EmailThread.md)\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailThread`](../../thread/classes/EmailThread.md)\n\n***\n\n### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\n***\n\n### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../../draft/type-aliases/DraftOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\n***\n\n### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### draftById()\n\n> **draftById**(`id`): [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n***\n\n### filters()\n\n> **filters**(`inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\n***\n\n### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`InboxOptions`](../interfaces/InboxOptions.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### label()\n\n> **label**(`id`): [`Label`](../../label/classes/Label.md)\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Label`](../../label/classes/Label.md)\n\n***\n\n### labels()\n\n> **labels**(): `Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\n***\n\n### link()\n\n> **link**(`id`): [`Link`](../../link/classes/Link.md)\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Link`](../../link/classes/Link.md)\n\n***\n\n### links()\n\n> **links**(): `Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n***\n\n### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\n***\n\n### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: [`Link`](../../link/classes/Link.md)[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\n***\n\n### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: [`Link`](../../link/classes/Link.md); `pageSize?`: `number`; \\} |\n| `options.inbox?` | [`Link`](../../link/classes/Link.md) |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### send()\n\n> **send**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`EmailFilterOptions`](../../filter/interfaces/EmailFilterOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\n\n<!-- src/entities/email/namespace/interfaces/InboxOptions.md -->\n# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | [`ApiSortMethod`](../../../../../generated/email/types.gen/type-aliases/ApiSortMethod.md) | Sort order. Defaults to `viewed_updated`. |\n",- "documentation": "# Macro SDK: email\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/auth/types.gen/type-aliases/EmailConnectionProviders.md -->\n# Type Alias: EmailConnectionProviders\n\n> **EmailConnectionProviders** = \\{ `gmail`: `boolean`; `outlook`: `boolean`; `outlook_admin_consent_url?`: `string` \\| `null`; \\}\n\nActual deployment availability for the provider selector.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-gmail\"></a> `gmail` | `boolean` | - |\n| <a id=\"property-outlook\"></a> `outlook` | `boolean` | - |\n| <a id=\"property-outlook_admin_consent_url\"></a> `outlook_admin_consent_url?` | `string` \\| `null` | Where a Microsoft 365 administrator approves Macro for their whole directory. Present when Outlook is configured and the request named an `original_url` for the administrator's browser to return to. |\n\n\n<!-- generated/email/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/email/types.gen/type-aliases/ApiAttachmentDraft.md -->\n# Type Alias: ApiAttachmentDraft\n\n> **ApiAttachmentDraft** = \\{ `content_id?`: `string` \\| `null`; `content_type`: `string`; `draft_id`: `string`; `file_name`: `string`; `id`: `string`; `is_inline`: `boolean`; `s3_key`: `string`; `sha`: `string`; `size`: `number`; `upload_pending`: `boolean`; \\}\n\nAPI representation of a draft attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-content_type\"></a> `content_type` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-file_name\"></a> `file_name` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_inline\"></a> `is_inline` | `boolean` |\n| <a id=\"property-s3_key\"></a> `s3_key` | `string` |\n| <a id=\"property-sha\"></a> `sha` | `string` |\n| <a id=\"property-size\"></a> `size` | `number` |\n| <a id=\"property-upload_pending\"></a> `upload_pending` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiAttachmentForwarded.md -->\n# Type Alias: ApiAttachmentForwarded\n\n> **ApiAttachmentForwarded** = \\{ `attachment_id`: `string`; `draft_id`: `string`; `filename?`: `string` \\| `null`; `message_provider_id`: `string`; `mime_type?`: `string` \\| `null`; `provider_attachment_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a forwarded attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment_id\"></a> `attachment_id` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-message_provider_id\"></a> `message_provider_id` | `string` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_attachment_id\"></a> `provider_attachment_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiContactInfo.md -->\n# Type Alias: ApiContactInfo\n\n> **ApiContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nAPI representation of a contact (sender or recipient).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftContactInfo.md -->\n# Type Alias: ApiDraftContactInfo\n\n> **ApiDraftContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nContact info for draft request/response (backward-compatible with MessageToSend shape).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Email address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | Profile photo URL. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiDraftInput.md -->\n# Type Alias: ApiDraftInput\n\n> **ApiDraftInput** = \\{ `bcc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `body_html?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `cc?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; `db_id?`: `string` \\| `null`; `draft_generation?`: `number`; `headers_json?`: `null` \\| [`Value`](Value.md); `include_signature?`: `boolean` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `subject`: `string`; `thread_db_id?`: `string` \\| `null`; `to?`: [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null`; \\}\n\nThe draft input matching the current `MessageToSend` JSON shape for backward compat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Bcc recipients. |\n| <a id=\"property-body_html\"></a> `body_html?` | `string` \\| `null` | HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage. |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | Macro body format. |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | Plain text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | Cc recipients. |\n| <a id=\"property-db_id\"></a> `db_id?` | `string` \\| `null` | Existing message DB ID (for updating an existing draft). |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation from the last loaded draft; legacy clients begin at zero. |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `null` \\| [`Value`](Value.md) | - |\n| <a id=\"property-include_signature\"></a> `include_signature?` | `boolean` \\| `null` | Per-message override for whether to include the signature on send: `Some(false)` to exclude (user dismissed it). Omit to use the inbox's default policy. Ignored for drafts. |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | Provider message ID. |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | Provider thread ID. |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | ID of the message this draft is replying to. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id?` | `string` \\| `null` | Thread DB ID. |\n| <a id=\"property-to\"></a> `to?` | [`ApiDraftContactInfo`](ApiDraftContactInfo.md)[] \\| `null` | To recipients. |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiEmailFilter.md -->\n# Type Alias: ApiEmailFilter\n\n> **ApiEmailFilter** = \\{ `created_at`: `string`; `email_address?`: `string` \\| `null`; `email_domain?`: `string` \\| `null`; `id`: `string`; `is_important`: `boolean`; \\}\n\nA single email filter in API responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-email_address\"></a> `email_address?` | `string` \\| `null` |\n| <a id=\"property-email_domain\"></a> `email_domain?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_important\"></a> `is_important` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabel.md -->\n# Type Alias: ApiLabel\n\n> **ApiLabel** = \\{ `createdAt`: `string`; `id`: `string`; `labelListVisibility`: [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `linkId`: `string`; `messageListVisibility`: [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name`: `string`; `providerLabelId`: `string`; `type`: [`ApiLabelType`](ApiLabelType.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-linkid\"></a> `linkId` | `string` |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-providerlabelid\"></a> `providerLabelId` | `string` |\n| <a id=\"property-type\"></a> `type` | [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelListVisibility.md -->\n# Type Alias: ApiLabelListVisibility\n\n> **ApiLabelListVisibility** = `\"LabelShow\"` \\| `\"LabelShowIfUnread\"` \\| `\"LabelHide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiLabelType.md -->\n# Type Alias: ApiLabelType\n\n> **ApiLabelType** = `\"System\"` \\| `\"User\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessage.md -->\n# Type Alias: ApiMessage\n\n> **ApiMessage** = \\{ `attachments`: [`ApiMessageAttachment`](ApiMessageAttachment.md)[]; `attachments_draft`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `attachments_forwarded`: [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[]; `bcc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `body_html_sanitized?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_replyless?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `calendar_invitations?`: [`CalendarInvitation`](CalendarInvitation.md)[]; `cc`: [`ApiContactInfo`](ApiContactInfo.md)[]; `created_at`: `string`; `db_id`: `string`; `draft_generation`: `number`; `from?`: `null` \\| [`ApiContactInfo`](ApiContactInfo.md); `global_id?`: `string` \\| `null`; `has_attachments`: `boolean`; `headers_json?`: `unknown`; `internal_date_ts?`: `string` \\| `null`; `is_draft`: `boolean`; `is_read`: `boolean`; `is_sent`: `boolean`; `is_starred`: `boolean`; `labels`: [`ApiMessageLabel`](ApiMessageLabel.md)[]; `link_id`: `string`; `operation_status?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); `provider_history_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `scheduled_send_status?`: `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md); `scheduled_send_time?`: `string` \\| `null`; `sent_at?`: `string` \\| `null`; `size_estimate?`: `number` \\| `null`; `snippet?`: `string` \\| `null`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ApiContactInfo`](ApiContactInfo.md)[]; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiMessageAttachment`](ApiMessageAttachment.md)[] | - |\n| <a id=\"property-attachments_draft\"></a> `attachments_draft` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] | - |\n| <a id=\"property-attachments_forwarded\"></a> `attachments_forwarded` | [`ApiAttachmentForwarded`](ApiAttachmentForwarded.md)[] | - |\n| <a id=\"property-bcc\"></a> `bcc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-body_html_sanitized\"></a> `body_html_sanitized?` | `string` \\| `null` | - |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | - |\n| <a id=\"property-body_replyless\"></a> `body_replyless?` | `string` \\| `null` | - |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | - |\n| <a id=\"property-calendar_invitations\"></a> `calendar_invitations?` | [`CalendarInvitation`](CalendarInvitation.md)[] | - |\n| <a id=\"property-cc\"></a> `cc` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation` | `number` | Draft edit generation; changes at send and cancellation boundaries. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ApiContactInfo`](ApiContactInfo.md) | - |\n| <a id=\"property-global_id\"></a> `global_id?` | `string` \\| `null` | - |\n| <a id=\"property-has_attachments\"></a> `has_attachments` | `boolean` | - |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `unknown` | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-is_draft\"></a> `is_draft` | `boolean` | - |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` | - |\n| <a id=\"property-is_sent\"></a> `is_sent` | `boolean` | - |\n| <a id=\"property-is_starred\"></a> `is_starred` | `boolean` | - |\n| <a id=\"property-labels\"></a> `labels` | [`ApiMessageLabel`](ApiMessageLabel.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-operation_status\"></a> `operation_status?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) | - |\n| <a id=\"property-provider_history_id\"></a> `provider_history_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | - |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | - |\n| <a id=\"property-scheduled_send_status\"></a> `scheduled_send_status?` | `null` \\| [`ScheduledSendStatus`](ScheduledSendStatus.md) | - |\n| <a id=\"property-scheduled_send_time\"></a> `scheduled_send_time?` | `string` \\| `null` | - |\n| <a id=\"property-sent_at\"></a> `sent_at?` | `string` \\| `null` | - |\n| <a id=\"property-size_estimate\"></a> `size_estimate?` | `number` \\| `null` | - |\n| <a id=\"property-snippet\"></a> `snippet?` | `string` \\| `null` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ApiContactInfo`](ApiContactInfo.md)[] | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageAttachment.md -->\n# Type Alias: ApiMessageAttachment\n\n> **ApiMessageAttachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a provider attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageLabel.md -->\n# Type Alias: ApiMessageLabel\n\n> **ApiMessageLabel** = \\{ `created_at`: `string`; `id?`: `string` \\| `null`; `label_list_visibility?`: `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md); `link_id`: `string`; `message_list_visibility?`: `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md); `name?`: `string` \\| `null`; `provider_label_id`: `string`; `type_?`: `null` \\| [`ApiLabelType`](ApiLabelType.md); \\}\n\nAPI representation of a label on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` |\n| <a id=\"property-label_list_visibility\"></a> `label_list_visibility?` | `null` \\| [`ApiLabelListVisibility`](ApiLabelListVisibility.md) |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-message_list_visibility\"></a> `message_list_visibility?` | `null` \\| [`ApiMessageListVisibility`](ApiMessageListVisibility.md) |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-provider_label_id\"></a> `provider_label_id` | `string` |\n| <a id=\"property-type_\"></a> `type_?` | `null` \\| [`ApiLabelType`](ApiLabelType.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageListVisibility.md -->\n# Type Alias: ApiMessageListVisibility\n\n> **ApiMessageListVisibility** = `\"Show\"` \\| `\"Hide\"`\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperation.md -->\n# Type Alias: ApiMessageOperation\n\n> **ApiMessageOperation** = \\{ `issue?`: `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; `state`: [`ApiMessageOperationState`](ApiMessageOperationState.md); \\}\n\nVersions are opaque decimal strings so clients never truncate an i64.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-issue\"></a> `issue?` | `null` \\| [`ApiMessageOperationIssue`](ApiMessageOperationIssue.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n| <a id=\"property-state\"></a> `state` | [`ApiMessageOperationState`](ApiMessageOperationState.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationIssue.md -->\n# Type Alias: ApiMessageOperationIssue\n\n> **ApiMessageOperationIssue** = `\"ACCEPTING_REMOTE\"` \\| `\"DRAFT_CONFLICT\"` \\| `\"CREATION_UNKNOWN\"` \\| `\"ATTACHMENT_UNKNOWN\"` \\| `\"SEND_UNKNOWN\"` \\| `\"SEND_REJECTED\"` \\| `\"ACCESS_REVOKED\"` \\| `\"INVALID_CONTENT\"` \\| `\"MOVE_PENDING\"` \\| `\"MOVE_CONFLICT\"` \\| `\"MOVE_SOURCE_SENT\"` \\| `\"MOVE_REAUTHORIZATION\"` \\| `\"MOVE_ORIGINAL_REMAINS\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageOperationState.md -->\n# Type Alias: ApiMessageOperationState\n\n> **ApiMessageOperationState** = `\"PENDING\"` \\| `\"SYNCHRONIZED\"` \\| `\"CONFLICT\"` \\| `\"UNCERTAIN\"` \\| `\"SUBMITTING\"` \\| `\"CONFIRMING\"` \\| `\"SENT\"` \\| `\"DELETED\"` \\| `\"CANCELLED\"` \\| `\"FAILED\"`\n\nProvider-neutral state exposed to clients.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiMessageResolutionAction.md -->\n# Type Alias: ApiMessageResolutionAction\n\n> **ApiMessageResolutionAction** = `\"keep_local\"` \\| `\"use_provider\"` \\| `\"recheck\"` \\| `\"retry_send\"` \\| `\"keep_original\"`\n\nA deliberate resolution of a particular observed operation version.\n\n\n<!-- generated/email/types.gen/type-aliases/ApiSortMethod.md -->\n# Type Alias: ApiSortMethod\n\n> **ApiSortMethod** = `\"viewed_at\"` \\| `\"updated_at\"` \\| `\"created_at\"` \\| `\"viewed_updated\"`\n\ncommon types of sorts based on timestamps\n\n\n<!-- generated/email/types.gen/type-aliases/ApiThread.md -->\n# Type Alias: ApiThread\n\n> **ApiThread** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `created_at`: `string`; `db_id`: `string`; `inbox_visible`: `boolean`; `is_read`: `boolean`; `latest_inbound_message_ts?`: `string` \\| `null`; `latest_non_spam_message_ts?`: `string` \\| `null`; `latest_outbound_message_ts?`: `string` \\| `null`; `link_id`: `string`; `messages`: [`ApiMessage`](ApiMessage.md)[]; `project_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-inbox_visible\"></a> `inbox_visible` | `boolean` |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` |\n| <a id=\"property-latest_inbound_message_ts\"></a> `latest_inbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_non_spam_message_ts\"></a> `latest_non_spam_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_outbound_message_ts\"></a> `latest_outbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-messages\"></a> `messages` | [`ApiMessage`](ApiMessage.md)[] |\n| <a id=\"property-project_id\"></a> `project_id?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Attachment.md -->\n# Type Alias: Attachment\n\n> **Attachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAttachments of a message, as sent to us by the provider.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` | - |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` | - |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` | Cloud reference: open this provider page instead of downloading bytes. |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` | - |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/AttendeeResponseStatus.md -->\n# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarAttendee.md -->\n# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: [`AttendeeResponseStatus`](AttendeeResponseStatus.md); \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | [`AttendeeResponseStatus`](AttendeeResponseStatus.md) | RSVP state. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEvent.md -->\n# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: [`CalendarAttendee`](CalendarAttendee.md)[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| [`ConferenceProvider`](ConferenceProvider.md); `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: [`EventType`](EventType.md); `guestPolicy`: [`GuestPolicy`](GuestPolicy.md); `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: [`EventReminders`](EventReminders.md); `sequence`: `number`; `sources?`: [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[]; `status`: [`EventStatus`](EventStatus.md); `time`: [`EventTime`](EventTime.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `updatedAt`: `string`; `viewerCan`: [`ViewerCapabilities`](ViewerCapabilities.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`CalendarAttendee`](CalendarAttendee.md)[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| [`ConferenceProvider`](ConferenceProvider.md) | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | [`EventType`](EventType.md) | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | [`GuestPolicy`](GuestPolicy.md) | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | [`EventReminders`](EventReminders.md) | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | [`CalendarEventSourceContent`](CalendarEventSourceContent.md)[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | [`EventStatus`](EventStatus.md) | Event status. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | [`ViewerCapabilities`](ViewerCapabilities.md) | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarEventSourceContent.md -->\n# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: [`EventType`](EventType.md); `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: [`EventReminders`](EventReminders.md); `title`: `string`; `transparency`: [`EventTransparency`](EventTransparency.md); `visibility`: [`EventVisibility`](EventVisibility.md); \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | [`EventType`](EventType.md) | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | [`EventReminders`](EventReminders.md) | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | [`EventTransparency`](EventTransparency.md) | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | [`EventVisibility`](EventVisibility.md) | Event visibility. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarInvitation.md -->\n# Type Alias: CalendarInvitation\n\n> **CalendarInvitation** = \\{ `attendees`: [`InvitationParticipant`](InvitationParticipant.md)[]; `comment?`: `string` \\| `null`; `conference_url?`: `string` \\| `null`; `description?`: `string` \\| `null`; `dtstamp?`: `string` \\| `null`; `end?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `id`: `string`; `last_modified?`: `string` \\| `null`; `location?`: `string` \\| `null`; `method`: [`InvitationMethod`](InvitationMethod.md); `organizer?`: `null` \\| [`InvitationParticipant`](InvitationParticipant.md); `recurrence?`: `string`[] \\| `null`; `recurrence_id?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `recurrence_id_raw?`: `string` \\| `null`; `sequence`: `number`; `start?`: `null` \\| [`InvitationDateTime`](InvitationDateTime.md); `status?`: `string` \\| `null`; `title?`: `string` \\| `null`; `uid`: `string`; \\}\n\nDisplay snapshot of one meaningful VEVENT, owned by the email domain.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | [`InvitationParticipant`](InvitationParticipant.md)[] | Historical attendee identities and participation metadata. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Reply or counter-proposal comment. |\n| <a id=\"property-conference_url\"></a> `conference_url?` | `string` \\| `null` | Validated HTTP(S) conferencing URL; never fetched during rendering. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Plaintext description, retaining passwords and dial-in instructions. |\n| <a id=\"property-dtstamp\"></a> `dtstamp?` | `string` \\| `null` | Scheduling timestamp in its original spelling. |\n| <a id=\"property-end\"></a> `end?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | Content-derived component identity, stable across repeated extraction. |\n| <a id=\"property-last_modified\"></a> `last_modified?` | `string` \\| `null` | Last modification timestamp in its original spelling. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Plaintext event location. |\n| <a id=\"property-method\"></a> `method` | [`InvitationMethod`](InvitationMethod.md) | Original scheduling method. |\n| <a id=\"property-organizer\"></a> `organizer?` | `null` \\| [`InvitationParticipant`](InvitationParticipant.md) | - |\n| <a id=\"property-recurrence\"></a> `recurrence?` | `string`[] \\| `null` | Raw `RRULE`, `RDATE` and `EXDATE` lines, empty for a single event. `None` on snapshots saved before recurrence was recorded, where a series cannot be told apart from a single event. |\n| <a id=\"property-recurrence_id\"></a> `recurrence_id?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-recurrence_id_raw\"></a> `recurrence_id_raw?` | `string` \\| `null` | Original recurrence identifier spelling and parameters. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Scheduling revision, distinct from delivery order. |\n| <a id=\"property-start\"></a> `start?` | `null` \\| [`InvitationDateTime`](InvitationDateTime.md) | - |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | Original event status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Event summary. |\n| <a id=\"property-uid\"></a> `uid` | `string` | iCalendar UID; never a Google provider event ID. |\n\n\n<!-- generated/email/types.gen/type-aliases/CalendarOccurrence.md -->\n# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: [`EventTime`](EventTime.md); \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | [`EventTime`](EventTime.md) | Instance time. |\n\n\n<!-- generated/email/types.gen/type-aliases/ConferenceProvider.md -->\n# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfo.md -->\n# Type Alias: ContactInfo\n\n> **ContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoLegacy.md -->\n# Type Alias: ContactInfoLegacy\n\n> **ContactInfoLegacy** = \\{ `email`: `string`; `email_address`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-email_address\"></a> `email_address` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |\n\n\n<!-- generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md -->\n# Type Alias: ContactInfoWithInteraction\n\n> **ContactInfoWithInteraction** = [`ContactInfoLegacy`](ContactInfoLegacy.md) & \\{ `last_interaction`: `string`; \\}\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `last_interaction` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminderOverride.md -->\n# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventReminders.md -->\n# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: [`EventReminderOverride`](EventReminderOverride.md)[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | [`EventReminderOverride`](EventReminderOverride.md)[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventStatus.md -->\n# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.\n\n\n<!-- generated/email/types.gen/type-aliases/EventTime.md -->\n# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |\n\n\n<!-- generated/email/types.gen/type-aliases/EventTransparency.md -->\n# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.\n\n\n<!-- generated/email/types.gen/type-aliases/EventType.md -->\n# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.\n\n\n<!-- generated/email/types.gen/type-aliases/EventVisibility.md -->\n# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponse.md -->\n# Type Alias: GetAttachmentResponse\n\n> **GetAttachmentResponse** = \\{ `attachment`: [`Attachment`](Attachment.md); \\}\n\nThe response returned from the get attachment endpoint\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment\"></a> `attachment` | [`Attachment`](Attachment.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetAttachmentResponses.md -->\n# Type Alias: GetAttachmentResponses\n\n> **GetAttachmentResponses** = \\{ `200`: [`GetAttachmentResponse`](GetAttachmentResponse.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`GetAttachmentResponse`](GetAttachmentResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GetMessageResponses.md -->\n# Type Alias: GetMessageResponses\n\n> **GetMessageResponses** = \\{ `200`: [`ParsedMessage`](ParsedMessage.md); \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | [`ParsedMessage`](ParsedMessage.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/GuestPolicy.md -->\n# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationDateTime.md -->\n# Type Alias: InvitationDateTime\n\n> **InvitationDateTime** = \\{ `kind`: `\"date\"`; `value`: `string`; \\} \\| \\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\} \\| \\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\nPreserve date-only and unresolved times without manufacturing UTC instants.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `value` | `string` | ISO calendar date. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"zoned\"` | - |\n| `time_zone` | `string` | IANA zone of the original TZID, or UTC. |\n| `value` | `string` | RFC3339 instant. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"unresolved\"` | - |\n| `time_zone?` | `string` \\| `null` | Original TZID if present. |\n| `value` | `string` | ISO local wall time, without an offset. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationMethod.md -->\n# Type Alias: InvitationMethod\n\n> **InvitationMethod** = `\"request\"` \\| `\"reply\"` \\| `\"cancel\"` \\| `\"counter\"` \\| `\"publish\"` \\| `\"unknown\"`\n\nOriginal scheduling method, including methods unsupported for actions.\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationParticipant.md -->\n# Type Alias: InvitationParticipant\n\n> **InvitationParticipant** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `participation_status?`: `string` \\| `null`; \\}\n\nScheduling participant; saved responses are historical, not current RSVP.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Participant calendar address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Sender-supplied display name. |\n| <a id=\"property-participation_status\"></a> `participation_status?` | `string` \\| `null` | Original PARTSTAT, retaining extensions. |\n\n\n<!-- generated/email/types.gen/type-aliases/InvitationResolution.md -->\n# Type Alias: InvitationResolution\n\n> **InvitationResolution** = \\{ `kind`: `\"disconnected\"`; \\} \\| \\{ `kind`: `\"still_syncing\"`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\} \\| \\{ `kind`: `\"unavailable\"`; \\} \\| \\{ `kind`: `\"no_match\"`; \\} \\| \\{ `kind`: `\"ambiguous\"`; \\} \\| \\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\nRefreshable result, distinct from the immutable email contents.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"still_syncing\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unavailable\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"no_match\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"ambiguous\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: [`CalendarEvent`](CalendarEvent.md); `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: [`CalendarOccurrence`](CalendarOccurrence.md); `responding_email`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `can_join` | `boolean` | Whether the conference link belongs to the reconciled scheduling target. |\n| `can_respond` | `boolean` | Whether a response is currently allowed. |\n| `event` | [`CalendarEvent`](CalendarEvent.md) | Current occurrence-specific content. |\n| `is_stale` | `boolean` | Whether the provider projection trails the email revision. |\n| `kind` | `\"resolved\"` | - |\n| `occurrence` | [`CalendarOccurrence`](CalendarOccurrence.md) | Original occurrence identity and current time. |\n| `responding_email` | `string` | Connected address that would respond. |\n\n\n<!-- generated/email/types.gen/type-aliases/LabelInfo.md -->\n# Type Alias: LabelInfo\n\n> **LabelInfo** = \\{ `name`: `string`; `provider_id`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-provider_id\"></a> `provider_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/Link.md -->\n# Type Alias: Link\n\n> **Link** = \\{ `calendar_disabled`: `boolean`; `created_at`: `string`; `email_address`: `string`; `fusionauth_user_id`: `string`; `has_calendar_data`: `boolean`; `id`: `string`; `is_primary`: `boolean`; `is_sync_active`: `boolean`; `macro_id`: `string`; `needs_calendar_permission`: `boolean`; `needs_reauth`: `boolean`; `photo_url?`: `string` \\| `null`; `provider`: [`UserProvider`](UserProvider.md); `settings`: [`Settings`](Settings.md); `sync_status`: [`SyncStatus`](SyncStatus.md); `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar_disabled\"></a> `calendar_disabled` | `boolean` | Whether the user turned calendar off for this inbox, which also removed its calendar data. `needs_calendar_permission` is true either way, so this is what separates \"never granted\" from \"deliberately off\" — unprompted calendar nags must stay quiet for the latter. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-email_address\"></a> `email_address` | `string` | - |\n| <a id=\"property-fusionauth_user_id\"></a> `fusionauth_user_id` | `string` | - |\n| <a id=\"property-has_calendar_data\"></a> `has_calendar_data` | `boolean` | Whether Macro holds calendar data for this inbox. Drives the turn-off control on its own, so removing that data never depends on the recorded scopes still matching the set Macro requests today — a set that changes as the integration narrows, stranding data behind a capability check that no longer recognizes an older grant. |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_primary\"></a> `is_primary` | `boolean` | - |\n| <a id=\"property-is_sync_active\"></a> `is_sync_active` | `boolean` | - |\n| <a id=\"property-macro_id\"></a> `macro_id` | `string` | - |\n| <a id=\"property-needs_calendar_permission\"></a> `needs_calendar_permission` | `boolean` | Whether the link's Google grant is missing the calendar scope. True for inboxes connected before the calendar capability existed (and for grants where the user declined it); drives the per-inbox calendar upgrade prompt. Re-running the connect flow records the new grant. |\n| <a id=\"property-needs_reauth\"></a> `needs_reauth` | `boolean` | Whether the link's Google grant needs to be reconnected. Drives the per-inbox reconnect prompt independently of the sync-status badge. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | The inbox's own profile photo (its self-contact's SFS photo), if synced. |\n| <a id=\"property-provider\"></a> `provider` | [`UserProvider`](UserProvider.md) | - |\n| <a id=\"property-settings\"></a> `settings` | [`Settings`](Settings.md) | - |\n| <a id=\"property-sync_status\"></a> `sync_status` | [`SyncStatus`](SyncStatus.md) | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxAction.md -->\n# Type Alias: MailboxAction\n\n> **MailboxAction** = \\{ `kind`: `\"read\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"archived\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"junk\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\nDesired organization state. Categories never stand in for folders or flags.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"read\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"read\"` | - |\n| `value` | `boolean` | Mark correspondence read or unread. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"flagged\"` | - |\n| `value` | `boolean` | Set the follow-up star. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"archived\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"archived\"` | - |\n| `value` | `boolean` | Archive inbox messages, or restore received correspondence to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"trashed\"` | - |\n| `value` | `boolean` | Move to recoverable trash, or restore correspondence to Inbox (drafts to Drafts). |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"junk\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"junk\"` | - |\n| `value` | `boolean` | Move to junk, or restore to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"category\"` | - |\n| `value` | \\{ `name`: `string`; `present`: `boolean`; \\} | Add/remove a category while preserving other provider assignments. |\n| `value.name` | `string` | - |\n| `value.present` | `boolean` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperation.md -->\n# Type Alias: MailboxOperation\n\n> **MailboxOperation** = \\{ `action`: [`MailboxAction`](MailboxAction.md); `id`: `string`; `state`: [`MailboxOperationState`](MailboxOperationState.md); `updated_at`: `string`; \\}\n\nDurable outcome of an accepted organization action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-action\"></a> `action` | [`MailboxAction`](MailboxAction.md) |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-state\"></a> `state` | [`MailboxOperationState`](MailboxOperationState.md) |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxOperationState.md -->\n# Type Alias: MailboxOperationState\n\n> **MailboxOperationState** = `\"pending\"` \\| `\"applied\"` \\| `\"failed\"` \\| `\"cancelled\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsChange.md -->\n# Type Alias: MailboxSettingsChange\n\n> **MailboxSettingsChange** = `\"create_label\"` \\| `\"delete_label\"` \\| `\"sender_block\"`\n\n\n<!-- generated/email/types.gen/type-aliases/MailboxSettingsOperation.md -->\n# Type Alias: MailboxSettingsOperation\n\n> **MailboxSettingsOperation** = \\{ `enabled`: `boolean`; `id`: `string`; `kind`: [`MailboxSettingsChange`](MailboxSettingsChange.md); `needs_attention`: `boolean`; `resource`: `string`; \\}\n\nAn accepted inbox configuration change awaiting provider confirmation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-kind\"></a> `kind` | [`MailboxSettingsChange`](MailboxSettingsChange.md) |\n| <a id=\"property-needs_attention\"></a> `needs_attention` | `boolean` |\n| <a id=\"property-resource\"></a> `resource` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/MessageOperationResponse.md -->\n# Type Alias: MessageOperationResponse\n\n> **MessageOperationResponse** = \\{ `operation?`: `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md); \\}\n\nAuthorized polling response. Gmail has no asynchronous draft operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-operation\"></a> `operation?` | `null` \\| [`ApiMessageOperation`](ApiMessageOperation.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/ParsedMessage.md -->\n# Type Alias: ParsedMessage\n\n> **ParsedMessage** = \\{ `bcc`: [`ContactInfo`](ContactInfo.md)[]; `body_parsed?`: `string` \\| `null`; `cc`: [`ContactInfo`](ContactInfo.md)[]; `db_id`: `string`; `draft_generation?`: `number`; `from?`: `null` \\| [`ContactInfo`](ContactInfo.md); `internal_date_ts?`: `string` \\| `null`; `labels`: [`LabelInfo`](LabelInfo.md)[]; `link_id`: `string`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: [`ContactInfo`](ContactInfo.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-body_parsed\"></a> `body_parsed?` | `string` \\| `null` | - |\n| <a id=\"property-cc\"></a> `cc` | [`ContactInfo`](ContactInfo.md)[] | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Draft edit generation captured with this message snapshot. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| [`ContactInfo`](ContactInfo.md) | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-labels\"></a> `labels` | [`LabelInfo`](LabelInfo.md)[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | [`ContactInfo`](ContactInfo.md)[] | - |\n\n\n<!-- generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md -->\n# Type Alias: ResolveMessageOperationRequest\n\n> **ResolveMessageOperationRequest** = \\{ `accept_duplicate_risk?`: `boolean`; `action`: [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md); `remote_version?`: `string` \\| `null`; `revision`: `string`; \\}\n\nStale versions fail without altering the current operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-accept_duplicate_risk\"></a> `accept_duplicate_risk?` | `boolean` |\n| <a id=\"property-action\"></a> `action` | [`ApiMessageResolutionAction`](ApiMessageResolutionAction.md) |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/ScheduledSendStatus.md -->\n# Type Alias: ScheduledSendStatus\n\n> **ScheduledSendStatus** = `\"pending\"` \\| `\"sending\"` \\| `\"failed\"` \\| `\"unconfirmed\"`\n\nThe user-visible delivery state of an unsent scheduled message.\n\n\n<!-- generated/email/types.gen/type-aliases/Settings.md -->\n# Type Alias: Settings\n\n> **Settings** = \\{ `signature?`: `string` \\| `null`; `signature_on_replies_forwards?`: `boolean` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-signature\"></a> `signature?` | `string` \\| `null` | The user's email signature content (HTML). On a patch, omit or send `null` to leave unchanged (both deserialize to `None`); pass an empty string to clear it. The column cannot be set to SQL NULL via patch. |\n| <a id=\"property-signature_on_replies_forwards\"></a> `signature_on_replies_forwards?` | `boolean` \\| `null` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/SyncStatus.md -->\n# Type Alias: SyncStatus\n\n> **SyncStatus** = `\"SYNCING\"` \\| `\"UP_TO_DATE\"` \\| `\"ERROR\"` \\| `\"NEEDS_REAUTH\"` \\| `\"INACTIVE\"`\n\nCoarse sync state for an inbox, used to render a one-line hint in the\nmulti-inbox settings list. Derived from the link's `is_sync_active` flag, its\nreauth health, and its most recent backfill job.\n\n\n<!-- generated/email/types.gen/type-aliases/ThreadStateField.md -->\n# Type Alias: ThreadStateField\n\n> **ThreadStateField** = `\"read\"` \\| `\"starred\"` \\| `\"trashed\"` \\| `\"junk\"`\n\nSemantic mailbox facts, independent of folder/category names.\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftRequest.md -->\n# Type Alias: TransferDraftRequest\n\n> **TransferDraftRequest** = \\{ `destination_link_id`: `string`; `draft_generation?`: `number`; `operation_id`: `string`; \\}\n\nReuse the same operation ID when retrying after a lost response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-destination_link_id\"></a> `destination_link_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation captured with the source draft. |\n| <a id=\"property-operation_id\"></a> `operation_id` | `string` | - |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferDraftResponse.md -->\n# Type Alias: TransferDraftResponse\n\n> **TransferDraftResponse** = \\{ `attachments`: [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[]; `message_id`: `string`; `source_id`: `string`; `source_thread_id`: `string`; `thread_id`: `string`; \\}\n\nA new identity prevents delayed writes from mutating the moved copy.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | [`ApiAttachmentDraft`](ApiAttachmentDraft.md)[] |\n| <a id=\"property-message_id\"></a> `message_id` | `string` |\n| <a id=\"property-source_id\"></a> `source_id` | `string` |\n| <a id=\"property-source_thread_id\"></a> `source_thread_id` | `string` |\n| <a id=\"property-thread_id\"></a> `thread_id` | `string` |\n\n\n<!-- generated/email/types.gen/type-aliases/TransferRecoveryResponse.md -->\n# Type Alias: TransferRecoveryResponse\n\n> **TransferRecoveryResponse** = \\{ `committed?`: `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md); \\}\n\nA null result confirms that the move cannot commit, even if its request was delayed.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-committed\"></a> `committed?` | `null` \\| [`TransferDraftResponse`](TransferDraftResponse.md) |\n\n\n<!-- generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md -->\n# Type Alias: UpdateThreadStateRequest\n\n> **UpdateThreadStateRequest** = \\{ `field`: [`ThreadStateField`](ThreadStateField.md); `value`: `boolean`; \\}\n\nDesired state for every applicable message in an authorized thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-field\"></a> `field` | [`ThreadStateField`](ThreadStateField.md) |\n| <a id=\"property-value\"></a> `value` | `boolean` |\n\n\n<!-- generated/email/types.gen/type-aliases/UserProvider.md -->\n# Type Alias: UserProvider\n\n> **UserProvider** = `\"GMAIL\"` \\| `\"OUTLOOK\"`\n\n\n<!-- generated/email/types.gen/type-aliases/Value.md -->\n# Type Alias: Value\n\n> **Value** = `unknown`\n\n\n<!-- generated/email/types.gen/type-aliases/ViewerCapabilities.md -->\n# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |\n\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/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/EmailFollowup.md -->\n# Type Alias: EmailFollowup\n\n> **EmailFollowup** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `linkId`: `string`; `remindAt`: `string`; `reminderId`: `string`; `revision`: `string`; `state`: [`FollowupState`](FollowupState.md); `threadId`: `string`; \\}\n\nPublic status shown on email and in the Reminders editor.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Condition, defaulting to no reply for new follow-ups. |\n| <a id=\"property-linkid\"></a> `linkId` | `string` | Canonical owned/delegated inbox. |\n| <a id=\"property-remindat\"></a> `remindAt` | `string` | Confirmed schedule. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | Identity of the snooze and its delivery records. |\n| <a id=\"property-revision\"></a> `revision` | `string` | Last accepted operation; edits/removal compare this to prevent stale undo. |\n| <a id=\"property-state\"></a> `state` | [`FollowupState`](FollowupState.md) | Durable lifecycle progress. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Conversation identity. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupCommand.md -->\n# Type Alias: EmailFollowupCommand\n\n> **EmailFollowupCommand** = \\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\} \\| \\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\nIdempotent email command. Reusing an operation ID with different data fails.\n\n## Union Members\n\n### Type Literal\n\n\\{ `condition`: [`EmailReminderCondition`](EmailReminderCondition.md); `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition` | [`EmailReminderCondition`](EmailReminderCondition.md) | Reply condition. |\n| `expectedRevision?` | `string` \\| `null` | None for creation, the current revision for edits. |\n| `operationId` | `string` | Unique request identity retained across network retries. |\n| `remindAt` | `string` | One future instant; conditional recurrence is deliberately absent. |\n| `type` | `\"set\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `expectedRevision` | `string` | Reject removal if a newer edit has replaced this operation. |\n| `operationId` | `string` | Unique request identity. |\n| `type` | `\"remove\"` | - |\n| `undo?` | `boolean` | Undo restores original visibility; ordinary Remove returns to inbox. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailFollowupResponse.md -->\n# Type Alias: EmailFollowupResponse\n\n> **EmailFollowupResponse** = \\{ `followup?`: `null` \\| [`EmailFollowup`](EmailFollowup.md); \\}\n\nLookup response, including an email with no follow-up yet.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-followup\"></a> `followup?` | `null` \\| [`EmailFollowup`](EmailFollowup.md) |\n\n\n<!-- generated/storage/types.gen/type-aliases/EmailReminderCondition.md -->\n# Type Alias: EmailReminderCondition\n\n> **EmailReminderCondition** = `\"if_no_reply\"` \\| `\"regardless\"`\n\nWhen an email follow-up should return the conversation.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FollowupState.md -->\n# Type Alias: FollowupState\n\n> **FollowupState** = `\"archiving\"` \\| `\"pending\"` \\| `\"returning\"` \\| `\"returned\"` \\| `\"cancelled\"` \\| `\"removed\"`\n\nDurable progress of an email operation.\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/email/attachment/classes/EmailAttachment.md -->\n# Class: EmailAttachment\n\nA file attached to an email message. A thin handle keyed by attachment id;\nthe record loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailAttachmentData`](../type-aliases/EmailAttachmentData.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-contentid\"></a> `contentId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's Content-ID header value (for inline attachments). | - |\n| <a id=\"property-dataurl\"></a> `dataUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A URL to the attachment's raw data, when available. | - |\n| <a id=\"property-filename\"></a> `filename` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's original filename. | - |\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-mimetype\"></a> `mimeType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's MIME type. | - |\n| <a id=\"property-sfsid\"></a> `sfsId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's static-file-service id, when it has been stored there. | - |\n| <a id=\"property-size\"></a> `size` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | The attachment's size in bytes. | - |\n\n## Methods\n\n### toDocument()\n\n> **toDocument**(): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\nThe Macro document holding this attachment's content. Get-or-create: the\nserver returns the existing document's id, or downloads the attachment\nfrom the provider and uploads it as a new document first (deduplicated\nbehind a server-side lock).\n\n#### Returns\n\n`Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.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`, `id`): `EmailAttachment`\n\nA handle to an attachment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailAttachment`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailAttachment`\n\nBuild an attachment from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`Attachment`](../../../../../generated/email/types.gen/type-aliases/Attachment.md) |\n\n#### Returns\n\n`EmailAttachment`\n\n\n<!-- src/entities/email/attachment/type-aliases/EmailAttachmentData.md -->\n# Type Alias: EmailAttachmentData\n\n> **EmailAttachmentData** = [`GetAttachmentResponses`](../../../../../generated/email/types.gen/type-aliases/GetAttachmentResponses.md)\\[`200`\\]\\[`\"attachment\"`\\]\n\nThe API's representation of an email attachment (`Attachment`).\n\n\n<!-- src/entities/email/draft/classes/DraftAttachment.md -->\n# Class: DraftAttachment\n\nAn uploaded or forwarded attachment belonging to a draft.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `readonly` | [`EmailDraft`](EmailDraft.md) | Parent draft. |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | `number` | Draft generation captured when the attachment was reserved. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | `boolean` | Whether this attachment was forwarded. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Attachment identity. |\n\n## Methods\n\n### complete()\n\n> **complete**(): `Promise`\\<`void`\\>\n\nComplete verification after uploading the file.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this attachment from its draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\nSerialize identity without credentials.\n\n#### Returns\n\n\\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `draftGeneration` | `number` |\n| `draftId` | `string` |\n| `forwarded` | `boolean` |\n| `id` | `string` |\n\n***\n\n### byId()\n\n> `static` **byId**(`_client`, `draft`, `id`, `forwarded?`, `draftGeneration?`): `DraftAttachment`\n\nConstruct a draft scoped attachment handle.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `_client` | `MacroClient` | `undefined` |\n| `draft` | [`EmailDraft`](EmailDraft.md) | `undefined` |\n| `id` | `string` | `undefined` |\n| `forwarded?` | `boolean` | `false` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`DraftAttachment`\n\n\n<!-- src/entities/email/draft/classes/EmailDraft.md -->\n# Class: EmailDraft\n\nA draft email. Sending remains an explicit separate operation.\n\n## Extends\n\n- [`EmailMessage`](../../message/classes/EmailMessage.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`bcc`](../../message/classes/EmailMessage.md#property-bcc) |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`body`](../../message/classes/EmailMessage.md#property-body) |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`cc`](../../message/classes/EmailMessage.md#property-cc) |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | Edit generation to capture with content before saving or transferring it. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#property-from) |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`EmailMessage`](../../message/classes/EmailMessage.md).[`id`](../../message/classes/EmailMessage.md#property-id) |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`labels`](../../message/classes/EmailMessage.md#property-labels) |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`link`](../../message/classes/EmailMessage.md#property-link) |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`sentAt`](../../message/classes/EmailMessage.md#property-sentat) |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`subject`](../../message/classes/EmailMessage.md#property-subject) |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | [`EmailMessage`](../../message/classes/EmailMessage.md).[`to`](../../message/classes/EmailMessage.md#property-to) |\n\n## Methods\n\n### addAttachment()\n\n> **addAttachment**(`options`): `Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\nReserve an attachment upload. Upload to the returned URL, then call complete().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `fileName`: `string`; `sha`: `string`; `size`: `number`; `uploadId?`: `string`; \\} |\n| `options.fileName` | `string` |\n| `options.sha` | `string` |\n| `options.size` | `number` |\n| `options.uploadId?` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `attachment`: [`DraftAttachment`](DraftAttachment.md); `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\n***\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`addLabel`](../../message/classes/EmailMessage.md#addlabel)\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`completeDraftAttachment`](../../message/classes/EmailMessage.md#completedraftattachment)\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### forwardAttachment()\n\n> **forwardAttachment**(`attachment`): `Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\nForward an existing attachment into this draft.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`EmailAttachment`](../../attachment/classes/EmailAttachment.md) |\n\n#### Returns\n\n`Promise`\\<[`DraftAttachment`](DraftAttachment.md)\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`operationStatus`](../../message/classes/EmailMessage.md#operationstatus)\n\n***\n\n### removeAttachment()\n\n> **removeAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nRemove a draft attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`removeLabel`](../../message/classes/EmailMessage.md#removelabel)\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`resolveOperation`](../../message/classes/EmailMessage.md#resolveoperation)\n\n***\n\n### schedule()\n\n> **schedule**(`sendTime`, `options?`): `Promise`\\<`void`\\>\n\nSchedule this draft for sending.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sendTime` | `string` |\n| `options?` | \\{ `includeSignature?`: `boolean`; \\} |\n| `options.includeSignature?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`thread`](../../message/classes/EmailMessage.md#thread)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`toJSON`](../../message/classes/EmailMessage.md#tojson)\n\n***\n\n### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`transferDraft`](../../message/classes/EmailMessage.md#transferdraft)\n\n***\n\n### unschedule()\n\n> **unschedule**(): `Promise`\\<`void`\\>\n\nRemove a scheduled send.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace draft content without changing its identity or sending it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### verifyAttachment()\n\n> **verifyAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nComplete verification of an uploaded attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | [`DraftAttachment`](DraftAttachment.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailDraft`\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailDraft`\n\n#### Overrides\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`byId`](../../message/classes/EmailMessage.md#byid)\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`from`](../../message/classes/EmailMessage.md#from)\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n#### Inherited from\n\n[`EmailMessage`](../../message/classes/EmailMessage.md).[`send`](../../message/classes/EmailMessage.md#send)\n\n\n<!-- src/entities/email/draft/functions/draftBody.md -->\n# Function: draftBody()\n\n> **draftBody**(`options`): [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\nTranslate draft content to the generated contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../type-aliases/DraftOptions.md) |\n\n## Returns\n\n[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\n\n\n<!-- src/entities/email/draft/type-aliases/DraftOptions.md -->\n# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<[`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md), `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: [`EmailMessage`](../../message/classes/EmailMessage.md); `thread?`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | [`ApiDraftInput`](../../../../../generated/email/types.gen/type-aliases/ApiDraftInput.md)\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | Message being replied to. |\n| `thread?` | [`EmailThread`](../../thread/classes/EmailThread.md) | Thread receiving this draft. |\n\n\n<!-- src/entities/email/filter/classes/EmailFilter.md -->\n# Class: EmailFilter\n\nAn importance filter matched by sender address or domain.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched address. | - |\n| <a id=\"property-emaildomain\"></a> `emailDomain` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched domain. | - |\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-isimportant\"></a> `isImportant` | `readonly` | () => `Promise`\\<`boolean`\\> | Importance assigned by this filter. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this filter.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setImportant()\n\n> **setImportant**(`isImportant`): `Promise`\\<`void`\\>\n\nChange the importance for the same sender selector.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `isImportant` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.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`, `id`, `inbox?`): `EmailFilter`\n\nConstruct a lazy filter handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `record`, `inbox?`): `EmailFilter`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`ApiEmailFilter`](../../../../../generated/email/types.gen/type-aliases/ApiEmailFilter.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`EmailFilter`\n\n\n<!-- src/entities/email/filter/interfaces/EmailFilterOptions.md -->\n# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |\n\n\n<!-- src/entities/email/label/classes/Label.md -->\n# Class: Label\n\nAn email label. A free-to-construct handle: there is no single-label GET,\nso the detail record loads lazily on first field access by listing all\nlabels and finding this one (mirroring Link).\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.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 label 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-labellistvisibility\"></a> `labelListVisibility` | `readonly` | () => `Promise`\\<[`ApiLabelListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiLabelListVisibility.md)\\> | Whether the label is shown in the label list. | - |\n| <a id=\"property-linkid\"></a> `linkId` | `readonly` | () => `Promise`\\<`string`\\> | The inbox (email link) this label belongs to. | - |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | `readonly` | () => `Promise`\\<[`ApiMessageListVisibility`](../../../../../generated/email/types.gen/type-aliases/ApiMessageListVisibility.md)\\> | Whether the label is shown in the message list. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The label's display name. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<[`ApiLabelType`](../../../../../generated/email/types.gen/type-aliases/ApiLabelType.md)\\> | Whether this is a system label or a user-created one. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this label.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiLabel`](../../../../../generated/email/types.gen/type-aliases/ApiLabel.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`, `id`): `Label`\n\nA handle to a label 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`Label`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `name`): `Promise`\\<`Label`\\>\n\nCreate a user label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Label`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Label`[]\\>\n\nAll labels across the user's inboxes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Label`[]\\>\n\n\n<!-- src/entities/email/link/classes/Link.md -->\n# Class: Link\n\nAn email link: a connected inbox (e.g. Gmail or Outlook) that threads and\nmessages sync through. A free-to-construct handle, resolved from the\ncaller's connected links.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | The inbox's email address. | - |\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-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is the user's primary inbox. | - |\n| <a id=\"property-issyncactive\"></a> `isSyncActive` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether syncing is currently active for this inbox. | - |\n| <a id=\"property-needsreauth\"></a> `needsReauth` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the inbox needs to be re-authenticated. | - |\n| <a id=\"property-photourl\"></a> `photoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The inbox's avatar URL, if any. | - |\n| <a id=\"property-provider\"></a> `provider` | `readonly` | () => `Promise`\\<[`UserProvider`](../../../../../generated/email/types.gen/type-aliases/UserProvider.md)\\> | The email provider (e.g. `GMAIL` or `OUTLOOK`). | - |\n| <a id=\"property-syncstatus\"></a> `syncStatus` | `readonly` | () => `Promise`\\<[`SyncStatus`](../../../../../generated/email/types.gen/type-aliases/SyncStatus.md)\\> | The inbox's sync status. | - |\n\n## Methods\n\n### settingsOperations()\n\n> **settingsOperations**(): `Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\nRead category and sender-policy changes for this inbox.\n\n#### Returns\n\n`Promise`\\<[`MailboxSettingsOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxSettingsOperation.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Link`](../../../../../generated/email/types.gen/type-aliases/Link.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`, `id`): `Link`\n\nA handle to an email link 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`Link`\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Link`[]\\>\n\nThe caller's connected email links.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Link`[]\\>\n\n\n<!-- src/entities/email/message/classes/EmailMessage.md -->\n# Class: EmailMessage\n\nA message in an email thread. A thin handle keyed by message id; the\nrecord loads lazily on first field access.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`EmailMessageData`](../type-aliases/EmailMessageData.md)\\>\n\n## Extended by\n\n- [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Bcc recipients. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | - |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The Cc recipients. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md) \\| `undefined`\\> | The sender. | - |\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-labels\"></a> `labels` | `readonly` | () => `Promise`\\<[`LabelInfo`](../../../../../generated/email/types.gen/type-aliases/LabelInfo.md)[]\\> | Labels on this message. | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | The inbox (email link) this message belongs to. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | - |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | - |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<[`ContactInfo`](../../../../../generated/email/types.gen/type-aliases/ContactInfo.md)[]\\> | The To recipients. | - |\n\n## Methods\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### operationStatus()\n\n> **operationStatus**(): `Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<[`MessageOperationResponse`](../../../../../generated/email/types.gen/type-aliases/MessageOperationResponse.md)\\>\n\n***\n\n### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`ResolveMessageOperationRequest`](../../../../../generated/email/types.gen/type-aliases/ResolveMessageOperationRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### thread()\n\n> **thread**(): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.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### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`TransferDraftRequest`](../../../../../generated/email/types.gen/type-aliases/TransferDraftRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`TransferDraftResponse`](../../../../../generated/email/types.gen/type-aliases/TransferDraftResponse.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailMessage`\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| `id` | `string` |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `EmailMessage`\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ParsedMessage`](../../../../../generated/email/types.gen/type-aliases/ParsedMessage.md) |\n\n#### Returns\n\n`EmailMessage`\n\n***\n\n### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | [`SendEmailOptions`](../interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>\n\n\n<!-- src/entities/email/message/interfaces/SendEmailOptions.md -->\n# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n\n\n<!-- src/entities/email/message/type-aliases/EmailMessageData.md -->\n# Type Alias: EmailMessageData\n\n> **EmailMessageData** = [`GetMessageResponses`](../../../../../generated/email/types.gen/type-aliases/GetMessageResponses.md)\\[`200`\\]\n\nThe API's representation of an email message (`ParsedMessage`).\n\n\n<!-- src/entities/email/namespace/classes/EmailNamespace.md -->\n# Class: EmailNamespace\n\n## Constructors\n\n### Constructor\n\n> **new EmailNamespace**(`client`): `EmailNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`EmailNamespace`\n\n## Methods\n\n### archive()\n\n> **archive**(`threads`, `archived?`): `Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)[]\\>\n\nArchive many threads (or unarchive with `false`). Resolves to the threads\nwhose state could not change.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `threads` | [`EmailThread`](../../thread/classes/EmailThread.md)[] | `undefined` |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<[`EmailThread`](../../thread/classes/EmailThread.md)[]\\>\n\n***\n\n### attachment()\n\n> **attachment**(`id`): [`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)\n\n***\n\n### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>\n\n***\n\n### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> **byId**(`id`): [`EmailThread`](../../thread/classes/EmailThread.md)\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailThread`](../../thread/classes/EmailThread.md)\n\n***\n\n### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<[`EmailConnectionProviders`](../../../../../generated/auth/types.gen/type-aliases/EmailConnectionProviders.md)\\>\n\n***\n\n### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`ContactInfoWithInteraction`](../../../../../generated/email/types.gen/type-aliases/ContactInfoWithInteraction.md)[]; \\}\\>\n\n***\n\n### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`DraftOptions`](../../draft/type-aliases/DraftOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)\\>\n\n***\n\n### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### draftById()\n\n> **draftById**(`id`): [`EmailDraft`](../../draft/classes/EmailDraft.md)\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailDraft`](../../draft/classes/EmailDraft.md)\n\n***\n\n### filters()\n\n> **filters**(`inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)[]\\>\n\n***\n\n### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`InboxOptions`](../interfaces/InboxOptions.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### label()\n\n> **label**(`id`): [`Label`](../../label/classes/Label.md)\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Label`](../../label/classes/Label.md)\n\n***\n\n### labels()\n\n> **labels**(): `Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<[`Label`](../../label/classes/Label.md)[]\\>\n\n***\n\n### link()\n\n> **link**(`id`): [`Link`](../../link/classes/Link.md)\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Link`](../../link/classes/Link.md)\n\n***\n\n### links()\n\n> **links**(): `Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<[`Link`](../../link/classes/Link.md)[]\\>\n\n***\n\n### message()\n\n> **message**(`id`): [`EmailMessage`](../../message/classes/EmailMessage.md)\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`EmailMessage`](../../message/classes/EmailMessage.md)\n\n***\n\n### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`TransferRecoveryResponse`](../../../../../generated/email/types.gen/type-aliases/TransferRecoveryResponse.md)\\>\n\n***\n\n### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: [`Link`](../../link/classes/Link.md)[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: [`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md); `thread`: [`EmailThread`](../../thread/classes/EmailThread.md); \\}, `any`, `any`\\>\n\n***\n\n### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: [`Link`](../../link/classes/Link.md); `pageSize?`: `number`; \\} |\n| `options.inbox?` | [`Link`](../../link/classes/Link.md) |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailDraft`](../../draft/classes/EmailDraft.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | [`SearchOpts`](../../../search/interfaces/SearchOpts.md) |\n\n#### Returns\n\n`AsyncGenerator`\\<[`EmailThread`](../../thread/classes/EmailThread.md)\\>\n\n***\n\n### send()\n\n> **send**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`SendEmailOptions`](../../message/interfaces/SendEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`EmailFilterOptions`](../../filter/interfaces/EmailFilterOptions.md) |\n| `inbox?` | [`Link`](../../link/classes/Link.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFilter`](../../filter/classes/EmailFilter.md)\\>\n\n\n<!-- src/entities/email/namespace/interfaces/InboxOptions.md -->\n# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | [`ApiSortMethod`](../../../../../generated/email/types.gen/type-aliases/ApiSortMethod.md) | Sort order. Defaults to `viewed_updated`. |\n\n\n<!-- src/entities/email/thread/classes/EmailThread.md -->\n# Class: EmailThread\n\nAn email thread. A free-to-construct handle: the detail record (including\nup to the first 100 messages) loads lazily on first field access.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ThreadDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/email/types.gen/type-aliases/AccessLevel.md)\\> | `...` | The viewer's access level to this thread. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was created. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"email_thread\"` | `'email_thread'` | Favorites identify email threads as `email_thread`. | [`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-inboxvisible\"></a> `inboxVisible` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread is visible in the inbox (i.e. not archived). | - | - |\n| <a id=\"property-isread\"></a> `isRead` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread has been read. | - | - |\n| <a id=\"property-latestinboundat\"></a> `latestInboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest inbound message, if any. | - | - |\n| <a id=\"property-latestnonspamat\"></a> `latestNonSpamAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest non-spam message, if any. | - | - |\n| <a id=\"property-latestoutboundat\"></a> `latestOutboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest outbound message, if any. | - | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<[`Link`](../../link/classes/Link.md)\\> | `...` | The inbox (email link) that owns this thread. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this thread is attached to, if any. | - | - |\n| <a id=\"property-providerid\"></a> `providerId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The provider-internal thread id (e.g. Gmail/Outlook), if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`EmailThread`\\> | `...` | Search email threads by subject and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### addEventToCalendar()\n\n> **addEventToCalendar**(`message`, `invitation`, `options?`): `Promise`\\<[`CalendarEvent`](../../../calendar/event/classes/CalendarEvent.md)\\>\n\nAdd a shared event one of this thread's messages carries (a published\n`.ics`, such as one sent with Forward by email) to one of the\nrequester's Google calendars, and return a handle to the synced\nsnapshot. The event is read from the saved message, never from the\ncaller, and lands the way [CalendarEvent.addToCalendar](../../../calendar/event/classes/CalendarEvent.md#addtocalendar) adds a\nchannel-shared one: the meeting's iCalendar UID and organizer, only the\nrequester as a guest, no join link, nobody notified. Refused with\n`invalid_input` for an invitation, which is answered from the calendar\ninstead, `already_on_calendar` when the meeting is already on one of\ntheir calendars, whichever calendar is named (it cannot be added to\nanother of theirs either), and `copy_refused` when Google will not\nimport it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | [`EmailMessage`](../../message/classes/EmailMessage.md) |\n| `invitation` | [`CalendarInvitation`](../../../../../generated/email/types.gen/type-aliases/CalendarInvitation.md) |\n| `options?` | \\{ `calendar?`: [`Calendar`](../../../calendar/calendar/classes/Calendar.md); \\} |\n| `options.calendar?` | [`Calendar`](../../../calendar/calendar/classes/Calendar.md) |\n\n#### Returns\n\n`Promise`\\<[`CalendarEvent`](../../../calendar/event/classes/CalendarEvent.md)\\>\n\n***\n\n### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### archive()\n\n> **archive**(`archived?`): `Promise`\\<`void`\\>\n\nArchive the thread (or unarchive with `false`).\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### attachments()\n\n> **attachments**(): `Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\nThe attachments across this thread's first 100 messages, pre-seeded from the thread detail.\n\n#### Returns\n\n`Promise`\\<[`EmailAttachment`](../../attachment/classes/EmailAttachment.md)[]\\>\n\n***\n\n### calendarInvitations()\n\n> **calendarInvitations**(): `Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.md); \\}\\>\n\nCalendar invitations resolved from this thread's messages.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: [`InvitationResolution`](../../../../../generated/email/types.gen/type-aliases/InvitationResolution.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### favorite()\n\n> **favorite**(): `Promise`\\<`EmailThread`\\>\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`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### followup()\n\n> **followup**(): `Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\nRead follow-up state for this thread.\n\n#### Returns\n\n`Promise`\\<[`EmailFollowupResponse`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupResponse.md)\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the thread as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### messages()\n\n> **messages**(`opts?`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\nThe messages in this thread, pre-seeded from the list endpoint.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `limit?`: `number`; `since?`: `string`; \\} |\n| `opts.limit?` | `number` |\n| `opts.since?` | `string` |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md)[]\\>\n\n***\n\n### moveToProject()\n\n> **moveToProject**(`project`): `Promise`\\<`void`\\>\n\nAttach the thread to a project, or clear the project 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### operations()\n\n> **operations**(): `Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\nRead pending or failed mailbox changes without initiating a retry.\n\n#### Returns\n\n`Promise`\\<[`MailboxOperation`](../../../../../generated/email/types.gen/type-aliases/MailboxOperation.md)[]\\>\n\n***\n\n### participants()\n\n> **participants**(): `Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\nEveryone on the thread (senders and recipients), deduped by email.\nDerived from the thread's first 100 messages.\n\n#### Returns\n\n`Promise`\\<[`ApiContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiContactInfo.md)[]\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\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### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | [`Label`](../../label/classes/Label.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reply()\n\n> **reply**(`opts`): `Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\nSend a reply within this thread. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | [`ReplyEmailOptions`](../interfaces/ReplyEmailOptions.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailMessage`](../../message/classes/EmailMessage.md) \\| `undefined`\\>\n\n***\n\n### setFollowup()\n\n> **setFollowup**(`command`): `Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.md)\\>\n\nSet or remove a follow-up using a persisted operation id and revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `command` | [`EmailFollowupCommand`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowupCommand.md) |\n\n#### Returns\n\n`Promise`\\<[`EmailFollowup`](../../../../../generated/storage/types.gen/type-aliases/EmailFollowup.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### subject()\n\n> **subject**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe thread's subject, from its first message with one.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiThread`](../../../../../generated/email/types.gen/type-aliases/ApiThread.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`\\<`EmailThread`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`unfavorite`](../../../entity/classes/PropertiedEntity.md#unfavorite)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nChange project membership or share permissions for this thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `project?`: [`Project`](../../../projects/project/classes/Project.md) \\| `null`; `sharePermission?`: [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md); \\} |\n| `options.project?` | [`Project`](../../../projects/project/classes/Project.md) \\| `null` |\n| `options.sharePermission?` | [`SharePermissionOptions`](../../../sharing/permissions/type-aliases/SharePermissionOptions.md) |\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### updateState()\n\n> **updateState**(`request`): `Promise`\\<`void`\\>\n\nUpdate provider-neutral read, trash, spam, or star state.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateThreadStateRequest`](../../../../../generated/email/types.gen/type-aliases/UpdateThreadStateRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### archiveMany()\n\n> `static` **archiveMany**(`client`, `threads`, `archived?`): `Promise`\\<`EmailThread`[]\\>\n\nArchive many threads (or unarchive with `false`), sending one request per\n100 threads. Resolves to the threads whose state could not change.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | `undefined` |\n| `threads` | `EmailThread`[] | `undefined` |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`EmailThread`[]\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `EmailThread`\n\nA handle to a thread 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`EmailThread`\n\n\n<!-- src/entities/email/thread/interfaces/ReplyEmailOptions.md -->\n# Interface: ReplyEmailOptions\n\nOptions for replying within an email thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Cc recipients. |\n| <a id=\"property-replyingto\"></a> `replyingTo?` | [`EmailMessage`](../../message/classes/EmailMessage.md) | The message being replied to. |\n| <a id=\"property-subject\"></a> `subject?` | `string` | Subject line. Defaults to the subject of the thread's first message. |\n| <a id=\"property-to\"></a> `to` | [`ApiDraftContactInfo`](../../../../../generated/email/types.gen/type-aliases/ApiDraftContactInfo.md)[] | Recipients. |\n"- },- {- "name": "favorites",- "description": "Manage favorites.",- "overview": "<!-- src/entities/favorites/namespace/classes/FavoritesNamespace.md -->\n# Class: FavoritesNamespace\n\nThe user's favorites: a manually ordered collection of entity references.\n\n## Constructors\n\n### Constructor\n\n> **new FavoritesNamespace**(`client`): `FavoritesNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FavoritesNamespace`\n\n## Methods\n\n### add()\n\n> **add**(`entity`): `Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)\\>\n\nFavorite an entity. Returns the favorite record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)\\>\n\n***\n\n### list()\n\n> **list**(`filter?`): `Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)[]\\>\n\nThe user's favorites, in manual order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `filter?` | [`FavoritesFilter`](../type-aliases/FavoritesFilter.md) |\n\n#### Returns\n\n`Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)[]\\>\n\n***\n\n### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nRemove an entity from the user's favorites.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reorder()\n\n> **reorder**(`favorites`): `Promise`\\<`void`\\>\n\nReorder the favorites: pass every favorited entity in the desired order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `favorites` | [`FavoriteEntityRef`](../../../../../generated/storage/types.gen/type-aliases/FavoriteEntityRef.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n\n<!-- src/entities/favorites/namespace/type-aliases/FavoritesFilter.md -->\n# Type Alias: FavoritesFilter\n\n> **FavoritesFilter** = \\{ `entityIds?`: `string`[]; `entityTypes?`: [`MacroEntityType`](../../../entity/type-aliases/MacroEntityType.md)[]; \\}\n\nWhich favorites to list.\n\nThe two dimensions are independent. Within one, the values are alternatives;\nbetween them they are both required, so `entityTypes: ['document']` with\n`entityIds: [a, b]` matches only documents `a` and `b`. An omitted or empty\nlist constrains nothing, which is why the default lists the whole collection.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-entityids\"></a> `entityIds?` | `string`[] |\n| <a id=\"property-entitytypes\"></a> `entityTypes?` | [`MacroEntityType`](../../../entity/type-aliases/MacroEntityType.md)[] |\n",- "documentation": "# Macro SDK: favorites\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/Favorite.md -->\n# Type Alias: Favorite\n\n> **Favorite** = \\{ `channelId?`: `string` \\| `null`; `channelType?`: `string` \\| `null`; `createdAt`: `string`; `documentSubType?`: `string` \\| `null`; `entityId`: `string`; `entityType`: `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`; `fileType?`: `string` \\| `null`; `sortOrder`: `number`; \\}\n\nA single favorited entity, including display metadata hydrated from the\nfavorited entity where available. Display names are deliberately not\nincluded: clients resolve them from the entity previews pipeline, which\nis viewer-relative for DM channels and updated by renames.\n\nA favorite is identified by `(entity_type, entity_id)` within the user's\ncollection; there is no surrogate id.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | Owning channel id of the favorited channel message, when applicable. |\n| <a id=\"property-channeltype\"></a> `channelType?` | `string` \\| `null` | Channel type (e.g. `public`, `direct_message`) of the favorited channel, when applicable. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the favorite was created. |\n| <a id=\"property-documentsubtype\"></a> `documentSubType?` | `string` \\| `null` | Document sub type (e.g. `task`) of the favorited document, when applicable. |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The id of the favorited entity. |\n| <a id=\"property-entitytype\"></a> `entityType` | `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | The type of the favorited entity. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | File type of the favorited document, when applicable. |\n| <a id=\"property-sortorder\"></a> `sortOrder` | `number` | Manual ordering value; lower sorts first. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FavoriteEntityRef.md -->\n# Type Alias: FavoriteEntityRef\n\n> **FavoriteEntityRef** = \\{ `entityId`: `string`; `entityType`: `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`; \\}\n\nA reference to a favorited entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The id of the favorited entity. |\n| <a id=\"property-entitytype\"></a> `entityType` | `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | The type of the favorited entity. |\n\n\n<!-- src/entities/favorites/namespace/classes/FavoritesNamespace.md -->\n# Class: FavoritesNamespace\n\nThe user's favorites: a manually ordered collection of entity references.\n\n## Constructors\n\n### Constructor\n\n> **new FavoritesNamespace**(`client`): `FavoritesNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FavoritesNamespace`\n\n## Methods\n\n### add()\n\n> **add**(`entity`): `Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)\\>\n\nFavorite an entity. Returns the favorite record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)\\>\n\n***\n\n### list()\n\n> **list**(`filter?`): `Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)[]\\>\n\nThe user's favorites, in manual order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `filter?` | [`FavoritesFilter`](../type-aliases/FavoritesFilter.md) |\n\n#### Returns\n\n`Promise`\\<[`Favorite`](../../../../../generated/storage/types.gen/type-aliases/Favorite.md)[]\\>\n\n***\n\n### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nRemove an entity from the user's favorites.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reorder()\n\n> **reorder**(`favorites`): `Promise`\\<`void`\\>\n\nReorder the favorites: pass every favorited entity in the desired order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `favorites` | [`FavoriteEntityRef`](../../../../../generated/storage/types.gen/type-aliases/FavoriteEntityRef.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n\n<!-- src/entities/favorites/namespace/type-aliases/FavoritesFilter.md -->\n# Type Alias: FavoritesFilter\n\n> **FavoritesFilter** = \\{ `entityIds?`: `string`[]; `entityTypes?`: [`MacroEntityType`](../../../entity/type-aliases/MacroEntityType.md)[]; \\}\n\nWhich favorites to list.\n\nThe two dimensions are independent. Within one, the values are alternatives;\nbetween them they are both required, so `entityTypes: ['document']` with\n`entityIds: [a, b]` matches only documents `a` and `b`. An omitted or empty\nlist constrains nothing, which is why the default lists the whole collection.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-entityids\"></a> `entityIds?` | `string`[] |\n| <a id=\"property-entitytypes\"></a> `entityTypes?` | [`MacroEntityType`](../../../entity/type-aliases/MacroEntityType.md)[] |\n"- },- {- "name": "foreignEntities",- "description": "Resolve linked external entities.",- "overview": "<!-- src/entities/foreign/namespace/classes/ForeignEntityNamespace.md -->\n# Class: ForeignEntityNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ForeignEntityNamespace**(`client`): `ForeignEntityNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ForeignEntityNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\n\n***\n\n### bySource()\n\n> **bySource**(`source`, `foreignEntityId`): `Promise`\\<[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\\>\n\nLook a foreign entity up by the identifier its source system assigned.\n\n`foreignEntityId` may contain slashes — sources store them inside the\nidentifier, for example `owner/repo/pull/12`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | `string` |\n| `foreignEntityId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\\>\n\n***\n\n### githubPullRequestFacets()\n\n> **githubPullRequestFacets**(): `Promise`\\<[`GithubPullRequestFacets`](../interfaces/GithubPullRequestFacets.md)\\>\n\nRepositories, authors, assignees, and labels among the GitHub pull\nrequests visible to the authenticated user and their team, each with how\nmany pull requests it covers. A pull request visible to both the user and\nthe team counts once.\n\n#### Returns\n\n`Promise`\\<[`GithubPullRequestFacets`](../interfaces/GithubPullRequestFacets.md)\\>\n\n\n<!-- src/entities/foreign/namespace/interfaces/GithubPullRequestFacets.md -->\n# Interface: GithubPullRequestFacets\n\nRepositories, authors, assignees, and labels among the GitHub pull requests\nvisible to the caller.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-assignees\"></a> `assignees` | [`GithubUserFacet`](../type-aliases/GithubUserFacet.md)[] | Assignees, most pull requests first. |\n| <a id=\"property-authors\"></a> `authors` | [`GithubUserFacet`](../type-aliases/GithubUserFacet.md)[] | Authors, most pull requests first. |\n| <a id=\"property-labels\"></a> `labels` | [`GithubLabelFacet`](../type-aliases/GithubLabelFacet.md)[] | Labels, most pull requests first. |\n| <a id=\"property-repositories\"></a> `repositories` | [`GithubRepositoryFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubRepositoryFacet.md)[] | Repositories, most pull requests first. |\n\n\n<!-- src/entities/foreign/namespace/type-aliases/GithubLabelFacet.md -->\n# Type Alias: GithubLabelFacet\n\n> **GithubLabelFacet** = `Omit`\\<[`GithubLabelFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubLabelFacet.md), `\"color\"`\\> & \\{ `color?`: `string`; \\}\n\nA label among the GitHub pull requests visible to the caller.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` | The label's most recently synced color, as six hex digits without `#`. |\n\n\n<!-- src/entities/foreign/namespace/type-aliases/GithubUserFacet.md -->\n# Type Alias: GithubUserFacet\n\n> **GithubUserFacet** = `Omit`\\<[`GithubUserFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubUserFacet.md), `\"login\"`\\> & \\{ `login?`: `string`; \\}\n\nA GitHub user among the pull requests visible to the caller, as an author or an assignee.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `login?` | `string` | The user's most recently synced GitHub login, when known. |\n",- "documentation": "# Macro SDK: foreignEntities\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/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ForeignEntity.md -->\n# Type Alias: ForeignEntity\n\n> **ForeignEntity** = \\{ `createdAt`: `string`; `foreignEntityId`: `string`; `foreignEntitySource`: `string`; `id`: `string`; `metadata`: `unknown`; `storedForAuthEntity`: `string`; `storedForId`: `string`; `updatedAt`: `string`; \\}\n\nA persisted mapping to an entity owned by an external system.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Timestamp when the record was created. |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId` | `string` | Identifier assigned by the external system. |\n| <a id=\"property-foreignentitysource\"></a> `foreignEntitySource` | `string` | Source system that owns the external identifier. |\n| <a id=\"property-id\"></a> `id` | `string` | Internal primary key for this foreign entity record. |\n| <a id=\"property-metadata\"></a> `metadata` | `unknown` | Arbitrary metadata stored with the mapping. |\n| <a id=\"property-storedforauthentity\"></a> `storedForAuthEntity` | `string` | Internal auth entity namespace this foreign entity is stored for. |\n| <a id=\"property-storedforid\"></a> `storedForId` | `string` | Internal entity identifier this foreign entity is stored for. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Timestamp when the record was last updated. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubLabelFacet.md -->\n# Type Alias: GithubLabelFacet\n\n> **GithubLabelFacet** = \\{ `color?`: `string` \\| `null`; `count`: `number`; `name`: `string`; \\}\n\nA label among the visible GitHub pull requests. Labels with the same name in different\nrepositories count together.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | The label's most recently synced color, as six hex digits without `#`. |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests with the label. |\n| <a id=\"property-name\"></a> `name` | `string` | The label's name. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubRepositoryFacet.md -->\n# Type Alias: GithubRepositoryFacet\n\n> **GithubRepositoryFacet** = \\{ `count`: `number`; `repository`: `string`; `repositoryId`: `string`; \\}\n\nA repository among the visible GitHub pull requests.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests in the repository. |\n| <a id=\"property-repository\"></a> `repository` | `string` | The repository's most recently synced name, as `owner/repo`. |\n| <a id=\"property-repositoryid\"></a> `repositoryId` | `string` | The numeric GitHub repository id, which survives renames and transfers. |\n\n\n<!-- generated/storage/types.gen/type-aliases/GithubUserFacet.md -->\n# Type Alias: GithubUserFacet\n\n> **GithubUserFacet** = \\{ `count`: `number`; `githubUserId`: `string`; `login?`: `string` \\| `null`; \\}\n\nA GitHub user among the visible pull requests, as an author or an assignee.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests the user opened, or is assigned to. |\n| <a id=\"property-githubuserid\"></a> `githubUserId` | `string` | The user's numeric GitHub user id. |\n| <a id=\"property-login\"></a> `login?` | `string` \\| `null` | The user's most recently synced GitHub login, when known. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/foreign/foreign-entity/classes/ForeignEntity.md -->\n# Class: ForeignEntity\n\nA read-only mapping to an entity owned by an external system (e.g. a\nGitHub pull request). Keyed by the internal foreign-entity record id.\n\n## Extends\n\n- [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`ForeignEntityDetail`\\>\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 record was created (ISO timestamp). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"foreign_entity\"` | `'foreign_entity'` | Favorites identify foreign entities as `foreign_entity`. | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`entityType`](../../../entity/classes/FavoritableEntity.md#property-entitytype) | - |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The identifier assigned by the external system. | - | - |\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-source\"></a> `source` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The source system that owns the external identifier (e.g. `github_pull_request`). | - | - |\n| <a id=\"property-storedforauthentity\"></a> `storedForAuthEntity` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The internal auth entity namespace this foreign entity is stored for. | - | - |\n| <a id=\"property-storedforid\"></a> `storedForId` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The internal entity id this foreign entity is stored for. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the record was last updated (ISO timestamp). | - | - |\n\n## Methods\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`ForeignEntity`\\>\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`\\<`ForeignEntity`\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`favorite`](../../../entity/classes/FavoritableEntity.md#favorite)\n\n***\n\n### metadata()\n\n> **metadata**(): `Promise`\\<`unknown`\\>\n\nArbitrary source-specific metadata stored with the mapping.\n\n#### Returns\n\n`Promise`\\<`unknown`\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md).[`permission`](../../../entity/classes/FavoritableEntity.md#permission)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ForeignEntity`](../../../../../generated/storage/types.gen/type-aliases/ForeignEntity.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ForeignEntity`](../../../../../generated/storage/types.gen/type-aliases/ForeignEntity.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ForeignEntity`](../../../../../generated/storage/types.gen/type-aliases/ForeignEntity.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`\\<`ForeignEntity`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`ForeignEntity`\\>\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`): `ForeignEntity`\n\nA handle to a foreign entity by its internal record 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`ForeignEntity`\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `ForeignEntity`\n\nBuild a foreign entity from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`ForeignEntity`](../../../../../generated/storage/types.gen/type-aliases/ForeignEntity.md) |\n\n#### Returns\n\n`ForeignEntity`\n\n\n<!-- src/entities/foreign/namespace/classes/ForeignEntityNamespace.md -->\n# Class: ForeignEntityNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ForeignEntityNamespace**(`client`): `ForeignEntityNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ForeignEntityNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\n\n***\n\n### bySource()\n\n> **bySource**(`source`, `foreignEntityId`): `Promise`\\<[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\\>\n\nLook a foreign entity up by the identifier its source system assigned.\n\n`foreignEntityId` may contain slashes — sources store them inside the\nidentifier, for example `owner/repo/pull/12`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | `string` |\n| `foreignEntityId` | `string` |\n\n#### Returns\n\n`Promise`\\<[`ForeignEntity`](../../foreign-entity/classes/ForeignEntity.md)\\>\n\n***\n\n### githubPullRequestFacets()\n\n> **githubPullRequestFacets**(): `Promise`\\<[`GithubPullRequestFacets`](../interfaces/GithubPullRequestFacets.md)\\>\n\nRepositories, authors, assignees, and labels among the GitHub pull\nrequests visible to the authenticated user and their team, each with how\nmany pull requests it covers. A pull request visible to both the user and\nthe team counts once.\n\n#### Returns\n\n`Promise`\\<[`GithubPullRequestFacets`](../interfaces/GithubPullRequestFacets.md)\\>\n\n\n<!-- src/entities/foreign/namespace/interfaces/GithubPullRequestFacets.md -->\n# Interface: GithubPullRequestFacets\n\nRepositories, authors, assignees, and labels among the GitHub pull requests\nvisible to the caller.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-assignees\"></a> `assignees` | [`GithubUserFacet`](../type-aliases/GithubUserFacet.md)[] | Assignees, most pull requests first. |\n| <a id=\"property-authors\"></a> `authors` | [`GithubUserFacet`](../type-aliases/GithubUserFacet.md)[] | Authors, most pull requests first. |\n| <a id=\"property-labels\"></a> `labels` | [`GithubLabelFacet`](../type-aliases/GithubLabelFacet.md)[] | Labels, most pull requests first. |\n| <a id=\"property-repositories\"></a> `repositories` | [`GithubRepositoryFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubRepositoryFacet.md)[] | Repositories, most pull requests first. |\n\n\n<!-- src/entities/foreign/namespace/type-aliases/GithubLabelFacet.md -->\n# Type Alias: GithubLabelFacet\n\n> **GithubLabelFacet** = `Omit`\\<[`GithubLabelFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubLabelFacet.md), `\"color\"`\\> & \\{ `color?`: `string`; \\}\n\nA label among the GitHub pull requests visible to the caller.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` | The label's most recently synced color, as six hex digits without `#`. |\n\n\n<!-- src/entities/foreign/namespace/type-aliases/GithubUserFacet.md -->\n# Type Alias: GithubUserFacet\n\n> **GithubUserFacet** = `Omit`\\<[`GithubUserFacet`](../../../../../generated/storage/types.gen/type-aliases/GithubUserFacet.md), `\"login\"`\\> & \\{ `login?`: `string`; \\}\n\nA GitHub user among the pull requests visible to the caller, as an author or an assignee.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `login?` | `string` | The user's most recently synced GitHub login, when known. |\n"- },- {- "name": "forms",- "description": "Build forms and read responses.",- "overview": "<!-- src/entities/forms/namespace/classes/FormNamespace.md -->\n# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.\n\n## Constructors\n\n### Constructor\n\n> **new FormNamespace**(`client`): `FormNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FormNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Form`](../../form/classes/Form.md)\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Form`](../../form/classes/Form.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\n***\n\n### list()\n\n> **list**(`database?`): `Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n",- "documentation": "# Macro SDK: forms\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/Audience.md -->\n# Type Alias: Audience\n\n> **Audience** = `\"members\"` \\| `\"public\"`\n\nWho may respond to a form.\n\n\n<!-- generated/storage/types.gen/type-aliases/BookingTarget.md -->\n# Type Alias: BookingTarget\n\n> **BookingTarget** = \\{ `eventTypeId`: `string`; `profileId`: `string`; \\}\n\nAn existing native Macro scheduling event offered after an accepted response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventtypeid\"></a> `eventTypeId` | `string` | The event type to book. |\n| <a id=\"property-profileid\"></a> `profileId` | `string` | The scheduling profile that owns the event. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CellValue.md -->\n# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionRef`](OptionRef.md)[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | [`EntityRef`](EntityRef.md)[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnKind.md -->\n# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | [`EntityKind`](EntityKind.md) | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Conjunction.md -->\n# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.\n\n\n<!-- generated/storage/types.gen/type-aliases/DateOperator.md -->\n# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityKind.md -->\n# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityRef.md -->\n# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: [`EntityKind`](EntityKind.md); \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | [`EntityKind`](EntityKind.md) | What kind of entity it is; it must be the kind the column points at. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterCondition.md -->\n# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: [`FilterTest`](FilterTest.md); \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | [`FilterTest`](FilterTest.md) | What its cell must be. The test's kind must fit the column's type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterGroup.md -->\n# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: [`FilterNode`](FilterNode.md)[]; `conjunction`: [`Conjunction`](Conjunction.md); \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | [`FilterNode`](FilterNode.md)[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`Conjunction`](Conjunction.md) | Whether every condition must hold, or any one. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterNode.md -->\n# Type Alias: FilterNode\n\n> **FilterNode** = [`FilterCondition`](FilterCondition.md) & \\{ `kind`: `\"condition\"`; \\} \\| [`FilterGroup`](FilterGroup.md) & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterTest.md -->\n# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\} \\| \\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | [`PresenceOperator`](PresenceOperator.md) | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | [`TextOperator`](TextOperator.md) | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | [`NumberOperator`](NumberOperator.md) | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | [`DateOperator`](DateOperator.md) | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's references relate to these. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Form.md -->\n# Type Alias: Form\n\n> **Form** = \\{ `audience`: [`Audience`](Audience.md); `closesAt`: `string` \\| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `isHiddenInDrive`: `boolean`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \\| `null`; `status`: [`FormStatus`](FormStatus.md); `submittedColumnId`: `string` \\| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \\}\n\nA form: a view of one database table whose rows are its responses.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience` | [`Audience`](Audience.md) | Who may respond. |\n| <a id=\"property-closesat\"></a> `closesAt` | `string` \\| `null` | When it stops taking responses, if it does. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage` | `string` | What a respondent reads once their response is saved; empty for the default. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database holding its responses. |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read under the name. |\n| <a id=\"property-id\"></a> `id` | `string` | The form. |\n| <a id=\"property-ishiddenindrive\"></a> `isHiddenInDrive` | `boolean` | Whether Drive leaves it, and the database behind it, out of its listings, as for a channel poll. |\n| <a id=\"property-name\"></a> `name` | `string` | Its display name. A standalone form follows the database it created; a form attached to an existing table has its own name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Its owner. |\n| <a id=\"property-respondentcolumnid\"></a> `respondentColumnId` | `string` \\| `null` | The person column each signed-in submission names its respondent in; `null` once deleted. |\n| <a id=\"property-status\"></a> `status` | [`FormStatus`](FormStatus.md) | Whether its owner closed it. |\n| <a id=\"property-submittedcolumnid\"></a> `submittedColumnId` | `string` \\| `null` | The date column each submission stamps; `null` once deleted. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table whose rows are its responses. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible` | `boolean` | Whether respondents may read option tallies. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When its facts or layout last changed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormAccess.md -->\n# Type Alias: FormAccess\n\n> **FormAccess** = `\"view\"` \\| `\"edit\"` \\| `\"owner\"`\n\nThe caller's level on a form: view responds, edit changes questions and\nreads responses, owner also sets the audience, closes and trashes it.\n\n\n<!-- generated/storage/types.gen/type-aliases/FormDetail.md -->\n# Type Alias: FormDetail\n\n> **FormDetail** = \\{ `access`: [`FormAccess`](FormAccess.md); `form`: [`Form`](Form.md); `sections`: [`FormSectionDetail`](FormSectionDetail.md)[]; `tableGone`: `boolean`; \\}\n\nA form with its layout, as the caller may see it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | [`FormAccess`](FormAccess.md) | The caller's level on it. |\n| <a id=\"property-form\"></a> `form` | [`Form`](Form.md) | The form's facts. |\n| <a id=\"property-sections\"></a> `sections` | [`FormSectionDetail`](FormSectionDetail.md)[] | Its sections, in order. |\n| <a id=\"property-tablegone\"></a> `tableGone` | `boolean` | Whether its database is in the trash, so it has no table to show or write: its sections keep no questions and it takes no responses. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormPublicationProblem.md -->\n# Type Alias: FormPublicationProblem\n\n> **FormPublicationProblem** = \\{ `kind`: `\"invalidDraft\"`; \\} \\| \\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\} \\| \\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\} \\| \\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\} \\| \\{ `kind`: `\"pending\"`; \\}\n\nAn editor's saved draft is not yet the version respondents can use.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"invalidDraft\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"layout\"` | - |\n| `problem` | [`LayoutProblem`](LayoutProblem.md) | The invariant the editor needs to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"widgetMismatch\"` | - |\n| `question` | `string` | The question to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"pending\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/FormQuestionDetail.md -->\n# Type Alias: FormQuestionDetail\n\n> **FormQuestionDetail** = \\{ `column`: `string`; `helpText`: `string`; `id`: `string`; `kind`: [`ColumnKind`](ColumnKind.md); `options`: [`QuestionOption`](QuestionOption.md)[]; `required`: `boolean`; `title`: `string`; `widget`: `null` \\| [`Widget`](Widget.md); \\}\n\nA question with its column's facts.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column it writes. |\n| <a id=\"property-helptext\"></a> `helpText` | `string` | What respondents read under the title. |\n| <a id=\"property-id\"></a> `id` | `string` | The question. |\n| <a id=\"property-kind\"></a> `kind` | [`ColumnKind`](ColumnKind.md) | The column's type. |\n| <a id=\"property-options\"></a> `options` | [`QuestionOption`](QuestionOption.md)[] | The column's options, in order, for a select or tag column. |\n| <a id=\"property-required\"></a> `required` | `boolean` | Whether a response must answer it. |\n| <a id=\"property-title\"></a> `title` | `string` | The column's name. |\n| <a id=\"property-widget\"></a> `widget` | `null` \\| [`Widget`](Widget.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormSectionDetail.md -->\n# Type Alias: FormSectionDetail\n\n> **FormSectionDetail** = \\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nOne section of a form as it reads.\n\n## Union Members\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"questions\"` | - |\n| `questions` | [`FormQuestionDetail`](FormQuestionDetail.md)[] | Its questions, in order. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"gate\"` | - |\n| `message` | `string` | What a stopped respondent reads. |\n| `rules` | [`FilterGroup`](FilterGroup.md) | The rules. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"booking\"` | - |\n| `target?` | [`BookingTarget`](BookingTarget.md) | Editors can configure the destination; respondent layouts omit it. |\n| `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormStatus.md -->\n# Type Alias: FormStatus\n\n> **FormStatus** = `\"open\"` \\| `\"closed\"`\n\nWhether a form takes responses, as its owner set it. A form also stops\ntaking them once its closing time passes.\n\n\n<!-- generated/storage/types.gen/type-aliases/LayoutProblem.md -->\n# Type Alias: LayoutProblem\n\n> **LayoutProblem** = \\{ `kind`: `\"bookingMustBeLast\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\} \\| \\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\} \\| \\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\nWhy a layout does not fit the form's table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"bookingMustBeLast\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"unknownColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"managedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"repeatedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The id. |\n| `kind` | `\"repeatedId\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"gateNamesLaterColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"gateRule\"` | - |\n| `reason` | `string` | Why. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"textTooLong\"` | - |\n| `max` | `number` | The longest allowed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/NumberOperator.md -->\n# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionRef.md -->\n# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresenceOperator.md -->\n# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.\n\n\n<!-- generated/storage/types.gen/type-aliases/QuestionOption.md -->\n# Type Alias: QuestionOption\n\n> **QuestionOption** = \\{ `color`: `string` \\| `null`; `id`: `string`; `label`: `string`; \\}\n\nOne option of a question's column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` | Its colour, a hex string, if it has one. |\n| <a id=\"property-id\"></a> `id` | `string` | The option. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ResponseStatus.md -->\n# Type Alias: ResponseStatus\n\n> **ResponseStatus** = `\"submitted\"` \\| `\"stopped\"`\n\nWhether a ledger entry is a saved response or a stop at a gate.\n\n\n<!-- generated/storage/types.gen/type-aliases/SetOperator.md -->\n# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TextOperator.md -->\n# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.\n\n\n<!-- generated/storage/types.gen/type-aliases/UnlockedBooking.md -->\n# Type Alias: UnlockedBooking\n\n> **UnlockedBooking** = \\{ `description`: `string`; `section`: `string`; `target`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nA booking step a passing response has unlocked, with its destination.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read before choosing a time. |\n| <a id=\"property-section\"></a> `section` | `string` | The booking section. |\n| <a id=\"property-target\"></a> `target` | [`BookingTarget`](BookingTarget.md) | The native booking event to open. |\n| <a id=\"property-title\"></a> `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateForm.md -->\n# Type Alias: UpdateForm\n\n> **UpdateForm** = \\{ `audience?`: [`Audience`](Audience.md); `closesAt?`: `string` \\| `null`; `confirmationMessage?`: `string`; `description?`: `string`; `status?`: [`FormStatus`](FormStatus.md); `tallyVisible?`: `boolean`; \\}\n\nA change to a form's facts; what is left out stays. The description and\nconfirmation message take edit, the rest owner. A form is renamed\nthrough the entity mutation router.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience?` | [`Audience`](Audience.md) | Who may respond from now on. |\n| <a id=\"property-closesat\"></a> `closesAt?` | `string` \\| `null` | When it stops taking responses, or `null` for never. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage?` | `string` | Its new confirmation message. |\n| <a id=\"property-description\"></a> `description?` | `string` | Its new description. |\n| <a id=\"property-status\"></a> `status?` | [`FormStatus`](FormStatus.md) | Open or close it. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible?` | `boolean` | Whether respondents may read option tallies. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Widget.md -->\n# Type Alias: Widget\n\n> **Widget** = `\"short\"` \\| `\"paragraph\"` \\| `\"datetime\"` \\| `\"date\"` \\| `\"url\"` \\| `\"file\"` \\| `\"choice\"` \\| `\"dropdown\"` \\| `\"checkboxes\"`\n\nHow a question is asked. Each column kind takes a few, the first its\ndefault; kinds asked one way only (numbers, checkboxes, entity and row\npickers) take none.\n\n\n<!-- src/entities/forms/form/classes/Form.md -->\n# Class: Form\n\nA form over a database table. Viewers can read its questions and submit;\neditors can build it and read responses; owners control its audience.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | () => `Promise`\\<[`FormAccess`](../../../../../generated/storage/types.gen/type-aliases/FormAccess.md)\\> | The caller's access level. | - |\n| <a id=\"property-audience\"></a> `audience` | `readonly` | () => `Promise`\\<[`Audience`](../../../../../generated/storage/types.gen/type-aliases/Audience.md)\\> | Who may respond. | - |\n| <a id=\"property-closesat\"></a> `closesAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled closing time, when set. | - |\n| <a id=\"property-database\"></a> `database` | `readonly` | () => `Promise`\\<[`Database`](../../../databases/database/classes/Database.md)\\> | The response database. Reading its contents requires separate access. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string`\\> | Introductory text shown to respondents. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The form's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The owning user. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`FormStatus`](../../../../../generated/storage/types.gen/type-aliases/FormStatus.md)\\> | Whether submissions are currently enabled. A closing time can also close the form. | - |\n| <a id=\"property-table\"></a> `table` | `readonly` | () => `Promise`\\<[`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md)\\> | The linked table, without fetching its contents. | - |\n\n## Methods\n\n### editResponse()\n\n> **editResponse**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nReplace the caller's answers while the form is open; gates are evaluated again.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### myResponse()\n\n> **myResponse**(): `Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\nRead the caller's receipt and answers without reading anyone else's responses.\n\n#### Returns\n\n`Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nAll questions in display order, skipping gates.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### replaceLayout()\n\n> **replaceLayout**(`sections`): `Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\nSave a replacement in the shared draft. Existing handles retain identity;\nomitted handles mint sections or questions. Column facts use the database API.\nA publicationError means the draft was saved but respondents still see the last\nvalid version. Repair the reported problem or reload to retry publication.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sections` | [`FormSectionPlacement`](../type-aliases/FormSectionPlacement.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\n***\n\n### respondUrl()\n\n> **respondUrl**(): `string`\n\nThe respondent page, which public forms also expose without signing in.\n\n#### Returns\n\n`string`\n\n***\n\n### responseSummary()\n\n> **responseSummary**(): `Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\nLedger counts and total table rows; requires edit access.\n\n#### Returns\n\n`Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\n***\n\n### schema()\n\n> **schema**(): `Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\nThe form's presentation and column facts; this never contains response rows.\n\n#### Returns\n\n`Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n***\n\n### sections()\n\n> **sections**(): `Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\nSections in display order.\n\n#### Returns\n\n`Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead the form's sharing grants. Requires ownership.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### submit()\n\n> **submit**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nSubmit answers. Signed-in respondents get at most one response; use editResponse afterwards.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### tally()\n\n> **tally**(): `Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\nChoice and checkbox counts, available to viewers when tally visibility is enabled.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.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### update()\n\n> **update**(`updates`): `Promise`\\<`Form`\\>\n\nUpdate presentation or owner-controlled settings; null explicitly clears the closing time.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | [`UpdateForm`](../../../../../generated/storage/types.gen/type-aliases/UpdateForm.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nUpdate grants. Public responding is controlled by audience, not link sharing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nOpen the form's builder in Macro.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Form`\n\nA form handle with details loaded on demand.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Form`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Form`\\>\n\nCreate a form, optionally over a table of a database the caller owns.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`, `database?`): `Promise`\\<`Form`[]\\>\n\nForms shared with the caller, or live forms over a specified database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<`Form`[]\\>\n\n\n<!-- src/entities/forms/form/classes/FormReference.md -->\n# Class: FormReference\n\nA typed reference read from a form answer, without fetching the referenced entity.\n\n## Implements\n\n- [`FormEntityHandle`](../interfaces/FormEntityHandle.md)\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) | The referenced entity's kind. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The referenced entity's identifier. |\n\n## Methods\n\n### byId()\n\n> `static` **byId**(`entityType`, `id`): `FormReference`\n\nConstruct a reference when its kind and identifier are known.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entityType` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormReference`\n\n\n<!-- src/entities/forms/form/interfaces/FormEntityHandle.md -->\n# Interface: FormEntityHandle\n\nAn entity handle used in a reference answer or rule.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The entity's identifier. |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswer.md -->\n# Type Alias: FormAnswer\n\n> **FormAnswer** = \\{ `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `value`: [`FormAnswerValue`](FormAnswerValue.md); \\}\n\nOne question and its answer.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-value\"></a> `value` | [`FormAnswerValue`](FormAnswerValue.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswerValue.md -->\n# Type Alias: FormAnswerValue\n\n> **FormAnswerValue** = `Exclude`\\<[`CellValue`](../../../../../generated/storage/types.gen/type-aliases/CellValue.md), \\{ `type`: `\"rows\"` \\| `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `type`: `\"rows\"`; `value`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md)[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: \\{ `entity`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md); `entityType`: [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md); \\}[]; \\}\n\nAn answer value; references use handles, and scalar values keep their cell representation.\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingStep.md -->\n# Type Alias: FormBookingStep\n\n> **FormBookingStep** = `Omit`\\<[`UnlockedBooking`](../../../../../generated/storage/types.gen/type-aliases/UnlockedBooking.md), `\"section\"`\\> & \\{ `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nA booking step released after the form accepts the caller's answers.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `section` | [`FormSection`](../../section/classes/FormSection.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingTarget.md -->\n# Type Alias: FormBookingTarget\n\n> **FormBookingTarget** = [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md)\n\nThe public Macro booking destination selected by a form editor.\n\n\n<!-- src/entities/forms/form/type-aliases/FormLayoutResult.md -->\n# Type Alias: FormLayoutResult\n\n> **FormLayoutResult** = \\{ `form`: [`Form`](../classes/Form.md); `publicationError?`: [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md); \\}\n\nA saved layout and any reason it is not yet visible to respondents.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-form\"></a> `form` | [`Form`](../classes/Form.md) |\n| <a id=\"property-publicationerror\"></a> `publicationError?` | [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionPlacement.md -->\n# Type Alias: FormQuestionPlacement\n\n> **FormQuestionPlacement** = \\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `helpText?`: `string`; `question?`: [`FormQuestion`](../../question/classes/FormQuestion.md); `required?`: `boolean`; `widget?`: [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md); \\}\n\nA question placement in a layout replacement. Omit question to mint a new stable question.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md) |\n| <a id=\"property-helptext\"></a> `helpText?` | `string` |\n| <a id=\"property-question\"></a> `question?` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-required\"></a> `required?` | `boolean` |\n| <a id=\"property-widget\"></a> `widget?` | [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionTally.md -->\n# Type Alias: FormQuestionTally\n\n> **FormQuestionTally** = \\{ `buckets`: \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[]; `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `responses`: `number`; \\}\n\nA question's public tally. Options with no votes are retained.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-buckets\"></a> `buckets` | \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[] |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-responses\"></a> `responses` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormResponseSummary.md -->\n# Type Alias: FormResponseSummary\n\n> **FormResponseSummary** = \\{ `rows`: `number`; `stopped`: `number`; `stoppedBySection`: \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[]; `submitted`: `number`; \\}\n\nCounts from the response ledger and its linked table.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-rows\"></a> `rows` | `number` |\n| <a id=\"property-stopped\"></a> `stopped` | `number` |\n| <a id=\"property-stoppedbysection\"></a> `stoppedBySection` | \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[] |\n| <a id=\"property-submitted\"></a> `submitted` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormRuleTest.md -->\n# Type Alias: FormRuleTest\n\n> **FormRuleTest** = `Exclude`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `kind`: `\"options\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"`; \\}\\>\\[`\"operator\"`\\]; `options`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `entities`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md)[]; `kind`: `\"entities\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"entities\"`; \\}\\>\\[`\"operator\"`\\]; \\}\n\nA form rule, with option and entity references represented by handles.\n\n\n<!-- src/entities/forms/form/type-aliases/FormRules.md -->\n# Type Alias: FormRules\n\n> **FormRules** = \\{ `conditions`: (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[]; `conjunction`: [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\]; \\}\n\nConditions over columns asked in earlier sections.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[] |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\] |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSectionPlacement.md -->\n# Type Alias: FormSectionPlacement\n\n> **FormSectionPlacement** = \\{ `description?`: `string`; `section?`: [`FormSection`](../../section/classes/FormSection.md); `title`: `string`; \\} & \\{ `kind`: `\"questions\"`; `questions`: [`FormQuestionPlacement`](FormQuestionPlacement.md)[]; \\} \\| \\{ `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FormRules`](FormRules.md); \\} \\| \\{ `kind`: `\"booking\"`; `target`: [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md); \\}\n\nA section in a layout replacement. Omit section to mint a new stable section.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `description?` | `string` |\n| `section?` | [`FormSection`](../../section/classes/FormSection.md) |\n| `title` | `string` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSubmissionOutcome.md -->\n# Type Alias: FormSubmissionOutcome\n\n> **FormSubmissionOutcome** = \\{ `booking?`: [`FormBookingStep`](FormBookingStep.md); `outcome`: `\"submitted\"`; `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); \\} \\| \\{ `message`: `string`; `outcome`: `\"stopped\"`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nThe result of submitting or editing a response. A stopped submission has no row.\n\n\n<!-- src/entities/forms/form/type-aliases/MyFormResponse.md -->\n# Type Alias: MyFormResponse\n\n> **MyFormResponse** = \\{ `answers`: [`FormAnswer`](FormAnswer.md)[]; `booking?`: [`FormBookingStep`](FormBookingStep.md); `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row?`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); `status`: [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md); `stoppedAtSection?`: [`FormSection`](../../section/classes/FormSection.md); `submittedAt`: `string`; `updatedAt`: `string`; \\}\n\nThe caller's receipt and current answers, read without access to other responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-answers\"></a> `answers` | [`FormAnswer`](FormAnswer.md)[] |\n| <a id=\"property-booking\"></a> `booking?` | [`FormBookingStep`](FormBookingStep.md) |\n| <a id=\"property-response\"></a> `response` | [`FormResponse`](../../response/classes/FormResponse.md) |\n| <a id=\"property-row\"></a> `row?` | [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) |\n| <a id=\"property-status\"></a> `status` | [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md) |\n| <a id=\"property-stoppedatsection\"></a> `stoppedAtSection?` | [`FormSection`](../../section/classes/FormSection.md) |\n| <a id=\"property-submittedat\"></a> `submittedAt` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` |\n\n\n<!-- src/entities/forms/namespace/classes/FormNamespace.md -->\n# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.\n\n## Constructors\n\n### Constructor\n\n> **new FormNamespace**(`client`): `FormNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FormNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Form`](../../form/classes/Form.md)\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Form`](../../form/classes/Form.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\n***\n\n### list()\n\n> **list**(`database?`): `Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\n\n<!-- src/entities/forms/question/classes/FormOption.md -->\n# Class: FormOption\n\nA choice of one form question, resolved through that question's current options.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The backing database option's identifier. |\n| <a id=\"property-question\"></a> `question` | `readonly` | [`FormQuestion`](FormQuestion.md) | The question offering this choice. |\n\n## Methods\n\n### color()\n\n> **color**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe choice's color, when one is set.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\nThe choice's label and color.\n\n#### Returns\n\n`Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\n***\n\n### label()\n\n> **label**(): `Promise`\\<`string`\\>\n\nThe choice's label.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`question`, `id`): `FormOption`\n\nA handle to a known choice of a question.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `question` | [`FormQuestion`](FormQuestion.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormOption`\n\n\n<!-- src/entities/forms/question/classes/FormQuestion.md -->\n# Class: FormQuestion\n\nOne question, backed by a column. Its details never require reading the response table.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that asks this question. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The question's stable identifier within its form layout. |\n\n## Methods\n\n### column()\n\n> **column**(): `Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\nThe column behind the question. Reading the column itself needs database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\nThe question's current presentation and column facts.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\n***\n\n### options()\n\n> **options**(): `Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\nCurrent choices, in display order.\n\n#### Returns\n\n`Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe question's current title (its column's name).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormQuestion`\n\nA question handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormQuestion`\n\n\n<!-- src/entities/forms/response/classes/FormResponse.md -->\n# Class: FormResponse\n\nA cached receipt for the caller's response; other respondents' receipts are private.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that received this response. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The response ledger entry's identifier. |\n\n## Methods\n\n### answers()\n\n> **answers**(): `Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\nAnswers as submitted or last read. Refresh to include later changes to the row.\n\n#### Returns\n\n`Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\n***\n\n### booking()\n\n> **booking**(): `Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\nThe booking step unlocked by this saved response, if any.\n\n#### Returns\n\n`Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`FormResponse`\\>\n\nReload the caller's current receipt; requires a signed-in respondent.\n\n#### Returns\n\n`Promise`\\<`FormResponse`\\>\n\n***\n\n### row()\n\n> **row**(): `Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\nThe receipt's row, if any. Reading that row requires database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\nWhether this receipt was submitted or stopped by a gate.\n\n#### Returns\n\n`Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`, `snapshot?`): `FormResponse`\n\nA response handle, optionally seeded with an already returned receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n| `snapshot?` | `ResponseSnapshot` |\n\n#### Returns\n\n`FormResponse`\n\n\n<!-- src/entities/forms/section/classes/FormSection.md -->\n# Class: FormSection\n\nAn ordered group of questions, or a gate between groups.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The owning form. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The section's stable identifier. |\n\n## Methods\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\nThe section's current presentation.\n\n#### Returns\n\n`Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nQuestions in display order; gates contain no questions.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe section heading.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormSection`\n\nA section handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormSection`\n"- },- {- "name": "notifications",- "description": "Read and manage notifications.",- "overview": "<!-- src/entities/notifications/namespace/classes/NotificationNamespace.md -->\n# Class: NotificationNamespace\n\n## Constructors\n\n### Constructor\n\n> **new NotificationNamespace**(`client`): `NotificationNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`NotificationNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Notification`](../../notification/classes/Notification.md)\n\nA handle to a notification by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Notification`](../../notification/classes/Notification.md)\n\n***\n\n### delete()\n\n> **delete**(`ids`): `Promise`\\<`void`\\>\n\nDelete a batch of notifications.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### disableType()\n\n> **disableType**(`type`): `Promise`\\<`void`\\>\n\nDisable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### enableType()\n\n> **enableType**(`type`): `Promise`\\<`void`\\>\n\nRe-enable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(`opts?`): `AsyncGenerator`\\<[`Notification`](../../notification/classes/Notification.md)\\>\n\nThe viewer's notification feed, 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`\\<[`Notification`](../../notification/classes/Notification.md)\\>\n\n***\n\n### markDone()\n\n> **markDone**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as done.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as seen.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### preferences()\n\n> **preferences**(): `Promise`\\<[`GetNotificationTypePreferencesResponse`](../../../../../generated/notification/types.gen/type-aliases/GetNotificationTypePreferencesResponse.md)\\>\n\nThe viewer's notification type preferences (disabled types).\n\n#### Returns\n\n`Promise`\\<[`GetNotificationTypePreferencesResponse`](../../../../../generated/notification/types.gen/type-aliases/GetNotificationTypePreferencesResponse.md)\\>\n\n\n<!-- src/entities/notifications/namespace/type-aliases/NotificationType.md -->\n# Type Alias: NotificationType\n\n> **NotificationType** = [`NotifEvent`](../../../../../generated/notification/types.gen/type-aliases/NotifEvent.md)\\[`\"tag\"`\\]\n\nA notification event type name, e.g. `channel_mention`.\n",- "documentation": "# Macro SDK: notifications\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/notification/types.gen/type-aliases/AgentSessionMentionedMetadata.md -->\n# Type Alias: AgentSessionMentionedMetadata\n\n> **AgentSessionMentionedMetadata** = [`AgentSessionNotificationRef`](AgentSessionNotificationRef.md) & \\{ `actionId`: `string`; `mentionedBy?`: `string` \\| `null`; \\}\n\nSomeone named the recipient in a prompt to an agent session.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `actionId` | `string` | The action carrying the prompt. |\n| `mentionedBy?` | `string` \\| `null` | Who wrote the prompt, absent when a bot acted on nobody's behalf. |\n\n\n<!-- generated/notification/types.gen/type-aliases/AgentSessionNotificationRef.md -->\n# Type Alias: AgentSessionNotificationRef\n\n> **AgentSessionNotificationRef** = \\{ `announcementMessageId?`: `string` \\| `null`; `botId`: `string`; `botName`: `string`; `channelId?`: `string` \\| `null`; `parent?`: `null` \\| [`AgentSessionOriginParent`](AgentSessionOriginParent.md); `sessionId`: `string`; `sessionName`: `string`; `threadId?`: `string` \\| `null`; \\}\n\nFlattened into each agent-session kind so the wire keeps these keys at the\ntop level of the metadata, the way [`CommonChannelMetadata`] does.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcementmessageid\"></a> `announcementMessageId?` | `string` \\| `null` | The magic-chip message for the turn in question, when one was posted. |\n| <a id=\"property-botid\"></a> `botId` | `string` | The bot the session runs for. A string on the wire: system bots have fixed ids like `00000000-0000-0000-0000-00000000a2a2`, which are not RFC 4122 uuids and fail a `format: uuid` check on the client. |\n| <a id=\"property-botname\"></a> `botName` | `string` | The bot's display name; agent notifications have no user sender, so this is who they read as being from. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | The channel the session was opened from, when it was opened from a channel thread. |\n| <a id=\"property-parent\"></a> `parent?` | `null` \\| [`AgentSessionOriginParent`](AgentSessionOriginParent.md) | - |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | The session; what a click opens. |\n| <a id=\"property-sessionname\"></a> `sessionName` | `string` | The session's name at the time of the event. |\n| <a id=\"property-threadid\"></a> `threadId?` | `string` \\| `null` | The thread the session was opened from, when it was. |\n\n\n<!-- generated/notification/types.gen/type-aliases/AgentSessionOriginParent.md -->\n# Type Alias: AgentSessionOriginParent\n\n> **AgentSessionOriginParent** = \\{ `id`: `string`; `type`: `string`; \\}\n\nThe session an agent-session notification is about, and where its magic\nchip lives when it was opened from a thread.\n\nThe conversation an agent session was opened from: a channel, document,\nor initiative. Spelled like the message API's parent for client routing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | The parent entity id. |\n| <a id=\"property-type\"></a> `type` | `string` | `channel`, `document`, or `initiative`. |\n\n\n<!-- generated/notification/types.gen/type-aliases/AgentSessionSettledMetadata.md -->\n# Type Alias: AgentSessionSettledMetadata\n\n> **AgentSessionSettledMetadata** = [`AgentSessionNotificationRef`](AgentSessionNotificationRef.md) & \\{ `actor?`: `string` \\| `null`; `excerpt?`: `string` \\| `null`; `stopReason`: `string`; `turn`: `number`; \\}\n\nAn agent finished a turn with nothing queued behind it.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `actor?` | `string` \\| `null` | Who prompted the turn, absent when a bot acted on nobody's behalf. |\n| `excerpt?` | `string` \\| `null` | The agent's last prose in the turn, whole; `None` when it wrote none. |\n| `stopReason` | `string` | The ACP stop reason, or `error`. |\n| `turn` | `number` | The turn that ended. |\n\n\n<!-- generated/notification/types.gen/type-aliases/AgentSessionWaitingForInputMetadata.md -->\n# Type Alias: AgentSessionWaitingForInputMetadata\n\n> **AgentSessionWaitingForInputMetadata** = [`AgentSessionNotificationRef`](AgentSessionNotificationRef.md) & \\{ `question`: `string`; `turn`: `number`; \\}\n\nAn agent is blocked on a question only the session's owner can answer.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `question` | `string` | The question, as the agent phrased it. |\n| `turn` | `number` | The turn asking. |\n\n\n<!-- generated/notification/types.gen/type-aliases/AiResponseMetadata.md -->\n# Type Alias: AiResponseMetadata\n\n> **AiResponseMetadata** = \\{ `messageId`: `string`; `summary`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` |\n| <a id=\"property-summary\"></a> `summary` | `string` |\n\n\n<!-- generated/notification/types.gen/type-aliases/ApiUserNotification.md -->\n# Type Alias: ApiUserNotification\n\n> **ApiUserNotification** = [`Entity`](Entity.md) & \\{ `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `id`: `string`; `notification_event_type`: `string`; `notification_metadata`: [`NotifEvent`](NotifEvent.md); `owner_id`: `string`; `sender_id?`: `string` \\| `null`; `sent`: `boolean`; `state`: [`NotificationState`](NotificationState.md); `updated_at`: `string`; `viewed_at?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `created_at` | `string` | When the notification was created. |\n| `deleted_at?` | `string` \\| `null` | When the notification was deleted. |\n| `id` | `string` | The notification ID. |\n| `notification_event_type` | `string` | The notification event type string (e.g. \"channel_mention\"). TODO make this a new type |\n| `notification_metadata` | [`NotifEvent`](NotifEvent.md) | Deserialized notification metadata. |\n| `owner_id` | `string` | The user who owns this notification. |\n| `sender_id?` | `string` \\| `null` | The user who triggered the notification. |\n| `sent` | `boolean` | Whether the notification has been sent. |\n| `state` | [`NotificationState`](NotificationState.md) | The authoritative notification lifecycle state. |\n| `updated_at` | `string` | When the notification was last updated. |\n| `viewed_at?` | `string` \\| `null` | When the notification was viewed/seen. |\n\n\n<!-- generated/notification/types.gen/type-aliases/CalendarEventJoinRequestMetadata.md -->\n# Type Alias: CalendarEventJoinRequestMetadata\n\n> **CalendarEventJoinRequestMetadata** = \\{ `eventId`: `string`; `requestId`: `string`; `title`: `string`; \\}\n\nA channel member who sees a calendar event only through a channel share\nasked the person who shared it to add them as a guest. Sent to the sharer,\nwith the requester as sender.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | The shared calendar event entity the request is for. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity, answered from the event's details. |\n| <a id=\"property-title\"></a> `title` | `string` | Event title when the request was made. |\n\n\n<!-- generated/notification/types.gen/type-aliases/CalendarEventReminderMetadata.md -->\n# Type Alias: CalendarEventReminderMetadata\n\n> **CalendarEventReminderMetadata** = \\{ `endsAt?`: `string` \\| `null`; `eventId`: `string`; `minutesBefore`: `number`; `occurrenceKey`: `string`; `startDate?`: `string` \\| `null`; `startsAt?`: `string` \\| `null`; `timeZone?`: `string` \\| `null`; `title`: `string`; \\}\n\nA calendar event alarm came due. Like [`ReminderMetadata`], these are\nself-notifications: `sender_id` must stay `None` or the only recipient is\nfiltered out. Everything the alert renders rides in here so the\ndispatcher never has to resolve the event again at display time.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-endsat\"></a> `endsAt?` | `string` \\| `null` | Instance end, for timed events. |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | The calendar event entity the alarm belongs to. |\n| <a id=\"property-minutesbefore\"></a> `minutesBefore` | `number` | Minutes before the start the alarm was configured to fire. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable occurrence key of the instance that is starting. |\n| <a id=\"property-startdate\"></a> `startDate?` | `string` \\| `null` | Instance start date, for all-day events. |\n| <a id=\"property-startsat\"></a> `startsAt?` | `string` \\| `null` | Instance start, for timed events. |\n| <a id=\"property-timezone\"></a> `timeZone?` | `string` \\| `null` | IANA zone for rendering local clock times, when known. |\n| <a id=\"property-title\"></a> `title` | `string` | Event display title at dispatch time. |\n\n\n<!-- generated/notification/types.gen/type-aliases/CallStartedMetadata.md -->\n# Type Alias: CallStartedMetadata\n\n> **CallStartedMetadata** = \\{ `channel_name?`: `string` \\| `null`; `sender_profile_picture_url?`: `string` \\| `null`; \\}\n\nMetadata for a notification that a call has started in a channel.\n\nMirrors the producer-side `CallStartedNotification` in the `call` crate:\nboth serialize the same wire shape (snake_case fields) under the same\n`call_started` [`Notification::TYPE_NAME`]. This type is the read-side\nmodel used by [`crate::NotifEvent`]; the producer keeps its own type\nbecause it additionally builds the incoming-call APNS/VoIP push.\n\nRows persisted before the type name was normalized used the kebab-case\n`call-started`; the [`crate::NotifEvent::CallStarted`] variant carries a\n`#[serde(alias = \"call-started\")]` so those rows still deserialize.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_name\"></a> `channel_name?` | `string` \\| `null` | The name of the channel the call started in, when available. |\n| <a id=\"property-sender_profile_picture_url\"></a> `sender_profile_picture_url?` | `string` \\| `null` | Profile picture URL of the user who started the call, when available. |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelInviteMetadata.md -->\n# Type Alias: ChannelInviteMetadata\n\n> **ChannelInviteMetadata** = \\{ `channelName?`: `string`; `invitedBy`: `string`; `isDirectMessage?`: `boolean`; `messageContent?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; \\}\n\nMetadata for when a user is invited to a channel.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` | The name of the channel |\n| <a id=\"property-invitedby\"></a> `invitedBy` | `string` | The user who sent the invitation |\n| <a id=\"property-isdirectmessage\"></a> `isDirectMessage?` | `boolean` | Whether this is a direct message rather than a channel invitation. Older notification payloads retain channel-invitation wording. |\n| <a id=\"property-messagecontent\"></a> `messageContent?` | `string` \\| `null` | Message content to show in the invite email, when the invite was triggered by a message. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | The sender's profile picture URL, if available. |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelMentionMetadata.md -->\n# Type Alias: ChannelMentionMetadata\n\n> **ChannelMentionMetadata** = [`CommonChannelMetadata`](CommonChannelMetadata.md) & \\{ `messageContent`: `string`; `messageId`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent` | `string` | The message content |\n| `messageId` | `string` | The message you were mentioned in |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| `threadId?` | `string` \\| `null` | the id of the thread |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelMessageReactionMetadata.md -->\n# Type Alias: ChannelMessageReactionMetadata\n\n> **ChannelMessageReactionMetadata** = [`CommonChannelMetadata`](CommonChannelMetadata.md) & \\{ `emoji`: `string`; `messageContent`: `string`; `messageId`: `string`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; \\}\n\nMetadata for a reaction added to one of the recipient's channel messages.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `emoji` | `string` | The emoji added by the reactor. |\n| `messageContent` | `string` | The reacted-to message content. |\n| `messageId` | `string` | The reacted-to message id. |\n| `senderProfilePictureUrl?` | `string` \\| `null` | Optional reactor profile picture URL. |\n| `threadId?` | `string` \\| `null` | The thread root id when the reacted-to message is a reply. |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelMessageSendMetadata.md -->\n# Type Alias: ChannelMessageSendMetadata\n\n> **ChannelMessageSendMetadata** = [`CommonChannelMetadata`](CommonChannelMetadata.md) & \\{ `messageContent?`: `string`; `messageId`: `string`; `sender?`: `string` \\| `null`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent?` | `string` | The content of the message |\n| `messageId` | `string` | The message id |\n| `sender?` | `string` \\| `null` | The user who sent the message, when sent by a user |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelReplyMetadata.md -->\n# Type Alias: ChannelReplyMetadata\n\n> **ChannelReplyMetadata** = [`CommonChannelMetadata`](CommonChannelMetadata.md) & \\{ `messageContent`: `string`; `messageId`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId`: `string`; `threadParentSenderId?`: `string` \\| `null`; `userId?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent` | `string` | The message content |\n| `messageId` | `string` | The id of the new message |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| `threadId` | `string` | The id of the thread that has the reply |\n| `threadParentSenderId?` | `string` \\| `null` | The user who sent the root message of the thread |\n| `userId?` | `string` \\| `null` | The sender id of the reply, when sent by a user |\n\n\n<!-- generated/notification/types.gen/type-aliases/ChannelType.md -->\n# Type Alias: ChannelType\n\n> **ChannelType** = `\"public\"` \\| `\"private\"` \\| `\"directMessage\"` \\| `\"team\"`\n\n\n<!-- generated/notification/types.gen/type-aliases/CommentRef.md -->\n# Type Alias: CommentRef\n\n> **CommentRef** = `number` \\| `string`\n\nIdentity of a document comment or its thread. Comments written before the\nshared message store carry the legacy numeric ids; comments in the shared\nstore carry the message and root UUIDs.\n\n\n<!-- generated/notification/types.gen/type-aliases/CommentedOnDocumentMetadata.md -->\n# Type Alias: CommentedOnDocumentMetadata\n\n> **CommentedOnDocumentMetadata** = \\{ `commentId`: [`CommentRef`](CommentRef.md); `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md); `text`: `string`; `threadId`: [`CommentRef`](CommentRef.md); \\}\n\nNotification sent when someone comments on a document the user owns.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | [`CommentRef`](CommentRef.md) | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md) | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | [`CommentRef`](CommentRef.md) | the thread id |\n\n\n<!-- generated/notification/types.gen/type-aliases/CommonChannelMetadata.md -->\n# Type Alias: CommonChannelMetadata\n\n> **CommonChannelMetadata** = \\{ `channelName?`: `string`; `channelType`: [`ChannelType`](ChannelType.md); \\}\n\nCommon metadata for notifications on channels\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` |\n| <a id=\"property-channeltype\"></a> `channelType` | [`ChannelType`](ChannelType.md) |\n\n\n<!-- generated/notification/types.gen/type-aliases/CrmDiscussionMetadata.md -->\n# Type Alias: CrmDiscussionMetadata\n\n> **CrmDiscussionMetadata** = \\{ `messageId`: `string`; `reason`: [`CrmDiscussionReason`](CrmDiscussionReason.md); `recordName`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `text`: `string`; `threadId`: `string`; \\}\n\nCRM discussion metadata. The notification entity identifies the company or\ncontact; message and thread UUIDs select the discussion inside it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Canonical shared message UUID. |\n| <a id=\"property-reason\"></a> `reason` | [`CrmDiscussionReason`](CrmDiscussionReason.md) | Semantic reason selected by the message delivery domain. |\n| <a id=\"property-recordname\"></a> `recordName` | `string` | Company or contact display name. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public display name for a bot author. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | Optional avatar for push notification attachments. |\n| <a id=\"property-text\"></a> `text` | `string` | Posted Markdown content. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Canonical discussion root UUID. |\n\n\n<!-- generated/notification/types.gen/type-aliases/CrmDiscussionReason.md -->\n# Type Alias: CrmDiscussionReason\n\n> **CrmDiscussionReason** = `\"mention\"` \\| `\"reply\"` \\| `\"owner\"`\n\nWhy a CRM discussion notification was delivered.\n\n\n<!-- generated/notification/types.gen/type-aliases/DocumentMentionMetadata.md -->\n# Type Alias: DocumentMentionMetadata\n\n> **DocumentMentionMetadata** = [`ChannelMentionMetadata`](ChannelMentionMetadata.md) & \\{ `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `subType?`: `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md); \\}\n\nSomeone mentioned a document in a channel\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `documentName` | `string` | The name of the document |\n| `fileType?` | `string` \\| `null` | The file type of the document |\n| `owner` | `string` | The owner of the document |\n| `subType?` | `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md) | - |\n\n\n<!-- generated/notification/types.gen/type-aliases/Entity.md -->\n# Type Alias: Entity\n\n> **Entity** = \\{ `entity_id`: `string`; `entity_type`: [`EntityType`](EntityType.md); \\}\n\nThe Entity describes the minimum amount of information required to describe a unique thing in Macro\nThis contains the type of the entity [EntityType] and the string id of that entity\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | The id of that entity |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`EntityType`](EntityType.md) | The type of entity we are describing |\n\n\n<!-- generated/notification/types.gen/type-aliases/EntityAccessGrantedMetadata.md -->\n# Type Alias: EntityAccessGrantedMetadata\n\n> **EntityAccessGrantedMetadata** = \\{ `accessLevel`: [`RequestedAccessLevel`](RequestedAccessLevel.md); `entityName`: `string`; `fileType?`: `string` \\| `null`; `requestId`: `string`; `revision`: `number`; \\}\n\nA person granted you access to a shared entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | [`RequestedAccessLevel`](RequestedAccessLevel.md) | Requested or granted permission. |\n| <a id=\"property-entityname\"></a> `entityName` | `string` | Shared item's name. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | Document file type for routing. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision that generated this notification. |\n\n\n<!-- generated/notification/types.gen/type-aliases/EntityAccessRequestedMetadata.md -->\n# Type Alias: EntityAccessRequestedMetadata\n\n> **EntityAccessRequestedMetadata** = \\{ `accessLevel`: [`RequestedAccessLevel`](RequestedAccessLevel.md); `entityName`: `string`; `fileType?`: `string` \\| `null`; `requestId`: `string`; `revision`: `number`; \\}\n\nA person requested access to a shared entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | [`RequestedAccessLevel`](RequestedAccessLevel.md) | Requested or granted permission. |\n| <a id=\"property-entityname\"></a> `entityName` | `string` | Shared item's name. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | Document file type for routing. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision that generated this notification. |\n\n\n<!-- generated/notification/types.gen/type-aliases/EntityType.md -->\n# Type Alias: EntityType\n\n> **EntityType** = `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`\n\nThe type of an entity in Macro\n\n\n<!-- generated/notification/types.gen/type-aliases/GetNotificationTypePreferencesResponse.md -->\n# Type Alias: GetNotificationTypePreferencesResponse\n\n> **GetNotificationTypePreferencesResponse** = \\{ `disabled_types`: `string`[]; \\}\n\nResponse for listing disabled notification types.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-disabled_types\"></a> `disabled_types` | `string`[] | The notification types that the user has disabled. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrCheckRun.md -->\n# Type Alias: GithubPrCheckRun\n\n> **GithubPrCheckRun** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `checkName`: `string`; `checkRunGithubId`: `number`; `checkStatus`: `string`; `checkUrl`: `string`; `completedAt`: `string`; `conclusion`: `string`; `state`: [`GithubPrCheckRunState`](GithubPrCheckRunState.md); \\}\n\nMetadata for a notification that a GitHub pull request check run completed.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checkName` | `string` | The display name GitHub reported for the check run. |\n| `checkRunGithubId` | `number` | The GitHub numeric id of the check run. |\n| `checkStatus` | `string` | The raw GitHub check run status. |\n| `checkUrl` | `string` | The public GitHub URL for the check run. |\n| `completedAt` | `string` | When GitHub marked the check run as complete. |\n| `conclusion` | `string` | The raw GitHub check run conclusion. |\n| `state` | [`GithubPrCheckRunState`](GithubPrCheckRunState.md) | The normalized notification state for this check run. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrCheckRunState.md -->\n# Type Alias: GithubPrCheckRunState\n\n> **GithubPrCheckRunState** = `\"completed\"` \\| `\"failed\"`\n\nThe normalized result state for a GitHub pull request check-run notification.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrComment.md -->\n# Type Alias: GithubPrComment\n\n> **GithubPrComment** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `commentGithubId?`: `number` \\| `null`; `commentKind`: [`GithubPrCommentKind`](GithubPrCommentKind.md); `commentSnippet`: `string`; `commentUrl?`: `string` \\| `null`; \\}\n\nMetadata for a notification that a GitHub pull request was commented on.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `commentGithubId?` | `number` \\| `null` | The GitHub numeric id of the comment, when available. |\n| `commentKind` | [`GithubPrCommentKind`](GithubPrCommentKind.md) | The kind of comment that was posted. |\n| `commentSnippet` | `string` | A truncated excerpt of the comment body. |\n| `commentUrl?` | `string` \\| `null` | The public GitHub URL for the comment, when available. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrCommentKind.md -->\n# Type Alias: GithubPrCommentKind\n\n> **GithubPrCommentKind** = `\"issue\"` \\| `\"review_comment\"`\n\nThe kind of GitHub comment that triggered a [`GithubPrComment`] notification.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrEventAction.md -->\n# Type Alias: GithubPrEventAction\n\n> **GithubPrEventAction** = `\"opened\"` \\| `\"reopened\"` \\| `\"closed\"`\n\nThe GitHub pull request webhook action that triggered the notification.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrEventStatus.md -->\n# Type Alias: GithubPrEventStatus\n\n> **GithubPrEventStatus** = `\"open\"` \\| `\"closed\"` \\| `\"merged\"`\n\nThe normalized lifecycle status for a GitHub pull request notification.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrMention.md -->\n# Type Alias: GithubPrMention\n\n> **GithubPrMention** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `commentGithubId?`: `number` \\| `null`; `commentUrl?`: `string` \\| `null`; `location`: [`GithubPrMentionLocation`](GithubPrMentionLocation.md); `textSnippet`: `string`; \\}\n\nMetadata for a notification that the user was mentioned on a GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `commentGithubId?` | `number` \\| `null` | The GitHub numeric id of the comment or review containing the mention, when available. |\n| `commentUrl?` | `string` \\| `null` | The public GitHub URL for the text containing the mention, when available. |\n| `location` | [`GithubPrMentionLocation`](GithubPrMentionLocation.md) | Where the mention appeared. |\n| `textSnippet` | `string` | A truncated excerpt of the text containing the mention. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrMentionLocation.md -->\n# Type Alias: GithubPrMentionLocation\n\n> **GithubPrMentionLocation** = `\"pr_body\"` \\| `\"comment\"` \\| `\"review\"` \\| `\"review_comment\"`\n\nWhere in a GitHub pull request the user was mentioned.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrNotificationCommon.md -->\n# Type Alias: GithubPrNotificationCommon\n\n> **GithubPrNotificationCommon** = \\{ `displayName`: `string`; `foreignEntityId`: `string`; `githubKey`: `string`; `number`: `number`; `owner`: `string`; `repo`: `string`; `senderGithubAvatarUrl?`: `string` \\| `null`; `senderGithubLogin?`: `string` \\| `null`; `senderGithubUserId?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\}\n\nFields shared by every GitHub pull request notification type.\n\nEmbedded with `#[serde(flatten)]` so the wire shape keeps these keys at the\ntop level of the metadata object.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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` | The source-specific internal foreign entity row id for this pull request. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The external GitHub key, in `owner/repo/pull/number` format. |\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-sendergithubavatarurl\"></a> `senderGithubAvatarUrl?` | `string` \\| `null` | The GitHub avatar URL for the sender, when available. |\n| <a id=\"property-sendergithublogin\"></a> `senderGithubLogin?` | `string` \\| `null` | The GitHub login for the sender, when available. |\n| <a id=\"property-sendergithubuserid\"></a> `senderGithubUserId?` | `string` \\| `null` | The stable GitHub numeric user id for the sender, serialized as a string. |\n| <a id=\"property-title\"></a> `title` | `string` | The GitHub pull request title. Falls back to `display_name` when GitHub has no title. |\n| <a id=\"property-url\"></a> `url` | `string` | The public GitHub URL for the pull request. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrReview.md -->\n# Type Alias: GithubPrReview\n\n> **GithubPrReview** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `reviewGithubId?`: `number` \\| `null`; `reviewSnippet?`: `string` \\| `null`; `reviewUrl?`: `string` \\| `null`; `state`: [`GithubPrReviewState`](GithubPrReviewState.md); \\}\n\nMetadata for a notification that a review was submitted on the user's GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `reviewGithubId?` | `number` \\| `null` | The GitHub numeric id of the review, when available. |\n| `reviewSnippet?` | `string` \\| `null` | A truncated excerpt of the review body, when any was written. |\n| `reviewUrl?` | `string` \\| `null` | The public GitHub URL for the review, when available. |\n| `state` | [`GithubPrReviewState`](GithubPrReviewState.md) | The review decision state. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrReviewState.md -->\n# Type Alias: GithubPrReviewState\n\n> **GithubPrReviewState** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"commented\"`\n\nThe state of a submitted GitHub pull request review.\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubPrStatusChanged.md -->\n# Type Alias: GithubPrStatusChanged\n\n> **GithubPrStatusChanged** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `action`: [`GithubPrEventAction`](GithubPrEventAction.md); `baseBranch?`: `string` \\| `null`; `headBranch?`: `string` \\| `null`; `mergedAt?`: `string` \\| `null`; `previousStatus?`: `null` \\| [`GithubPrEventStatus`](GithubPrEventStatus.md); `status`: [`GithubPrEventStatus`](GithubPrEventStatus.md); \\}\n\nMetadata for a GitHub pull request lifecycle notification.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action` | [`GithubPrEventAction`](GithubPrEventAction.md) | The webhook action that triggered this notification. |\n| `baseBranch?` | `string` \\| `null` | The pull request base branch, when available. |\n| `headBranch?` | `string` \\| `null` | The pull request head branch, when available. |\n| `mergedAt?` | `string` \\| `null` | When the pull request was merged, when available. |\n| `previousStatus?` | `null` \\| [`GithubPrEventStatus`](GithubPrEventStatus.md) | - |\n| `status` | [`GithubPrEventStatus`](GithubPrEventStatus.md) | The current normalized pull request status. |\n\n\n<!-- generated/notification/types.gen/type-aliases/GithubReviewRequested.md -->\n# Type Alias: GithubReviewRequested\n\n> **GithubReviewRequested** = [`GithubPrNotificationCommon`](GithubPrNotificationCommon.md) & \\{ `requestedReviewerGithubLogin?`: `string` \\| `null`; `requestedReviewerGithubUserId?`: `string` \\| `null`; \\}\n\nMetadata for a notification that the user's review was requested on a GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `requestedReviewerGithubLogin?` | `string` \\| `null` | The GitHub login of the requested reviewer, when available. |\n| `requestedReviewerGithubUserId?` | `string` \\| `null` | The stable GitHub numeric user id of the requested reviewer, serialized as a string. |\n\n\n<!-- generated/notification/types.gen/type-aliases/InboxReauthRequiredMetadata.md -->\n# Type Alias: InboxReauthRequiredMetadata\n\n> **InboxReauthRequiredMetadata** = \\{ `emailAddress`: `string`; \\}\n\nMetadata for a notification that a linked inbox's grant has died and the\ninbox must be reconnected. Fanned out to the inbox owner and every delegate,\nsince any of them holding the Google grant can restore sync.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | The address of the inbox that needs to be reconnected. |\n\n\n<!-- generated/notification/types.gen/type-aliases/InitiativeDiscussionMetadata.md -->\n# Type Alias: InitiativeDiscussionMetadata\n\n> **InitiativeDiscussionMetadata** = \\{ `messageId`: `string`; `owner`: `string`; `projectName`: `string`; `reason`: [`InitiativeDiscussionReason`](InitiativeDiscussionReason.md); `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `text`: `string`; `threadId`: `string`; \\}\n\nProject discussion metadata. The notification entity identifies the initiative;\nmessage and thread UUIDs select the discussion inside that project.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Canonical shared message UUID. |\n| <a id=\"property-owner\"></a> `owner` | `string` | Authenticated project owner. |\n| <a id=\"property-projectname\"></a> `projectName` | `string` | Name displayed in the project header. |\n| <a id=\"property-reason\"></a> `reason` | [`InitiativeDiscussionReason`](InitiativeDiscussionReason.md) | Semantic reason selected by the message delivery domain. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public display name for a bot author. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | Optional avatar for push notification attachments. |\n| <a id=\"property-text\"></a> `text` | `string` | Posted Markdown content. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Canonical discussion root UUID. |\n\n\n<!-- generated/notification/types.gen/type-aliases/InitiativeDiscussionReason.md -->\n# Type Alias: InitiativeDiscussionReason\n\n> **InitiativeDiscussionReason** = `\"mention\"` \\| `\"reply\"` \\| `\"assignee\"` \\| `\"owner\"`\n\nWhy a project discussion notification was delivered.\n\n\n<!-- generated/notification/types.gen/type-aliases/InviteToTeamMetadata.md -->\n# Type Alias: InviteToTeamMetadata\n\n> **InviteToTeamMetadata** = \\{ `invitedBy`: `string`; `inviteePlan?`: [`InviteePlan`](InviteePlan.md); `reminder?`: `boolean`; `role?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `teamId`: `string`; `teamInviteId`: `string`; `teamName`: `string`; \\}\n\nMetadata for when a user is invited to a team.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-invitedby\"></a> `invitedBy` | `string` | The user who sent the invitation |\n| <a id=\"property-inviteeplan\"></a> `inviteePlan?` | [`InviteePlan`](InviteePlan.md) | What the invitee gets by joining, as the team stood when the invite was sent. |\n| <a id=\"property-reminder\"></a> `reminder?` | `boolean` | Whether this email reminds the invitee of an invite they have not answered. |\n| <a id=\"property-role\"></a> `role?` | `string` \\| `null` | Role/permission level in the team |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | The sender's profile picture URL, if available. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | The unique identifier of the team |\n| <a id=\"property-teaminviteid\"></a> `teamInviteId` | `string` | The unique identifier of the team invite |\n| <a id=\"property-teamname\"></a> `teamName` | `string` | The name of the team being invited to |\n\n\n<!-- generated/notification/types.gen/type-aliases/InviteePlan.md -->\n# Type Alias: InviteePlan\n\n> **InviteePlan** = `\"free\"` \\| `\"premium\"`\n\nWhat a team invitee gets by joining.\n\n\n<!-- generated/notification/types.gen/type-aliases/MentionedInDocumentCommentMetadata.md -->\n# Type Alias: MentionedInDocumentCommentMetadata\n\n> **MentionedInDocumentCommentMetadata** = \\{ `commentId`: [`CommentRef`](CommentRef.md); `documentName`: `string`; `fileType?`: `string` \\| `null`; `mentionId`: `string`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md); `text`: `string`; `threadId`: [`CommentRef`](CommentRef.md); \\}\n\nNotification sent when a user is mentioned in a document comment.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | [`CommentRef`](CommentRef.md) | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-mentionid\"></a> `mentionId` | `string` | The mention ID. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md) | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | [`CommentRef`](CommentRef.md) | the thread id |\n\n\n<!-- generated/notification/types.gen/type-aliases/NewEmailMetadata.md -->\n# Type Alias: NewEmailMetadata\n\n> **NewEmailMetadata** = \\{ `sender?`: `string` \\| `null`; `snippet`: `string`; `subject`: `string`; `threadId`: `string`; `toEmail`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-sender\"></a> `sender?` | `string` \\| `null` |\n| <a id=\"property-snippet\"></a> `snippet` | `string` |\n| <a id=\"property-subject\"></a> `subject` | `string` |\n| <a id=\"property-threadid\"></a> `threadId` | `string` |\n| <a id=\"property-toemail\"></a> `toEmail` | `string` |\n\n\n<!-- generated/notification/types.gen/type-aliases/NotifEvent.md -->\n# Type Alias: NotifEvent\n\n> **NotifEvent** = \\{ `content`: [`ChannelMentionMetadata`](ChannelMentionMetadata.md); `tag`: `\"channel_mention\"`; \\} \\| \\{ `content`: [`DocumentMentionMetadata`](DocumentMentionMetadata.md); `tag`: `\"document_mention\"`; \\} \\| \\{ `content`: [`MentionedInDocumentCommentMetadata`](MentionedInDocumentCommentMetadata.md); `tag`: `\"mentioned_in_document_comment\"`; \\} \\| \\{ `content`: [`RepliedToDocumentCommentThreadMetadata`](RepliedToDocumentCommentThreadMetadata.md); `tag`: `\"replied_to_document_comment_thread\"`; \\} \\| \\{ `content`: [`CommentedOnDocumentMetadata`](CommentedOnDocumentMetadata.md); `tag`: `\"commented_on_document\"`; \\} \\| \\{ `content`: [`EntityAccessRequestedMetadata`](EntityAccessRequestedMetadata.md); `tag`: `\"entity_access_requested\"`; \\} \\| \\{ `content`: [`EntityAccessGrantedMetadata`](EntityAccessGrantedMetadata.md); `tag`: `\"entity_access_granted\"`; \\} \\| \\{ `content`: [`InitiativeDiscussionMetadata`](InitiativeDiscussionMetadata.md); `tag`: `\"initiative_discussion\"`; \\} \\| \\{ `content`: [`CrmDiscussionMetadata`](CrmDiscussionMetadata.md); `tag`: `\"crm_discussion\"`; \\} \\| \\{ `content`: [`ChannelInviteMetadata`](ChannelInviteMetadata.md); `tag`: `\"channel_invite\"`; \\} \\| \\{ `content`: [`ChannelMessageSendMetadata`](ChannelMessageSendMetadata.md); `tag`: `\"channel_message_send\"`; \\} \\| \\{ `content`: [`ChannelReplyMetadata`](ChannelReplyMetadata.md); `tag`: `\"channel_message_reply\"`; \\} \\| \\{ `content`: [`CallStartedMetadata`](CallStartedMetadata.md); `tag`: `\"call_started\"`; \\} \\| \\{ `content`: [`NewEmailMetadata`](NewEmailMetadata.md); `tag`: `\"new_email\"`; \\} \\| \\{ `content`: [`InboxReauthRequiredMetadata`](InboxReauthRequiredMetadata.md); `tag`: `\"inbox_reauth_required\"`; \\} \\| \\{ `content`: [`InviteToTeamMetadata`](InviteToTeamMetadata.md); `tag`: `\"invite_to_team\"`; \\} \\| \\{ `content`: [`TaskAssignedMetadata`](TaskAssignedMetadata.md); `tag`: `\"task_assigned\"`; \\} \\| \\{ `content`: [`ReminderMetadata`](ReminderMetadata.md); `tag`: `\"reminder\"`; \\} \\| \\{ `content`: [`WhatsappGroupMessageMetadata`](WhatsappGroupMessageMetadata.md); `tag`: `\"whatsapp_group_message\"`; \\} \\| \\{ `content`: [`CalendarEventReminderMetadata`](CalendarEventReminderMetadata.md); `tag`: `\"calendar_event_reminder\"`; \\} \\| \\{ `content`: [`AiResponseMetadata`](AiResponseMetadata.md); `tag`: `\"ai_response\"`; \\} \\| \\{ `content`: [`GithubPrStatusChanged`](GithubPrStatusChanged.md); `tag`: `\"github_pr_status_changed\"`; \\} \\| \\{ `content`: [`GithubPrCheckRun`](GithubPrCheckRun.md); `tag`: `\"github_pr_check_run\"`; \\} \\| \\{ `content`: [`GithubReviewRequested`](GithubReviewRequested.md); `tag`: `\"github_review_requested\"`; \\} \\| \\{ `content`: [`GithubPrComment`](GithubPrComment.md); `tag`: `\"github_pr_comment\"`; \\} \\| \\{ `content`: [`GithubPrMention`](GithubPrMention.md); `tag`: `\"github_pr_mention\"`; \\} \\| \\{ `content`: [`GithubPrReview`](GithubPrReview.md); `tag`: `\"github_pr_review\"`; \\} \\| \\{ `content`: [`AgentSessionSettledMetadata`](AgentSessionSettledMetadata.md); `tag`: `\"agent_session_settled\"`; \\} \\| \\{ `content`: [`AgentSessionWaitingForInputMetadata`](AgentSessionWaitingForInputMetadata.md); `tag`: `\"agent_session_waiting_for_input\"`; \\} \\| \\{ `content`: [`AgentSessionMentionedMetadata`](AgentSessionMentionedMetadata.md); `tag`: `\"agent_session_mentioned\"`; \\} \\| \\{ `content`: [`ChannelMessageReactionMetadata`](ChannelMessageReactionMetadata.md); `tag`: `\"channel_message_reaction\"`; \\} \\| \\{ `content`: [`CalendarEventJoinRequestMetadata`](CalendarEventJoinRequestMetadata.md); `tag`: `\"calendar_event_join_request\"`; \\}\n\nMirrors [`model_notifications::NotificationEvent`] but uses `tag` / `content`\nas the serde adjacently-tagged field names so it can be deserialized from the\nshape produced by [`UserNotificationRow::into_tagged`] +\n[`UserNotificationRow::into_json`].\n\nOnly includes variants whose metadata types implement the `Notification` trait.\n\n## Union Members\n\n### Type Literal\n\n\\{ `content`: [`ChannelMentionMetadata`](ChannelMentionMetadata.md); `tag`: `\"channel_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ChannelMentionMetadata`](ChannelMentionMetadata.md) | Someone mentioned you in a channel. |\n| `tag` | `\"channel_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`DocumentMentionMetadata`](DocumentMentionMetadata.md); `tag`: `\"document_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`DocumentMentionMetadata`](DocumentMentionMetadata.md) | Someone mentioned a document in a channel. |\n| `tag` | `\"document_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`MentionedInDocumentCommentMetadata`](MentionedInDocumentCommentMetadata.md); `tag`: `\"mentioned_in_document_comment\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`MentionedInDocumentCommentMetadata`](MentionedInDocumentCommentMetadata.md) | User was mentioned in a comment in a document |\n| `tag` | `\"mentioned_in_document_comment\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`RepliedToDocumentCommentThreadMetadata`](RepliedToDocumentCommentThreadMetadata.md); `tag`: `\"replied_to_document_comment_thread\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`RepliedToDocumentCommentThreadMetadata`](RepliedToDocumentCommentThreadMetadata.md) | Someone replied to a document comment thread the user participated in. |\n| `tag` | `\"replied_to_document_comment_thread\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`CommentedOnDocumentMetadata`](CommentedOnDocumentMetadata.md); `tag`: `\"commented_on_document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`CommentedOnDocumentMetadata`](CommentedOnDocumentMetadata.md) | Someone commented on a document the user owns. |\n| `tag` | `\"commented_on_document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`EntityAccessRequestedMetadata`](EntityAccessRequestedMetadata.md); `tag`: `\"entity_access_requested\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`EntityAccessRequestedMetadata`](EntityAccessRequestedMetadata.md) | Someone requested more access to a shared entity. |\n| `tag` | `\"entity_access_requested\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`EntityAccessGrantedMetadata`](EntityAccessGrantedMetadata.md); `tag`: `\"entity_access_granted\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`EntityAccessGrantedMetadata`](EntityAccessGrantedMetadata.md) | An owner granted requested access. |\n| `tag` | `\"entity_access_granted\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`InitiativeDiscussionMetadata`](InitiativeDiscussionMetadata.md); `tag`: `\"initiative_discussion\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`InitiativeDiscussionMetadata`](InitiativeDiscussionMetadata.md) | Someone commented, replied, or mentioned the recipient on a project. |\n| `tag` | `\"initiative_discussion\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`CrmDiscussionMetadata`](CrmDiscussionMetadata.md); `tag`: `\"crm_discussion\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`CrmDiscussionMetadata`](CrmDiscussionMetadata.md) | Someone commented, replied, or mentioned the recipient on a CRM company or contact. |\n| `tag` | `\"crm_discussion\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`ChannelInviteMetadata`](ChannelInviteMetadata.md); `tag`: `\"channel_invite\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ChannelInviteMetadata`](ChannelInviteMetadata.md) | The user was invited to a channel. |\n| `tag` | `\"channel_invite\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`ChannelMessageSendMetadata`](ChannelMessageSendMetadata.md); `tag`: `\"channel_message_send\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ChannelMessageSendMetadata`](ChannelMessageSendMetadata.md) | A user sent a message in a channel. |\n| `tag` | `\"channel_message_send\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`ChannelReplyMetadata`](ChannelReplyMetadata.md); `tag`: `\"channel_message_reply\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ChannelReplyMetadata`](ChannelReplyMetadata.md) | Someone replied to a thread in a channel that the user is part of. |\n| `tag` | `\"channel_message_reply\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`CallStartedMetadata`](CallStartedMetadata.md); `tag`: `\"call_started\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`CallStartedMetadata`](CallStartedMetadata.md) | A call has started in a channel the user is a member of. The `call-started` alias keeps rows persisted before the type name was normalized to snake_case (`call_started`) deserializable. |\n| `tag` | `\"call_started\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`NewEmailMetadata`](NewEmailMetadata.md); `tag`: `\"new_email\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`NewEmailMetadata`](NewEmailMetadata.md) | A new email has been sent to the user. |\n| `tag` | `\"new_email\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`InboxReauthRequiredMetadata`](InboxReauthRequiredMetadata.md); `tag`: `\"inbox_reauth_required\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`InboxReauthRequiredMetadata`](InboxReauthRequiredMetadata.md) | A linked inbox's grant died and must be reconnected. |\n| `tag` | `\"inbox_reauth_required\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`InviteToTeamMetadata`](InviteToTeamMetadata.md); `tag`: `\"invite_to_team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`InviteToTeamMetadata`](InviteToTeamMetadata.md) | A user was invited to a team. |\n| `tag` | `\"invite_to_team\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`TaskAssignedMetadata`](TaskAssignedMetadata.md); `tag`: `\"task_assigned\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`TaskAssignedMetadata`](TaskAssignedMetadata.md) | A user was assigned to a task. |\n| `tag` | `\"task_assigned\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`ReminderMetadata`](ReminderMetadata.md); `tag`: `\"reminder\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ReminderMetadata`](ReminderMetadata.md) | A reminder the user set for themselves came due. |\n| `tag` | `\"reminder\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`WhatsappGroupMessageMetadata`](WhatsappGroupMessageMetadata.md); `tag`: `\"whatsapp_group_message\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`WhatsappGroupMessageMetadata`](WhatsappGroupMessageMetadata.md) | A live message in a shared WhatsApp group. |\n| `tag` | `\"whatsapp_group_message\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`CalendarEventReminderMetadata`](CalendarEventReminderMetadata.md); `tag`: `\"calendar_event_reminder\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`CalendarEventReminderMetadata`](CalendarEventReminderMetadata.md) | A calendar event alarm came due. |\n| `tag` | `\"calendar_event_reminder\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`AiResponseMetadata`](AiResponseMetadata.md); `tag`: `\"ai_response\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`AiResponseMetadata`](AiResponseMetadata.md) | An AI assistant responded to a chat. |\n| `tag` | `\"ai_response\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubPrStatusChanged`](GithubPrStatusChanged.md); `tag`: `\"github_pr_status_changed\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubPrStatusChanged`](GithubPrStatusChanged.md) | A GitHub pull request changed lifecycle state. The `github_pr_event` alias keeps rows and queue messages persisted before the rename deserializable. |\n| `tag` | `\"github_pr_status_changed\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubPrCheckRun`](GithubPrCheckRun.md); `tag`: `\"github_pr_check_run\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubPrCheckRun`](GithubPrCheckRun.md) | A GitHub pull request check run completed. |\n| `tag` | `\"github_pr_check_run\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubReviewRequested`](GithubReviewRequested.md); `tag`: `\"github_review_requested\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubReviewRequested`](GithubReviewRequested.md) | The user's review was requested on a GitHub pull request. |\n| `tag` | `\"github_review_requested\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubPrComment`](GithubPrComment.md); `tag`: `\"github_pr_comment\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubPrComment`](GithubPrComment.md) | A GitHub pull request was commented on. |\n| `tag` | `\"github_pr_comment\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubPrMention`](GithubPrMention.md); `tag`: `\"github_pr_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubPrMention`](GithubPrMention.md) | The user was mentioned on a GitHub pull request. |\n| `tag` | `\"github_pr_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`GithubPrReview`](GithubPrReview.md); `tag`: `\"github_pr_review\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`GithubPrReview`](GithubPrReview.md) | A review was submitted on the user's GitHub pull request. |\n| `tag` | `\"github_pr_review\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`AgentSessionSettledMetadata`](AgentSessionSettledMetadata.md); `tag`: `\"agent_session_settled\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`AgentSessionSettledMetadata`](AgentSessionSettledMetadata.md) | An agent finished a turn with nothing queued behind it. |\n| `tag` | `\"agent_session_settled\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`AgentSessionWaitingForInputMetadata`](AgentSessionWaitingForInputMetadata.md); `tag`: `\"agent_session_waiting_for_input\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`AgentSessionWaitingForInputMetadata`](AgentSessionWaitingForInputMetadata.md) | An agent is blocked on a question for the session's owner. |\n| `tag` | `\"agent_session_waiting_for_input\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`AgentSessionMentionedMetadata`](AgentSessionMentionedMetadata.md); `tag`: `\"agent_session_mentioned\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`AgentSessionMentionedMetadata`](AgentSessionMentionedMetadata.md) | The user was named in a prompt to an agent session. |\n| `tag` | `\"agent_session_mentioned\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`ChannelMessageReactionMetadata`](ChannelMessageReactionMetadata.md); `tag`: `\"channel_message_reaction\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`ChannelMessageReactionMetadata`](ChannelMessageReactionMetadata.md) | Someone reacted to one of the user's channel messages. |\n| `tag` | `\"channel_message_reaction\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: [`CalendarEventJoinRequestMetadata`](CalendarEventJoinRequestMetadata.md); `tag`: `\"calendar_event_join_request\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | [`CalendarEventJoinRequestMetadata`](CalendarEventJoinRequestMetadata.md) | A channel member asked to be added as a guest of an event the user shared with the channel. |\n| `tag` | `\"calendar_event_join_request\"` | - |\n\n\n<!-- generated/notification/types.gen/type-aliases/NotificationDocumentSubType.md -->\n# Type Alias: NotificationDocumentSubType\n\n> **NotificationDocumentSubType** = \\{ `type`: `\"task\"`; \\} \\| \\{ `type`: `\"snippet\"`; \\} \\| \\{ `type`: `\"skill\"`; \\} \\| \\{ `type`: `\"initiative_description\"`; \\}\n\nThe sub type of a document in a notification.\nSerializes as `{ \"type\": \"task\" }` matching the storage service pattern.\n\n\n<!-- generated/notification/types.gen/type-aliases/NotificationState.md -->\n# Type Alias: NotificationState\n\n> **NotificationState** = `\"unseen\"` \\| `\"seen\"` \\| `\"done\"`\n\nThe mutually exclusive lifecycle states of a user's notification.\n\n\n<!-- generated/notification/types.gen/type-aliases/ReminderMetadata.md -->\n# Type Alias: ReminderMetadata\n\n> **ReminderMetadata** = \\{ `description`: `string`; `reminderId`: `string`; `scheduledFor?`: `string` \\| `null`; \\}\n\nMetadata for a reminder the user set for themselves coming due.\n\nThere is no sender: a reminder is self-set, so the dispatcher sends it with\n`sender_id: None` (a recipient who is also the sender is filtered out of\ntheir own notification). Every formatter here must therefore work without\none.\n\nThe associated entity, when there is one, lives on the notification row\nrather than in here, and clients resolve its name from that — so the\ndispatcher does not have to look up a name across five entity types.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What the user asked to be reminded about. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | The reminder that fired. |\n| <a id=\"property-scheduledfor\"></a> `scheduledFor?` | `string` \\| `null` | Which firing this is — the occurrence the reminder came due for. What distinguishes two firings of the same recurring reminder, which are otherwise identical: same id, same description. The collapse key is built from it, so without it Tuesday's alert would replace Monday's unread one on the lock screen. Optional because notifications written before recurring dispatch existed have no such field, and they still have to read back. |\n\n\n<!-- generated/notification/types.gen/type-aliases/RepliedToDocumentCommentThreadMetadata.md -->\n# Type Alias: RepliedToDocumentCommentThreadMetadata\n\n> **RepliedToDocumentCommentThreadMetadata** = \\{ `commentId`: [`CommentRef`](CommentRef.md); `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md); `text`: `string`; `threadId`: [`CommentRef`](CommentRef.md); \\}\n\nNotification sent when someone replies to a document comment thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | [`CommentRef`](CommentRef.md) | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md) | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | [`CommentRef`](CommentRef.md) | the thread id |\n\n\n<!-- generated/notification/types.gen/type-aliases/RequestedAccessLevel.md -->\n# Type Alias: RequestedAccessLevel\n\n> **RequestedAccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"`\n\nPermission level used by an access request, excluding ownership.\n\n\n<!-- generated/notification/types.gen/type-aliases/TaskAssignedMetadata.md -->\n# Type Alias: TaskAssignedMetadata\n\n> **TaskAssignedMetadata** = \\{ `assignedBy`: `string`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md); `taskId`: `string`; `taskName?`: `string` \\| `null`; \\}\n\nMetadata for when a user is assigned to a task\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-assignedby\"></a> `assignedBy` | `string` | The user who assigned the task |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| [`NotificationDocumentSubType`](NotificationDocumentSubType.md) | - |\n| <a id=\"property-taskid\"></a> `taskId` | `string` | The unique identifier of the task |\n| <a id=\"property-taskname\"></a> `taskName?` | `string` \\| `null` | The name of the task (optional) |\n\n\n<!-- generated/notification/types.gen/type-aliases/WhatsappGroupMessageMetadata.md -->\n# Type Alias: WhatsappGroupMessageMetadata\n\n> **WhatsappGroupMessageMetadata** = \\{ `groupName`: `string`; `messageId`: `string`; \\}\n\nA live message in an independently shared WhatsApp group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-groupname\"></a> `groupName` | `string` | Group name, independent of its remote subject. |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Stable message id; retries use it as their notification id. |\n\n\n<!-- src/entities/notifications/namespace/classes/NotificationNamespace.md -->\n# Class: NotificationNamespace\n\n## Constructors\n\n### Constructor\n\n> **new NotificationNamespace**(`client`): `NotificationNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`NotificationNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Notification`](../../notification/classes/Notification.md)\n\nA handle to a notification by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Notification`](../../notification/classes/Notification.md)\n\n***\n\n### delete()\n\n> **delete**(`ids`): `Promise`\\<`void`\\>\n\nDelete a batch of notifications.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### disableType()\n\n> **disableType**(`type`): `Promise`\\<`void`\\>\n\nDisable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### enableType()\n\n> **enableType**(`type`): `Promise`\\<`void`\\>\n\nRe-enable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(`opts?`): `AsyncGenerator`\\<[`Notification`](../../notification/classes/Notification.md)\\>\n\nThe viewer's notification feed, 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`\\<[`Notification`](../../notification/classes/Notification.md)\\>\n\n***\n\n### markDone()\n\n> **markDone**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as done.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as seen.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### preferences()\n\n> **preferences**(): `Promise`\\<[`GetNotificationTypePreferencesResponse`](../../../../../generated/notification/types.gen/type-aliases/GetNotificationTypePreferencesResponse.md)\\>\n\nThe viewer's notification type preferences (disabled types).\n\n#### Returns\n\n`Promise`\\<[`GetNotificationTypePreferencesResponse`](../../../../../generated/notification/types.gen/type-aliases/GetNotificationTypePreferencesResponse.md)\\>\n\n\n<!-- src/entities/notifications/namespace/type-aliases/NotificationType.md -->\n# Type Alias: NotificationType\n\n> **NotificationType** = [`NotifEvent`](../../../../../generated/notification/types.gen/type-aliases/NotifEvent.md)\\[`\"tag\"`\\]\n\nA notification event type name, e.g. `channel_mention`.\n\n\n<!-- src/entities/notifications/notification/classes/Notification.md -->\n# Class: Notification\n\nA notification in the viewer's feed.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<`NotificationDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the notification was created. | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the notification was deleted, if it has been. | - |\n| <a id=\"property-done\"></a> `done` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the notification is completed. | - |\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-metadata\"></a> `metadata` | `readonly` | () => `Promise`\\<[`NotifEvent`](../../../../../generated/notification/types.gen/type-aliases/NotifEvent.md)\\> | The typed notification payload (tagged by event type). | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The user who owns (receives) this notification. | - |\n| <a id=\"property-sender\"></a> `sender` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md) \\| `undefined`\\> | The user who triggered the notification, if any. | - |\n| <a id=\"property-sent\"></a> `sent` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the notification has been sent (delivered out of band). | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<[`NotificationState`](../../../../../generated/notification/types.gen/type-aliases/NotificationState.md)\\> | The authoritative lifecycle state, independent of viewing timestamps. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<`string`\\> | The notification event type (e.g. `channel_mention`). | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the notification was last updated. | - |\n| <a id=\"property-viewedat\"></a> `viewedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the notification was viewed, if it has been seen. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the notification.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### markDone()\n\n> **markDone**(): `Promise`\\<`void`\\>\n\nMark the notification as done.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the notification as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### markUndone()\n\n> **markUndone**(): `Promise`\\<`void`\\>\n\nMove the notification back to not-done.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### seen()\n\n> **seen**(): `Promise`\\<`boolean`\\>\n\nWhether the notification is acknowledged (seen or done).\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ApiUserNotification`](../../../../../generated/notification/types.gen/type-aliases/ApiUserNotification.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`ApiUserNotification`](../../../../../generated/notification/types.gen/type-aliases/ApiUserNotification.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ApiUserNotification`](../../../../../generated/notification/types.gen/type-aliases/ApiUserNotification.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`, `id`): `Notification`\n\nA handle to a notification 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`Notification`\n\n***\n\n### from()\n\n> `static` **from**(`client`, `data`): `Notification`\n\nBuild a notification from a list-endpoint record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | [`ApiUserNotification`](../../../../../generated/notification/types.gen/type-aliases/ApiUserNotification.md) |\n\n#### Returns\n\n`Notification`\n\n***\n\n### list()\n\n> `static` **list**(`client`, `opts?`): `AsyncGenerator`\\<`Notification`\\>\n\nThe viewer's notification feed, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | \\{ `pageSize?`: `number`; `states?`: [`NotificationState`](../../../../../generated/notification/types.gen/type-aliases/NotificationState.md)[]; \\} |\n| `opts.pageSize?` | `number` |\n| `opts.states?` | [`NotificationState`](../../../../../generated/notification/types.gen/type-aliases/NotificationState.md)[] |\n\n#### Returns\n\n`AsyncGenerator`\\<`Notification`\\>\n"- },- {- "name": "pins",- "description": "Manage pinned entities.",- "overview": "<!-- src/entities/pins/namespace/classes/PinsNamespace.md -->\n# Class: PinsNamespace\n\nThe user's pins: items pinned to fixed slots in the home view.\n\n## Constructors\n\n### Constructor\n\n> **new PinsNamespace**(`client`): `PinsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`PinsNamespace`\n\n## Methods\n\n### add()\n\n> **add**(`entity`, `opts`): `Promise`\\<`void`\\>\n\nPin an entity to a slot. `index` is the slot to put it in.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n| `opts` | \\{ `index`: `number`; \\} |\n| `opts.index` | `number` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`PinnedItem`](../../../../../generated/storage/types.gen/type-aliases/PinnedItem.md)[]\\>\n\nThe user's pinned items, with their pin indices.\n\n#### Returns\n\n`Promise`\\<[`PinnedItem`](../../../../../generated/storage/types.gen/type-aliases/PinnedItem.md)[]\\>\n\n***\n\n### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nUnpin an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reorder()\n\n> **reorder**(`pins`): `Promise`\\<`void`\\>\n\nReorder pins: pass each pinned item with its type and new index.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `pins` | [`ReorderPinRequest`](../../../../../generated/storage/types.gen/type-aliases/ReorderPinRequest.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n",- "documentation": "# Macro SDK: pins\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/BasicDocument.md -->\n# Type Alias: BasicDocument\n\n> **BasicDocument** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `owner`: `string`; `projectId?`: `string` \\| `null`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| [`BasicDocumentSubType`](BasicDocumentSubType.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-documentfamilyid\"></a> `documentFamilyId?` | `number` \\| `null` | The id of the document family this document belongs to |\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 (e.g. pdf, docx) |\n| <a id=\"property-id\"></a> `id` | `string` | The document id |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the document |\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-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` \\| [`BasicDocumentSubType`](BasicDocumentSubType.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/BasicDocumentSubType.md -->\n# Type Alias: BasicDocumentSubType\n\n> **BasicDocumentSubType** = \\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\} \\| \\{ `type`: `\"snippet\"`; \\} \\| \\{ `type`: `\"skill\"`; \\} \\| \\{ `type`: `\"initiative_description\"`; \\}\n\nSub type of a document with associated properties encoded in each variant.\nThis ensures type-safety: task properties only exist when the document is a task.\n\n## Union Members\n\n### Type Literal\n\n\\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `is_completed` | `boolean` | Whether the task is completed. True if the Status property is set to \"Completed\". |\n| `type` | `\"task\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"snippet\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"skill\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"initiative_description\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/Chat.md -->\n# Type Alias: Chat\n\n> **Chat** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `isPersistent`: `boolean`; `model?`: `string` \\| `null`; `name`: `string`; `projectId?`: `string` \\| `null`; `tokenCount?`: `number` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the chat was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | The time the chat was deleted |\n| <a id=\"property-id\"></a> `id` | `string` | The chat uuid |\n| <a id=\"property-ispersistent\"></a> `isPersistent` | `boolean` | - |\n| <a id=\"property-model\"></a> `model?` | `string` \\| `null` | The model used to generate the chat |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the chat |\n| <a id=\"property-projectid\"></a> `projectId?` | `string` \\| `null` | The project id of the chat |\n| <a id=\"property-tokencount\"></a> `tokenCount?` | `number` \\| `null` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the chat was last updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | Who the chat belongs to |\n\n\n<!-- generated/storage/types.gen/type-aliases/Item.md -->\n# Type Alias: Item\n\n> **Item** = \\{ `type`: `\"document\"`; \\} & [`BasicDocument`](BasicDocument.md) \\| \\{ `type`: `\"chat\"`; \\} & [`Chat`](Chat.md) \\| \\{ `type`: `\"project\"`; \\} & [`Project`](Project.md)\n\n\n<!-- generated/storage/types.gen/type-aliases/PinnedItem.md -->\n# Type Alias: PinnedItem\n\n> **PinnedItem** = \\{ `activity`: [`Item`](Item.md); `item`: [`Item`](Item.md); `pinIndex`: `number`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-activity\"></a> `activity` | [`Item`](Item.md) | legacy will be removed later |\n| <a id=\"property-item\"></a> `item` | [`Item`](Item.md) | The activity that was pinned |\n| <a id=\"property-pinindex\"></a> `pinIndex` | `number` | The pin index |\n\n\n<!-- generated/storage/types.gen/type-aliases/Project.md -->\n# Type Alias: Project\n\n> **Project** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `parentId?`: `string` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the project was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | - |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the project |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the project |\n| <a id=\"property-parentid\"></a> `parentId?` | `string` \\| `null` | The parent project id |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the project was updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | The user id of who created the project |\n\n\n<!-- generated/storage/types.gen/type-aliases/ReorderPinRequest.md -->\n# Type Alias: ReorderPinRequest\n\n> **ReorderPinRequest** = \\{ `pinIndex`: `number`; `pinnedItemId`: `string`; `pinnedItemType`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pinindex\"></a> `pinIndex` | `number` | The index of the pin |\n| <a id=\"property-pinneditemid\"></a> `pinnedItemId` | `string` | The id of the pinned item |\n| <a id=\"property-pinneditemtype\"></a> `pinnedItemType` | `string` | The type of the pin |\n\n\n<!-- src/entities/pins/namespace/classes/PinsNamespace.md -->\n# Class: PinsNamespace\n\nThe user's pins: items pinned to fixed slots in the home view.\n\n## Constructors\n\n### Constructor\n\n> **new PinsNamespace**(`client`): `PinsNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`PinsNamespace`\n\n## Methods\n\n### add()\n\n> **add**(`entity`, `opts`): `Promise`\\<`void`\\>\n\nPin an entity to a slot. `index` is the slot to put it in.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n| `opts` | \\{ `index`: `number`; \\} |\n| `opts.index` | `number` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`PinnedItem`](../../../../../generated/storage/types.gen/type-aliases/PinnedItem.md)[]\\>\n\nThe user's pinned items, with their pin indices.\n\n#### Returns\n\n`Promise`\\<[`PinnedItem`](../../../../../generated/storage/types.gen/type-aliases/PinnedItem.md)[]\\>\n\n***\n\n### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nUnpin an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | [`FavoritableEntity`](../../../entity/classes/FavoritableEntity.md)\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### reorder()\n\n> **reorder**(`pins`): `Promise`\\<`void`\\>\n\nReorder pins: pass each pinned item with its type and new index.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `pins` | [`ReorderPinRequest`](../../../../../generated/storage/types.gen/type-aliases/ReorderPinRequest.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n"- },- {- "name": "projects",- "description": "Organize entities into projects.",- "overview": "<!-- src/entities/projects/namespace/classes/ProjectNamespace.md -->\n# Class: ProjectNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ProjectNamespace**(`client`): `ProjectNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ProjectNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Project`](../../project/classes/Project.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Project`](../../project/classes/Project.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Project`](../../project/classes/Project.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `parent?`: [`Project`](../../project/classes/Project.md); \\} |\n| `opts.name` | `string` |\n| `opts.parent?` | [`Project`](../../project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Project`](../../project/classes/Project.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Project`](../../project/classes/Project.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`\\<[`Project`](../../project/classes/Project.md)\\>\n",- "documentation": "# Macro SDK: projects\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/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/BasicDocument.md -->\n# Type Alias: BasicDocument\n\n> **BasicDocument** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `owner`: `string`; `projectId?`: `string` \\| `null`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| [`BasicDocumentSubType`](BasicDocumentSubType.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-documentfamilyid\"></a> `documentFamilyId?` | `number` \\| `null` | The id of the document family this document belongs to |\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 (e.g. pdf, docx) |\n| <a id=\"property-id\"></a> `id` | `string` | The document id |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the document |\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-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` \\| [`BasicDocumentSubType`](BasicDocumentSubType.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/BasicDocumentSubType.md -->\n# Type Alias: BasicDocumentSubType\n\n> **BasicDocumentSubType** = \\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\} \\| \\{ `type`: `\"snippet\"`; \\} \\| \\{ `type`: `\"skill\"`; \\} \\| \\{ `type`: `\"initiative_description\"`; \\}\n\nSub type of a document with associated properties encoded in each variant.\nThis ensures type-safety: task properties only exist when the document is a task.\n\n## Union Members\n\n### Type Literal\n\n\\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `is_completed` | `boolean` | Whether the task is completed. True if the Status property is set to \"Completed\". |\n| `type` | `\"task\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"snippet\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"skill\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"initiative_description\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/Chat.md -->\n# Type Alias: Chat\n\n> **Chat** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `isPersistent`: `boolean`; `model?`: `string` \\| `null`; `name`: `string`; `projectId?`: `string` \\| `null`; `tokenCount?`: `number` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the chat was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | The time the chat was deleted |\n| <a id=\"property-id\"></a> `id` | `string` | The chat uuid |\n| <a id=\"property-ispersistent\"></a> `isPersistent` | `boolean` | - |\n| <a id=\"property-model\"></a> `model?` | `string` \\| `null` | The model used to generate the chat |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the chat |\n| <a id=\"property-projectid\"></a> `projectId?` | `string` \\| `null` | The project id of the chat |\n| <a id=\"property-tokencount\"></a> `tokenCount?` | `number` \\| `null` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the chat was last updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | Who the chat belongs to |\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Item.md -->\n# Type Alias: Item\n\n> **Item** = \\{ `type`: `\"document\"`; \\} & [`BasicDocument`](BasicDocument.md) \\| \\{ `type`: `\"chat\"`; \\} & [`Chat`](Chat.md) \\| \\{ `type`: `\"project\"`; \\} & [`Project`](Project.md)\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/Project.md -->\n# Type Alias: Project\n\n> **Project** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `parentId?`: `string` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the project was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | - |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the project |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the project |\n| <a id=\"property-parentid\"></a> `parentId?` | `string` \\| `null` | The parent project id |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the project was updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | The user id of who created the project |\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/projects/namespace/classes/ProjectNamespace.md -->\n# Class: ProjectNamespace\n\n## Constructors\n\n### Constructor\n\n> **new ProjectNamespace**(`client`): `ProjectNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`ProjectNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Project`](../../project/classes/Project.md)\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Project`](../../project/classes/Project.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Project`](../../project/classes/Project.md)\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `parent?`: [`Project`](../../project/classes/Project.md); \\} |\n| `opts.name` | `string` |\n| `opts.parent?` | [`Project`](../../project/classes/Project.md) |\n\n#### Returns\n\n`Promise`\\<[`Project`](../../project/classes/Project.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Project`](../../project/classes/Project.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`\\<[`Project`](../../project/classes/Project.md)\\>\n\n\n<!-- src/entities/projects/project/classes/Project.md -->\n# Class: Project\n\nA Macro project: a folder-like container for documents, chats, and subprojects.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`ProjectDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the project was created (RFC 3339 timestamp). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"project\"` | `'project'` | Favorites identify projects as `project`. | [`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 project's display name. | - | - |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | () => `Promise`\\<`Project` \\| `undefined`\\> | `...` | The parent project, if this project is nested. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Project`\\> | `...` | Search projects by name and content, most relevant first, auto-paginated. | - | - |\n\n## Methods\n\n### accessLevel()\n\n> **accessLevel**(): `Promise`\\<`\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\\>\n\nRead the caller's effective access level.\n\n#### Returns\n\n`Promise`\\<`\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\\>\n\n***\n\n### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the project and its contents. Soft by default (reversible with\n[restore](#restore)); pass `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`\\<`Project`\\>\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`\\<`Project`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### items()\n\n> **items**(): `Promise`\\<[`Item`](../../../../../generated/storage/types.gen/type-aliases/Item.md)[]\\>\n\nThe items (documents, chats, subprojects) directly inside this project.\n\n#### Returns\n\n`Promise`\\<[`Item`](../../../../../generated/storage/types.gen/type-aliases/Item.md)[]\\>\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\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 project.\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 project.\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### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead this project's sharing configuration.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Project`](../../../../../generated/storage/types.gen/type-aliases/Project.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Project`](../../../../../generated/storage/types.gen/type-aliases/Project.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Project`](../../../../../generated/storage/types.gen/type-aliases/Project.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`\\<`Project`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Project`\\>\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### byId()\n\n> `static` **byId**(`client`, `id`): `Project`\n\nA handle to a project 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`Project`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Project`\\>\n\nCreate a project, optionally nested inside a parent project.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `name`: `string`; `parent?`: `Project`; \\} |\n| `opts.name` | `string` |\n| `opts.parent?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Project`\\>\n"- },- {- "name": "properties",- "description": "Read and update entity properties.",- "overview": "<!-- src/entities/properties/namespace/classes/PropertiesNamespace.md -->\n# Class: PropertiesNamespace\n\nProperty definitions and tag sets. Entity-level reads and writes live on\nthe entity handles ([PropertiedEntity.properties](../../../entity/classes/PropertiedEntity.md#properties), `setProperty`,\n`deleteProperty`).\n\n## Constructors\n\n### Constructor\n\n> **new PropertiesNamespace**(`client`): `PropertiesNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`PropertiesNamespace`\n\n## Methods\n\n### addEntityPropertyOption()\n\n> **addEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nAdd a select option to a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>; `option`: [`PropertyOption`](../../property-option/classes/PropertyOption.md); `property`: [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md); \\} |\n| `opts.entity` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\> |\n| `opts.option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n| `opts.property` | [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### bulkEntityProperties()\n\n> **bulkEntityProperties**(`request`): `Promise`\\<`Record`\\<`string`, [`EntityPropertiesResponse`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertiesResponse.md)\\>\\>\n\nGet properties for multiple entities in a single request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`BulkEntityPropertiesRequest`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityPropertiesRequest.md) |\n\n#### Returns\n\n`Promise`\\<`Record`\\<`string`, [`EntityPropertiesResponse`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertiesResponse.md)\\>\\>\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\\>\n\nCreate a new custom property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `dataType`: [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md); `displayName`: `string`; `scope`: [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md); \\} |\n| `opts.dataType` | [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md) |\n| `opts.displayName` | `string` |\n| `opts.scope` | [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\\>\n\n***\n\n### definition()\n\n> **definition**(`id`): [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\n\nA handle to an existing property definition by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\n\n***\n\n### list()\n\n> **list**(`opts?`): `Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)[]\\>\n\nList property definitions visible to the user, pre-hydrated with their records.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `forEntityType?`: [`PropertyTargetEntityType`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md); `scope?`: [`PropertyScope`](../../../../../generated/properties/types.gen/type-aliases/PropertyScope.md); \\} |\n| `opts.forEntityType?` | [`PropertyTargetEntityType`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md) |\n| `opts.scope?` | [`PropertyScope`](../../../../../generated/properties/types.gen/type-aliases/PropertyScope.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)[]\\>\n\n***\n\n### removeEntityPropertyOption()\n\n> **removeEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nRemove a select option from a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>; `option`: [`PropertyOption`](../../property-option/classes/PropertyOption.md); `property`: [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md); \\} |\n| `opts.entity` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\> |\n| `opts.option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n| `opts.property` | [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### tags()\n\n> **tags**(): `Promise`\\<[`TagSetResponse`](../../../../../generated/properties/types.gen/type-aliases/TagSetResponse.md)[]\\>\n\nThe user's tag sets: their personal set, plus their team's when on a team.\n\n#### Returns\n\n`Promise`\\<[`TagSetResponse`](../../../../../generated/properties/types.gen/type-aliases/TagSetResponse.md)[]\\>\n\n***\n\n### updateEntityPropertyOptions()\n\n> **updateEntityPropertyOptions**(`entities`, `change`): `Promise`\\<[`BulkEntityOptionUpdateResult`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateResult.md)[]\\>\n\nApply one multi-select option delta to several entity handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entities` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>[] |\n| `change` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md) |\n\n#### Returns\n\n`Promise`\\<[`BulkEntityOptionUpdateResult`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateResult.md)[]\\>\n",- "documentation": "# Macro SDK: properties\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/AddNumberOptionRequest.md -->\n# Type Alias: AddNumberOptionRequest\n\n> **AddNumberOptionRequest** = \\{ `display_order`: `number`; `value`: `number`; \\}\n\nType-safe request to add a number option to a SelectNumber property.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `number` |\n\n\n<!-- generated/properties/types.gen/type-aliases/AddPropertyOptionRequest.md -->\n# Type Alias: AddPropertyOptionRequest\n\n> **AddPropertyOptionRequest** = \\{ `option`: [`AddStringOptionRequest`](AddStringOptionRequest.md); `type`: `\"select_string\"`; \\} \\| \\{ `option`: [`AddNumberOptionRequest`](AddNumberOptionRequest.md); `type`: `\"select_number\"`; \\}\n\nEnum for type-safe property option addition requests.\n\n\n<!-- generated/properties/types.gen/type-aliases/AddStringOptionRequest.md -->\n# Type Alias: AddStringOptionRequest\n\n> **AddStringOptionRequest** = \\{ `color?`: `string` \\| `null`; `display_order`: `number`; `value`: `string`; \\}\n\nType-safe request to add a string option to a SelectString property.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateResult.md -->\n# Type Alias: BulkEntityOptionUpdateResult\n\n> **BulkEntityOptionUpdateResult** = \\{ `entity_id`: `string`; `entity_type`: [`PropertyTargetEntityType`](PropertyTargetEntityType.md); `error?`: `string` \\| `null`; `option_ids?`: `string`[] \\| `null`; `status`: [`BulkEntityOptionUpdateStatus`](BulkEntityOptionUpdateStatus.md); \\}\n\nOne entity's result in a cross-entity bulk option update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | The entity's id this result is for. |\n| <a id=\"property-entity_type\"></a> `entity_type` | [`PropertyTargetEntityType`](PropertyTargetEntityType.md) | The entity's type this result is for. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | A human-readable reason, present only when `failed`. |\n| <a id=\"property-option_ids\"></a> `option_ids?` | `string`[] \\| `null` | The entity's reconciled final option ids, present only when `applied`. |\n| <a id=\"property-status\"></a> `status` | [`BulkEntityOptionUpdateStatus`](BulkEntityOptionUpdateStatus.md) | Whether the delta was applied, skipped, or failed for this entity. |\n\n\n<!-- generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateStatus.md -->\n# Type Alias: BulkEntityOptionUpdateStatus\n\n> **BulkEntityOptionUpdateStatus** = `\"applied\"` \\| `\"skipped_no_permission\"` \\| `\"failed\"`\n\nPer-entity outcome of a cross-entity bulk option update.\n\n\n<!-- generated/properties/types.gen/type-aliases/BulkEntityPropertiesRequest.md -->\n# Type Alias: BulkEntityPropertiesRequest\n\n> **BulkEntityPropertiesRequest** = \\{ `entities`: [`PropertyTargetReference`](PropertyTargetReference.md)[]; `property_ids?`: `string`[]; \\}\n\nRequest for getting properties for multiple entities in bulk\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entities\"></a> `entities` | [`PropertyTargetReference`](PropertyTargetReference.md)[] | Array of entity references (entity_id and entity_type pairs) |\n| <a id=\"property-property_ids\"></a> `property_ids?` | `string`[] | Optional: only return properties with these definition IDs. If empty, returns all. |\n\n\n<!-- generated/properties/types.gen/type-aliases/CreatePropertyScope.md -->\n# Type Alias: CreatePropertyScope\n\n> **CreatePropertyScope** = `\"user\"` \\| `\"team\"`\n\nOwnership scope a client may request when creating a property definition.\nThe owning user or team is derived server-side from the authenticated caller -\nclients never supply owner ids. System properties are not creatable via the API.\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/EntityPropertiesResponse.md -->\n# Type Alias: EntityPropertiesResponse\n\n> **EntityPropertiesResponse** = \\{ `entity_id`: `string`; `properties`: [`EntityPropertyWithDefinition`](EntityPropertyWithDefinition.md)[]; \\}\n\nResponse for document/entity properties endpoint.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-properties\"></a> `properties` | [`EntityPropertyWithDefinition`](EntityPropertyWithDefinition.md)[] |\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/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/PropertyDataType.md -->\n# Type Alias: PropertyDataType\n\n> **PropertyDataType** = \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"string\"`; \\} \\| \\{ `multi`: `boolean`; `options`: [`SelectNumberOption`](SelectNumberOption.md)[]; `type`: `\"select_number\"`; \\} \\| \\{ `multi`: `boolean`; `options`: [`SelectStringOption`](SelectStringOption.md)[]; `type`: `\"select_string\"`; \\} \\| \\{ `multi`: `boolean`; `specific_type?`: `null` \\| [`EntityType`](EntityType.md); `type`: `\"entity\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"link\"`; \\}\n\nData type with embedded options for requests - provides compile-time validation.\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/PropertyDefinitionDetailResponse.md -->\n# Type Alias: PropertyDefinitionDetailResponse\n\n> **PropertyDefinitionDetailResponse** = [`PropertyOwner`](PropertyOwner.md) & \\{ `createdAt?`: `string` \\| `null`; `dataType`: [`DataType`](DataType.md); `displayName`: `string`; `id`: `string`; `isMetadata`: `boolean`; `isMultiSelect`: `boolean`; `isSystem`: `boolean`; `specificEntityType?`: `null` \\| [`EntityType`](EntityType.md); `updatedAt?`: `string` \\| `null`; \\}\n\nProperty definition response (API representation).\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `createdAt?` | `string` \\| `null` | - |\n| `dataType` | [`DataType`](DataType.md) | - |\n| `displayName` | `string` | - |\n| `id` | `string` | - |\n| `isMetadata` | `boolean` | Flag to indicate if this is a system-generated metadata property |\n| `isMultiSelect` | `boolean` | - |\n| `isSystem` | `boolean` | Flag to indicate if this is a system property (managed by the system) |\n| `specificEntityType?` | `null` \\| [`EntityType`](EntityType.md) | - |\n| `updatedAt?` | `string` \\| `null` | - |\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/PropertyOptionResponse.md -->\n# Type Alias: PropertyOptionResponse\n\n> **PropertyOptionResponse** = \\{ `color?`: `string` \\| `null`; `displayOrder`: `number`; `id`: `string`; `propertyDefinitionId`: `string`; `value`: [`PropertyOptionValue`](PropertyOptionValue.md); \\}\n\nProperty option response (API representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` |\n| <a id=\"property-displayorder\"></a> `displayOrder` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-propertydefinitionid\"></a> `propertyDefinitionId` | `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/PropertyScope.md -->\n# Type Alias: PropertyScope\n\n> **PropertyScope** = `\"user\"` \\| `\"team\"` \\| `\"system\"` \\| `\"all\"`\n\nScope filter for property queries\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/SelectNumberOption.md -->\n# Type Alias: SelectNumberOption\n\n> **SelectNumberOption** = \\{ `display_order`: `number`; `value`: `number`; \\}\n\nOption for select number properties in requests.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `number` |\n\n\n<!-- generated/properties/types.gen/type-aliases/SelectStringOption.md -->\n# Type Alias: SelectStringOption\n\n> **SelectStringOption** = \\{ `display_order`: `number`; `value`: `string`; \\}\n\nOption for select-type properties in requests.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `string` |\n\n\n<!-- generated/properties/types.gen/type-aliases/TagScope.md -->\n# Type Alias: TagScope\n\n> **TagScope** = `\"user\"` \\| `\"team\"`\n\nWhich owner a tag set belongs to.\n\n\n<!-- generated/properties/types.gen/type-aliases/TagSetResponse.md -->\n# Type Alias: TagSetResponse\n\n> **TagSetResponse** = \\{ `definition?`: `null` \\| [`PropertyDefinitionDetailResponse`](PropertyDefinitionDetailResponse.md); `options`: [`PropertyOptionResponse`](PropertyOptionResponse.md)[]; `scope`: [`TagScope`](TagScope.md); \\}\n\nA tag set the caller can use. `definition` is absent until the set is provisioned\n(on first label create), in which case `options` is empty.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition?` | `null` \\| [`PropertyDefinitionDetailResponse`](PropertyDefinitionDetailResponse.md) |\n| <a id=\"property-options\"></a> `options` | [`PropertyOptionResponse`](PropertyOptionResponse.md)[] |\n| <a id=\"property-scope\"></a> `scope` | [`TagScope`](TagScope.md) |\n\n\n<!-- generated/properties/types.gen/type-aliases/UpdatePropertyOptionRequest.md -->\n# Type Alias: UpdatePropertyOptionRequest\n\n> **UpdatePropertyOptionRequest** = \\{ `color?`: `string` \\| `null`; `display_order?`: `number` \\| `null`; `value?`: `string` \\| `null`; \\}\n\nRequest to update a property option in place. Omitted fields keep their current value.\nThe option id is preserved, so the change propagates to every entity referencing it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | New color as a hex string like `#RRGGBB`. |\n| <a id=\"property-display_order\"></a> `display_order?` | `number` \\| `null` | New display order. |\n| <a id=\"property-value\"></a> `value?` | `string` \\| `null` | New string value (label text). Only valid for SelectString and Tag properties. |\n\n\n<!-- src/entities/properties/namespace/classes/PropertiesNamespace.md -->\n# Class: PropertiesNamespace\n\nProperty definitions and tag sets. Entity-level reads and writes live on\nthe entity handles ([PropertiedEntity.properties](../../../entity/classes/PropertiedEntity.md#properties), `setProperty`,\n`deleteProperty`).\n\n## Constructors\n\n### Constructor\n\n> **new PropertiesNamespace**(`client`): `PropertiesNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`PropertiesNamespace`\n\n## Methods\n\n### addEntityPropertyOption()\n\n> **addEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nAdd a select option to a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>; `option`: [`PropertyOption`](../../property-option/classes/PropertyOption.md); `property`: [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md); \\} |\n| `opts.entity` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\> |\n| `opts.option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n| `opts.property` | [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### bulkEntityProperties()\n\n> **bulkEntityProperties**(`request`): `Promise`\\<`Record`\\<`string`, [`EntityPropertiesResponse`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertiesResponse.md)\\>\\>\n\nGet properties for multiple entities in a single request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`BulkEntityPropertiesRequest`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityPropertiesRequest.md) |\n\n#### Returns\n\n`Promise`\\<`Record`\\<`string`, [`EntityPropertiesResponse`](../../../../../generated/properties/types.gen/type-aliases/EntityPropertiesResponse.md)\\>\\>\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\\>\n\nCreate a new custom property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `dataType`: [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md); `displayName`: `string`; `scope`: [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md); \\} |\n| `opts.dataType` | [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md) |\n| `opts.displayName` | `string` |\n| `opts.scope` | [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\\>\n\n***\n\n### definition()\n\n> **definition**(`id`): [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\n\nA handle to an existing property definition by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)\n\n***\n\n### list()\n\n> **list**(`opts?`): `Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)[]\\>\n\nList property definitions visible to the user, pre-hydrated with their records.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `forEntityType?`: [`PropertyTargetEntityType`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md); `scope?`: [`PropertyScope`](../../../../../generated/properties/types.gen/type-aliases/PropertyScope.md); \\} |\n| `opts.forEntityType?` | [`PropertyTargetEntityType`](../../../../../generated/properties/types.gen/type-aliases/PropertyTargetEntityType.md) |\n| `opts.scope?` | [`PropertyScope`](../../../../../generated/properties/types.gen/type-aliases/PropertyScope.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md)[]\\>\n\n***\n\n### removeEntityPropertyOption()\n\n> **removeEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nRemove a select option from a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>; `option`: [`PropertyOption`](../../property-option/classes/PropertyOption.md); `property`: [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md); \\} |\n| `opts.entity` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\> |\n| `opts.option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n| `opts.property` | [`PropertyDefinition`](../../property-definition/classes/PropertyDefinition.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### tags()\n\n> **tags**(): `Promise`\\<[`TagSetResponse`](../../../../../generated/properties/types.gen/type-aliases/TagSetResponse.md)[]\\>\n\nThe user's tag sets: their personal set, plus their team's when on a team.\n\n#### Returns\n\n`Promise`\\<[`TagSetResponse`](../../../../../generated/properties/types.gen/type-aliases/TagSetResponse.md)[]\\>\n\n***\n\n### updateEntityPropertyOptions()\n\n> **updateEntityPropertyOptions**(`entities`, `change`): `Promise`\\<[`BulkEntityOptionUpdateResult`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateResult.md)[]\\>\n\nApply one multi-select option delta to several entity handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entities` | [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<`unknown`\\>[] |\n| `change` | [`PropertyOptionDelta`](../../../entity/interfaces/PropertyOptionDelta.md) |\n\n#### Returns\n\n`Promise`\\<[`BulkEntityOptionUpdateResult`](../../../../../generated/properties/types.gen/type-aliases/BulkEntityOptionUpdateResult.md)[]\\>\n\n\n<!-- src/entities/properties/property-definition/classes/PropertyDefinition.md -->\n# Class: PropertyDefinition\n\nA property definition: schema for a custom field that can be attached to\nentities. Obtain instances via PropertiesNamespace.create,\nPropertiesNamespace.list, or PropertiesNamespace.definition.\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Accessors\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### dataType\n\n#### Get Signature\n\n> **get** **dataType**(): `Promise`\\<[`DataType`](../../../../../generated/properties/types.gen/type-aliases/DataType.md)\\>\n\n##### Returns\n\n`Promise`\\<[`DataType`](../../../../../generated/properties/types.gen/type-aliases/DataType.md)\\>\n\n***\n\n### displayName\n\n#### Get Signature\n\n> **get** **displayName**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### isMultiSelect\n\n#### Get Signature\n\n> **get** **isMultiSelect**(): `Promise`\\<`boolean`\\>\n\n##### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### isSystem\n\n#### Get Signature\n\n> **get** **isSystem**(): `Promise`\\<`boolean`\\>\n\n##### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### owner\n\n#### Get Signature\n\n> **get** **owner**(): `Promise`\\<[`PropertyOwner`](../../../../../generated/properties/types.gen/type-aliases/PropertyOwner.md)\\>\n\n##### Returns\n\n`Promise`\\<[`PropertyOwner`](../../../../../generated/properties/types.gen/type-aliases/PropertyOwner.md)\\>\n\n***\n\n### updatedAt\n\n#### Get Signature\n\n> **get** **updatedAt**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>\n\n## Methods\n\n### addOption()\n\n> **addOption**(`option`): `Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)\\>\n\nAdd an option to this select-type property.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | [`AddPropertyOptionRequest`](../../../../../generated/properties/types.gen/type-aliases/AddPropertyOptionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)\\>\n\n***\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this property definition.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### deleteOption()\n\n> **deleteOption**(`option`): `Promise`\\<`void`\\>\n\nDelete an option from this property.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### options()\n\n> **options**(): `Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)[]\\>\n\nThe selectable options for this definition (select-type properties).\n\n#### Returns\n\n`Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)[]\\>\n\n***\n\n### updateOption()\n\n> **updateOption**(`option`, `updates`): `Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)\\>\n\nUpdate an option (label, color, display order).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | [`PropertyOption`](../../property-option/classes/PropertyOption.md) |\n| `updates` | [`UpdatePropertyOptionRequest`](../../../../../generated/properties/types.gen/type-aliases/UpdatePropertyOptionRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`PropertyOption`](../../property-option/classes/PropertyOption.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `PropertyDefinition`\n\nA handle to an existing definition by id. Fields load lazily on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`PropertyDefinition`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`PropertyDefinition`\\>\n\nCreate a new property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `dataType`: [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md); `displayName`: `string`; `scope`: [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md); \\} |\n| `opts.dataType` | [`PropertyDataType`](../../../../../generated/properties/types.gen/type-aliases/PropertyDataType.md) |\n| `opts.displayName` | `string` |\n| `opts.scope` | [`CreatePropertyScope`](../../../../../generated/properties/types.gen/type-aliases/CreatePropertyScope.md) |\n\n#### Returns\n\n`Promise`\\<`PropertyDefinition`\\>\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `PropertyDefinition`\n\nWrap a record already in hand (e.g. from a list response).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`PropertyDefinition`](../../../../../generated/properties/types.gen/type-aliases/PropertyDefinition.md) |\n\n#### Returns\n\n`PropertyDefinition`\n\n\n<!-- src/entities/properties/property-option/classes/PropertyOption.md -->\n# Class: PropertyOption\n\nA selectable option on a select-type property definition. There is no\nsingle-option GET, so instances are only built from a seed record — via\nPropertyDefinition.options or PropertyDefinition.addOption.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-definitionid\"></a> `definitionId` | `readonly` | `string` | The property definition this option belongs to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | - |\n\n## Accessors\n\n### color\n\n#### Get Signature\n\n> **get** **color**(): `string` \\| `undefined`\n\nThe option's display color, if set.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen the option was created.\n\n##### Returns\n\n`string`\n\n***\n\n### displayOrder\n\n#### Get Signature\n\n> **get** **displayOrder**(): `number`\n\nThe option's position among its definition's options.\n\n##### Returns\n\n`number`\n\n***\n\n### updatedAt\n\n#### Get Signature\n\n> **get** **updatedAt**(): `string`\n\nWhen the option was last updated.\n\n##### Returns\n\n`string`\n\n***\n\n### value\n\n#### Get Signature\n\n> **get** **value**(): [`PropertyOptionValue`](../../../../../generated/properties/types.gen/type-aliases/PropertyOptionValue.md)\n\nThe option's value (string or number, per the property's data type).\n\n##### Returns\n\n[`PropertyOptionValue`](../../../../../generated/properties/types.gen/type-aliases/PropertyOptionValue.md)\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this option from its property definition.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### update()\n\n> **update**(`updates`): `Promise`\\<`PropertyOption`\\>\n\nUpdate this option's label, color, or display order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | [`UpdatePropertyOptionRequest`](../../../../../generated/properties/types.gen/type-aliases/UpdatePropertyOptionRequest.md) |\n\n#### Returns\n\n`Promise`\\<`PropertyOption`\\>\n\n***\n\n### from()\n\n> `static` **from**(`client`, `definitionId`, `record`): `PropertyOption`\n\nWrap a record already in hand (e.g. from a list or create response).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `definitionId` | `string` |\n| `record` | [`PropertyOption`](../../../../../generated/properties/types.gen/type-aliases/PropertyOption.md) |\n\n#### Returns\n\n`PropertyOption`\n"- },- {- "name": "tasks",- "description": "Search, create, and update tasks.",- "overview": "<!-- src/entities/tasks/namespace/classes/TaskNamespace.md -->\n# Class: TaskNamespace\n\n## Constructors\n\n### Constructor\n\n> **new TaskNamespace**(`client`): `TaskNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`TaskNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Task`](../../task/classes/Task.md)\n\nA handle to a task by document id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Task`](../../task/classes/Task.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Task`](../../task/classes/Task.md)\\>\n\nCreate a task.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); `shareWithTeam?`: `boolean`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n| `opts.shareWithTeam?` | `boolean` |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<[`Task`](../../task/classes/Task.md)\\>\n\n***\n\n### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<[`Task`](../../task/classes/Task.md)[]\\>\n\nThe tasks the GitHub pull request at `url` references, oldest link first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Task`](../../task/classes/Task.md)[]\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Task`](../../task/classes/Task.md)\\>\n\nSearch tasks 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`\\<[`Task`](../../task/classes/Task.md)\\>\n",- "documentation": "# Macro SDK: tasks\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/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/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/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\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/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/DocumentResponseMetadata.md -->\n# Type Alias: DocumentResponseMetadata\n\n> **DocumentResponseMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `documentBom?`: [`BomPart`](BomPart.md)[] \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentId`: `string`; `documentName`: `string`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `modificationData?`: `unknown`; `owner`: `string`; `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-documentbom\"></a> `documentBom?` | [`BomPart`](BomPart.md)[] \\| `null` | If the document is a DOCX document, 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 |\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-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/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/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\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/HighlightType.md -->\n# Type Alias: HighlightType\n\n> **HighlightType** = `1` \\| `2` \\| `3`\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightAnchorRequest.md -->\n# Type Alias: PdfHighlightAnchorRequest\n\n> **PdfHighlightAnchorRequest** = \\{ `alpha`: `number`; `blue`: `number`; `green`: `number`; `highlightRects`: [`PdfHighlightRectAnchorRequest`](PdfHighlightRectAnchorRequest.md)[]; `highlightType`: [`HighlightType`](HighlightType.md); `page`: `number`; `pageViewportHeight`: `number`; `pageViewportWidth`: `number`; `red`: `number`; `text`: `string`; `uuid?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-alpha\"></a> `alpha` | `number` |\n| <a id=\"property-blue\"></a> `blue` | `number` |\n| <a id=\"property-green\"></a> `green` | `number` |\n| <a id=\"property-highlightrects\"></a> `highlightRects` | [`PdfHighlightRectAnchorRequest`](PdfHighlightRectAnchorRequest.md)[] |\n| <a id=\"property-highlighttype\"></a> `highlightType` | [`HighlightType`](HighlightType.md) |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-pageviewportheight\"></a> `pageViewportHeight` | `number` |\n| <a id=\"property-pageviewportwidth\"></a> `pageViewportWidth` | `number` |\n| <a id=\"property-red\"></a> `red` | `number` |\n| <a id=\"property-text\"></a> `text` | `string` |\n| <a id=\"property-uuid\"></a> `uuid?` | `string` \\| `null` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PdfHighlightRectAnchorRequest.md -->\n# Type Alias: PdfHighlightRectAnchorRequest\n\n> **PdfHighlightRectAnchorRequest** = \\{ `height`: `number`; `left`: `number`; `top`: `number`; `width`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `number` |\n| <a id=\"property-left\"></a> `left` | `number` |\n| <a id=\"property-top\"></a> `top` | `number` |\n| <a id=\"property-width\"></a> `width` | `number` |\n\n\n<!-- generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.md -->\n# Type Alias: PreSaveDocumentResponseData\n\n> **PreSaveDocumentResponseData** = \\{ `presignedUrls`: [`PresignedUrl`](PresignedUrl.md)[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurls\"></a> `presignedUrls` | [`PresignedUrl`](PresignedUrl.md)[] | Contains any presigned urls you need to upload specific bom parts with. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresignedUrl.md -->\n# Type Alias: PresignedUrl\n\n> **PresignedUrl** = \\{ `presignedUrl`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurl\"></a> `presignedUrl` | `string` | The presigned url used to upload the sha |\n| <a id=\"property-sha\"></a> `sha` | `string` | The sha of the item |\n\n\n<!-- generated/storage/types.gen/type-aliases/SaveBomPart.md -->\n# Type Alias: SaveBomPart\n\n> **SaveBomPart** = \\{ `path`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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/SaveDocumentRequest.md -->\n# Type Alias: SaveDocumentRequest\n\n> **SaveDocumentRequest** = \\{ `modificationData?`: `unknown`; `newBom?`: [`SaveBomPart`](SaveBomPart.md)[] \\| `null`; `sha?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-modificationdata\"></a> `modificationData?` | `unknown` | The modification data for the document instance. Used to store highlights and other overlays onto a static file |\n| <a id=\"property-newbom\"></a> `newBom?` | [`SaveBomPart`](SaveBomPart.md)[] \\| `null` | **DOCX ONLY** The updated BOM for the document. Containing the file path and the sha. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The sha of the new document. This is used to generate a presigned url to upload the new document content to s3. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md -->\n# Type Alias: SaveDocumentResponseData\n\n> **SaveDocumentResponseData** = \\{ `documentMetadata`: [`DocumentResponseMetadata`](DocumentResponseMetadata.md); `presignedUrl?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentmetadata\"></a> `documentMetadata` | [`DocumentResponseMetadata`](DocumentResponseMetadata.md) | The updated document metadata |\n| <a id=\"property-presignedurl\"></a> `presignedUrl?` | `string` \\| `null` | If the document is an editable file, we provide a presigned url to save the updated file to. |\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/tasks/namespace/classes/TaskNamespace.md -->\n# Class: TaskNamespace\n\n## Constructors\n\n### Constructor\n\n> **new TaskNamespace**(`client`): `TaskNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`TaskNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Task`](../../task/classes/Task.md)\n\nA handle to a task by document id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Task`](../../task/classes/Task.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Task`](../../task/classes/Task.md)\\>\n\nCreate a task.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); `shareWithTeam?`: `boolean`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n| `opts.shareWithTeam?` | `boolean` |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<[`Task`](../../task/classes/Task.md)\\>\n\n***\n\n### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<[`Task`](../../task/classes/Task.md)[]\\>\n\nThe tasks the GitHub pull request at `url` references, oldest link first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Task`](../../task/classes/Task.md)[]\\>\n\n***\n\n### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<[`Task`](../../task/classes/Task.md)\\>\n\nSearch tasks 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`\\<[`Task`](../../task/classes/Task.md)\\>\n\n\n<!-- src/entities/tasks/task/classes/Task.md -->\n# Class: Task\n\nA Macro task: a document with sub-type `task`. Inherits the full document\nsurface ([Document.rename](../../../documents/document/classes/Document.md#rename), move, delete, restore, content, events)\nand adds task-specific state.\n\n## Extends\n\n- [`Document`](../../../documents/document/classes/Document.md)\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](../../../sharing/access/classes/EntityAccess.md) | `...` | Access requests and direct user grants. | - | [`Document`](../../../documents/document/classes/Document.md).[`access`](../../../documents/document/classes/Document.md#property-access) |\n| <a id=\"property-branchedfrom\"></a> `branchedFrom` | `readonly` | () => `Promise`\\<[`Document`](../../../documents/document/classes/Document.md) \\| `undefined`\\> | `...` | The document this one was branched from, if any. | - | [`Document`](../../../documents/document/classes/Document.md).[`branchedFrom`](../../../documents/document/classes/Document.md#property-branchedfrom) |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was created. | - | [`Document`](../../../documents/document/classes/Document.md).[`createdAt`](../../../documents/document/classes/Document.md#property-createdat) |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was deleted, if it has been. | - | [`Document`](../../../documents/document/classes/Document.md).[`deletedAt`](../../../documents/document/classes/Document.md#property-deletedat) |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"document\"` | `'document'` | Favorites identify documents as `document`. | - | [`Document`](../../../documents/document/classes/Document.md).[`entityType`](../../../documents/document/classes/Document.md#property-entitytype) |\n| <a id=\"property-filetype\"></a> `fileType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The document's file type (e.g. `md`, `pdf`, `docx`). | - | [`Document`](../../../documents/document/classes/Document.md).[`fileType`](../../../documents/document/classes/Document.md#property-filetype) |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | [`Document`](../../../documents/document/classes/Document.md).[`id`](../../../documents/document/classes/Document.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The document's display name. | - | [`Document`](../../../documents/document/classes/Document.md).[`name`](../../../documents/document/classes/Document.md#property-name) |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | `...` | The user who owns the document. | - | [`Document`](../../../documents/document/classes/Document.md).[`owner`](../../../documents/document/classes/Document.md#property-owner) |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<[`Project`](../../../projects/project/classes/Project.md) \\| `undefined`\\> | `...` | The project this document belongs to, if any. | - | [`Document`](../../../documents/document/classes/Document.md).[`project`](../../../documents/document/classes/Document.md#property-project) |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was last updated. | - | [`Document`](../../../documents/document/classes/Document.md).[`updatedAt`](../../../documents/document/classes/Document.md#property-updatedat) |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Task`\\> | `...` | Search tasks by name and content, most relevant first, auto-paginated. | [`Document`](../../../documents/document/classes/Document.md).[`search`](../../../documents/document/classes/Document.md#property-search) | - |\n\n## Methods\n\n### anchors()\n\n> **anchors**(): `Promise`\\<[`DocumentAnchor`](../../../documents/anchor/classes/DocumentAnchor.md)[]\\>\n\nPDF annotations in this document.\n\n#### Returns\n\n`Promise`\\<[`DocumentAnchor`](../../../documents/anchor/classes/DocumentAnchor.md)[]\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`anchors`](../../../documents/document/classes/Document.md#anchors)\n\n***\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`branchName`](../../../documents/document/classes/Document.md#branchname)\n\n***\n\n### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<[`Comment`](../../../documents/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`](../../../documents/comment/classes/Comment.md)\\>\n\nThe created comment.\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`comment`](../../../documents/document/classes/Document.md#comment)\n\n***\n\n### comments()\n\n> **comments**(): `Promise`\\<[`CommentThread`](../../../documents/document/interfaces/CommentThread.md)[]\\>\n\nThe document's live comment threads, each with its comments, newest thread first.\n\n#### Returns\n\n`Promise`\\<[`CommentThread`](../../../documents/document/interfaces/CommentThread.md)[]\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`comments`](../../../documents/document/classes/Document.md#comments)\n\n***\n\n### completed()\n\n> **completed**(): `Promise`\\<`boolean` \\| `undefined`\\>\n\nWhether the task is completed (its Status property is \"Completed\");\n`undefined` if the document is not a task.\n\n#### Returns\n\n`Promise`\\<`boolean` \\| `undefined`\\>\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`content`](../../../documents/document/classes/Document.md#content)\n\n***\n\n### copy()\n\n> **copy**(`opts`): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\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`](../../../documents/document/classes/Document.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`copy`](../../../documents/document/classes/Document.md#copy)\n\n***\n\n### createHighlight()\n\n> **createHighlight**(`options`): `Promise`\\<[`DocumentAnchor`](../../../documents/anchor/classes/DocumentAnchor.md)\\>\n\nCreate a standalone PDF highlight.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<[`PdfHighlightAnchorRequest`](../../../../../generated/storage/types.gen/type-aliases/PdfHighlightAnchorRequest.md), `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<[`DocumentAnchor`](../../../documents/anchor/classes/DocumentAnchor.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`createHighlight`](../../../documents/document/classes/Document.md#createhighlight)\n\n***\n\n### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the document. Soft by default (reversible with [restore](../../../documents/document/classes/Document.md#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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`delete`](../../../documents/document/classes/Document.md#delete)\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[`Document`](../../../documents/document/classes/Document.md).[`deleteProperty`](../../../documents/document/classes/Document.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Task`\\>\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`\\<`Task`\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`favorite`](../../../documents/document/classes/Document.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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`githubPullRequests`](../../../documents/document/classes/Document.md#githubpullrequests)\n\n***\n\n### meetingNotes()\n\n> **meetingNotes**(): `Promise`\\<\\{ `eventTitle`: `string`; `note`: [`CalendarNote`](../../../calendar/note/classes/CalendarNote.md); \\}[]\\>\n\nMeeting links visible to the reader. Owners also receive unavailable grants and may unlink them to revoke meeting/team access.\n\n#### Returns\n\n`Promise`\\<\\{ `eventTitle`: `string`; `note`: [`CalendarNote`](../../../calendar/note/classes/CalendarNote.md); \\}[]\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`meetingNotes`](../../../documents/document/classes/Document.md#meetingnotes)\n\n***\n\n### messageThreadById()\n\n> **messageThreadById**(`id`): [`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`MessageThread`](../../../messages/thread/classes/MessageThread.md)\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`messageThreadById`](../../../documents/document/classes/Document.md#messagethreadbyid)\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`move`](../../../documents/document/classes/Document.md#move)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`permission`](../../../documents/document/classes/Document.md#permission)\n\n***\n\n### permissionsToken()\n\n> **permissionsToken**(): `Promise`\\<`string`\\>\n\nMint a scoped permissions token.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`permissionsToken`](../../../documents/document/classes/Document.md#permissionstoken)\n\n***\n\n### prepareSave()\n\n> **prepareSave**(`parts`): `Promise`\\<[`PreSaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.md)\\>\n\nPrepare multipart content saving and return the service's upload instructions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `parts` | [`SaveBomPart`](../../../../../generated/storage/types.gen/type-aliases/SaveBomPart.md)[] |\n\n#### Returns\n\n`Promise`\\<[`PreSaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/PreSaveDocumentResponseData.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`prepareSave`](../../../documents/document/classes/Document.md#preparesave)\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[`Document`](../../../documents/document/classes/Document.md).[`properties`](../../../documents/document/classes/Document.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[`Document`](../../../documents/document/classes/Document.md).[`propertyReference`](../../../documents/document/classes/Document.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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`rename`](../../../documents/document/classes/Document.md#rename)\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`restore`](../../../documents/document/classes/Document.md#restore)\n\n***\n\n### save()\n\n> **save**(`options`): `Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\nCommit uploaded content. Does not retry uncertain writes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`SaveDocumentRequest`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`save`](../../../documents/document/classes/Document.md#save)\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[`Document`](../../../documents/document/classes/Document.md).[`setProperty`](../../../documents/document/classes/Document.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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`setTeamShare`](../../../documents/document/classes/Document.md#setteamshare)\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`sharePermissions`](../../../documents/document/classes/Document.md#sharepermissions)\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`shortId`](../../../documents/document/classes/Document.md#shortid)\n\n***\n\n### simpleSave()\n\n> **simpleSave**(): `Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\nCommit a simple document save.\n\n#### Returns\n\n`Promise`\\<[`SaveDocumentResponseData`](../../../../../generated/storage/types.gen/type-aliases/SaveDocumentResponseData.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`simpleSave`](../../../documents/document/classes/Document.md#simplesave)\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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`teamShare`](../../../documents/document/classes/Document.md#teamshare)\n\n***\n\n### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Comment`](../../../documents/comment/classes/Comment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | [`TimelineOptions`](../../../messages/thread/interfaces/TimelineOptions.md)\\<[`Comment`](../../../documents/comment/classes/Comment.md)\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: [`Comment`](../../../documents/comment/classes/Comment.md); `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`timelinePage`](../../../documents/document/classes/Document.md#timelinepage)\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[`Document`](../../../documents/document/classes/Document.md).[`toJSON`](../../../documents/document/classes/Document.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#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`toMention`](../../../documents/document/classes/Document.md#tomention)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Task`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Task`\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`unfavorite`](../../../documents/document/classes/Document.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[`Document`](../../../documents/document/classes/Document.md).[`updatePropertyOptions`](../../../documents/document/classes/Document.md#updatepropertyoptions)\n\n***\n\n### version()\n\n> **version**(`version`): [`DocumentVersion`](../../../documents/version/classes/DocumentVersion.md)\n\nA handle to an immutable version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `version` | `number` |\n\n#### Returns\n\n[`DocumentVersion`](../../../documents/version/classes/DocumentVersion.md)\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`version`](../../../documents/document/classes/Document.md#version)\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nThe task's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n#### Overrides\n\n[`Document`](../../../documents/document/classes/Document.md).[`webUrl`](../../../documents/document/classes/Document.md#weburl)\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Task`\n\nA handle to a task by document 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`Task`\n\n#### Overrides\n\n[`Document`](../../../documents/document/classes/Document.md).[`byId`](../../../documents/document/classes/Document.md#byid)\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Task`\\>\n\nCreate a task. `team` scopes the team task number and may be omitted\nwhen the creator belongs to exactly one team; `shareWithTeam` defaults\nto true.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: [`Project`](../../../projects/project/classes/Project.md); `shareWithTeam?`: `boolean`; `team?`: [`Team`](../../../teams/team/classes/Team.md); \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | [`Project`](../../../projects/project/classes/Project.md) |\n| `opts.shareWithTeam?` | `boolean` |\n| `opts.team?` | [`Team`](../../../teams/team/classes/Team.md) |\n\n#### Returns\n\n`Promise`\\<`Task`\\>\n\n#### Overrides\n\n[`Document`](../../../documents/document/classes/Document.md).[`create`](../../../documents/document/classes/Document.md#create)\n\n***\n\n### createSkill()\n\n> `static` **createSkill**(`client`, `opts`): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\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`](../../../documents/document/classes/Document.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`createSkill`](../../../documents/document/classes/Document.md#createskill)\n\n***\n\n### createSnippet()\n\n> `static` **createSnippet**(`client`, `opts`): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\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`](../../../documents/document/classes/Document.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`createSnippet`](../../../documents/document/classes/Document.md#createsnippet)\n\n***\n\n### forPullRequest()\n\n> `static` **forPullRequest**(`client`, `url`): `Promise`\\<`Task`[]\\>\n\nThe tasks the GitHub pull request at `url` references (as `MACRO-<id>` in\nits text, branch, or comments), oldest link first. Empty when the caller\ncannot see the pull request; tasks the caller cannot open still appear.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Task`[]\\>\n\n***\n\n### recent()\n\n> `static` **recent**(`client`, `opts?`): `AsyncGenerator`\\<[`Document`](../../../documents/document/classes/Document.md)\\>\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`](../../../documents/document/classes/Document.md)\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`recent`](../../../documents/document/classes/Document.md#recent)\n\n***\n\n### recentlyDeleted()\n\n> `static` **recentlyDeleted**(`client`): `Promise`\\<[`Document`](../../../documents/document/classes/Document.md)[]\\>\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`](../../../documents/document/classes/Document.md)[]\\>\n\n#### Inherited from\n\n[`Document`](../../../documents/document/classes/Document.md).[`recentlyDeleted`](../../../documents/document/classes/Document.md#recentlydeleted)\n"- },- {- "name": "teams",- "description": "Manage teams and membership.",- "overview": "<!-- src/entities/teams/namespace/classes/TeamNamespace.md -->\n# Class: TeamNamespace\n\n## Constructors\n\n### Constructor\n\n> **new TeamNamespace**(`client`): `TeamNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`TeamNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Team`](../../team/classes/Team.md)\n\nA handle to a team by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Team`](../../team/classes/Team.md)\n\n***\n\n### current()\n\n> **current**(): `Promise`\\<[`Team`](../../team/classes/Team.md)\\>\n\nThe caller's current team.\n\n#### Returns\n\n`Promise`\\<[`Team`](../../team/classes/Team.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Team`](../../team/classes/Team.md)[]\\>\n\nThe teams the caller belongs to.\n\n#### Returns\n\n`Promise`\\<[`Team`](../../team/classes/Team.md)[]\\>\n",- "documentation": "# Macro SDK: teams\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/auth/types.gen/type-aliases/Language.md -->\n# Type Alias: Language\n\n> **Language** = `\"en\"` \\| `\"de\"` \\| `\"fr\"` \\| `\"es\"` \\| `\"it\"` \\| `\"nl\"` \\| `\"pt-PT\"` \\| `\"sv\"` \\| `\"da\"` \\| `\"nb\"` \\| `\"fi\"` \\| `\"pl\"` \\| `\"ru\"` \\| `\"ja\"` \\| `\"ko\"` \\| `\"zh-Hans\"` \\| `\"zh-Hant\"` \\| `\"hi\"` \\| `\"id\"` \\| `\"vi\"` \\| `\"th\"`\n\nA language the app's interface is available in, as a BCP 47 tag.\n\n\n<!-- generated/auth/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/auth/types.gen/type-aliases/Team.md -->\n# Type Alias: Team\n\n> **Team** = \\{ `allow_non_admin_invites`: `boolean`; `auto_join_domain?`: `string` \\| `null`; `crm_enabled`: `boolean`; `default_link_share?`: `null` \\| [`LinkShare`](LinkShare.md); `enterprise`: `boolean`; `id`: `string`; `language?`: `null` \\| [`Language`](Language.md); `name`: `string`; `owner_id`: `string`; `slug`: `string`; \\}\n\nThe Team struct\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_non_admin_invites\"></a> `allow_non_admin_invites` | `boolean` | Whether non-admin members may invite users to the team. Defaults to true; admins can turn it off so only admins/owners may invite. |\n| <a id=\"property-auto_join_domain\"></a> `auto_join_domain?` | `string` \\| `null` | The email domain new users are automatically joined to this team with, when automatic domain joining is enabled (None otherwise). |\n| <a id=\"property-crm_enabled\"></a> `crm_enabled` | `boolean` | Whether the CRM is enabled for this team (from `team_crm_settings`; `false` when no row exists). |\n| <a id=\"property-default_link_share\"></a> `default_link_share?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-enterprise\"></a> `enterprise` | `boolean` | Whether this team is on an enterprise license. Enterprise teams are billed out-of-band; membership changes skip all Stripe subscription bookkeeping (no seat counts, no subscription backfill, no paying check). |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-language\"></a> `language?` | `null` \\| [`Language`](Language.md) | - |\n| <a id=\"property-name\"></a> `name` | `string` | - |\n| <a id=\"property-owner_id\"></a> `owner_id` | `string` | - |\n| <a id=\"property-slug\"></a> `slug` | `string` | - |\n\n\n<!-- generated/auth/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- src/entities/teams/namespace/classes/TeamNamespace.md -->\n# Class: TeamNamespace\n\n## Constructors\n\n### Constructor\n\n> **new TeamNamespace**(`client`): `TeamNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`TeamNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Team`](../../team/classes/Team.md)\n\nA handle to a team by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Team`](../../team/classes/Team.md)\n\n***\n\n### current()\n\n> **current**(): `Promise`\\<[`Team`](../../team/classes/Team.md)\\>\n\nThe caller's current team.\n\n#### Returns\n\n`Promise`\\<[`Team`](../../team/classes/Team.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Team`](../../team/classes/Team.md)[]\\>\n\nThe teams the caller belongs to.\n\n#### Returns\n\n`Promise`\\<[`Team`](../../team/classes/Team.md)[]\\>\n\n\n<!-- src/entities/teams/team/classes/Team.md -->\n# Class: Team\n\nA Macro team. A free-to-construct handle; the record loads lazily on first\nfield access, resolved from the caller's team memberships.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Team`](../../../../../generated/auth/types.gen/type-aliases/Team.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-defaultlinkshare\"></a> `defaultLinkShare` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkShare \\| null \\| undefined\\> \\| `undefined`\\> | The team's default link-share scope for newly shared items, or null when link sharing is off by default. | - |\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-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The team's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The user who owns the team. | - |\n| <a id=\"property-slug\"></a> `slug` | `readonly` | () => `Promise`\\<`string`\\> | The team's slug (its URL identifier). | - |\n\n## Methods\n\n### members()\n\n> **members**(): `Promise`\\<[`TeamMembership`](../interfaces/TeamMembership.md)[]\\>\n\nThe team's members, with their roles. The API only exposes members for\nthe caller's current team, so this rejects for any other team.\n\n#### Returns\n\n`Promise`\\<[`TeamMembership`](../interfaces/TeamMembership.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Team`](../../../../../generated/auth/types.gen/type-aliases/Team.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Team`](../../../../../generated/auth/types.gen/type-aliases/Team.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Team`](../../../../../generated/auth/types.gen/type-aliases/Team.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`, `id`): `Team`\n\nA handle to a team 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`Team`\n\n***\n\n### current()\n\n> `static` **current**(`client`): `Promise`\\<`Team`\\>\n\nThe caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Team`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`): `Promise`\\<`Team`[]\\>\n\nThe teams the caller belongs to.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Team`[]\\>\n\n\n<!-- src/entities/teams/team/interfaces/TeamMembership.md -->\n# Interface: TeamMembership\n\nA member of a team: the user and their role.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-role\"></a> `role` | [`TeamRole`](../../../../../generated/auth/types.gen/type-aliases/TeamRole.md) | Their role on the team. |\n| <a id=\"property-user\"></a> `user` | [`User`](../../../users/user/classes/User.md) | The member. |\n"- },- {- "name": "users",- "description": "Look up users and their profiles.",- "overview": "<!-- src/entities/users/namespace/classes/UserNamespace.md -->\n# Class: UserNamespace\n\n## Constructors\n\n### Constructor\n\n> **new UserNamespace**(`client`): `UserNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`UserNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`User`](../../user/classes/User.md)\n\nA handle to a user by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`User`](../../user/classes/User.md)\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`User`](../../user/classes/User.md)\\>\n\nThe current authenticated user.\n\n#### Returns\n\n`Promise`\\<[`User`](../../user/classes/User.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`): `Promise`\\<[`User`](../../user/classes/User.md)[]\\>\n\nFind people in your existing Macro contacts by name or email, as in the\nmention picker. This is not a global directory. Returns every matching\ncontact so callers can disambiguate; it never chooses a person for you.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`Promise`\\<[`User`](../../user/classes/User.md)[]\\>\n",- "documentation": "# Macro SDK: users\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/auth/types.gen/type-aliases/UserName.md -->\n# Type Alias: UserName\n\n> **UserName** = \\{ `first_name?`: `string` \\| `null`; `id`: `string`; `last_name?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-first_name\"></a> `first_name?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-last_name\"></a> `last_name?` | `string` \\| `null` |\n\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/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/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\n\n\n<!-- src/entities/users/namespace/classes/UserNamespace.md -->\n# Class: UserNamespace\n\n## Constructors\n\n### Constructor\n\n> **new UserNamespace**(`client`): `UserNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`UserNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`User`](../../user/classes/User.md)\n\nA handle to a user by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`User`](../../user/classes/User.md)\n\n***\n\n### me()\n\n> **me**(): `Promise`\\<[`User`](../../user/classes/User.md)\\>\n\nThe current authenticated user.\n\n#### Returns\n\n`Promise`\\<[`User`](../../user/classes/User.md)\\>\n\n***\n\n### search()\n\n> **search**(`query`): `Promise`\\<[`User`](../../user/classes/User.md)[]\\>\n\nFind people in your existing Macro contacts by name or email, as in the\nmention picker. This is not a global directory. Returns every matching\ncontact so callers can disambiguate; it never chooses a person for you.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`Promise`\\<[`User`](../../user/classes/User.md)[]\\>\n\n\n<!-- src/entities/users/user/classes/User.md -->\n# Class: User\n\nA Macro user. Identity lives in the auth service, so details like the\ndisplay name are fetched on demand. Can be dropped into a msg\ntemplate to @-mention the user.\n\n## Extends\n\n- [`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md)\\<[`UserName`](../../../../../generated/auth/types.gen/type-aliases/UserName.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-entitytype\"></a> `entityType` | `readonly` | `\"user\"` | `'user'` | Favorites identify users as `user`. | [`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\n## Methods\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### dm()\n\n> **dm**(): `Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md)\\>\n\nOpen (or create) your direct-message channel with this user.\n\n#### Returns\n\n`Promise`\\<[`Channel`](../../../channels/channel/classes/Channel.md)\\>\n\nThe DM `Channel`.\n\n***\n\n### email()\n\n> **email**(): `string` \\| `undefined`\n\nThis user's email address. Macro user ids encode it as `macro|<email>`,\nso this reads straight off the id — no auth-service endpoint returns\nemails for arbitrary users.\n\n#### Returns\n\n`string` \\| `undefined`\n\nThe email, or `undefined` if the id is not email-derived.\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`User`\\>\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`\\<`User`\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`favorite`](../../../entity/classes/PropertiedEntity.md#favorite)\n\n***\n\n### name()\n\n> **name**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThis user's display name, fetched from the auth service (falling back to\nyour email contacts when the Macro profile has none).\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\nThe full name, or `undefined` if the user has no name on record.\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`PropertiedEntity`](../../../entity/classes/PropertiedEntity.md).[`permission`](../../../entity/classes/PropertiedEntity.md#permission)\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### 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?`: [`UserName`](../../../../../generated/auth/types.gen/type-aliases/UserName.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`UserName`](../../../../../generated/auth/types.gen/type-aliases/UserName.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`UserName`](../../../../../generated/auth/types.gen/type-aliases/UserName.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`\\<`User`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`User`\\>\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### byId()\n\n> `static` **byId**(`client`, `id`): `User`\n\nA handle to a user by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`User`\n\n***\n\n### fromName()\n\n> `static` **fromName**(`client`, `name`): `User`\n\nA user handle seeded with an already loaded auth-service name.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | [`UserName`](../../../../../generated/auth/types.gen/type-aliases/UserName.md) |\n\n#### Returns\n\n`User`\n\n***\n\n### me()\n\n> `static` **me**(`client`): `Promise`\\<`User`\\>\n\nA handle to the current authenticated user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`User`\\>\n"- },- {- "name": "webhooks",- "description": "Manage API webhook subscriptions.",- "overview": "<!-- src/entities/webhooks/namespace/classes/WebhooksNamespace.md -->\n# Class: WebhooksNamespace\n\nWebhook registrations for receiving signed entity-event deliveries.\n\n## Constructors\n\n### Constructor\n\n> **new WebhooksNamespace**(`client`): `WebhooksNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`WebhooksNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Webhook`](../../webhook/classes/Webhook.md)\n\nA handle to an existing webhook by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Webhook`](../../webhook/classes/Webhook.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)\\>\n\nRegister a webhook. `namespace` must be unique among the owning\nworkspace's webhooks (the endpoint returns 409 on a clash) and cannot be\nchanged later. `filters` must be non-empty (each entry matches event\nnames, optionally narrowed to entity ids); `scope` defaults to `'user'`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `filters`: [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[]; `headers?`: `Record`\\<`string`, `string`\\>; `name`: `string`; `namespace`: `string`; `scope?`: [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md); `url`: `string`; \\} |\n| `opts.filters` | [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[] |\n| `opts.headers?` | `Record`\\<`string`, `string`\\> |\n| `opts.name` | `string` |\n| `opts.namespace` | `string` |\n| `opts.scope?` | [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md) |\n| `opts.url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)[]\\>\n\nThe caller's webhooks across their personal and team workspaces, newest\nfirst. Each returned handle already holds its record.\n\n#### Returns\n\n`Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)[]\\>\n",- "documentation": "# Macro SDK: webhooks\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/BTreeMap.md -->\n# Type Alias: BTreeMap\n\n> **BTreeMap** = \\{\\[`key`: `string`\\]: `string`; \\}\n\n## Index Signature\n\n\\[`key`: `string`\\]: `string`\n\n\n<!-- generated/storage/types.gen/type-aliases/PatchWebhookRequest.md -->\n# Type Alias: PatchWebhookRequest\n\n> **PatchWebhookRequest** = \\{ `endpoint_url?`: `string` \\| `null`; `filters?`: `null` \\| [`Vec`](Vec.md); `headers?`: `null` \\| [`BTreeMap`](BTreeMap.md); `name?`: `string` \\| `null`; `status?`: `null` \\| [`WebhookStatus`](WebhookStatus.md); \\}\n\nRequest to patch a webhook. The webhook's namespace is fixed at creation\ntime and is deliberately not patchable.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-endpoint_url\"></a> `endpoint_url?` | `string` \\| `null` | Endpoint URL. HTTPS is required outside local environments. |\n| <a id=\"property-filters\"></a> `filters?` | `null` \\| [`Vec`](Vec.md) | - |\n| <a id=\"property-headers\"></a> `headers?` | `null` \\| [`BTreeMap`](BTreeMap.md) | - |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| [`WebhookStatus`](WebhookStatus.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/String.md -->\n# Type Alias: String\n\n> **String** = `string`\n\n\n<!-- generated/storage/types.gen/type-aliases/ValidateWebhookResponse.md -->\n# Type Alias: ValidateWebhookResponse\n\n> **ValidateWebhookResponse** = \\{ `is_valid`: `boolean`; `message?`: `string` \\| `null`; `response_status?`: `number` \\| `null`; `webhook_id`: [`String`](String.md); \\}\n\nSanitized result of validating a webhook endpoint.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-is_valid\"></a> `is_valid` | `boolean` | Whether the endpoint accepted the signed validation delivery. |\n| <a id=\"property-message\"></a> `message?` | `string` \\| `null` | Sanitized message explaining validation failure. |\n| <a id=\"property-response_status\"></a> `response_status?` | `number` \\| `null` | HTTP response status returned by the webhook endpoint, when available. |\n| <a id=\"property-webhook_id\"></a> `webhook_id` | [`String`](String.md) | Webhook id that was validated. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Vec.md -->\n# Type Alias: Vec\n\n> **Vec** = \\{ `events`: `string`[]; `ids?`: `string`[] \\| `null`; \\}[]\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `events` | `string`[] | Event names matched by this filter. |\n| `ids?` | `string`[] \\| `null` | Entity ids matched by this filter. When absent, the filter matches all entity ids. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Webhook.md -->\n# Type Alias: Webhook\n\n> **Webhook** = \\{ `created_at`: `string`; `created_by_user_id`: `string`; `deleted_at?`: `string` \\| `null`; `endpoint_url`: `string`; `filters`: [`Vec`](Vec.md); `headers`: [`BTreeMap`](BTreeMap.md); `id`: [`String`](String.md); `is_valid`: `boolean`; `name`: `string`; `namespace`: `string`; `status`: [`WebhookStatus`](WebhookStatus.md); `updated_at`: `string`; `workspace_id`: `string`; \\}\n\nWebhook row returned by application APIs.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by_user_id\"></a> `created_by_user_id` | `string` | User that created the webhook. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Soft-delete timestamp. |\n| <a id=\"property-endpoint_url\"></a> `endpoint_url` | `string` | Endpoint URL. HTTPS is required outside local environments. |\n| <a id=\"property-filters\"></a> `filters` | [`Vec`](Vec.md) | Typed filters used to match events and optional entity ids. |\n| <a id=\"property-headers\"></a> `headers` | [`BTreeMap`](BTreeMap.md) | Custom delivery headers, after decryption by the repository. |\n| <a id=\"property-id\"></a> `id` | [`String`](String.md) | Webhook id. |\n| <a id=\"property-is_valid\"></a> `is_valid` | `boolean` | Whether the current endpoint configuration has passed validation. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-namespace\"></a> `namespace` | `string` | Caller-chosen namespace, unique among the owning workspace's webhooks. Set at creation time only; it cannot be changed afterwards. |\n| <a id=\"property-status\"></a> `status` | [`WebhookStatus`](WebhookStatus.md) | Webhook lifecycle status. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |\n| <a id=\"property-workspace_id\"></a> `workspace_id` | `string` | Owning workspace id. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WebhookFilter.md -->\n# Type Alias: WebhookFilter\n\n> **WebhookFilter** = \\{ `events`: `string`[]; `ids?`: `string`[] \\| `null`; \\}\n\nEvent and optional entity-id constraints used to match webhook deliveries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-events\"></a> `events` | `string`[] | Event names matched by this filter. |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | Entity ids matched by this filter. When absent, the filter matches all entity ids. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WebhookScope.md -->\n# Type Alias: WebhookScope\n\n> **WebhookScope** = `\"user\"` \\| `\"team\"`\n\nScope that owns a newly-created webhook.\n\nClients serialize this, so both derives are used. `Display`/`FromStr`\nspell the same names as serde, for query strings and config values.\n\n\n<!-- generated/storage/types.gen/type-aliases/WebhookStatus.md -->\n# Type Alias: WebhookStatus\n\n> **WebhookStatus** = `\"active\"` \\| `\"paused\"` \\| `\"disabled\"`\n\nWebhook lifecycle status.\n\n\n<!-- src/entities/webhooks/namespace/classes/WebhooksNamespace.md -->\n# Class: WebhooksNamespace\n\nWebhook registrations for receiving signed entity-event deliveries.\n\n## Constructors\n\n### Constructor\n\n> **new WebhooksNamespace**(`client`): `WebhooksNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`WebhooksNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Webhook`](../../webhook/classes/Webhook.md)\n\nA handle to an existing webhook by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Webhook`](../../webhook/classes/Webhook.md)\n\n***\n\n### create()\n\n> **create**(`opts`): `Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)\\>\n\nRegister a webhook. `namespace` must be unique among the owning\nworkspace's webhooks (the endpoint returns 409 on a clash) and cannot be\nchanged later. `filters` must be non-empty (each entry matches event\nnames, optionally narrowed to entity ids); `scope` defaults to `'user'`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `filters`: [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[]; `headers?`: `Record`\\<`string`, `string`\\>; `name`: `string`; `namespace`: `string`; `scope?`: [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md); `url`: `string`; \\} |\n| `opts.filters` | [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[] |\n| `opts.headers?` | `Record`\\<`string`, `string`\\> |\n| `opts.name` | `string` |\n| `opts.namespace` | `string` |\n| `opts.scope?` | [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md) |\n| `opts.url` | `string` |\n\n#### Returns\n\n`Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)\\>\n\n***\n\n### list()\n\n> **list**(): `Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)[]\\>\n\nThe caller's webhooks across their personal and team workspaces, newest\nfirst. Each returned handle already holds its record.\n\n#### Returns\n\n`Promise`\\<[`Webhook`](../../webhook/classes/Webhook.md)[]\\>\n\n\n<!-- src/entities/webhooks/webhook/classes/Webhook.md -->\n# Class: Webhook\n\nA webhook registration: an HTTPS endpoint Macro delivers signed entity\nevents to.\n\nA free-to-construct `(client, id)` handle like any other entity: the detail\nrecord loads lazily from the webhook GET endpoint on first field access and\nis dropped after any mutation. WebhooksNamespace.list enumerates the\ncaller's webhooks across their personal and team workspaces.\n\nThe signing secret is only ever returned once, from [create](#create); it's\nexposed there as [Webhook.signingSecret](#property-signingsecret). Save it — patches, gets,\nand `byId` handles never carry it again — and pass it to\n`MacroOpts.webhookSecret` so `macro.events.webhook()` can verify\ndeliveries. Live SSE via `macro.events.listen()` does not use a\npersisted webhook or signing secret.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`Webhook`](../../../../../generated/storage/types.gen/type-aliases/Webhook.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 webhook was created. | - |\n| <a id=\"property-createdby\"></a> `createdBy` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The user who registered this webhook. | - |\n| <a id=\"property-endpointurl\"></a> `endpointUrl` | `readonly` | () => `Promise`\\<`string`\\> | The HTTPS endpoint URL deliveries are sent to. | - |\n| <a id=\"property-filters\"></a> `filters` | `readonly` | () => `Promise`\\<[`Vec`](../../../../../generated/storage/types.gen/type-aliases/Vec.md)\\> | The event/entity-id filters that gate deliveries. | - |\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-isvalid\"></a> `isValid` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the current endpoint configuration has passed validation. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The webhook's display name. | - |\n| <a id=\"property-namespace\"></a> `namespace` | `readonly` | () => `Promise`\\<`string`\\> | The caller-chosen namespace, unique among the owning workspace's webhooks. Fixed at creation time; it cannot be patched. | - |\n| <a id=\"property-signingsecret\"></a> `signingSecret?` | `readonly` | `string` | The signing secret used to verify deliveries, present only on the handle returned by [create](#create). `undefined` for `byId` and listed handles. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`WebhookStatus`](../../../../../generated/storage/types.gen/type-aliases/WebhookStatus.md)\\> | The webhook's lifecycle status. | - |\n| <a id=\"property-workspaceid\"></a> `workspaceId` | `readonly` | () => `Promise`\\<`string`\\> | The owning workspace id: the creator's user id for a personal webhook, or a team id for a team webhook. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the webhook.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### pause()\n\n> **pause**(): `Promise`\\<`void`\\>\n\nPause deliveries.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### resume()\n\n> **resume**(): `Promise`\\<`void`\\>\n\nResume deliveries.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### scope()\n\n> **scope**(): `Promise`\\<[`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md)\\>\n\nWhether this webhook is owned by the caller personally (`user`) or by\ntheir team (`team`). Derived from ownership: a personal webhook's owning\nworkspace is the creator's own user id, whereas a team webhook's workspace\nis a distinct team id.\n\n#### Returns\n\n`Promise`\\<[`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md)\\>\n\n***\n\n### setFilters()\n\n> **setFilters**(`filters`): `Promise`\\<`void`\\>\n\nReplace the webhook's delivery filters (must be non-empty).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `filters` | [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### setUrl()\n\n> **setUrl**(`url`): `Promise`\\<`void`\\>\n\nPoint the webhook at a new HTTPS endpoint URL.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`Webhook`](../../../../../generated/storage/types.gen/type-aliases/Webhook.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`Webhook`](../../../../../generated/storage/types.gen/type-aliases/Webhook.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`Webhook`](../../../../../generated/storage/types.gen/type-aliases/Webhook.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### update()\n\n> **update**(`body`): `Promise`\\<`void`\\>\n\nUpdate the webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | [`PatchWebhookRequest`](../../../../../generated/storage/types.gen/type-aliases/PatchWebhookRequest.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### validate()\n\n> **validate**(): `Promise`\\<[`ValidateWebhookResponse`](../../../../../generated/storage/types.gen/type-aliases/ValidateWebhookResponse.md)\\>\n\nSend a signed validation test delivery to the endpoint and report whether\nit was accepted. Drops the cached detail so a subsequent [isValid](#property-isvalid)\nread reflects the new validation state.\n\n#### Returns\n\n`Promise`\\<[`ValidateWebhookResponse`](../../../../../generated/storage/types.gen/type-aliases/ValidateWebhookResponse.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Webhook`\n\nA handle to a webhook 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`Webhook`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Webhook`\\>\n\nRegister a webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `filters`: [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[]; `headers?`: `Record`\\<`string`, `string`\\>; `name`: `string`; `namespace`: `string`; `scope?`: [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md); `url`: `string`; \\} |\n| `opts.filters` | [`WebhookFilter`](../../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[] |\n| `opts.headers?` | `Record`\\<`string`, `string`\\> |\n| `opts.name` | `string` |\n| `opts.namespace` | `string` |\n| `opts.scope?` | [`WebhookScope`](../../../../../generated/storage/types.gen/type-aliases/WebhookScope.md) |\n| `opts.url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Webhook`\\>\n\n***\n\n### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `Webhook`\n\nWrap an already-loaded record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | [`Webhook`](../../../../../generated/storage/types.gen/type-aliases/Webhook.md) |\n\n#### Returns\n\n`Webhook`\n"- },- {- "name": "core",- "description": "SDK construction, entity handles, lazy fields, search options, events and shared types.",- "overview": "<!-- src/config/interfaces/MacroOpts.md -->\n# Interface: MacroOpts\n\nOptions passed to `new Macro(opts)` and stored on `MacroClient`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auth\"></a> `auth?` | [`MacroAuth`](../type-aliases/MacroAuth.md) | How to authenticate. Takes precedence over `token`. Falls back to `MACRO_API_KEY` (a user API key or bearer token) or `MACRO_BOT_TOKEN` (bot). |\n| <a id=\"property-env\"></a> `env?` | [`Env`](../type-aliases/Env.md) | Which Macro environment to talk to. Falls back to the MACRO_ENV env var, then `'prod'`. |\n| <a id=\"property-hosts\"></a> `hosts?` | `Partial`\\<`Record`\\<[`ServiceName`](../type-aliases/ServiceName.md), `string`\\>\\> | Override individual service hosts (e.g. point one at localhost). |\n| <a id=\"property-onrequest\"></a> `onRequest?` | (`event`) => `void` | Optional generated API operation events; excludes arguments, URLs and response data. |\n| <a id=\"property-requestedas\"></a> `requestedAs?` | `string` | User id the bot acts for, sent as `x-macro-bot-for-macro-user-id` on every request. Bot auth only. Set via `macro.requestedAs(user)` rather than directly. |\n| <a id=\"property-token\"></a> `token?` | [`TokenSource`](../type-aliases/TokenSource.md) | Shorthand for `auth: { type: 'user', token }`. Accepts a Settings API key (`mak_…`) or a bearer token. |\n| <a id=\"property-webappurl\"></a> `webAppUrl?` | `string` | Override the web app base URL (e.g. for local frontend dev). Also reads MACRO_WEB_URL. |\n| <a id=\"property-webhooksecret\"></a> `webhookSecret?` | `string` | Signing secret for verifying incoming persisted-webhook deliveries. Required only for `macro.events.webhook()` / `macro.events.handle()`. SSE via `macro.events.listen()` uses the API token and does not need this. Falls back to MACRO_WEBHOOK_SECRET. |\n| <a id=\"property-wsverify\"></a> `wsVerify?` | `string` | - |\n\n\n<!-- src/config/type-aliases/BotScope.md -->\n# Type Alias: BotScope\n\n> **BotScope** = `\"user\"` \\| `\"team\"`\n\nAccess scope for bot-authenticated requests. `user` acts with the\nrequested-as user's access (requires `requestedAs`); `team` acts with the\nbot's owning team's access (team-owned bots only).\n\n\n<!-- src/config/type-aliases/Env.md -->\n# Type Alias: Env\n\n> **Env** = `\"dev\"` \\| `\"prod\"` \\| `\"local\"`\n\n\n<!-- src/config/type-aliases/MacroAuth.md -->\n# Type Alias: MacroAuth\n\n> **MacroAuth** = \\{ `apiKey?`: `never`; `token`: [`TokenSource`](TokenSource.md); `type`: `\"user\"`; \\} \\| \\{ `apiKey`: `string`; `token?`: `never`; `type`: `\"user\"`; \\} \\| \\{ `scope?`: [`BotScope`](BotScope.md); `token`: [`TokenSource`](TokenSource.md); `type`: `\"bot\"`; \\}\n\nHow the SDK authenticates with Macro.\n\nA user has exactly one of two credential fields.\n\n- `token`: a bearer token, or a `mak_` API key. The SDK picks the header\n from the prefix at send time.\n- `apiKey`: a Settings → API Keys key, always sent as\n `x-macro-user-api-key`. Not prefix-checked, so keys that predate the\n `mak_` prefix work here.\n\nA bot uses an `mbot_` token as `x-macro-bot-token` plus\n`x-macro-bot-scope`, defaulting to `user` when `requestedAs` is set and\n`team` otherwise.\n\n\n<!-- src/config/type-aliases/ServiceName.md -->\n# Type Alias: ServiceName\n\n> **ServiceName** = `\"agent-harness\"` \\| `\"storage\"` \\| `\"auth\"` \\| `\"email\"` \\| `\"calendar\"` \\| `\"cognition\"` \\| `\"notification\"` \\| `\"properties\"` \\| `\"search\"` \\| `\"scheduled-action\"` \\| `\"static-files\"` \\| `\"connection\"` \\| `\"contacts\"` \\| `\"unfurl\"`\n\nThe backend services the SDK talks to. Note `search` and `properties` are\nserved on the storage host, so they point there.\n\n\n<!-- src/config/type-aliases/TokenSource.md -->\n# Type Alias: TokenSource\n\n> **TokenSource** = `string` \\| (() => `string` \\| `Promise`\\<`string`\\>)\n\nA credential string, or a (possibly async) function that returns one.\n\n\n<!-- src/config/variables/HOSTS.md -->\n# Variable: HOSTS\n\n> `const` **HOSTS**: `Record`\\<[`Env`](../type-aliases/Env.md), `Record`\\<[`ServiceName`](../type-aliases/ServiceName.md), `string`\\>\\>\n\n\n<!-- src/config/variables/WEB_APP_URLS.md -->\n# Variable: WEB\\_APP\\_URLS\n\n> `const` **WEB\\_APP\\_URLS**: `Record`\\<[`Env`](../type-aliases/Env.md), `string`\\>\n\n\n<!-- src/macro/classes/Macro.md -->\n# Class: Macro\\<T\\>\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` *extends* [`MacroOpts`](../../config/interfaces/MacroOpts.md) | [`MacroOpts`](../../config/interfaces/MacroOpts.md) |\n\n## Constructors\n\n### Constructor\n\n> **new Macro**\\<`T`\\>(`opts`): `Macro`\\<`T`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `T` |\n\n#### Returns\n\n`Macro`\\<`T`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-_client\"></a> `_client` | `readonly` | `MacroClient` | Direct access to the underlying hey-api service clients. |\n| <a id=\"property-agents\"></a> `agents` | `readonly` | [`AgentNamespace`](../../entities/agents/namespace/classes/AgentNamespace.md) | agents resources and operations. |\n| <a id=\"property-agentsessions\"></a> `agentSessions` | `readonly` | [`AgentSessionNamespace`](../../entities/agent-sessions/namespace/classes/AgentSessionNamespace.md) | - |\n| <a id=\"property-ai\"></a> `ai` | `readonly` | [`AiNamespace`](../../entities/ai/namespace/classes/AiNamespace.md) | - |\n| <a id=\"property-apikeys\"></a> `apiKeys` | `readonly` | [`ApiKeyNamespace`](../../entities/api-keys/namespace/classes/ApiKeyNamespace.md) | apiKeys resources and operations. |\n| <a id=\"property-bots\"></a> `bots` | `readonly` | [`BotsNamespace`](../../entities/bots/namespace/classes/BotsNamespace.md) | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | [`CalendarNamespace`](../../entities/calendar/namespace/classes/CalendarNamespace.md) | - |\n| <a id=\"property-calls\"></a> `calls` | `readonly` | [`CallRecordNamespace`](../../entities/calls/namespace/classes/CallRecordNamespace.md) | - |\n| <a id=\"property-channels\"></a> `channels` | `readonly` | [`ChannelNamespace`](../../entities/channels/namespace/classes/ChannelNamespace.md) | - |\n| <a id=\"property-crm\"></a> `crm` | `readonly` | [`CrmNamespace`](../../entities/crm/namespace/classes/CrmNamespace.md) | - |\n| <a id=\"property-databases\"></a> `databases` | `readonly` | [`DatabaseNamespace`](../../entities/databases/namespace/classes/DatabaseNamespace.md) | - |\n| <a id=\"property-documents\"></a> `documents` | `readonly` | [`DocumentNamespace`](../../entities/documents/namespace/classes/DocumentNamespace.md) | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | [`EmailNamespace`](../../entities/email/namespace/classes/EmailNamespace.md) | - |\n| <a id=\"property-entitymentions\"></a> `entityMentions` | `readonly` | [`EntityMentionNamespace`](../../entities/entity-mentions/namespace/classes/EntityMentionNamespace.md) | entityMentions resources and operations. |\n| <a id=\"property-events\"></a> `events` | `readonly` | [`MacroEvents`](../../events/receiver/classes/MacroEvents.md) | - |\n| <a id=\"property-favorites\"></a> `favorites` | `readonly` | [`FavoritesNamespace`](../../entities/favorites/namespace/classes/FavoritesNamespace.md) | - |\n| <a id=\"property-foreignentities\"></a> `foreignEntities` | `readonly` | [`ForeignEntityNamespace`](../../entities/foreign/namespace/classes/ForeignEntityNamespace.md) | - |\n| <a id=\"property-forms\"></a> `forms` | `readonly` | [`FormNamespace`](../../entities/forms/namespace/classes/FormNamespace.md) | Build forms and submit answers without granting respondents database access. |\n| <a id=\"property-githubpullrequests\"></a> `githubPullRequests` | `readonly` | [`GithubPullRequestNamespace`](../../entities/github-pull-requests/namespace/classes/GithubPullRequestNamespace.md) | githubPullRequests resources and operations. |\n| <a id=\"property-harnesses\"></a> `harnesses` | `readonly` | [`HarnessNamespace`](../../entities/harnesses/namespace/classes/HarnessNamespace.md) | harnesses resources and operations. |\n| <a id=\"property-initiatives\"></a> `initiatives` | `readonly` | [`InitiativeNamespace`](../../entities/initiatives/namespace/classes/InitiativeNamespace.md) | initiatives resources and operations. |\n| <a id=\"property-meetings\"></a> `meetings` | `readonly` | [`MeetingNamespace`](../../entities/meetings/namespace/classes/MeetingNamespace.md) | meetings resources and operations. |\n| <a id=\"property-notifications\"></a> `notifications` | `readonly` | [`NotificationNamespace`](../../entities/notifications/namespace/classes/NotificationNamespace.md) | - |\n| <a id=\"property-pins\"></a> `pins` | `readonly` | [`PinsNamespace`](../../entities/pins/namespace/classes/PinsNamespace.md) | - |\n| <a id=\"property-projects\"></a> `projects` | `readonly` | [`ProjectNamespace`](../../entities/projects/namespace/classes/ProjectNamespace.md) | - |\n| <a id=\"property-properties\"></a> `properties` | `readonly` | [`PropertiesNamespace`](../../entities/properties/namespace/classes/PropertiesNamespace.md) | - |\n| <a id=\"property-routines\"></a> `routines` | `readonly` | [`RoutineNamespace`](../../entities/routines/namespace/classes/RoutineNamespace.md) | routines resources and operations. |\n| <a id=\"property-tasks\"></a> `tasks` | `readonly` | [`TaskNamespace`](../../entities/tasks/namespace/classes/TaskNamespace.md) | - |\n| <a id=\"property-teams\"></a> `teams` | `readonly` | [`TeamNamespace`](../../entities/teams/namespace/classes/TeamNamespace.md) | - |\n| <a id=\"property-unfurls\"></a> `unfurls` | `readonly` | [`UnfurlNamespace`](../../entities/unfurls/namespace/classes/UnfurlNamespace.md) | unfurls resources and operations. |\n| <a id=\"property-users\"></a> `users` | `readonly` | [`UserNamespace`](../../entities/users/namespace/classes/UserNamespace.md) | - |\n| <a id=\"property-webappurl\"></a> `webAppUrl` | `readonly` | `string` | Base URL of the Macro web app, used to build entity URLs. |\n| <a id=\"property-webhooks\"></a> `webhooks` | `readonly` | [`WebhooksNamespace`](../../entities/webhooks/namespace/classes/WebhooksNamespace.md) | - |\n| <a id=\"property-whatsapp\"></a> `whatsapp` | `readonly` | [`WhatsAppNamespace`](../../entities/whatsapp/namespace/classes/WhatsAppNamespace.md) | Personal WhatsApp groups and shared group operations. |\n\n## Methods\n\n### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated caller's mentionable principal — `bot|<uuid>` for bot\nauth, `macro|<email>` for user auth — fetched once and cached.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### requestedAs()\n\n> **requestedAs**(`user`): `Macro`\\<`T`\\>\n\nClone of this SDK acting on behalf of `user` (sent as\n`x-macro-bot-for-macro-user-id`). Bot auth only — throws for user auth,\nsince a user token always acts as its own user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | [`User`](../../entities/users/user/classes/User.md) |\n\n#### Returns\n\n`Macro`\\<`T`\\>\n\n\n<!-- src/macro/type-aliases/RequestActivity.md -->\n# Type Alias: RequestActivity\n\n> **RequestActivity** = \\{ `id`: `number`; `operation`: `string`; `service`: `string`; `status`: `\"started\"` \\| `\"completed\"` \\| `\"failed\"`; \\}\n\nA generated SDK operation lifecycle. Contains no arguments, URLs or response data.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `number` |\n| <a id=\"property-operation\"></a> `operation` | `string` |\n| <a id=\"property-service\"></a> `service` | `string` |\n| <a id=\"property-status\"></a> `status` | `\"started\"` \\| `\"completed\"` \\| `\"failed\"` |\n",- "documentation": "# Macro SDK: core\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/search/types.gen/type-aliases/AgentSessionFilters.md -->\n# Type Alias: AgentSessionFilters\n\n> **AgentSessionFilters** = \\{ `ids?`: `string`[]; `include?`: `boolean`; `owners?`: `string`[]; \\}\n\nFilters for agent sessions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] | Agent session ids to filter by. Empty to include all accessible sessions. |\n| <a id=\"property-include\"></a> `include?` | `boolean` | Opt this query into agent sessions at all. Agent sessions are off by default — see [`crate::ast::agent_session::AgentSessionLiteral::Include`]. Asking for specific `ids` or `owners` also opts in. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by session owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every owner. |\n\n\n<!-- generated/search/types.gen/type-aliases/CalendarEventFilters.md -->\n# Type Alias: CalendarEventFilters\n\n> **CalendarEventFilters** = \\{ `attendees?`: `string`[]; `calendar_event_ids?`: `string`[]; `ends_after?`: `string` \\| `null`; `organizers?`: `string`[]; `starts_before?`: `string` \\| `null`; `statuses?`: `string`[]; \\}\n\nFilters for canonical calendar-event entities.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | `string`[] | Attendee email addresses. |\n| <a id=\"property-calendar_event_ids\"></a> `calendar_event_ids?` | `string`[] | Canonical event ids. |\n| <a id=\"property-ends_after\"></a> `ends_after?` | `string` \\| `null` | Include master events ending after this instant. |\n| <a id=\"property-organizers\"></a> `organizers?` | `string`[] | Organizer email addresses. |\n| <a id=\"property-starts_before\"></a> `starts_before?` | `string` \\| `null` | Include master events starting before this instant. |\n| <a id=\"property-statuses\"></a> `statuses?` | `string`[] | Event statuses such as `confirmed`, `tentative`, or `cancelled`. |\n\n\n<!-- generated/search/types.gen/type-aliases/CallFilters.md -->\n# Type Alias: CallFilters\n\n> **CallFilters** = \\{ `attended?`: `boolean` \\| `null`; `call_ids?`: `string`[]; `channel_ids?`: `string`[]; `speaker_ids?`: `string`[]; `status?`: `null` \\| [`CallStatus`](CallStatus.md); \\}\n\nFilters for call records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attended\"></a> `attended?` | `boolean` \\| `null` | Legacy filter by whether the requesting user attended the call. Prefer [`CallFilters::status`] for new callers. `None` = no filter, `Some(true)` = only calls the user joined, `Some(false)` = only calls the user did not join. |\n| <a id=\"property-call_ids\"></a> `call_ids?` | `string`[] | Call record IDs to filter by. Empty to include all calls. |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs to filter calls by. Empty to include all calls. |\n| <a id=\"property-speaker_ids\"></a> `speaker_ids?` | `string`[] | Speaker macro user ids. Empty to include all. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| [`CallStatus`](CallStatus.md) | - |\n\n\n<!-- generated/search/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/search/types.gen/type-aliases/ChannelFilters.md -->\n# Type Alias: ChannelFilters\n\n> **ChannelFilters** = \\{ `channel_ids?`: `string`[]; `channel_types?`: `string`[]; `importance?`: `boolean` \\| `null`; `is_participant?`: `boolean` \\| `null`; `mentions?`: `string`[]; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); `org_id?`: `number` \\| `null`; `sender_ids?`: `string`[]; `team_id?`: `string` \\| `null`; `thread_ids?`: `string`[]; \\}\n\nThe channel message filters used to filter down what channel messages you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels. |\n| <a id=\"property-channel_types\"></a> `channel_types?` | `string`[] | Channel types to filter by. Examples: ['public'], ['direct_message', 'private']. Empty to search all channel types. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by channel importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-is_participant\"></a> `is_participant?` | `boolean` \\| `null` | Filter by whether the requesting user is an active participant of the channel. Presence of this filter also widens the candidate set to team channels of the user's teams that they have not joined, so `false` matches those channels. None to ignore (participant channels only, today's default). |\n| <a id=\"property-mentions\"></a> `mentions?` | `string`[] | Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by channel notification state. |\n| <a id=\"property-org_id\"></a> `org_id?` | `number` \\| `null` | Channel organization ID to search within. Empty to ignore organization filtering. |\n| <a id=\"property-sender_ids\"></a> `sender_ids?` | `string`[] | Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders. |\n| <a id=\"property-team_id\"></a> `team_id?` | `string` \\| `null` | Channel team ID to search within. Empty to ignore team filtering. |\n| <a id=\"property-thread_ids\"></a> `thread_ids?` | `string`[] | Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads. |\n\n\n<!-- generated/search/types.gen/type-aliases/ChannelThreadFilters.md -->\n# Type Alias: ChannelThreadFilters\n\n> **ChannelThreadFilters** = \\{ `channel_ids?`: `string`[]; `participant_ids?`: `string`[]; `root_sender_ids?`: `string`[]; `thread_ids?`: `string`[]; \\}\n\nThe channel thread filters used to filter down channel-thread entities.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs containing the thread. Empty to include threads from all accessible channels. |\n| <a id=\"property-participant_ids\"></a> `participant_ids?` | `string`[] | Thread participant user IDs. A participant is the root message sender, anyone who replied in the thread, or anyone @-mentioned in the thread (group mentions like **Here** count through their per-user expansion at send time). Empty to include threads regardless of participants. |\n| <a id=\"property-root_sender_ids\"></a> `root_sender_ids?` | `string`[] | Sender IDs for the root thread message. Empty to include all root senders. |\n| <a id=\"property-thread_ids\"></a> `thread_ids?` | `string`[] | Channel thread parent message IDs to include. Empty to include all accessible threads. |\n\n\n<!-- generated/search/types.gen/type-aliases/ChatFilters.md -->\n# Type Alias: ChatFilters\n\n> **ChatFilters** = \\{ `chat_ids?`: `string`[]; `importance?`: `boolean` \\| `null`; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); `owners?`: `string`[]; `project_ids?`: `string`[]; `role?`: `string`[]; \\}\n\nThe chat filters used to filter down what chats you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-chat_ids\"></a> `chat_ids?` | `string`[] | Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by chat importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by chat notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by chat owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering. |\n| <a id=\"property-role\"></a> `role?` | `string`[] | Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles. |\n\n\n<!-- generated/search/types.gen/type-aliases/CrmCompanyFilters.md -->\n# Type Alias: CrmCompanyFilters\n\n> **CrmCompanyFilters** = \\{ `company_ids?`: `string`[]; `hidden?`: `boolean` \\| `null`; \\}\n\nThe crm company filters used to narrow which CRM companies appear in soup.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-company_ids\"></a> `company_ids?` | `string`[] | CRM company ids to filter by. Examples: ['11111111-...']. Empty to include all of the team's visible CRM companies. |\n| <a id=\"property-hidden\"></a> `hidden?` | `boolean` \\| `null` | Optional `crm_companies.hidden` filter. `None` = visible only (default for back-compat with non-admin callers). `Some(false)` = visible only (explicit). `Some(true)` = hidden only — requires admin/owner team role; enforced by the CRM service from the caller's team receipt. |\n\n\n<!-- generated/search/types.gen/type-aliases/DocumentFilters.md -->\n# Type Alias: DocumentFilters\n\n> **DocumentFilters** = \\{ `document_ids?`: `string`[]; `file_types?`: `string`[]; `importance?`: `boolean` \\| `null`; `is_email_attachment?`: `boolean` \\| `null`; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); `owners?`: `string`[]; `project_ids?`: `string`[]; `sub_types?`: `string`[]; `task_filters?`: [`TaskFilters`](TaskFilters.md); \\}\n\nThe document filters used to filter down what documents you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-document_ids\"></a> `document_ids?` | `string`[] | Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents. |\n| <a id=\"property-file_types\"></a> `file_types?` | `string`[] | Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by document importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-is_email_attachment\"></a> `is_email_attachment?` | `boolean` \\| `null` | Filter by email attachment status. true = only email attachments, false = only non-email attachments, None = both. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by document notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by document owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Examples: ['project1']. filtering. Empty to ignore project filtering. |\n| <a id=\"property-sub_types\"></a> `sub_types?` | `string`[] | Filter by document sub type. Examples: ['task']. Empty to search all sub types. |\n| <a id=\"property-task_filters\"></a> `task_filters?` | [`TaskFilters`](TaskFilters.md) | Task-specific filters that only apply to task subtype documents. |\n\n\n<!-- generated/search/types.gen/type-aliases/EmailFilters.md -->\n# Type Alias: EmailFilters\n\n> **EmailFilters** = \\{ `bcc?`: `string`[]; `calendar_only?`: `boolean` \\| `null`; `cc?`: `string`[]; `crm_addresses?`: `string`[]; `crm_domains?`: `string`[]; `email_thread_ids?`: `string`[]; `exclude_labels?`: `string`[]; `importance?`: `boolean` \\| `null`; `include_labels?`: `string`[]; `is_read?`: `boolean` \\| `null`; `link_ids?`: `string`[]; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); `project_ids?`: `string`[]; `recipients?`: `string`[]; `senders?`: `string`[]; `shared?`: [`SharedEmailFilter`](SharedEmailFilter.md); \\}\n\nThe email filters used to filter down what emails you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | `string`[] | Email BCC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by BCC. |\n| <a id=\"property-calendar_only\"></a> `calendar_only?` | `boolean` \\| `null` | When `Some(true)`, only include threads that have at least one message with an iCalendar attachment (`.ics` filename or `application/ics` mime type). `Some(false)` and `None` apply no constraint. |\n| <a id=\"property-cc\"></a> `cc?` | `string`[] | Email CC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by CC. |\n| <a id=\"property-crm_addresses\"></a> `crm_addresses?` | `string`[] | CRM-scoped address filter. When non-empty, expands visibility to every teammate's mailbox and restricts to threads involving any of these fully-qualified addresses. Each address is authorized against `crm_contacts` + `crm_companies` (contact must not be hidden, company must not be hidden, `email_sync` must be true). Mutually exclusive with `crm_domains`. |\n| <a id=\"property-crm_domains\"></a> `crm_domains?` | `string`[] | CRM-scoped domain filter. When non-empty, expands visibility to every teammate's mailbox and restricts to threads involving any of these domains (in any of sender/cc/bcc/recipient). Each domain is authorized against `crm_domains` + `crm_companies` (must exist for the caller's team, company must not be hidden, `email_sync` must be true). Mutually exclusive with `crm_addresses`. |\n| <a id=\"property-email_thread_ids\"></a> `email_thread_ids?` | `string`[] | Email thread IDs to filter by. Examples: ['thread-uuid-1']. Empty to search all threads. |\n| <a id=\"property-exclude_labels\"></a> `exclude_labels?` | `string`[] | Exclude emails that have any of these labels. Supports both Gmail system labels (e.g. \"CATEGORY_PROMOTIONS\") and user-created labels. Empty to not exclude any labels. Note: SPAM and TRASH emails are not indexed in OpenSearch, so they are already excluded by default. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by email importance. None to not filter. True to show only important emails (drafts, personal, sent, or uncategorized). False to show only unimportant emails (those categorized as promotions, social, updates, or forums). |\n| <a id=\"property-include_labels\"></a> `include_labels?` | `string`[] | Only include emails that have at least one of these labels. Supports both Gmail system labels (e.g. \"INBOX\", \"CATEGORY_PROMOTIONS\") and user-created labels (e.g. \"github\"). Empty to not filter by included labels. Note: SPAM and TRASH emails are not indexed in OpenSearch, so they will never appear in results regardless of this filter. |\n| <a id=\"property-is_read\"></a> `is_read?` | `boolean` \\| `null` | Filter by the email thread's read flag, independently of notification state. |\n| <a id=\"property-link_ids\"></a> `link_ids?` | `string`[] | Restrict to specific inboxes by email_links.id. Empty means \"any inbox the caller can access\" (soup expands to the full set at the router edge). |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by email notification state. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Empty to ignore project filtering. |\n| <a id=\"property-recipients\"></a> `recipients?` | `string`[] | Email Recipient addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by Recipient. |\n| <a id=\"property-senders\"></a> `senders?` | `string`[] | Email sender addresses to filter by. Examples: ['[email protected]']. Empty to search all senders. |\n| <a id=\"property-shared\"></a> `shared?` | [`SharedEmailFilter`](SharedEmailFilter.md) | Controls whether shared email threads are included in results. Defaults to \"exclude\" (only the user's own threads). |\n\n\n<!-- generated/search/types.gen/type-aliases/EntityFilters.md -->\n# Type Alias: EntityFilters\n\n> **EntityFilters** = \\{ `agent_session_filters?`: [`AgentSessionFilters`](AgentSessionFilters.md); `calendar_event_filters?`: [`CalendarEventFilters`](CalendarEventFilters.md); `call_filters?`: [`CallFilters`](CallFilters.md); `channel_filters?`: [`ChannelFilters`](ChannelFilters.md); `channel_thread_filters?`: [`ChannelThreadFilters`](ChannelThreadFilters.md); `chat_filters?`: [`ChatFilters`](ChatFilters.md); `crm_company_filters?`: [`CrmCompanyFilters`](CrmCompanyFilters.md); `document_filters?`: [`DocumentFilters`](DocumentFilters.md); `email_filters?`: [`EmailFilters`](EmailFilters.md); `favorites_only?`: `boolean` \\| `null`; `foreign_entity_filters?`: [`ForeignEntityFilters`](ForeignEntityFilters.md); `initiative_filters?`: [`InitiativeFilters`](InitiativeFilters.md); `project_filters?`: [`ProjectFilters`](ProjectFilters.md); `property_filters?`: [`PropertyFilter`](PropertyFilter.md)[]; `tag_filter_mode?`: [`TagFilterMode`](TagFilterMode.md); `tag_option_ids?`: `string`[]; \\}\n\na bundle of all of the filters for each entity type\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-agent_session_filters\"></a> `agent_session_filters?` | [`AgentSessionFilters`](AgentSessionFilters.md) | the bundled [AgentSessionFilters] |\n| <a id=\"property-calendar_event_filters\"></a> `calendar_event_filters?` | [`CalendarEventFilters`](CalendarEventFilters.md) | the bundled [CalendarEventFilters] |\n| <a id=\"property-call_filters\"></a> `call_filters?` | [`CallFilters`](CallFilters.md) | the bundled [CallFilters] |\n| <a id=\"property-channel_filters\"></a> `channel_filters?` | [`ChannelFilters`](ChannelFilters.md) | the bundled [ChannelFilters] |\n| <a id=\"property-channel_thread_filters\"></a> `channel_thread_filters?` | [`ChannelThreadFilters`](ChannelThreadFilters.md) | the bundled [ChannelThreadFilters] |\n| <a id=\"property-chat_filters\"></a> `chat_filters?` | [`ChatFilters`](ChatFilters.md) | the bundled [ChatFilters] |\n| <a id=\"property-crm_company_filters\"></a> `crm_company_filters?` | [`CrmCompanyFilters`](CrmCompanyFilters.md) | the bundled [CrmCompanyFilters] |\n| <a id=\"property-document_filters\"></a> `document_filters?` | [`DocumentFilters`](DocumentFilters.md) | the bundled [DocumentFilters] |\n| <a id=\"property-email_filters\"></a> `email_filters?` | [`EmailFilters`](EmailFilters.md) | the bundled [EmailFilters] |\n| <a id=\"property-favorites_only\"></a> `favorites_only?` | `boolean` \\| `null` | Restrict results to the authenticated viewer's favorites when true. |\n| <a id=\"property-foreign_entity_filters\"></a> `foreign_entity_filters?` | [`ForeignEntityFilters`](ForeignEntityFilters.md) | the bundled [ForeignEntityFilters] |\n| <a id=\"property-initiative_filters\"></a> `initiative_filters?` | [`InitiativeFilters`](InitiativeFilters.md) | Initiative filters. Initiatives are opt-in. |\n| <a id=\"property-project_filters\"></a> `project_filters?` | [`ProjectFilters`](ProjectFilters.md) | the bundled [ProjectFilters] |\n| <a id=\"property-property_filters\"></a> `property_filters?` | [`PropertyFilter`](PropertyFilter.md)[] | property-based filters applied across entity types |\n| <a id=\"property-tag_filter_mode\"></a> `tag_filter_mode?` | [`TagFilterMode`](TagFilterMode.md) | How the `tag_option_ids` combine: `any` (default) matches entities holding at least one selected tag, `all` requires every selected tag. |\n| <a id=\"property-tag_option_ids\"></a> `tag_option_ids?` | `string`[] | tag option ids matched against `properties.values`, OR'd together across all tag definitions. Option ids are globally unique, so the match ignores the owning definition id (personal and team tags combine into one OR). |\n\n\n<!-- generated/search/types.gen/type-aliases/ForeignEntityFilters.md -->\n# Type Alias: ForeignEntityFilters\n\n> **ForeignEntityFilters** = \\{ `foreign_entity_ids?`: `string`[]; `foreign_entity_sources?`: `string`[]; `ids?`: `string`[]; `includes_me?`: `boolean`; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); \\}\n\nFilters for foreign entity records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-foreign_entity_ids\"></a> `foreign_entity_ids?` | `string`[] | External entity identifiers to filter by. Empty to include all external IDs. |\n| <a id=\"property-foreign_entity_sources\"></a> `foreign_entity_sources?` | `string`[] | External source names to filter by. Empty to include all sources. |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] | Internal foreign entity record IDs to filter by. Empty to include all records. |\n| <a id=\"property-includes_me\"></a> `includes_me?` | `boolean` | When true, only return foreign entities whose metadata lists the requesting user as a participant (GitHub `involves:me` semantics for `github_pull_request` records). False or absent applies no filter. Serialized in filter ASTs as the `\"me\"` literal. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by the notification state of the foreign entity (e.g. whether the requesting user's GitHub PR notification is done/seen). |\n\n\n<!-- generated/search/types.gen/type-aliases/InitiativeFilters.md -->\n# Type Alias: InitiativeFilters\n\n> **InitiativeFilters** = \\{ `due_after?`: `string` \\| `null`; `due_before?`: `string` \\| `null`; `include?`: `boolean`; `initiative_ids?`: `string`[]; `name?`: `string` \\| `null`; `owners?`: `string`[]; \\}\n\nFilters for initiatives.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-due_after\"></a> `due_after?` | `string` \\| `null` | Inclusive lower due-date bound. |\n| <a id=\"property-due_before\"></a> `due_before?` | `string` \\| `null` | Inclusive upper due-date bound. |\n| <a id=\"property-include\"></a> `include?` | `boolean` | Opt this query into initiatives at all. Initiatives are off by default — see [`crate::ast::initiative::InitiativeLiteral::Include`]. Asking for specific `initiative_ids` or `owners` also opts in. |\n| <a id=\"property-initiative_ids\"></a> `initiative_ids?` | `string`[] | Initiative ids to filter by. Empty to include all accessible initiatives. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Case-insensitive name substring. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by initiative owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every owner. |\n\n\n<!-- generated/search/types.gen/type-aliases/NotificationFilters.md -->\n# Type Alias: NotificationFilters\n\n> **NotificationFilters** = \\{ `states?`: [`NotificationState`](NotificationState.md)[]; \\}\n\nNotification-level filters that apply to an entity type.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-states\"></a> `states?` | [`NotificationState`](NotificationState.md)[] | Include entities with a non-deleted notification in any of these exact states. Empty means no notification restriction. Active means `[unseen, seen]`. |\n\n\n<!-- generated/search/types.gen/type-aliases/NotificationState.md -->\n# Type Alias: NotificationState\n\n> **NotificationState** = `\"unseen\"` \\| `\"seen\"` \\| `\"done\"`\n\nThe mutually exclusive lifecycle states of a user's notification.\n\n\n<!-- generated/search/types.gen/type-aliases/ProjectFilters.md -->\n# Type Alias: ProjectFilters\n\n> **ProjectFilters** = \\{ `importance?`: `boolean` \\| `null`; `include_root?`: `boolean`; `notification_filters?`: [`NotificationFilters`](NotificationFilters.md); `owners?`: `string`[]; `project_ids?`: `string`[]; \\}\n\nThe project filters used to filter down what projects you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-include_root\"></a> `include_root?` | `boolean` | When true, `project_ids` also matches the projects themselves in addition to their children. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | [`NotificationFilters`](NotificationFilters.md) | Filter by project notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by project owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects. By default matches children of these projects; set `include_root` to also match the projects themselves. |\n\n\n<!-- generated/search/types.gen/type-aliases/PropertyFilter.md -->\n# Type Alias: PropertyFilter\n\n> **PropertyFilter** = \\{ `entity_ids?`: `string`[]; `entity_type?`: `string` \\| `null`; `option_ids?`: `string`[]; `property_definition_id`: `string`; \\}\n\nA single property-based filter condition.\n\nEach filter targets a specific property definition on entities of a given type,\nmatching against select option UUIDs or entity reference IDs.\nMultiple values within a single filter are OR'd together.\nMultiple filters are AND'd together.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_ids\"></a> `entity_ids?` | `string`[] | Entity reference IDs to match. Multiple values are OR'd together. |\n| <a id=\"property-entity_type\"></a> `entity_type?` | `string` \\| `null` | The entity type for the property lookup (e.g., \"TASK\", \"DOCUMENT\", \"PROJECT\"). When None, matches across all entity types. |\n| <a id=\"property-option_ids\"></a> `option_ids?` | `string`[] | Select option UUIDs to match. Multiple values are OR'd together. |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` | The UUID of the property definition to filter on. |\n\n\n<!-- generated/search/types.gen/type-aliases/SharedEmailFilter.md -->\n# Type Alias: SharedEmailFilter\n\n> **SharedEmailFilter** = `\"exclude\"` \\| `\"include\"` \\| `\"only\"`\n\nControls whether shared email threads are included in results.\n\n\n<!-- generated/search/types.gen/type-aliases/TagFilterMode.md -->\n# Type Alias: TagFilterMode\n\n> **TagFilterMode** = `\"any\"` \\| `\"all\"`\n\nHow multiple `tag_option_ids` combine when filtering.\n\n\n<!-- generated/search/types.gen/type-aliases/TaskFilters.md -->\n# Type Alias: TaskFilters\n\n> **TaskFilters** = \\{ `include_cbm_atm_nc?`: `boolean` \\| `null`; \\}\n\nTask-only filters nested under document filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-include_cbm_atm_nc\"></a> `include_cbm_atm_nc?` | `boolean` \\| `null` | Include tasks that are created by me, assigned to me, and not completed, even when they do not match other document filters. |\n\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/AccessRequest.md -->\n# Type Alias: AccessRequest\n\n> **AccessRequest** = \\{ `createdAt`: `string`; `grantedLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `id`: `string`; `requestedLevel`: [`AccessLevel`](AccessLevel.md); `requesterId`: `string`; `resolvedAt?`: `string` \\| `null`; `retryAfter?`: `string` \\| `null`; `revision`: `number`; `status`: [`RequestStatus`](RequestStatus.md); `updatedAt`: `string`; \\}\n\nLatest request for one person and one entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Start of this request attempt. |\n| <a id=\"property-grantedlevel\"></a> `grantedLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-id\"></a> `id` | `string` | Stable request identity across revisions. |\n| <a id=\"property-requestedlevel\"></a> `requestedLevel` | [`AccessLevel`](AccessLevel.md) | Requested upgrade. |\n| <a id=\"property-requesterid\"></a> `requesterId` | `string` | Person requesting access. |\n| <a id=\"property-resolvedat\"></a> `resolvedAt?` | `string` \\| `null` | When the request stopped being pending. |\n| <a id=\"property-retryafter\"></a> `retryAfter?` | `string` \\| `null` | Earliest next submission or level change; cancellation preserves this deadline. Submissions wait one minute, denials wait 24 hours, and approval clears it. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Optimistic concurrency token. |\n| <a id=\"property-status\"></a> `status` | [`RequestStatus`](RequestStatus.md) | Current outcome. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Most recent change. |\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityPermission.md -->\n# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\} \\| \\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: [`AccessLevel`](AccessLevel.md); `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | [`AccessLevel`](AccessLevel.md) | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: [`ParticipantRole`](ParticipantRole.md); `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`ParticipantRole`](ParticipantRole.md) | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: [`TeamRole`](TeamRole.md); `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | [`TeamRole`](TeamRole.md) | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FavoriteEntityRef.md -->\n# Type Alias: FavoriteEntityRef\n\n> **FavoriteEntityRef** = \\{ `entityId`: `string`; `entityType`: `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`; \\}\n\nA reference to a favorited entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The id of the favorited entity. |\n| <a id=\"property-entitytype\"></a> `entityType` | `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | The type of the favorited entity. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageCursor.md -->\n# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |\n\n\n<!-- generated/storage/types.gen/type-aliases/MessageDirection.md -->\n# Type Alias: MessageDirection\n\n> **MessageDirection** = `\"older\"` \\| `\"newer\"`\n\nDirection through a parent timeline, retaining channel cursor semantics.\n\n\n<!-- generated/storage/types.gen/type-aliases/ParticipantRole.md -->\n# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.\n\n\n<!-- generated/storage/types.gen/type-aliases/RequestStatus.md -->\n# Type Alias: RequestStatus\n\n> **RequestStatus** = `\"pending\"` \\| `\"granted\"` \\| `\"denied\"` \\| `\"cancelled\"`\n\nDurable outcome; reading a notification never changes it.\n\n\n<!-- generated/storage/types.gen/type-aliases/ResolveRequest.md -->\n# Type Alias: ResolveRequest\n\n> **ResolveRequest** = \\{ `grantedLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `revision`: `number`; \\}\n\nOwner's decision; omission of a granted level means deny.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-grantedlevel\"></a> `grantedLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-revision\"></a> `revision` | `number` | Request revision being reviewed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ShareEntityType.md -->\n# Type Alias: ShareEntityType\n\n> **ShareEntityType** = `\"document\"` \\| `\"chat\"` \\| `\"project\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"call\"` \\| `\"email_thread\"` \\| `\"agent_session\"` \\| `\"whatsapp_group\"`\n\nAn entity type with an existing Share surface.\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/TeamRole.md -->\n# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.\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/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/WebhookFilter.md -->\n# Type Alias: WebhookFilter\n\n> **WebhookFilter** = \\{ `events`: `string`[]; `ids?`: `string`[] \\| `null`; \\}\n\nEvent and optional entity-id constraints used to match webhook deliveries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-events\"></a> `events` | `string`[] | Event names matched by this filter. |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | Entity ids matched by this filter. When absent, the filter matches all entity ids. |\n\n\n<!-- generated/storage/types.gen/type-aliases/WebhookScope.md -->\n# Type Alias: WebhookScope\n\n> **WebhookScope** = `\"user\"` \\| `\"team\"`\n\nScope that owns a newly-created webhook.\n\nClients serialize this, so both derives are used. `Display`/`FromStr`\nspell the same names as serde, for query strings and config values.\n\n\n<!-- src/config/interfaces/MacroOpts.md -->\n# Interface: MacroOpts\n\nOptions passed to `new Macro(opts)` and stored on `MacroClient`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auth\"></a> `auth?` | [`MacroAuth`](../type-aliases/MacroAuth.md) | How to authenticate. Takes precedence over `token`. Falls back to `MACRO_API_KEY` (a user API key or bearer token) or `MACRO_BOT_TOKEN` (bot). |\n| <a id=\"property-env\"></a> `env?` | [`Env`](../type-aliases/Env.md) | Which Macro environment to talk to. Falls back to the MACRO_ENV env var, then `'prod'`. |\n| <a id=\"property-hosts\"></a> `hosts?` | `Partial`\\<`Record`\\<[`ServiceName`](../type-aliases/ServiceName.md), `string`\\>\\> | Override individual service hosts (e.g. point one at localhost). |\n| <a id=\"property-onrequest\"></a> `onRequest?` | (`event`) => `void` | Optional generated API operation events; excludes arguments, URLs and response data. |\n| <a id=\"property-requestedas\"></a> `requestedAs?` | `string` | User id the bot acts for, sent as `x-macro-bot-for-macro-user-id` on every request. Bot auth only. Set via `macro.requestedAs(user)` rather than directly. |\n| <a id=\"property-token\"></a> `token?` | [`TokenSource`](../type-aliases/TokenSource.md) | Shorthand for `auth: { type: 'user', token }`. Accepts a Settings API key (`mak_…`) or a bearer token. |\n| <a id=\"property-webappurl\"></a> `webAppUrl?` | `string` | Override the web app base URL (e.g. for local frontend dev). Also reads MACRO_WEB_URL. |\n| <a id=\"property-webhooksecret\"></a> `webhookSecret?` | `string` | Signing secret for verifying incoming persisted-webhook deliveries. Required only for `macro.events.webhook()` / `macro.events.handle()`. SSE via `macro.events.listen()` uses the API token and does not need this. Falls back to MACRO_WEBHOOK_SECRET. |\n| <a id=\"property-wsverify\"></a> `wsVerify?` | `string` | - |\n\n\n<!-- src/config/type-aliases/BotScope.md -->\n# Type Alias: BotScope\n\n> **BotScope** = `\"user\"` \\| `\"team\"`\n\nAccess scope for bot-authenticated requests. `user` acts with the\nrequested-as user's access (requires `requestedAs`); `team` acts with the\nbot's owning team's access (team-owned bots only).\n\n\n<!-- src/config/type-aliases/Env.md -->\n# Type Alias: Env\n\n> **Env** = `\"dev\"` \\| `\"prod\"` \\| `\"local\"`\n\n\n<!-- src/config/type-aliases/MacroAuth.md -->\n# Type Alias: MacroAuth\n\n> **MacroAuth** = \\{ `apiKey?`: `never`; `token`: [`TokenSource`](TokenSource.md); `type`: `\"user\"`; \\} \\| \\{ `apiKey`: `string`; `token?`: `never`; `type`: `\"user\"`; \\} \\| \\{ `scope?`: [`BotScope`](BotScope.md); `token`: [`TokenSource`](TokenSource.md); `type`: `\"bot\"`; \\}\n\nHow the SDK authenticates with Macro.\n\nA user has exactly one of two credential fields.\n\n- `token`: a bearer token, or a `mak_` API key. The SDK picks the header\n from the prefix at send time.\n- `apiKey`: a Settings → API Keys key, always sent as\n `x-macro-user-api-key`. Not prefix-checked, so keys that predate the\n `mak_` prefix work here.\n\nA bot uses an `mbot_` token as `x-macro-bot-token` plus\n`x-macro-bot-scope`, defaulting to `user` when `requestedAs` is set and\n`team` otherwise.\n\n\n<!-- src/config/type-aliases/ServiceName.md -->\n# Type Alias: ServiceName\n\n> **ServiceName** = `\"agent-harness\"` \\| `\"storage\"` \\| `\"auth\"` \\| `\"email\"` \\| `\"calendar\"` \\| `\"cognition\"` \\| `\"notification\"` \\| `\"properties\"` \\| `\"search\"` \\| `\"scheduled-action\"` \\| `\"static-files\"` \\| `\"connection\"` \\| `\"contacts\"` \\| `\"unfurl\"`\n\nThe backend services the SDK talks to. Note `search` and `properties` are\nserved on the storage host, so they point there.\n\n\n<!-- src/config/type-aliases/TokenSource.md -->\n# Type Alias: TokenSource\n\n> **TokenSource** = `string` \\| (() => `string` \\| `Promise`\\<`string`\\>)\n\nA credential string, or a (possibly async) function that returns one.\n\n\n<!-- src/config/variables/HOSTS.md -->\n# Variable: HOSTS\n\n> `const` **HOSTS**: `Record`\\<[`Env`](../type-aliases/Env.md), `Record`\\<[`ServiceName`](../type-aliases/ServiceName.md), `string`\\>\\>\n\n\n<!-- src/config/variables/WEB_APP_URLS.md -->\n# Variable: WEB\\_APP\\_URLS\n\n> `const` **WEB\\_APP\\_URLS**: `Record`\\<[`Env`](../type-aliases/Env.md), `string`\\>\n\n\n<!-- src/entities/entity/classes/FavoritableEntity.md -->\n# Abstract Class: FavoritableEntity\\<Detail\\>\n\nAn entity the favorites API can address, and so can be (un)favorited.\n\n## Extends\n\n- [`MacroEntity`](MacroEntity.md)\\<`Detail`\\>\n\n## Extended by\n\n- [`CallRecord`](../../calls/call-record/classes/CallRecord.md)\n- [`Message`](../../channels/message/classes/Message.md)\n- [`Contact`](../../crm/contact/classes/Contact.md)\n- [`PropertiedEntity`](PropertiedEntity.md)\n- [`ForeignEntity`](../../foreign/foreign-entity/classes/ForeignEntity.md)\n- [`WhatsAppGroup`](../../whatsapp/group/classes/WhatsAppGroup.md)\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Implements\n\n- [`Favoritable`](../interfaces/Favoritable.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `abstract readonly` | `\"project\"` \\| `\"user\"` \\| `\"team\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | How the entity-addressed APIs (favorites) identify this entity's type. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](MacroEntity.md).[`id`](MacroEntity.md#property-id) |\n\n## Methods\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\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`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n[`Favoritable`](../interfaces/Favoritable.md).[`favorite`](../interfaces/Favoritable.md#favorite)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](MacroEntity.md).[`toJSON`](MacroEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n[`Favoritable`](../interfaces/Favoritable.md).[`unfavorite`](../interfaces/Favoritable.md#unfavorite)\n\n\n<!-- src/entities/entity/classes/MacroEntity.md -->\n# Abstract Class: MacroEntity\\<Detail\\>\n\nBase for entity handles: a free-to-construct `(client, id)` pair whose\ndetail record loads lazily on first field access and is dropped after any\nmutation. Subclasses implement fetch and build their surface from\nfield and mutate.\n\n## Extended by\n\n- [`AgentSession`](../../agent-sessions/agent-session/classes/AgentSession.md)\n- [`CodeExecution`](../../agent-sessions/code-execution/classes/CodeExecution.md)\n- [`SessionReview`](../../agent-sessions/review/classes/SessionReview.md)\n- [`Agent`](../../agents/agent/classes/Agent.md)\n- [`UserApiKey`](../../api-keys/api-key/classes/UserApiKey.md)\n- [`Calendar`](../../calendar/calendar/classes/Calendar.md)\n- [`CalendarEvent`](../../calendar/event/classes/CalendarEvent.md)\n- [`CalendarNote`](../../calendar/note/classes/CalendarNote.md)\n- [`CallMessage`](../../calls/message/classes/CallMessage.md)\n- [`ChatMessage`](../../chats/generation/classes/ChatMessage.md)\n- [`CrmComment`](../../crm/comment/classes/CrmComment.md)\n- [`CrmPipeline`](../../crm/pipeline/classes/CrmPipeline.md)\n- [`PipelineTable`](../../crm/pipeline/classes/PipelineTable.md)\n- [`PipelineRow`](../../crm/pipeline/classes/PipelineRow.md)\n- [`PipelineColumn`](../../crm/pipeline/classes/PipelineColumn.md)\n- [`Database`](../../databases/database/classes/Database.md)\n- [`DocumentAnchor`](../../documents/anchor/classes/DocumentAnchor.md)\n- [`Comment`](../../documents/comment/classes/Comment.md)\n- [`EmailAttachment`](../../email/attachment/classes/EmailAttachment.md)\n- [`EmailFilter`](../../email/filter/classes/EmailFilter.md)\n- [`Label`](../../email/label/classes/Label.md)\n- [`Link`](../../email/link/classes/Link.md)\n- [`EmailMessage`](../../email/message/classes/EmailMessage.md)\n- [`FavoritableEntity`](FavoritableEntity.md)\n- [`Form`](../../forms/form/classes/Form.md)\n- [`GithubPullRequest`](../../github-pull-requests/pull-request/classes/GithubPullRequest.md)\n- [`Harness`](../../harnesses/harness/classes/Harness.md)\n- [`HarnessPairing`](../../harnesses/pairing/classes/HarnessPairing.md)\n- [`Initiative`](../../initiatives/initiative/classes/Initiative.md)\n- [`Meeting`](../../meetings/meeting/classes/Meeting.md)\n- [`MessageThread`](../../messages/thread/classes/MessageThread.md)\n- [`Notification`](../../notifications/notification/classes/Notification.md)\n- [`Routine`](../../routines/routine/classes/Routine.md)\n- [`AccessRequest`](../../sharing/access/classes/AccessRequest.md)\n- [`Team`](../../teams/team/classes/Team.md)\n- [`Webhook`](../../webhooks/webhook/classes/Webhook.md)\n- [`WhatsAppAccount`](../../whatsapp/account/classes/WhatsAppAccount.md)\n- [`WhatsAppChat`](../../whatsapp/chat/classes/WhatsAppChat.md)\n- [`WhatsAppMessage`](../../whatsapp/message/classes/WhatsAppMessage.md)\n- [`WhatsAppSend`](../../whatsapp/send/classes/WhatsAppSend.md)\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` |\n\n## Methods\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |\n\n\n<!-- src/entities/entity/classes/PropertiedEntity.md -->\n# Abstract Class: PropertiedEntity\\<Detail\\>\n\nA favoritable entity that also carries user-defined properties.\n\n## Extends\n\n- [`FavoritableEntity`](FavoritableEntity.md)\\<`Detail`\\>\n\n## Extended by\n\n- [`Channel`](../../channels/channel/classes/Channel.md)\n- [`Chat`](../../chats/chat/classes/Chat.md)\n- [`Company`](../../crm/company/classes/Company.md)\n- [`Document`](../../documents/document/classes/Document.md)\n- [`EmailThread`](../../email/thread/classes/EmailThread.md)\n- [`Project`](../../projects/project/classes/Project.md)\n- [`User`](../../users/user/classes/User.md)\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Implements\n\n- [`Propertied`](../interfaces/Propertied.md)\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `abstract readonly` | `\"project\"` \\| `\"user\"` \\| `\"team\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | How the entity-addressed APIs (favorites) identify this entity's type. | [`FavoritableEntity`](FavoritableEntity.md).[`entityType`](FavoritableEntity.md#property-entitytype) |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`FavoritableEntity`](FavoritableEntity.md).[`id`](FavoritableEntity.md#property-id) |\n\n## Methods\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#### Implementation of\n\n[`Propertied`](../interfaces/Propertied.md).[`deleteProperty`](../interfaces/Propertied.md#deleteproperty)\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\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`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n[`Propertied`](../interfaces/Propertied.md).[`favorite`](../interfaces/Propertied.md#favorite)\n\n#### Inherited from\n\n[`FavoritableEntity`](FavoritableEntity.md).[`favorite`](FavoritableEntity.md#favorite)\n\n***\n\n### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: [`EntityPermission`](../../../../generated/storage/types.gen/type-aliases/EntityPermission.md); `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n[`FavoritableEntity`](FavoritableEntity.md).[`permission`](FavoritableEntity.md#permission)\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#### Implementation of\n\n[`Propertied`](../interfaces/Propertied.md).[`properties`](../interfaces/Propertied.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***\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#### Implementation of\n\n[`Propertied`](../interfaces/Propertied.md).[`setProperty`](../interfaces/Propertied.md#setproperty)\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |\n\n#### Inherited from\n\n[`FavoritableEntity`](FavoritableEntity.md).[`toJSON`](FavoritableEntity.md#tojson)\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n[`Propertied`](../interfaces/Propertied.md).[`unfavorite`](../interfaces/Propertied.md#unfavorite)\n\n#### Inherited from\n\n[`FavoritableEntity`](FavoritableEntity.md).[`unfavorite`](FavoritableEntity.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`](../interfaces/PropertyOptionDelta.md)[] |\n\n#### Returns\n\n`Promise`\\<[`BulkUpdateEntityPropertyOptionsResponse`](../../../../generated/properties/types.gen/type-aliases/BulkUpdateEntityPropertyOptionsResponse.md)\\>\n\n\n<!-- src/entities/entity/interfaces/Favoritable.md -->\n# Interface: Favoritable\n\nAn entity that can be added to and removed from the user's favorites.\n\n## Extended by\n\n- [`Propertied`](Propertied.md)\n\n## Methods\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Favoritable`\\>\n\n#### Returns\n\n`Promise`\\<`Favoritable`\\>\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Favoritable`\\>\n\n#### Returns\n\n`Promise`\\<`Favoritable`\\>\n\n\n<!-- src/entities/entity/interfaces/Propertied.md -->\n# Interface: Propertied\n\nA favoritable entity that also carries user-defined properties.\n\n## Extends\n\n- [`Favoritable`](Favoritable.md)\n\n## Methods\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\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***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Propertied`\\>\n\n#### Returns\n\n`Promise`\\<`Propertied`\\>\n\n#### Inherited from\n\n[`Favoritable`](Favoritable.md).[`favorite`](Favoritable.md#favorite)\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<[`EntityPropertyWithDefinition`](../../../../generated/properties/types.gen/type-aliases/EntityPropertyWithDefinition.md)[]\\>\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***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\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***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Propertied`\\>\n\n#### Returns\n\n`Promise`\\<`Propertied`\\>\n\n#### Inherited from\n\n[`Favoritable`](Favoritable.md).[`unfavorite`](Favoritable.md#unfavorite)\n\n\n<!-- src/entities/entity/interfaces/PropertyOptionDelta.md -->\n# Interface: PropertyOptionDelta\n\nA delta to apply to one multi-select property.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-add\"></a> `add?` | [`PropertyOption`](../../properties/property-option/classes/PropertyOption.md)[] | Options to add to the property's current selection. |\n| <a id=\"property-property\"></a> `property` | [`PropertyDefinition`](../../properties/property-definition/classes/PropertyDefinition.md) | The multi-select property definition to update. |\n| <a id=\"property-remove\"></a> `remove?` | [`PropertyOption`](../../properties/property-option/classes/PropertyOption.md)[] | Options to remove from the property's current selection. |\n\n\n<!-- src/entities/entity/type-aliases/MacroEntityType.md -->\n# Type Alias: MacroEntityType\n\n> **MacroEntityType** = [`FavoriteEntityRef`](../../../../generated/storage/types.gen/type-aliases/FavoriteEntityRef.md)\\[`\"entityType\"`\\]\n\nHow the entity-addressed APIs (favorites) identify an entity's type.\n\n\n<!-- src/entities/messages/thread/classes/MessageThread.md -->\n# Class: MessageThread\n\nA shared message thread with resolution and deletion operations.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\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` | [`MessageParent`](../type-aliases/MessageParent.md) | The entity containing this thread. | - |\n| <a id=\"property-resolved\"></a> `resolved` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the thread is resolved. | - |\n\n## Methods\n\n### delete()\n\n> **delete**(`nonce?`): `Promise`\\<`void`\\>\n\nDelete the entire thread, including replies.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `nonce?` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md); `id`: `string`; `parentId`: `string`; `parentType`: `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"`; \\}\n\nSerialize identity with its owning resource.\n\n#### Returns\n\n\\{ `detail?`: [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md); `id`: `string`; `parentId`: `string`; `parentType`: `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`ThreadState`](../../../../../generated/storage/types.gen/type-aliases/ThreadState.md) |\n| `id` | `string` |\n| `parentId` | `string` |\n| `parentType` | `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` |\n\n#### Overrides\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nResolve the thread or detach its annotation anchor.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `detachAnchor?`: `boolean`; `nonce?`: `string`; `resolved?`: `boolean`; \\} |\n| `options.detachAnchor?` | `boolean` |\n| `options.nonce?` | `string` |\n| `options.resolved?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `parent`, `id`): `MessageThread`\n\nConstruct a scoped thread handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`MessageParent`](../type-aliases/MessageParent.md) |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`\n\n\n<!-- src/entities/messages/thread/functions/timeline.md -->\n# Function: timeline()\n\n> **timeline**\\<`TMessage`\\>(`client`, `parent`, `map`, `selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `TMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\nA bounded mixed message/activity page with typed message handles.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-tmessage\"></a> `TMessage` *extends* [`TimelineMessage`](../type-aliases/TimelineMessage.md) |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | [`MessageParent`](../type-aliases/MessageParent.md) |\n| `map` | (`record`) => `TMessage` |\n| `selection?` | [`TimelineOptions`](../interfaces/TimelineOptions.md)\\<`TMessage`\\> |\n\n## Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: [`User`](../../../users/user/classes/User.md); `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `TMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; `previousCursor`: [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `undefined`; \\}\\>\n\n\n<!-- src/entities/messages/thread/interfaces/TimelineOptions.md -->\n# Interface: TimelineOptions\\<TMessage\\>\n\nTimeline selection with typed message references and camel case options.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-tmessage\"></a> `TMessage` *extends* [`TimelineMessage`](../type-aliases/TimelineMessage.md) | [`TimelineMessage`](../type-aliases/TimelineMessage.md) |\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-activityafter\"></a> `activityAfter?` | `string` | Inclusive activity lower bound. |\n| <a id=\"property-activitybefore\"></a> `activityBefore?` | `string` | Exclusive activity upper bound. |\n| <a id=\"property-anchored\"></a> `anchored?` | `boolean` | Select anchored threads. |\n| <a id=\"property-around\"></a> `around?` | `TMessage` | Fetch around this message. |\n| <a id=\"property-cursor\"></a> `cursor?` | [`MessageCursor`](../../../../../generated/storage/types.gen/type-aliases/MessageCursor.md) \\| `null` | Opaque continuation cursor from a previous page. |\n| <a id=\"property-direction\"></a> `direction?` | [`MessageDirection`](../../../../../generated/storage/types.gen/type-aliases/MessageDirection.md) | Page direction. |\n| <a id=\"property-includedeletedthreads\"></a> `includeDeletedThreads?` | `boolean` | Include deleted threads. |\n| <a id=\"property-limit\"></a> `limit?` | `number` | Page size. |\n| <a id=\"property-messages\"></a> `messages?` | `TMessage`[] | Restrict selection to these messages. |\n\n\n<!-- src/entities/messages/thread/type-aliases/MessageParent.md -->\n# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `entity`: [`Channel`](../../../channels/channel/classes/Channel.md); `type`: `\"channel\"`; \\} \\| \\{ `entity`: [`Document`](../../../documents/document/classes/Document.md); `type`: `\"document\"`; \\} \\| \\{ `entity`: [`Company`](../../../crm/company/classes/Company.md); `type`: `\"crm_company\"`; \\} \\| \\{ `entity`: [`Contact`](../../../crm/contact/classes/Contact.md); `type`: `\"crm_contact\"`; \\} \\| \\{ `entity`: [`CallRecord`](../../../calls/call-record/classes/CallRecord.md); `type`: `\"call\"`; \\}\n\nThe typed parent of a shared message thread.\n\n\n<!-- src/entities/messages/thread/type-aliases/TimelineMessage.md -->\n# Type Alias: TimelineMessage\n\n> **TimelineMessage** = [`Message`](../../../channels/message/classes/Message.md) \\| [`Comment`](../../../documents/comment/classes/Comment.md) \\| [`CrmComment`](../../../crm/comment/classes/CrmComment.md) \\| [`CallMessage`](../../../calls/message/classes/CallMessage.md)\n\nA message handle accepted by a mixed timeline selector.\n\n\n<!-- src/entities/reference/type-aliases/EntityReference.md -->\n# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity`: [`User`](../../users/user/classes/User.md); `type`: `\"user\"`; \\} \\| \\{ `entity`: [`Team`](../../teams/team/classes/Team.md); `type`: `\"team\"`; \\} \\| \\{ `entity`: [`Document`](../../documents/document/classes/Document.md); `type`: `\"document\"`; \\} \\| \\{ `entity`: [`Chat`](../../chats/chat/classes/Chat.md); `type`: `\"chat\"`; \\} \\| \\{ `entity`: [`Channel`](../../channels/channel/classes/Channel.md); `type`: `\"channel\"`; \\} \\| \\{ `entity`: [`Message`](../../channels/message/classes/Message.md); `type`: `\"channel_message\"`; \\} \\| \\{ `entity`: [`Project`](../../projects/project/classes/Project.md); `type`: `\"project\"`; \\} \\| \\{ `entity`: [`EmailThread`](../../email/thread/classes/EmailThread.md); `type`: `\"email_thread\"`; \\} \\| \\{ `entity`: [`CalendarEvent`](../../calendar/event/classes/CalendarEvent.md); `type`: `\"calendar_event\"`; \\} \\| \\{ `entity`: [`CallRecord`](../../calls/call-record/classes/CallRecord.md); `type`: `\"call\"`; \\} \\| \\{ `entity`: [`ForeignEntity`](../../foreign/foreign-entity/classes/ForeignEntity.md); `type`: `\"foreign_entity\"`; \\} \\| \\{ `entity`: [`Company`](../../crm/company/classes/Company.md); `type`: `\"crm_company\"`; \\} \\| \\{ `entity`: [`Contact`](../../crm/contact/classes/Contact.md); `type`: `\"crm_contact\"`; \\} \\| \\{ `entity`: [`CrmPipeline`](../../crm/pipeline/classes/CrmPipeline.md); `type`: `\"crm_pipeline\"`; \\} \\| \\{ `entity`: [`AgentSession`](../../agent-sessions/agent-session/classes/AgentSession.md); `type`: `\"agent_session\"`; \\} \\| \\{ `entity`: [`Routine`](../../routines/routine/classes/Routine.md); `type`: `\"scheduled_action\"`; \\} \\| \\{ `entity`: [`Initiative`](../../initiatives/initiative/classes/Initiative.md); `type`: `\"initiative\"`; \\} \\| \\{ `entity`: [`Database`](../../databases/database/classes/Database.md); `type`: `\"database\"`; \\} \\| \\{ `entity`: [`DatabaseRow`](../../databases/row/classes/DatabaseRow.md); `type`: `\"database_row\"`; \\} \\| \\{ `entity`: [`Form`](../../forms/form/classes/Form.md); `type`: `\"form\"`; \\}\n\nTyped entity references accepted by cross-resource APIs.\n\n\n<!-- src/entities/search/functions/entitySearch.md -->\n# Function: entitySearch()\n\n> **entitySearch**\\<`T`, `K`\\>(`opts`): (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`T`\\>\n\nBuild a `search(client, query, opts?)` function for one entity type: unified\nsearch hits narrowed to `type`, each mapped through `make`.\nMost relevant first, auto-paginated.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-t\"></a> `T` |\n| <a id=\"type-parameter-k\"></a> `K` *extends* `\"email\"` \\| `\"project\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"company\"` \\| `\"calendarEvent\"` \\| `\"agentSession\"` \\| `\"channelMessage\"` |\n\n## Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `filters?`: [`EntityFilters`](../../../../generated/search/types.gen/type-aliases/EntityFilters.md); `includeCrm?`: `boolean`; `make`: (`client`, `hit`) => `T`; `type`: `K`; \\} | - |\n| `opts.filters?` | [`EntityFilters`](../../../../generated/search/types.gen/type-aliases/EntityFilters.md) | - |\n| `opts.includeCrm?` | `boolean` | Opt in to CRM results (off by default server-side; required for company hits). |\n| `opts.make` | (`client`, `hit`) => `T` | - |\n| `opts.type` | `K` | - |\n\n## Returns\n\n(`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`T`\\>\n\n\n<!-- src/entities/search/interfaces/SearchOpts.md -->\n# Interface: SearchOpts\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` |\n| <a id=\"property-searchon\"></a> `searchOn?` | [`SearchOn`](../type-aliases/SearchOn.md) |\n\n\n<!-- src/entities/search/type-aliases/SearchOn.md -->\n# Type Alias: SearchOn\n\n> **SearchOn** = `\"name\"` \\| `\"content\"` \\| `\"name_content\"`\n\n\n<!-- src/entities/sharing/access/classes/AccessRequest.md -->\n# Class: AccessRequest\n\nOne access request; resolutions preserve optimistic concurrency.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | [`EntityAccess`](EntityAccess.md) | Entity access surface owning the request. | - |\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-requestedlevel\"></a> `requestedLevel` | `readonly` | () => `Promise`\\<[`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)\\> | Requested access. | - |\n| <a id=\"property-requester\"></a> `requester` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | Requesting user. | - |\n| <a id=\"property-revision\"></a> `revision` | `readonly` | () => `Promise`\\<`number`\\> | Request revision. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`RequestStatus`](../../../../../generated/storage/types.gen/type-aliases/RequestStatus.md)\\> | Current request state. | - |\n\n## Methods\n\n### resolve()\n\n> **resolve**(`grantedLevel?`): `Promise`\\<`void`\\>\n\nApprove with an access level, or decline by omitting it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `grantedLevel?` | [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.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### from()\n\n> `static` **from**(`client`, `access`, `record`): `AccessRequest`\n\nSeed a request from a state or submission response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `access` | [`EntityAccess`](EntityAccess.md) |\n| `record` | [`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md) |\n\n#### Returns\n\n`AccessRequest`\n\n\n<!-- src/entities/sharing/access/classes/EntityAccess.md -->\n# Class: EntityAccess\n\nAccess requests and direct grants scoped to a shareable entity.\n\n## Constructors\n\n### Constructor\n\n> **new EntityAccess**(`client`, `entityType`, `entity`): `EntityAccess`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `entityType` | [`ShareEntityType`](../../../../../generated/storage/types.gen/type-aliases/ShareEntityType.md) |\n| `entity` | \\{ `id`: `string`; \\} |\n| `entity.id` | `string` |\n\n#### Returns\n\n`EntityAccess`\n\n## Methods\n\n### cancel()\n\n> **cancel**(`revision`): `Promise`\\<`void`\\>\n\nCancel the caller's own request at its observed revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `revision` | `number` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### direct()\n\n> **direct**(): `Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]\\>\n\nDirect grants expressed as user handles.\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `user`: [`User`](../../../users/user/classes/User.md); \\}[]\\>\n\n***\n\n### grant()\n\n> **grant**(`user`, `accessLevel?`): `Promise`\\<`void`\\>\n\nGrant direct access, or remove it by omitting the access level.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | [`User`](../../../users/user/classes/User.md) |\n| `accessLevel?` | [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### remove()\n\n> **remove**(`user`): `Promise`\\<`void`\\>\n\nRemove one user's direct grant.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | [`User`](../../../users/user/classes/User.md) |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### resolve()\n\n> **resolve**(`request`, `resolution`): `Promise`\\<[`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md)\\>\n\nResolve a request belonging to this entity at an observed revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`AccessRequest`](AccessRequest.md) |\n| `resolution` | [`ResolveRequest`](../../../../../generated/storage/types.gen/type-aliases/ResolveRequest.md) |\n\n#### Returns\n\n`Promise`\\<[`AccessRequest`](../../../../../generated/storage/types.gen/type-aliases/AccessRequest.md)\\>\n\n***\n\n### state()\n\n> **state**(`offset?`): `Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md) \\| `undefined`; `canReview`: `boolean`; `mine`: [`AccessRequest`](AccessRequest.md) \\| `undefined`; `nextOffset`: `number` \\| `undefined`; `owner`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; `pendingCount`: `number`; `requests`: [`AccessRequest`](AccessRequest.md)[]; `supportedLevels`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)[]; \\}\\>\n\nA page of access requests, including the caller's own request and review rights.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `offset?` | `number` |\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md) \\| `undefined`; `canReview`: `boolean`; `mine`: [`AccessRequest`](AccessRequest.md) \\| `undefined`; `nextOffset`: `number` \\| `undefined`; `owner`: [`User`](../../../users/user/classes/User.md) \\| `undefined`; `pendingCount`: `number`; `requests`: [`AccessRequest`](AccessRequest.md)[]; `supportedLevels`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md)[]; \\}\\>\n\n***\n\n### submit()\n\n> **submit**(`requestedLevel`, `revision?`): `Promise`\\<[`AccessRequest`](AccessRequest.md)\\>\n\nRequest access, optionally naming the revision of an earlier request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `requestedLevel` | [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md) |\n| `revision?` | `number` |\n\n#### Returns\n\n`Promise`\\<[`AccessRequest`](AccessRequest.md)\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `entity_id`: `string`; `entity_type`: [`ShareEntityType`](../../../../../generated/storage/types.gen/type-aliases/ShareEntityType.md); \\}\n\nSerialize the entity reference without credentials.\n\n#### Returns\n\n\\{ `entity_id`: `string`; `entity_type`: [`ShareEntityType`](../../../../../generated/storage/types.gen/type-aliases/ShareEntityType.md); \\}\n\n| Name | Type |\n| ------ | ------ |\n| `entity_id` | `string` |\n| `entity_type` | [`ShareEntityType`](../../../../../generated/storage/types.gen/type-aliases/ShareEntityType.md) |\n\n\n<!-- src/entities/sharing/permissions/functions/sharePermissionBody.md -->\n# Function: sharePermissionBody()\n\n> **sharePermissionBody**(`options`): [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md)\n\nConvert sharing options into the generated backend contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | [`SharePermissionOptions`](../type-aliases/SharePermissionOptions.md) |\n\n## Returns\n\n[`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md)\n\n\n<!-- src/entities/sharing/permissions/type-aliases/SharePermissionOptions.md -->\n# Type Alias: SharePermissionOptions\n\n> **SharePermissionOptions** = `Omit`\\<[`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md), `\"channelSharePermissions\"`\\> & \\{ `channelSharePermissions?`: \\{ `accessLevel?`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `channel`: [`Channel`](../../../channels/channel/classes/Channel.md); `operation`: [`UpdateChannelSharePermission`](../../../../../generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md)\\[`\"operation\"`\\]; \\}[] \\| `null`; \\}\n\nSharing updates reference channels by handle. Null clears the corresponding grant collection.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `channelSharePermissions?` | \\{ `accessLevel?`: [`AccessLevel`](../../../../../generated/storage/types.gen/type-aliases/AccessLevel.md); `channel`: [`Channel`](../../../channels/channel/classes/Channel.md); `operation`: [`UpdateChannelSharePermission`](../../../../../generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md)\\[`\"operation\"`\\]; \\}[] \\| `null` | Channel grants to create or replace. |\n\n\n<!-- src/events/receiver/classes/MacroEvents.md -->\n# Class: MacroEvents\n\nPer-instance event receiver. Subscribe with [MacroEvents.on](#on), then\neither [MacroEvents.listen](#listen) (SSE, the default) or mount\n[MacroEvents.webhook](#webhook) at a persisted webhook URL.\n\nObtain via `macro.events` — do not construct directly.\n\n## Constructors\n\n### Constructor\n\n> **new MacroEvents**(`client`, `secret?`): `MacroEvents`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `secret?` | `string` |\n\n#### Returns\n\n`MacroEvents`\n\n## Methods\n\n### handle()\n\n> **handle**(`rawBody`, `headers`): `Promise`\\<`void`\\>\n\nFeed a raw webhook delivery in: verifies the signature, parses, and\ndispatches to matching handlers.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `rawBody` | `string` |\n| `headers` | `DeliveryHeaders` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Throws\n\nif no signing secret was configured, or if the\n signature is missing or invalid.\n\n***\n\n### listen()\n\n> **listen**(`opts?`): `Promise`\\<() => `void`\\>\n\nOpen a live Server-Sent Events stream of matching broker events. This is\nthe default way to receive events — no public URL or signing secret\nrequired. Delivery is best-effort: events published before the\nconnection, while disconnected, or dropped for a slow subscriber are\nmissed; there is no replay.\n\nFilters default to the event names currently registered with [on](#on).\nThe stream uses those filters for its lifetime; later `.on` / unsubscribe\ncalls do not change what the server sends.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | [`ListenOptions`](../interfaces/ListenOptions.md) |\n\n#### Returns\n\n`Promise`\\<() => `void`\\>\n\nA function that closes the stream.\n\n***\n\n### on()\n\n> **on**\\<`E`\\>(`event`, `handler`): () => `void`\n\nSubscribe to an event across all entities.\n\n#### Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-e\"></a> `E` *extends* `\"agent_session.opened\"` \\| `\"agent_session.turn_started\"` \\| `\"agent_session.turn_ended\"` \\| `\"agent_session.command_rejected\"` \\| `\"agent_session.settled\"` \\| `\"agent_session.waiting_for_input\"` \\| `\"agent_session.input_received\"` \\| `\"agent_session.mentioned\"` \\| `\"agent_session.stopped\"` \\| `\"agent_session.renamed\"` \\| `\"agent_session.deleted\"` \\| `\"channel.picture_changed\"` \\| `\"channel.created\"` \\| `\"channel.updated\"` \\| `\"channel.deleted\"` \\| `\"channel.participant_added\"` \\| `\"channel.participant_removed\"` \\| `\"document.created\"` \\| `\"document.updated\"` \\| `\"document.deleted\"` \\| `\"document.content_uploaded\"` \\| `\"document.sync_content_updated\"` \\| `\"document.purged\"` \\| `\"document.copied\"` \\| `\"document.interaction\"` \\| `\"message.posted\"` \\| `\"message.patched\"` \\| `\"message.deleted\"` \\| `\"message.mentioned\"` \\| `\"message.attachment_created\"` \\| `\"message.attachment_removed\"` |\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `event` | `E` |\n| `handler` | `EventHandler`\\<`E`\\> |\n\n#### Returns\n\nAn unsubscribe function.\n\n() => `void`\n\n***\n\n### onSelfMention()\n\n> **onSelfMention**(`handler`): () => `void`\n\nSubscribe to @-mentions of the authenticated caller: `message.mentioned`\ndeliveries whose mentioned entity is this bot (bot auth) or this user\n(user auth), in channels and in document comments alike.\n\n`message.mentioned` deliveries cover every mention the stream's (or\nwebhook's) workspace can access (its `ids` filter holds channel or\ndocument ids); picking out \"me\" happens here, client-side. The caller's\nidentity is resolved lazily (once) on the first delivery.\n\nFor SSE, register this handler before [listen](#listen) so the derived\nfilters include `message.mentioned`. For persisted webhooks, register the\nwebhook separately, e.g. `macro.webhooks.create({ filters: [{ events:\n['message.mentioned'] }], … })`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `handler` | `EventHandler`\\<`\"message.mentioned\"`\\> |\n\n#### Returns\n\nAn unsubscribe function.\n\n() => `void`\n\n***\n\n### webhook()\n\n> **webhook**(): (`req`) => `Promise`\\<`Response`\\>\n\nA Fetch-style handler to mount at your persisted webhook route.\n\nRequires `webhookSecret` (or `MACRO_WEBHOOK_SECRET`).\n\n#### Returns\n\n(`req`) => `Promise`\\<`Response`\\>\n\n#### Example\n\n```ts\napp.post('/webhook', macro.events.webhook()); // Hono\n```\n\n\n<!-- src/events/receiver/interfaces/ListenOptions.md -->\n# Interface: ListenOptions\n\nOptions for [MacroEvents.listen](../classes/MacroEvents.md#listen).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filters\"></a> `filters?` | [`WebhookFilter`](../../../../generated/storage/types.gen/type-aliases/WebhookFilter.md)[] | Event/entity-id filters, identical to persisted webhook `filters`. Defaults to one filter covering every event currently registered with [MacroEvents.on](../classes/MacroEvents.md#on). |\n| <a id=\"property-scope\"></a> `scope?` | [`WebhookScope`](../../../../generated/storage/types.gen/type-aliases/WebhookScope.md) | Personal or team workspace whose webhook lifecycle events are delivered. Defaults to `'user'`. |\n| <a id=\"property-signal\"></a> `signal?` | `AbortSignal` | Abort the stream. |\n\n\n<!-- src/macro/classes/Macro.md -->\n# Class: Macro\\<T\\>\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` *extends* [`MacroOpts`](../../config/interfaces/MacroOpts.md) | [`MacroOpts`](../../config/interfaces/MacroOpts.md) |\n\n## Constructors\n\n### Constructor\n\n> **new Macro**\\<`T`\\>(`opts`): `Macro`\\<`T`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `T` |\n\n#### Returns\n\n`Macro`\\<`T`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-_client\"></a> `_client` | `readonly` | `MacroClient` | Direct access to the underlying hey-api service clients. |\n| <a id=\"property-agents\"></a> `agents` | `readonly` | [`AgentNamespace`](../../entities/agents/namespace/classes/AgentNamespace.md) | agents resources and operations. |\n| <a id=\"property-agentsessions\"></a> `agentSessions` | `readonly` | [`AgentSessionNamespace`](../../entities/agent-sessions/namespace/classes/AgentSessionNamespace.md) | - |\n| <a id=\"property-ai\"></a> `ai` | `readonly` | [`AiNamespace`](../../entities/ai/namespace/classes/AiNamespace.md) | - |\n| <a id=\"property-apikeys\"></a> `apiKeys` | `readonly` | [`ApiKeyNamespace`](../../entities/api-keys/namespace/classes/ApiKeyNamespace.md) | apiKeys resources and operations. |\n| <a id=\"property-bots\"></a> `bots` | `readonly` | [`BotsNamespace`](../../entities/bots/namespace/classes/BotsNamespace.md) | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | [`CalendarNamespace`](../../entities/calendar/namespace/classes/CalendarNamespace.md) | - |\n| <a id=\"property-calls\"></a> `calls` | `readonly` | [`CallRecordNamespace`](../../entities/calls/namespace/classes/CallRecordNamespace.md) | - |\n| <a id=\"property-channels\"></a> `channels` | `readonly` | [`ChannelNamespace`](../../entities/channels/namespace/classes/ChannelNamespace.md) | - |\n| <a id=\"property-crm\"></a> `crm` | `readonly` | [`CrmNamespace`](../../entities/crm/namespace/classes/CrmNamespace.md) | - |\n| <a id=\"property-databases\"></a> `databases` | `readonly` | [`DatabaseNamespace`](../../entities/databases/namespace/classes/DatabaseNamespace.md) | - |\n| <a id=\"property-documents\"></a> `documents` | `readonly` | [`DocumentNamespace`](../../entities/documents/namespace/classes/DocumentNamespace.md) | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | [`EmailNamespace`](../../entities/email/namespace/classes/EmailNamespace.md) | - |\n| <a id=\"property-entitymentions\"></a> `entityMentions` | `readonly` | [`EntityMentionNamespace`](../../entities/entity-mentions/namespace/classes/EntityMentionNamespace.md) | entityMentions resources and operations. |\n| <a id=\"property-events\"></a> `events` | `readonly` | [`MacroEvents`](../../events/receiver/classes/MacroEvents.md) | - |\n| <a id=\"property-favorites\"></a> `favorites` | `readonly` | [`FavoritesNamespace`](../../entities/favorites/namespace/classes/FavoritesNamespace.md) | - |\n| <a id=\"property-foreignentities\"></a> `foreignEntities` | `readonly` | [`ForeignEntityNamespace`](../../entities/foreign/namespace/classes/ForeignEntityNamespace.md) | - |\n| <a id=\"property-forms\"></a> `forms` | `readonly` | [`FormNamespace`](../../entities/forms/namespace/classes/FormNamespace.md) | Build forms and submit answers without granting respondents database access. |\n| <a id=\"property-githubpullrequests\"></a> `githubPullRequests` | `readonly` | [`GithubPullRequestNamespace`](../../entities/github-pull-requests/namespace/classes/GithubPullRequestNamespace.md) | githubPullRequests resources and operations. |\n| <a id=\"property-harnesses\"></a> `harnesses` | `readonly` | [`HarnessNamespace`](../../entities/harnesses/namespace/classes/HarnessNamespace.md) | harnesses resources and operations. |\n| <a id=\"property-initiatives\"></a> `initiatives` | `readonly` | [`InitiativeNamespace`](../../entities/initiatives/namespace/classes/InitiativeNamespace.md) | initiatives resources and operations. |\n| <a id=\"property-meetings\"></a> `meetings` | `readonly` | [`MeetingNamespace`](../../entities/meetings/namespace/classes/MeetingNamespace.md) | meetings resources and operations. |\n| <a id=\"property-notifications\"></a> `notifications` | `readonly` | [`NotificationNamespace`](../../entities/notifications/namespace/classes/NotificationNamespace.md) | - |\n| <a id=\"property-pins\"></a> `pins` | `readonly` | [`PinsNamespace`](../../entities/pins/namespace/classes/PinsNamespace.md) | - |\n| <a id=\"property-projects\"></a> `projects` | `readonly` | [`ProjectNamespace`](../../entities/projects/namespace/classes/ProjectNamespace.md) | - |\n| <a id=\"property-properties\"></a> `properties` | `readonly` | [`PropertiesNamespace`](../../entities/properties/namespace/classes/PropertiesNamespace.md) | - |\n| <a id=\"property-routines\"></a> `routines` | `readonly` | [`RoutineNamespace`](../../entities/routines/namespace/classes/RoutineNamespace.md) | routines resources and operations. |\n| <a id=\"property-tasks\"></a> `tasks` | `readonly` | [`TaskNamespace`](../../entities/tasks/namespace/classes/TaskNamespace.md) | - |\n| <a id=\"property-teams\"></a> `teams` | `readonly` | [`TeamNamespace`](../../entities/teams/namespace/classes/TeamNamespace.md) | - |\n| <a id=\"property-unfurls\"></a> `unfurls` | `readonly` | [`UnfurlNamespace`](../../entities/unfurls/namespace/classes/UnfurlNamespace.md) | unfurls resources and operations. |\n| <a id=\"property-users\"></a> `users` | `readonly` | [`UserNamespace`](../../entities/users/namespace/classes/UserNamespace.md) | - |\n| <a id=\"property-webappurl\"></a> `webAppUrl` | `readonly` | `string` | Base URL of the Macro web app, used to build entity URLs. |\n| <a id=\"property-webhooks\"></a> `webhooks` | `readonly` | [`WebhooksNamespace`](../../entities/webhooks/namespace/classes/WebhooksNamespace.md) | - |\n| <a id=\"property-whatsapp\"></a> `whatsapp` | `readonly` | [`WhatsAppNamespace`](../../entities/whatsapp/namespace/classes/WhatsAppNamespace.md) | Personal WhatsApp groups and shared group operations. |\n\n## Methods\n\n### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated caller's mentionable principal — `bot|<uuid>` for bot\nauth, `macro|<email>` for user auth — fetched once and cached.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### requestedAs()\n\n> **requestedAs**(`user`): `Macro`\\<`T`\\>\n\nClone of this SDK acting on behalf of `user` (sent as\n`x-macro-bot-for-macro-user-id`). Bot auth only — throws for user auth,\nsince a user token always acts as its own user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | [`User`](../../entities/users/user/classes/User.md) |\n\n#### Returns\n\n`Macro`\\<`T`\\>\n\n\n<!-- src/macro/type-aliases/RequestActivity.md -->\n# Type Alias: RequestActivity\n\n> **RequestActivity** = \\{ `id`: `number`; `operation`: `string`; `service`: `string`; `status`: `\"started\"` \\| `\"completed\"` \\| `\"failed\"`; \\}\n\nA generated SDK operation lifecycle. Contains no arguments, URLs or response data.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `number` |\n| <a id=\"property-operation\"></a> `operation` | `string` |\n| <a id=\"property-service\"></a> `service` | `string` |\n| <a id=\"property-status\"></a> `status` | `\"started\"` \\| `\"completed\"` \\| `\"failed\"` |\n\n\n<!-- src/mentions/functions/msg.md -->\n# Function: msg()\n\n> **msg**(`strings`, ...`values`): [`RichMessage`](../interfaces/RichMessage.md)\n\nCompose a rich message. Interpolate mentions (a User, Document,\n[here](../variables/here.md), …) or plain strings. Each mention writes its `<m-*>` tag into the\ncontent *and* adds itself to `mentions[]`, so the two can never drift; strings\nare inserted as-is, so markdown like `**bold**` passes through untouched.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `strings` | `TemplateStringsArray` |\n| ...`values` | [`Interpolation`](../type-aliases/Interpolation.md)[] |\n\n## Returns\n\n[`RichMessage`](../interfaces/RichMessage.md)\n\n## Example\n\n```ts\nchannel.send(msg`Hey ${user}, see ${doc}. cc ${here}`);\nchannel.send(msg`Status: ${status} — see ${doc}`);\n```\n\n\n<!-- src/mentions/functions/toBody.md -->\n# Function: toBody()\n\n> **toBody**(`body`): [`RichMessage`](../interfaces/RichMessage.md)\n\nNormalize a plain string or a [RichMessage](../interfaces/RichMessage.md) to the wire shape.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| [`RichMessage`](../interfaces/RichMessage.md) |\n\n## Returns\n\n[`RichMessage`](../interfaces/RichMessage.md)\n\n\n<!-- src/mentions/functions/wrapXml.md -->\n# Function: wrapXml()\n\n> **wrapXml**(`tag`, `data`): `string`\n\nSerialize a mention node to its `<tag>{json}</tag>` wire form. Readers take\neverything up to the first closing tag, so `<`, `>` and `&` in the JSON are\nwritten as `\\u` escapes: a document named `</m-document-mention>` would\notherwise end the tag early. Decoding the JSON restores the original text.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `tag` | `string` |\n| `data` | `unknown` |\n\n## Returns\n\n`string`\n\n\n<!-- src/mentions/interfaces/MentionPart.md -->\n# Interface: MentionPart\n\nThe two things a mentionable entity contributes to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mention\"></a> `mention` | [`SimpleMention`](../../../generated/storage/types.gen/type-aliases/SimpleMention.md) | The parallel entry the backend uses for notifications and permissions. |\n| <a id=\"property-tag\"></a> `tag` | `string` | The `<m-*>` tag written into the message content. |\n\n\n<!-- src/mentions/interfaces/Mentionable.md -->\n# Interface: Mentionable\n\nAnything that can be dropped into a [msg](../functions/msg.md) template as a mention.\n\n## Methods\n\n### toMention()\n\n> **toMention**(): [`MentionPart`](MentionPart.md)\n\n#### Returns\n\n[`MentionPart`](MentionPart.md)\n\n\n<!-- src/mentions/interfaces/RichMessage.md -->\n# Interface: RichMessage\n\nA composed message body: content with embedded tags, and the matching mentions.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content\"></a> `content` | `string` |\n| <a id=\"property-mentions\"></a> `mentions` | [`SimpleMention`](../../../generated/storage/types.gen/type-aliases/SimpleMention.md)[] |\n\n\n<!-- src/mentions/type-aliases/Interpolation.md -->\n# Type Alias: Interpolation\n\n> **Interpolation** = [`Mentionable`](../interfaces/Mentionable.md) \\| `string` \\| `number`\n\nWhat may be interpolated into a [msg](../functions/msg.md) template: a mention, or plain text.\n\n\n<!-- src/mentions/variables/here.md -->\n# Variable: here\n\n> `const` **here**: [`Mentionable`](../interfaces/Mentionable.md)\n\nThe `@here` group mention.\n\n\n<!-- src/utils/lazy/classes/Lazy.md -->\n# Class: Lazy\\<T\\>\n\nA value fetched on first access and cached thereafter. Powers thin entity\nhandles: construction is free, the record is loaded lazily the first time a\nfield is read, and concurrent reads share one in-flight request. Pass a\n`seed` when the record is already known (from a list or an event) to skip the\nfetch entirely.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-t\"></a> `T` |\n\n## Constructors\n\n### Constructor\n\n> **new Lazy**\\<`T`\\>(`loader`, `seed?`): `Lazy`\\<`T`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `loader` | () => `Promise`\\<`T`\\> |\n| `seed?` | `T` |\n\n#### Returns\n\n`Lazy`\\<`T`\\>\n\n## Methods\n\n### clear()\n\n> **clear**(): `void`\n\nDrop the cached value so the next read refetches.\n\n#### Returns\n\n`void`\n\n***\n\n### get()\n\n> **get**(): `Promise`\\<`T`\\>\n\n#### Returns\n\n`Promise`\\<`T`\\>\n\n***\n\n### peek()\n\n> **peek**(): `T` \\| `undefined`\n\nThe cached value, if already loaded — never triggers a fetch.\n\n#### Returns\n\n`T` \\| `undefined`\n\n\n<!-- src/utils/pagination/functions/paginate.md -->\n# Function: paginate()\n\n> **paginate**\\<`T`, `Cursor`\\>(`fetchPage`): `AsyncGenerator`\\<`T`\\>\n\nAsync generator over a cursor-paginated API. Iterate with `for await`.\nCursors are plain JSON values (strings or small objects), so a page whose\nnext cursor serialises identically to the one it was fetched with means the\nserver is not advancing; the generator throws instead of looping forever.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` | - |\n| <a id=\"type-parameter-cursor\"></a> `Cursor` | `string` |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `fetchPage` | (`cursor?`) => `Promise`\\<[`Page`](../interfaces/Page.md)\\<`T`, `Cursor`\\>\\> |\n\n## Returns\n\n`AsyncGenerator`\\<`T`\\>\n\n\n<!-- src/utils/pagination/interfaces/Page.md -->\n# Interface: Page\\<T, Cursor\\>\n\nOne page of a cursor-paginated list.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` | - |\n| <a id=\"type-parameter-cursor\"></a> `Cursor` | `string` |\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-items\"></a> `items` | `T`[] |\n| <a id=\"property-nextcursor\"></a> `nextCursor?` | `Cursor` \\| `null` |\n\n\n<!-- src/utils/unwrap/classes/MacroApiError.md -->\n# Class: MacroApiError\n\nA non-2xx HTTP response (Macro API, or a raw fetch like presigned downloads).\n\n## Extends\n\n- [`MacroError`](MacroError.md)\n\n## Extended by\n\n- [`MacroOpRefusedError`](../../../entities/databases/database/classes/MacroOpRefusedError.md)\n\n## Constructors\n\n### Constructor\n\n> **new MacroApiError**(`status`, `data`): `MacroApiError`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `status` | `number` |\n| `data` | `unknown` |\n\n#### Returns\n\n`MacroApiError`\n\n#### Overrides\n\n[`MacroError`](MacroError.md).[`constructor`](MacroError.md#constructor)\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-data\"></a> `data` | `readonly` | `unknown` |\n| <a id=\"property-status\"></a> `status` | `readonly` | `number` |\n\n\n<!-- src/utils/unwrap/classes/MacroError.md -->\n# Class: MacroError\n\nBase for every error the SDK throws.\n\n## Extends\n\n- `Error`\n\n## Extended by\n\n- [`MacroApiError`](MacroApiError.md)\n- [`MacroNotFoundError`](MacroNotFoundError.md)\n\n## Constructors\n\n### Constructor\n\n> **new MacroError**(`message`): `MacroError`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | `string` |\n\n#### Returns\n\n`MacroError`\n\n#### Overrides\n\n`Error.constructor`\n\n\n<!-- src/utils/unwrap/classes/MacroNotFoundError.md -->\n# Class: MacroNotFoundError\n\nThe API succeeded but the addressed entity doesn't exist in the result.\n\n## Extends\n\n- [`MacroError`](MacroError.md)\n\n## Constructors\n\n### Constructor\n\n> **new MacroNotFoundError**(`message`): `MacroNotFoundError`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | `string` |\n\n#### Returns\n\n`MacroNotFoundError`\n\n#### Overrides\n\n[`MacroError`](MacroError.md).[`constructor`](MacroError.md#constructor)\n\n\n<!-- src/utils/unwrap/functions/unwrap.md -->\n# Function: unwrap()\n\n> **unwrap**\\<`TData`, `TError`\\>(`res`): `TData`\n\nTurn a hey-api `{ data, error, response? }` result into either the success\npayload or a thrown MacroApiError.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-tdata\"></a> `TData` |\n| <a id=\"type-parameter-terror\"></a> `TError` |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `res` | \\{ `data?`: `TData`; `error?`: `TError`; `response?`: `Response`; \\} |\n| `res.data?` | `TData` |\n| `res.error?` | `TError` |\n| `res.response?` | `Response` |\n\n## Returns\n\n`TData`\n"+{+ "entities": [+ {+ "name": "agentSessions",+ "description": "Create and inspect agent sessions, read any viewable session's history as folded messages (`session.foldedLog()`), saved code executions, and editable email or calendar review stacks.",+ "index": "## agentSessions\nCreate and inspect agent sessions, read any viewable session's history as folded messages (`session.foldedLog()`), saved code executions, and editable email or calendar review stacks.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### AgentSession\nA managed or externally hosted coding-agent session.\nExtends `MacroEntity`.\nFields: access, codeExecutions, createdAt, harness, id, instructions, isArchived, model, modifiedAt, name, repoUrl, reviews, sandboxSize, status\n- `AgentSession.archive`: archive(): Promise<void> — Archive this session, making it read-only until unarchived.\n- `AgentSession.changes`: changes(): Promise<AgentSessionChangesResponse> — Read the latest captured GitHub pull request changes and capture status.\n- `AgentSession.changesPatch`: changesPatch(): Promise<string> — Read the unified diff of the latest captured changeset.\n- `AgentSession.control`: control(action): Promise<ControlResponse> — Send a prompt or lifecycle operation to the live agent session.\n- `AgentSession.delete`: delete(): Promise<void> — Delete this session and any live resources it owns.\n- `AgentSession.foldedLog`: foldedLog(): Promise<FoldedAgentSessionLog> — Read this session's whole history as the conversation the app renders: each user prompt and agent reply, oldest first, with tool calls and their results, pla...\n- `AgentSession.linkPullRequest`: linkPullRequest(url): Promise<void> — Link the GitHub pull request at url to this session.\n- `AgentSession.log`: log(): Promise<AgentSessionLogResponse> — Read the complete raw protocol log for this session.\n- `AgentSession.prompt`: prompt(text, attachments?): Promise<ControlResponse> — Send a prompt to the session — sugar over [control](#control).\n- `AgentSession.pullRequests`: pullRequests(): Promise<SessionPullRequest[]> — The GitHub pull requests linked to this session: the one its agent opened and any a person linked, oldest first.\n- `AgentSession.queue`: queue(): Promise<QueuedAction[]> — The actions waiting to dispatch in this session, oldest first.\n- `AgentSession.refreshChanges`: refreshChanges(): Promise<AgentSessionChangesResponse> — Request a fresh capture and return the current state while it runs.\n- `AgentSession.rename`: rename(name): Promise<void> — Rename this session.\n- `AgentSession.setSandboxSize`: setSandboxSize(size): Promise<SandboxSize> — Resize this session's sandbox and remember the size as the owner's default.\n- `AgentSession.sharePermissions`: sharePermissions(): Promise<agent-harness.SharePermissionV2> — Sharing configuration.\n- `AgentSession.toolApprovalById`: toolApprovalById(id): ToolApproval — Construct an approval handle scoped to this session.\n- `AgentSession.unarchive`: unarchive(): Promise<void> — Restore an archived session so it can be edited and prompted again.\n- `AgentSession.unlinkPullRequest`: unlinkPullRequest(url): Promise<void> — Unlink a GitHub pull request a person linked to this session.\n- `AgentSession.updateSharePermissions`: updateSharePermissions(options): Promise<agent-harness.SharePermissionV2> — Replace sharing grants.\n- `AgentSession.byId`: static byId(client, id): AgentSession — A handle to an agent session by id.\n- `AgentSession.codingPreferences`: static codingPreferences(client): Promise<CodingPreferencesBody> — What the caller's new coding sessions are told to do beyond their assignment.\n- `AgentSession.createManaged`: static createManaged(client, opts?): Promise<AgentSession> — Create a managed session, optionally delivering its first prompt.\n- `AgentSession.defaultSandboxSize`: static defaultSandboxSize(client): Promise<SandboxSize> — The caller's default sandbox size for new @coder sessions.\n- `AgentSession.forPullRequest`: static forPullRequest(client, url): Promise<AgentSession[]> — The sessions linked to the GitHub pull request at url that the caller can view, oldest link first.\n- `AgentSession.repositories`: static repositories(client): Promise<SelectableRepository[]> — The GitHub repositories the caller can hand a managed session: every repository under an installation of Macro's GitHub App they or their teams made, sorted ...\n- `AgentSession.repositoryBranches`: static repositoryBranches(client, repoUrl): Promise<string[]> — Branch names on one repository the caller can start a managed session from, in the order GitHub listed them.\n- `AgentSession.setCodingPreferences`: static setCodingPreferences(client, preferences): Promise<CodingPreferencesBody> — Replace the caller's coding preferences.\n- `AgentSession.setDefaultSandboxSize`: static setDefaultSandboxSize(client, size): Promise<SandboxSize> — Set the caller's default sandbox size for the next @coder mention.\n\n### CodeExecution\nA saved code execution belonging to one agent session.\nExtends `MacroEntity`.\nFields: calls, error, id, reviews, source, status\n- `CodeExecution.refresh`: refresh(): Promise<CodeExecution> — Reload the saved state, for example after a running execution completes.\n- `CodeExecution.result`: result(): Promise<unknown> — The program's returned JSON; preserves an explicit null result.\n- `CodeExecution.session`: session(): AgentSession — The session this execution belongs to.\n- `CodeExecution.byId`: static byId(client, session, id): CodeExecution — Construct a lazy execution handle within its owning session.\n\n### AgentConversation\nAn agent's conversation in one channel.\nFields: channel\n- `AgentConversation.agent`: agent(): Agent — The agent taking part.\n- `AgentConversation.sessions`: sessions(): { createdAt: string; isCurrent: boolean; session: AgentSession; }[] — Conversation sessions with their current flag.\n- `AgentConversation.startFresh`: startFresh(session): Promise<void> — Start a fresh conversation from one of its sessions.\n- `AgentConversation.toJSON`: toJSON(): { agentId: string; channelId: string; } — Serialize scoped identity.\n- `AgentConversation.turns`: turns(): ConversationTurn[] — Recorded conversation turns.\n\n### ConversationTurn\nOne agent conversation turn, identified by its source message.\nFields: conversation\n- `ConversationTurn.retry`: retry(actionId): Promise<void> — Retry with a caller persisted action nonce.\n- `ConversationTurn.session`: session(): AgentSession — Session that handled this turn.\n- `ConversationTurn.source`: source(): Message — Originating message.\n- `ConversationTurn.toJSON`: toJSON(): { channelId: string; sourceMessageId: string; } — Serialize scoped identity.\n\n### AgentSessionNamespace (`macro.agentSessions`)\nEntry point for coding-agent sessions.\n- `AgentSessionNamespace.byId`: byId(id): AgentSession — A handle to an agent session by id.\n- `AgentSessionNamespace.codingPreferences`: codingPreferences(): Promise<CodingPreferencesBody> — What the caller's new coding sessions are told to do beyond their assignment.\n- `AgentSessionNamespace.createManaged`: createManaged(opts?): Promise<AgentSession> — Create a managed agent session.\n- `AgentSessionNamespace.defaultSandboxSize`: defaultSandboxSize(): Promise<SandboxSize> — The caller's default sandbox size for new @coder sessions.\n- `AgentSessionNamespace.forPullRequest`: forPullRequest(url): Promise<AgentSession[]> — The sessions linked to the GitHub pull request at url that the caller can view.\n- `AgentSessionNamespace.repositories`: repositories(): Promise<SelectableRepository[]> — The GitHub repositories the caller can hand a managed session, with the branch each one's sessions start on by default.\n- `AgentSessionNamespace.repositoryBranches`: repositoryBranches(repoUrl): Promise<string[]> — Branch names on one repository the caller can start a managed session from.\n- `AgentSessionNamespace.setCodingPreferences`: setCodingPreferences(preferences): Promise<CodingPreferencesBody> — Replace the caller's coding preferences.\n- `AgentSessionNamespace.setDefaultSandboxSize`: setDefaultSandboxSize(size): Promise<SandboxSize> — Set the caller's default sandbox size for the next @coder mention.\n\n### QueuedAction\nOne action waiting in an agent session's server-side queue: a prompt or a compact accepted while a turn was running, dispatching when that turn ends.\n- `QueuedAction.edit`: edit(prompt): Promise<QueuedAction> — Replace this queued prompt's text before it dispatches.\n- `QueuedAction.remove`: remove(): Promise<void> — Remove this action from the queue before it dispatches.\n- `QueuedAction.steer`: steer(): Promise<void> — Move this action to the front and interrupt the current turn to run it next.\n- `QueuedAction.from`: static from(client, sessionId, dto): QueuedAction — Wrap a queue entry already in hand (e.g.\n\n### ReviewItem\nAn item handle scopes edits and decisions to its persisted review.\n- `ReviewItem.dismiss`: dismiss(): Promise<void> — Promise<void>\n- `ReviewItem.edit`: edit(draft): Promise<void> — Promise<void>\n- `ReviewItem.submit`: submit(): Promise<void> — Promise<void>\n\n### SessionReview\nA persistent review remains actionable after the code execution ends.\nExtends `MacroEntity`.\nFields: id, kind, title\n- `SessionReview.dismissAll`: dismissAll(): Promise<void> — Promise<void>\n- `SessionReview.items`: items(): Promise<ReviewItem[]> — Promise<ReviewItem[]>\n- `SessionReview.reference`: reference(): Promise<{ id: string; kind: ReviewKind; }> — Compact reference for main()'s returned reviews array.\n- `SessionReview.refresh`: refresh(): Promise<SessionReview> — Promise<SessionReview>\n- `SessionReview.session`: session(): AgentSession — AgentSession\n- `SessionReview.submitAll`: submitAll(): Promise<void> — Submit the saved pending drafts.\n- `SessionReview.byId`: static byId(client, session, id): SessionReview — SessionReview\n- `SessionReview.create`: static create(client, execution, input): Promise<SessionReview> — Promise<SessionReview>\n- `SessionReview.createForSession`: static createForSession(client, session, input, execution?): Promise<SessionReview> — Present a review in a session without requiring a code execution.\n- `SessionReview.fromRecord`: static fromRecord(client, session, record): SessionReview — SessionReview\n- `SessionReview.list`: static list(client, execution): Promise<SessionReview[]> — Promise<SessionReview[]>\n\n### ToolApproval\nA permission request scoped to its originating agent session.\nFields: id, session\n- `ToolApproval.answer`: answer(answer): Promise<AnswerToolApprovalResponse> — Answer the approval using the generated discriminated answer contract.\n- `ToolApproval.toJSON`: toJSON(): { id: string; sessionId: string; } — Serialize scoped identity only.\n- `ToolApproval.byId`: static byId(client, session, id): ToolApproval — Construct a scoped approval handle.\n\nTypes: `CreateManagedSessionOptions`, `FoldedAgentSessionLog`, `SelectableRepository`, `SessionPullRequest`, `CodeResult`, `JsonValue`, `CreateReviewOptions`, `ReviewCalendarDraft`, `ReviewEmailDraft`\n"+ },+ {+ "name": "agents",+ "description": "Configure agents, pair hosts and inspect their sessions.",+ "index": "## agents\nConfigure agents, pair hosts and inspect their sessions.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### Agent\nA configurable agent backed by a bot identity.\nExtends `MacroEntity`.\nFields: channels, defaultModel, host, id, instructions, name\n- `Agent.update`: update(options): Promise<void> — Replace agent settings.\n- `Agent.byId`: static byId(client, id): Agent — Construct a lazy agent handle.\n- `Agent.from`: static from(client, record): Agent — Seed from a listed or created agent.\n\n### AgentNamespace (`macro.agents`)\nConfigurable agents.\n- `AgentNamespace.byId`: byId(id): Agent — Construct a lazy agent handle.\n- `AgentNamespace.create`: create(options): Promise<Agent> — Create an agent.\n- `AgentNamespace.list`: list(): Promise<Agent[]> — All accessible agents.\n\n### Harness\nA registered host for coding agents.\nExtends `MacroEntity`.\nFields: connected, id, kind, name\n- `Harness.delete`: delete(): Promise<void> — Remove the host.\n- `Harness.byId`: static byId(client, id): Harness — Construct a lazy host handle.\n- `Harness.from`: static from(client, record): Harness — Seed from a listed host.\n\n### HarnessNamespace (`macro.harnesses`)\nHosts and device pairing.\n- `HarnessNamespace.agents`: agents(): Promise<Agent[]> — Agent handles for the currently authenticated host.\n- `HarnessNamespace.byId`: byId(id): Harness — Construct a lazy host handle.\n- `HarnessNamespace.createPairing`: createPairing(options): Promise<{ device: DevicePairing; deviceSecret: string; expiresAt: string; pairing: HarnessPairing; pollIntervalSeconds: number; }> — Start pairing a device; persist the secret separately from the handles.\n- `HarnessNamespace.deleteSelf`: deleteSelf(): Promise<void> — Revoke the currently authenticated host.\n- `HarnessNamespace.list`: list(): Promise<Harness[]> — All hosts visible to the caller.\n- `HarnessNamespace.me`: me(): Promise<Harness> — The currently authenticated host.\n- `HarnessNamespace.pairing`: pairing(code): HarnessPairing — Construct a lazy pairing from its displayed code.\n- `HarnessNamespace.sessions`: sessions(): Promise<AgentSession[]> — Session handles for the currently authenticated host.\n\n### DevicePairing\nDevice side pairing identity.\nFields: id\n- `DevicePairing.claim`: claim(deviceSecret): Promise<{ harness: Harness; token: string; } | undefined> — Attempt to claim an approved pairing.\n- `DevicePairing.toJSON`: toJSON(): { id: string; } — Serialize identity only.\n- `DevicePairing.byId`: static byId(client, id): DevicePairing — Construct the device side handle.\n\n### HarnessPairing\nA short lived host pairing, addressed by its displayed code.\nExtends `MacroEntity`.\nFields: expiresAt, id, name\n- `HarnessPairing.approve`: approve(options?): Promise<Harness> — Approve this pairing.\n- `HarnessPairing.byId`: static byId(client, code): HarnessPairing — Construct a lazy pairing from a pairing code.\n\nFunctions: `agentBody`\n\nTypes: `AgentOptions`\n"+ },+ {+ "name": "apiKeys",+ "description": "Create, list and revoke user API keys.",+ "index": "## apiKeys\nCreate, list and revoke user API keys.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### UserApiKey\nA user API key's metadata.\nExtends `MacroEntity`.\nFields: createdAt, id, name\n- `UserApiKey.delete`: delete(): Promise<void> — Revoke this key.\n- `UserApiKey.byId`: static byId(client, id): UserApiKey — Construct a lazy key handle.\n- `UserApiKey.from`: static from(client, record): UserApiKey — Seed from metadata, deliberately excluding the secret.\n\n### ApiKeyNamespace (`macro.apiKeys`)\nUser API key management.\n- `ApiKeyNamespace.byId`: byId(id): UserApiKey — Construct a lazy key handle.\n- `ApiKeyNamespace.create`: create(name): Promise<{ key: UserApiKey; secret: string; }> — Create a key.\n- `ApiKeyNamespace.list`: list(): Promise<UserApiKey[]> — List metadata for the caller's API keys.\n- `ApiKeyNamespace.tokenForEmail`: tokenForEmail(email): Promise<MacroApiTokenResponse> — Exchange an email address for a Macro API token, subject to server authorization.\n"+ },+ {+ "name": "entityMentions",+ "description": "Create and delete typed resource mention relationships.",+ "index": "## entityMentions\nCreate and delete typed resource mention relationships.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### EntityMention\nA stored mention connecting two resources.\nFields: id\n- `EntityMention.delete`: delete(): Promise<void> — Remove this mention.\n- `EntityMention.toJSON`: toJSON(): { id: string; } — Serialize identity only.\n- `EntityMention.byId`: static byId(client, id): EntityMention — Construct a mention handle for removal.\n\n### EntityMentionNamespace (`macro.entityMentions`)\nStored entity mention relationships.\n- `EntityMentionNamespace.byId`: byId(id): EntityMention — Construct a stored mention handle.\n- `EntityMentionNamespace.create`: create(source, target): Promise<EntityMention> — Create a mention from a source resource to a target resource.\n"+ },+ {+ "name": "githubPullRequests",+ "description": "Read stored GitHub pull request snapshots and captured diffs.",+ "index": "## githubPullRequests\nRead stored GitHub pull request snapshots and captured diffs.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### GithubPullRequestNamespace (`macro.githubPullRequests`)\nGitHub pull request snapshots and captured diffs.\n- `GithubPullRequestNamespace.byId`: byId(id): GithubPullRequest — Construct from a Macro foreign entity's identity.\n- `GithubPullRequestNamespace.forEntity`: forEntity(entity): GithubPullRequest — Resolve a foreign entity as a pull request.\n\n### GithubPullRequest\nA stored GitHub pull request addressed by its Macro foreign entity.\nExtends `MacroEntity`.\nFields: id, status, title, url\n- `GithubPullRequest.changes`: changes(): Promise<{ changeset?: PullRequestChangeset; error?: string; }> — Captured change metadata, when available.\n- `GithubPullRequest.byId`: static byId(client, id): GithubPullRequest — Construct a lazy pull request handle.\n\n### PullRequestChangeset\nOne captured diff belonging to a pull request.\nFields: pullRequest, record\n- `PullRequestChangeset.patch`: patch(): Promise<string> — Read the captured unified patch.\n- `PullRequestChangeset.toJSON`: toJSON(): { additions: number; base: storage.GitRefDto; capturedAt: string; deletions: number; files: storage.ChangedFileDto[]; head: storage.GitRefDto; id: string; patchBytes: number; pullRequestId: string; repository?: string | null; source: \"github_pull_request\"; truncated: boolean; } — Serialize captured metadata and parent identity.\n"+ },+ {+ "name": "initiatives",+ "description": "Group tasks and members into initiatives.",+ "index": "## initiatives\nGroup tasks and members into initiatives.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### Initiative\nA group of tasks and members working toward an outcome.\nExtends `MacroEntity`.\nFields: access, accessLevel, id, members, name, owner, sharePermissions, tasks\n- `Initiative.delete`: delete(): Promise<void> — Delete this initiative.\n- `Initiative.update`: update(options): Promise<void> — Update the name, membership or sharing configuration.\n- `Initiative.byId`: static byId(client, id): Initiative — Construct a lazy initiative handle.\n- `Initiative.from`: static from(client, record): Initiative — Seed from an initiative detail response.\n\n### InitiativeNamespace (`macro.initiatives`)\nInitiatives in the caller's workspace.\n- `InitiativeNamespace.byId`: byId(id): Initiative — Construct a lazy initiative handle.\n- `InitiativeNamespace.create`: create(options): Promise<Initiative> — Create an initiative.\n- `InitiativeNamespace.list`: list(): Promise<Initiative[]> — List accessible initiatives.\n\nTypes: `InitiativeOptions`\n"+ },+ {+ "name": "meetings",+ "description": "Create and manage meeting schedules, invitations and sharing links.",+ "index": "## meetings\nCreate and manage meeting schedules, invitations and sharing links.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### Meeting\nA meeting's schedule and invitation link.\nExtends `MacroEntity`.\nFields: call, channel, id, scheduledEnd, scheduledStart, title\n- `Meeting.cancel`: cancel(): Promise<void> — Cancel this meeting.\n- `Meeting.invite`: invite(email): Promise<void> — Invite an email address.\n- `Meeting.invitePermissions`: invitePermissions(): Promise<MeetingInvitePermissions> — Whether the caller can send invitations.\n- `Meeting.inviteUsers`: inviteUsers(users): Promise<void> — Invite Macro users.\n- `Meeting.update`: update(options): Promise<void> — Update schedule or title.\n- `Meeting.webUrl`: webUrl(): Promise<string> — Shareable meeting link.\n- `Meeting.byId`: static byId(client, id): Meeting — Construct a lazy meeting handle.\n- `Meeting.from`: static from(client, record): Meeting — Seed a meeting from a server response.\n\n### MeetingNamespace (`macro.meetings`)\nMeeting schedules and invitation lookup.\n- `MeetingNamespace.active`: active(): Promise<Meeting[]> — List active meetings.\n- `MeetingNamespace.byId`: byId(id): Meeting — Construct a handle to one of the caller's newest 100 standalone meetings.\n- `MeetingNamespace.create`: create(options): Promise<Meeting> — Create a meeting.\n- `MeetingNamespace.list`: list(): Promise<Meeting[]> — List the caller's newest 100 standalone meetings.\n- `MeetingNamespace.lookup`: lookup(token): Promise<Meeting> — Resolve a meeting's invitation token.\n"+ },+ {+ "name": "routines",+ "description": "Create scheduled and event-triggered agent routines and inspect executions.",+ "index": "## routines\nCreate scheduled and event-triggered agent routines and inspect executions.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### RoutineNamespace (`macro.routines`)\nScheduled and event-triggered routines.\n- `RoutineNamespace.byId`: byId(id): Routine — Construct a lazy routine handle.\n- `RoutineNamespace.create`: create(options): Promise<Routine> — Create an agent routine.\n- `RoutineNamespace.list`: list(options?): Promise<Routine[]> — List routines, optionally including event triggers.\n\n### Routine\nA scheduled or event-triggered agent task.\nExtends `MacroEntity`.\nFields: enabled, id, name, nextRunAt, owner, revision, runVisibility, trigger\n- `Routine.delete`: delete(): Promise<void> — Delete the routine.\n- `Routine.execute`: execute(): Promise<AgentSession | Chat | undefined> — Start an execution immediately and return its transcript handle if available.\n- `Routine.history`: history(): Promise<RoutineExecution[]> — Completed executions, with their routine scoped identity.\n- `Routine.setEnabled`: setEnabled(enabled): Promise<void> — Enable or disable triggering.\n- `Routine.update`: update(options): Promise<void> — Replace the routine's task and trigger configuration.\n- `Routine.byId`: static byId(client, id): Routine — Construct a lazy routine handle.\n- `Routine.from`: static from(client, record): Routine — Seed a handle from a server record.\n\n### RoutineExecution\nA completed routine execution, as recorded by the service.\nFields: record, routine\n- `RoutineExecution.toJSON`: toJSON(): { action_id: string; created_at: string; end_time: string; id?: string | null; is_success: boolean; resource_id?: string | null; result: {[key: string]: unknown; }; routine: string; start_time: string; } — Serialize without the authenticated client.\n\nFunctions: `routineBody`\n\nTypes: `RoutineOptions`, `RoutineEventFilter`, `RoutineTriggerOptions`, `SingleRoutineTrigger`\n"+ },+ {+ "name": "unfurls",+ "description": "Read URL preview metadata.",+ "index": "## unfurls\nRead URL preview metadata.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### UnfurlNamespace (`macro.unfurls`)\nURL metadata lookup.\n- `UnfurlNamespace.bulk`: bulk(urls): Promise<GetUnfurlBulkResponse> — Read metadata for multiple URLs in one request.\n- `UnfurlNamespace.get`: get(url): Promise<GetUnfurlResponse> — Read title, description and preview metadata for a URL.\n"+ },+ {+ "name": "ai",+ "description": "Generate structured objects, classify supplied content with Jev and read AI usage.",+ "index": "## ai\nGenerate structured objects, classify supplied content with Jev and read AI usage.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### AiNamespace (`macro.ai`)\nShared cognition endpoints, charged to the authenticated acting user.\n- `AiNamespace.decide`: decide(request): Promise<DecisionResponse> — Ask named yes/no questions about JSON input.\n- `AiNamespace.structuredCompletion`: structuredCompletion(request): Promise<StructuredCompletionResponse> — Generate an answer matching a JSON Schema.\n- `AiNamespace.usage`: usage(options?): Promise<UsageSummary> — Read AI usage over a time range, optionally restricting it to users.\n"+ },+ {+ "name": "bots",+ "description": "Inspect and manage bots.",+ "index": "## bots\nInspect and manage bots.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### BotsNamespace (`macro.bots`)\nThe authenticated bot's identity.\n- `BotsNamespace.channels`: channels(): Promise<BotChannel[]> — Channels containing the authenticated bot.\n- `BotsNamespace.me`: me(): Promise<Bot> — The authenticated bot's own record.\n- `BotsNamespace.myPrincipalId`: myPrincipalId(): Promise<string> — The authenticated bot's canonical principal id (bot|<uuid>) — the form used for bot mentions, senders, and webhook ids filters.\n"+ },+ {+ "name": "calendar",+ "description": "Find and manage calendar events.",+ "index": "## calendar\nFind and manage calendar events.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### Calendar\nA calendar visible to the requester across their connected inboxes: a free-to-construct handle whose detail resolves from the caller's calendar list.\nExtends `MacroEntity`.\nFields: color, emailAddress, emailLink, id, isPrimary, isSubscription, isWritable, name, syncError\n- `Calendar.setContributesToAvailability`: setContributesToAvailability(contributesToAvailability): Promise<void> — Set whether this calendar contributes to the caller's availability.\n- `Calendar.byId`: static byId(client, id): Calendar — A handle to a calendar by id.\n- `Calendar.list`: static list(client): Promise<Calendar[]> — The caller's visible calendars, primaries and writable first.\n\n### CalendarEvent\nA Macro calendar event: a handle exposing the event's synced fields and the mutations that act on it ([CalendarEvent.update](#update), [CalendarEvent.delete]...\nExtends `MacroEntity`.\nFields: attendees, calendar, description, guestPolicy, id, isReadOnly, location, recurrenceLines, status, time, title, transparency, viewerCan\n- `CalendarEvent.addToCalendar`: addToCalendar(options?): Promise<CalendarEvent> — Add a snapshot of an event shared with one of the requester's channels to one of their Google calendars, and return a handle to the synced snapshot.\n- `CalendarEvent.delete`: delete(options?): Promise<void> — Delete the event (or a scoped part of a recurring series) at its provider.\n- `CalendarEvent.ics`: ics(): Promise<string> — The event as an iCalendar (.ics) document: its series, title, description, location and organizer, never its guests or join link.\n- `CalendarEvent.inviteGuests`: inviteGuests(options): Promise<CalendarEvent> — Add guests without touching anyone already invited, and return a handle to the synced record.\n- `CalendarEvent.linkNote`: linkNote(document, occurrence, options?): Promise<CalendarNote> — Link a markdown document you own.\n- `CalendarEvent.notes`: notes(occurrence): Promise<CalendarNote[]> — Notes linked to a specific occurrence returned by calendar.occurrences().\n- `CalendarEvent.prepareReplacement`: prepareReplacement(options): Promise<CalendarReplacement> — Preview an organizer replacement without cancelling or sending invitations.\n- `CalendarEvent.providerUrl`: providerUrl(options?): Promise<string | undefined> — Open this calendar copy in its provider for actions unavailable through its API.\n- `CalendarEvent.record`: record(): Promise<calendar.CalendarEvent> — The full synced event record.\n- `CalendarEvent.rsvp`: rsvp(options): Promise<CalendarEvent> — Record the requester's RSVP and return a handle to the synced record.\n- `CalendarEvent.update`: update(options): Promise<CalendarEvent> — Update the event and return a handle to its synced record.\n- `CalendarEvent.byId`: static byId(client, id): CalendarEvent — A handle to a calendar event by id, for driving mutations.\n- `CalendarEvent.fromRecord`: static fromRecord(client, record): CalendarEvent — A handle seeded with a synced event record; reads resolve without a fetch.\n\n### CalendarNamespace (`macro.calendar`)\nThe calendar surface: the caller's visible calendars, event creation, and handles to individual events and calendars.\n- `CalendarNamespace.availabilityCalendars`: availabilityCalendars(): Promise<{ calendar: Calendar; contributesToAvailability: boolean; isPrimary: boolean; name: string; }[]> — Calendar availability settings, each referring to a typed calendar.\n- `CalendarNamespace.calendar`: calendar(id): Calendar — A handle to a calendar by id.\n- `CalendarNamespace.calendars`: calendars(): Promise<Calendar[]> — The caller's visible calendars, primaries and writable first.\n- `CalendarNamespace.createEvent`: createEvent(options): Promise<CalendarEvent> — Create a calendar event and return a handle to its synced record.\n- `CalendarNamespace.event`: event(id): CalendarEvent — A handle to a calendar event by id, for driving mutations.\n- `CalendarNamespace.noteDocuments`: noteDocuments(query?): Promise<{ documents: { document: Document; name: string; }[]; teams: { name: string; team: Team; }[]; }> — Find up to 30 owned markdown documents for meeting notes, plus available extra team audiences.\n- `CalendarNamespace.occurrences`: occurrences(options): AsyncGenerator<{ event: CalendarEvent; inbox: string | undefined; occurrence: storage.CalendarOccurrence; role: CalendarEventRole | undefined; }, any, any> — Calendar occurrences in a viewport, automatically paginated.\n- `CalendarNamespace.replacement`: replacement(operationId): CalendarReplacement — Recover a saved replacement, including after its original event was retired.\n- `CalendarNamespace.setTeamSharing`: setTeamSharing(sharing): Promise<calendar.TeamCalendarSharing> — Replace the team calendar sharing preference.\n- `CalendarNamespace.teamOutOfOffice`: teamOutOfOffice(options): Promise<{ hasMore: boolean; items: { event: CalendarEvent; occurrenceKey: string; owner: User; time: storage.EventTime; title: string | undefined; }[]; }> — Teammates' out-of-office occurrences in a bounded viewport.\n- `CalendarNamespace.teamPage`: teamPage(options): Promise<{ items: ({ contributesToAvailability: boolean; id: string; kind: \"busy\"; owner: User; time: storage.EventTime; } | { contributesToAvailability: boolean; details: storage.TeamCalendarDetails; id: string; kind: \"details\"; owner: User; time: storage.EventTime; })[]; members: { coverage: TeamCalendarCoverage; sharing: storage.TeamCalendarSharing; user: User; }[]; nextCursor: string | undefined; }> — A page of team availability, including its roster and continuation cursor.\n- `CalendarNamespace.teamSharing`: teamSharing(): Promise<calendar.TeamCalendarSharing> — Current sharing preference for the team calendar.\n\n### CalendarNote\nA markdown document linked to one meeting occurrence, with view-only access.\nExtends `MacroEntity`.\nFields: canManage, document, event, id, name, occurrence, team\n- `CalendarNote.setTeam`: setTeam(team?): Promise<void> — Change the extra team view grant; omit the team to remove it.\n- `CalendarNote.unlink`: unlink(): Promise<void> — Remove this occurrence's link and view grants, preserving the document and other sharing.\n- `CalendarNote.forDocument`: static forDocument(client, event, occurrence, document): CalendarNote — Construct a handle for a document already linked to this occurrence.\n- `CalendarNote.fromDocumentLink`: static fromDocumentLink(client, document, link): CalendarNote — Seed an owner-visible link that can be revoked even if the meeting is unavailable.\n- `CalendarNote.fromRecord`: static fromRecord(client, event, occurrence, record): CalendarNote — Seed a handle with a record returned by the meeting-note API.\n\n### CalendarReplacement\nDurable organizer replacement, recoverable even after the original event is retired.\nFields: id\n- `CalendarReplacement.confirm`: confirm(): Promise<CalendarReplacementView> — Confirm the reviewed cancellation and reinvitation, or resume that same operation.\n- `CalendarReplacement.discard`: discard(): Promise<void> — Discard an unconfirmed preview.\n- `CalendarReplacement.status`: status(): Promise<CalendarReplacementView> — Read progress without initiating provider writes.\n\nTypes: `DeleteEventOptions`, `InviteGuestsOptions`, `RsvpEventOptions`, `UpdateEventOptions`, `CreateEventOptions`, `CalendarEventRole`\n"+ },+ {+ "name": "calls",+ "description": "Read and edit call records, transcripts and meeting links.",+ "index": "## calls\nRead and edit call records, transcripts and meeting links.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### CallRecord\nA Macro call record (an archived or still active call).\nExtends `FavoritableEntity`.\nFields: access, channel, channelName, creator, durationMs, endedAt, entityType, guests, id, isActive, name, participants, recordingPreviewUrl, recordingStartedAt, recordingUrl, roomName, shareWithTeam, startedAt, status, summary, teamShareAccessLevel, transcript, search\n- `CallRecord.delete`: delete(): Promise<void> — Delete the call record.\n- `CallRecord.editTranscript`: editTranscript(assignments): Promise<void> — Update custom speaker assignments in the transcript.\n- `CallRecord.meeting`: meeting(): Promise<Meeting> — Get or create a shareable meeting for this call.\n- `CallRecord.message`: message(id): CallMessage — A message in this call's persistent chat.\n- `CallRecord.messageThreadById`: messageThreadById(id): MessageThread — A shared message thread scoped to this resource.\n- `CallRecord.rename`: rename(name): Promise<void> — Rename the call or clear the custom name.\n- `CallRecord.setTeamShare`: setTeamShare(shared): Promise<void> — Share the call with the creator's team (view access), or unshare it.\n- `CallRecord.timelinePage`: timelinePage(selection?): Promise<{ entries: ({ activity: { action: string; actor: User; actor_id: string; id: string; occurred_at: string; payload?: unknown; }; message?: undefined; type: \"activity\"; } | { activity?: undefined; message: CallMessage; type: \"message\"; })[]; nextCursor: MessageCursor | undefined; previousCursor: MessageCursor | undefined; }> — A mixed message and activity timeline page.\n- `CallRecord.toggleTeamShare`: toggleTeamShare(): Promise<boolean> — Toggle the server's share-with-team setting and return its new value.\n- `CallRecord.byId`: static byId(client, id): CallRecord — A handle to a call record by id.\n\n### CallMessage\nA message in a call's single persistent chat thread.\nExtends `MacroEntity`.\nFields: callId, content, createdAt, id, updatedAt\n- `CallMessage.author`: author(): Promise<User> — The user who sent this message.\n- `CallMessage.call`: call(): CallRecord — The call whose chat contains this message.\n- `CallMessage.delete`: delete(): Promise<void> — Delete this message, preserving the rest of the call's chat.\n- `CallMessage.edit`: edit(body): Promise<CallMessage> — Replace this message's body.\n- `CallMessage.reply`: reply(body): Promise<CallMessage> — Reply in the call's canonical thread, including when this is a reply.\n- `CallMessage.byId`: static byId(client, callId, id): CallMessage — A handle to a message by id.\n- `CallMessage.from`: static from(client, callId, record): CallMessage — Build a message from its record without another fetch.\n\n### CallRecordNamespace (`macro.calls`)\n- `CallRecordNamespace.byId`: byId(id): CallRecord — CallRecord\n- `CallRecordNamespace.search`: search(query, opts?): AsyncGenerator<CallRecord> — AsyncGenerator<CallRecord>\n"+ },+ {+ "name": "channels",+ "description": "Read and send channel messages; list the WhatsApp chat list (groups and direct chats), add chats to Macro, read and share added chats, and send from the credential owner's own account with mentions, media and delivery. Pairing stays in the app.",+ "index": "## channels\nRead and send channel messages; list the WhatsApp chat list (groups and direct chats), add chats to Macro, read and share added chats, and send from the credential owner's own account with mentions, media and delivery. Pairing stays in the app.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### ChannelActivity\nA user's channel activity marker.\nFields: channel\n- `ChannelActivity.createdAt`: createdAt(): string — Creation time.\n- `ChannelActivity.recordInteraction`: recordInteraction(type): Promise<ChannelActivity> — Record a view or interaction in this channel.\n- `ChannelActivity.toJSON`: toJSON(): ApiActivity — Serialize activity without credentials.\n- `ChannelActivity.user`: user(): User — User who interacted.\n\n### Channel\nA channel.\nExtends `PropertiedEntity`.\nFields: entityType, id, name, type, search\n- `Channel.addParticipants`: addParticipants(users): Promise<void> — Add users to the channel.\n- `Channel.agentConversations`: agentConversations(): Promise<AgentConversation[]> — Conversations maintained by agents in this channel.\n- `Channel.attachments`: attachments(opts?): AsyncGenerator<ApiChannelAttachment> — The attachments posted in this channel, auto-paginated.\n- `Channel.delete`: delete(): Promise<void> — Delete the channel.\n- `Channel.join`: join(): Promise<void> — Join the channel as the current user.\n- `Channel.joinCode`: joinCode(): Promise<string> — A reusable code that lets a user join this channel.\n- `Channel.leave`: leave(): Promise<void> — Leave the channel as the current user.\n- `Channel.message`: message(id): Message — A handle to a message in this channel by id.\n- `Channel.messages`: messages(opts?): AsyncGenerator<Message> — Root messages in this channel, most recent first, auto-paginated.\n- `Channel.messagesAfter`: messagesAfter(after, opts?): AsyncGenerator<Message> — Root messages created or replied to at or after after, most recent first, auto-paginated.\n- `Channel.messageThreadById`: messageThreadById(id): MessageThread — A shared message thread scoped to this resource.\n- `Channel.participants`: participants(): Promise<ApiChannelParticipant[]> — The channel's members, with their roles and join times.\n- `Channel.recordActivity`: recordActivity(type): Promise<ChannelActivity> — Record a view or interaction in this channel.\n- `Channel.removeParticipants`: removeParticipants(users): Promise<void> — Remove users from the channel.\n- `Channel.rename`: rename(name): Promise<void> — Rename the channel.\n- `Channel.send`: send(body, opts?): Promise<Message> — Post a message.\n- `Channel.setPicture`: setPicture(picture?): Promise<void> — Set an uploaded profile picture, or clear it.\n- `Channel.timelinePage`: timelinePage(selection?): Promise<{ entries: ({ activity: { action: string; actor: User; actor_id: string; id: string; occurred_at: string; payload?: unknown; }; message?: undefined; type: \"activity\"; } | { activity?: undefined; message: Message; type: \"message\"; })[]; nextCursor: MessageCursor | undefined; previousCursor: MessageCursor | undefined; }> — A mixed message and activity timeline page.\n- `Channel.typing`: typing(action, opts?): Promise<void> — Broadcast a typing indicator, optionally scoped to a thread.\n- `Channel.webUrl`: webUrl(): string — The channel's URL in the Macro web app.\n- `Channel.byId`: static byId(client, id): Channel — A handle to a channel by id.\n- `Channel.create`: static create(client, opts): Promise<Channel> — Create a channel.\n- `Channel.dm`: static dm(client, recipient): Promise<Channel> — Open (creating if needed) the DM channel with a user.\n- `Channel.private`: static private(client, recipients): Promise<Channel> — Open (creating if needed) the private group channel with a set of users.\n\n### ChannelLabelsNamespace\nShared or private channel labels: named groups of channels shown in the Chat sidebar.\n- `ChannelLabelsNamespace.create`: create(name, channels?): Promise<ChannelLabel> — Create a label and atomically move channels into it.\n- `ChannelLabelsNamespace.createSmartTag`: createSmartTag(name, rule): Promise<ChannelLabel> — Create a smart tag whose membership follows an attribute rule automatically.\n- `ChannelLabelsNamespace.delete`: delete(label): Promise<void> — Delete a label for the whole team; its channels return to the plain list.\n- `ChannelLabelsNamespace.list`: list(): Promise<ChannelLabel[]> — Every label in the authenticated user's shared or private scope.\n- `ChannelLabelsNamespace.previewSmartTag`: previewSmartTag(rule): Promise<SmartTagPreview> — Preview the first matches and total visible count without creating a tag.\n- `ChannelLabelsNamespace.rename`: rename(label, name): Promise<ChannelLabel> — Rename a label for the whole team.\n- `ChannelLabelsNamespace.setLabel`: setLabel(channel, label): Promise<void> — Move a channel into label, or out of any label when label is undefined.\n- `ChannelLabelsNamespace.updateSmartTag`: updateSmartTag(label, name, rule): Promise<ChannelLabel> — Update the name and matching rule of an existing smart tag.\n\n### Message\nA message in a channel.\nExtends `FavoritableEntity`.\nFields: channelId, content, createdAt, editedAt, entityType, id, mentions, updatedAt\n- `Message.author`: author(): Promise<User> — The user who sent this message.\n- `Message.channel`: channel(): Channel — The channel this message is in.\n- `Message.delete`: delete(): Promise<void> — Delete this message.\n- `Message.edit`: edit(body): Promise<Message> — Replace this message's body.\n- `Message.react`: react(emoji): Promise<Message> — Add an emoji reaction to this message.\n- `Message.reply`: reply(body): Promise<Message> — Post a reply in this message's thread.\n- `Message.thread`: thread(): Thread — The thread rooted at this message.\n- `Message.unreact`: unreact(emoji): Promise<Message> — Remove one of your emoji reactions from this message.\n- `Message.byId`: static byId(client, channelId, id, mentions?): Message — A handle to a message by id.\n- `Message.from`: static from(client, channelId, data): Message — Build a root or reply from a message record (pre-seeded, no fetch).\n\n### ChannelNamespace (`macro.channels`)\nFields: labels\n- `ChannelNamespace.activity`: activity(): Promise<ChannelActivity[]> — Recent channel activity, with channel and user handles.\n- `ChannelNamespace.byId`: byId(id): Channel — Channel\n- `ChannelNamespace.create`: create(opts): Promise<Channel> — Create a channel.\n- `ChannelNamespace.dm`: dm(recipient): Promise<Channel> — Promise<Channel>\n- `ChannelNamespace.list`: list(): Promise<Channel[]> — All channels the authenticated user is a member of.\n- `ChannelNamespace.private`: private(recipients): Promise<Channel> — Open (creating if needed) the private group channel with a set of users.\n- `ChannelNamespace.search`: search(query, opts?): AsyncGenerator<Channel> — Search channels by name (client-side fuzzy filter on the full channel list) or by content (server-side unified search).\n\n### ChannelPicture\nAn uploaded channel profile picture in static file storage.\nFields: id\n- `ChannelPicture.toJSON`: toJSON(): { id: string; } — Serialize the uploaded picture reference.\n- `ChannelPicture.byId`: static byId(id): ChannelPicture — Construct a reference from the upload receipt.\n\n### Thread\nA thread within a channel, rooted at a top-level message.\nFields: channelId, rootId\n- `Thread.channel`: channel(): Channel — The channel this thread is in.\n- `Thread.replies`: replies(): Promise<Message[]> — List the replies in this thread, oldest first.\n- `Thread.reply`: reply(body): Promise<Message> — Post a reply in this thread.\n- `Thread.root`: root(): Message — The message this thread hangs off.\n- `Thread.toJSON`: toJSON(): { channelId: string; rootId: string; } — Serialize the thread identity without its authenticated client.\n\n### WhatsAppAccount\nThe current user's WhatsApp account, connected through the Macro app.\nExtends `MacroEntity`.\nFields: id, identity, owner, state\n- `WhatsAppAccount.refresh`: refresh(): Promise<WhatsAppAccount> — Discard cached connection state and load its current value.\n- `WhatsAppAccount.byId`: static byId(client, id): WhatsAppAccount — Reference an account; reads still enforce the authenticated owner's scope.\n- `WhatsAppAccount.from`: static from(client, record): WhatsAppAccount — Seed an account handle from an API record.\n\n### WhatsAppChat\nOne chat of the current user's WhatsApp chat list: a group or a direct chat.\nExtends `MacroEntity`.\nFields: archived, canAdd, cannotAddReason, community, group, id, kind, lastActivityAt, name, pinned, shared\n- `WhatsAppChat.adopt`: adopt(): Promise<WhatsAppGroup> — Add the chat (a group or a direct chat) to Macro as the current user's own; its earlier messages are imported from the phone.\n- `WhatsAppChat.refresh`: refresh(): Promise<WhatsAppChat> — Reload the chat's list entry.\n- `WhatsAppChat.byId`: static byId(client, id): WhatsAppChat — Reference a chat by its WhatsApp JID.\n- `WhatsAppChat.from`: static from(client, record): WhatsAppChat — Seed a chat handle from the chat list.\n\n### WhatsAppGroup\nIndependently shareable added WhatsApp chat: a group or a direct chat.\nExtends `FavoritableEntity`.\nFields: backfill, canSend, community, disappearingSeconds, entityType, id, kind, limits, name, owner, participants, roster, sendingIdentity, sendReason, unreadCount\n- `WhatsAppGroup.delivery`: delivery(sends): Promise<WhatsAppSend[]> — Read delivery for selected caller-owned intents or messages.\n- `WhatsAppGroup.detach`: detach(): Promise<void> — Stop observation while preserving history and established sharing.\n- `WhatsAppGroup.markRead`: markRead(message): Promise<void> — Advance the caller's own read cursor.\n- `WhatsAppGroup.messageAttachments`: messageAttachments(messages): Promise<{ attachments: { document: Document | undefined; fileName: string; mime: string; ordinal: number; size: number; state: LinkedAttachmentState; }[]; message: WhatsAppMessage; }[]> — Read attachment states for selected messages.\n- `WhatsAppGroup.messages`: messages(options?): AsyncGenerator<WhatsAppMessage> — Iterate newest-first timeline pages lazily.\n- `WhatsAppGroup.permissions`: permissions(): Promise<storage.SharePermissionV2> — Read standard link/team sharing settings.\n- `WhatsAppGroup.refresh`: refresh(): Promise<WhatsAppGroup> — Reload detail, permissions and caller capabilities.\n- `WhatsAppGroup.reply`: reply(content, options): Promise<WhatsAppSend> — Personal sessions and owner API credentials can send.\n- `WhatsAppGroup.sends`: sends(): Promise<WhatsAppSend[]> — Read only the caller's pending, uncertain or failed sends.\n- `WhatsAppGroup.updatePermissions`: updatePermissions(update): Promise<void> — Actual owner updates standard link/team sharing settings.\n- `WhatsAppGroup.upload`: upload(file): Promise<WhatsAppUpload> — Stage a supported attachment for a deliberate send.\n- `WhatsAppGroup.byId`: static byId(client, id): WhatsAppGroup — Reference an adopted group; access is checked on each request.\n\n### WhatsAppMessage\nMessage in an independently shared WhatsApp group.\nExtends `MacroEntity`.\nFields: attachments, body, deleted, deliveryState, editedAt, forwarded, group, id, kind, mentions, reactions, replyTo, rich, sender, sentAt, viewOnce\n- `WhatsAppMessage.byId`: static byId(client, group, id): WhatsAppMessage — Reference a message within its original group.\n- `WhatsAppMessage.from`: static from(client, group, record): WhatsAppMessage — Seed a message handle from a timeline response.\n\n### WhatsAppNamespace (`macro.whatsapp`)\nOperate on an account already paired through the Macro app.\n- `WhatsAppNamespace.account`: account(): Promise<WhatsAppAccount | undefined> — Current owner's account, or undefined when no account has been connected.\n- `WhatsAppNamespace.byId`: byId(id): WhatsAppGroup — Reference an adopted entity without fetching it.\n- `WhatsAppNamespace.groups`: groups(): Promise<WhatsAppGroup[]> — Adopted groups shared with the caller, including without WhatsApp.\n\n### WhatsAppParticipant\nSomeone in an added WhatsApp chat, from its roster; mention them in a text reply.\nFields: group, id\n- `WhatsAppParticipant.toJSON`: toJSON(): { admin: boolean | undefined; displayName: string | undefined; group: string; id: string; } — Serialize the participant reference without credentials.\n- `WhatsAppParticipant.byId`: static byId(group, id): WhatsAppParticipant — Reference a participant of a chat by WhatsApp id.\n- `WhatsAppParticipant.from`: static from(group, record): WhatsAppParticipant — Seed a participant from the chat's roster.\n\n### WhatsAppSend\nOne deliberate send intent.\nExtends `MacroEntity`.\nFields: createdAt, errorCode, group, id, message, state\n- `WhatsAppSend.refresh`: refresh(): Promise<WhatsAppSend> — Fetch current delivery state without retrying or submitting the message.\n- `WhatsAppSend.request`: request(): Promise<{ idempotencyKey: string; message: WhatsAppReply; replyTo?: WhatsAppMessage; }> — Inspect the original intent for reconciliation; never resubmit an unknown outcome automatically.\n- `WhatsAppSend.byId`: static byId(client, group, id): WhatsAppSend — Reference a send intent within its original group.\n- `WhatsAppSend.from`: static from(client, group, record): WhatsAppSend — Seed a send handle from a server response.\n\n### WhatsAppUpload\nA staged attachment scoped to one adopted group; use it in a deliberate media send.\nFields: filename?, group, id, kind?\n- `WhatsAppUpload.toJSON`: toJSON(): { filename: string | undefined; group: string; id: string; kind: LinkedMediaKind | undefined; } — Serialize the upload reference without credentials.\n- `WhatsAppUpload.byId`: static byId(group, id): WhatsAppUpload — Reference a previously staged upload in its original group.\n- `WhatsAppUpload.from`: static from(group, record): WhatsAppUpload — Seed a handle from the server's upload receipt.\n\nFunctions: `postToChannel`, `communityOf`\n\nTypes: `ChannelAttachment`, `ChannelParticipant`, `MessageData`, `WhatsAppCommunity`, `WhatsAppReply`\n"+ },+ {+ "name": "crm",+ "description": "Work with CRM records and pipeline tables, columns, rows and sharing.",+ "index": "## crm\nWork with CRM records and pipeline tables, columns, rows and sharing.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### CrmComment\nA comment on a CRM company or contact: a message whose parent is the record, addressed by the record and the message UUID.\nExtends `MacroEntity`.\nFields: createdAt, deletedAt, id, parent, text, updatedAt\n- `CrmComment.author`: author(): Promise<User> — The user who wrote this comment.\n- `CrmComment.delete`: delete(): Promise<void> — Delete this comment.\n- `CrmComment.edit`: edit(body): Promise<CrmComment> — Replace the comment's text.\n- `CrmComment.reply`: reply(body): Promise<CrmComment> — Reply in this comment's thread.\n- `CrmComment.threadId`: threadId(): Promise<string> — The id of the thread this comment belongs to: its root, or itself for a root.\n- `CrmComment.byId`: static byId(client, parent, id): CrmComment — A handle to a comment by id.\n- `CrmComment.from`: static from(client, parent, record): CrmComment — Build a comment from a message record (pre-seeded, no fetch).\n\n### Company\nA CRM company: an organization the team has interacted with.\nExtends `PropertiedEntity`.\nFields: createdAt, description, emailSync, entityType, hidden, id, name, team, updatedAt, search\n- `Company.comment`: comment(body, opts?): Promise<CrmComment> — Add a comment.\n- `Company.commentById`: commentById(id): CrmComment — A handle to one of this company's comments by id.\n- `Company.comments`: comments(): Promise<CrmCommentThread[]> — The comment threads on this company, newest thread first.\n- `Company.contacts`: contacts(): Promise<Contact[]> — The contacts attached to this company (hidden ones filtered for non-admins).\n- `Company.createContact`: createContact(opts): Promise<Contact> — Create a contact under this company.\n- `Company.domain`: domain(): Promise<string | undefined> — The company's primary domain (e.g.\n- `Company.domains`: domains(): Promise<string[]> — All domains associated with the company, primary first.\n- `Company.hide`: hide(): Promise<void> — Hide the company from CRM listings: disables email sync and soft-hides its contacts.\n- `Company.messageThreadById`: messageThreadById(id): MessageThread — A shared message thread scoped to this resource.\n- `Company.rename`: rename(name): Promise<void> — Rename the company for the caller's current team.\n- `Company.setEmailSync`: setEmailSync(enabled): Promise<void> — Enable or disable team-wide email sync for this company.\n- `Company.timelinePage`: timelinePage(selection?): Promise<{ entries: ({ activity: { action: string; actor: User; actor_id: string; id: string; occurred_at: string; payload?: unknown; }; message?: undefined; type: \"activity\"; } | { activity?: undefined; message: CrmComment; type: \"message\"; })[]; nextCursor: MessageCursor | undefined; previousCursor: MessageCursor | undefined; }> — A mixed message and activity timeline page.\n- `Company.unhide`: unhide(): Promise<void> — Un-hide the company, restoring it and its contacts to CRM listings.\n- `Company.byId`: static byId(client, id): Company — A handle to a CRM company by id.\n- `Company.from`: static from(client, data): Company — Build a company from an API record (pre-seeded, no fetch).\n\n### Contact\nA CRM contact: a person observed interacting with the team.\nExtends `FavoritableEntity`.\nFields: company, createdAt, email, entityType, firstInteraction, hidden, id, lastInteraction, name, updatedAt\n- `Contact.comment`: comment(body, opts?): Promise<CrmComment> — Add a comment.\n- `Contact.commentById`: commentById(id): CrmComment — A handle to one of this contact's comments by id.\n- `Contact.comments`: comments(): Promise<CrmCommentThread[]> — The comment threads on this contact, newest thread first.\n- `Contact.hide`: hide(): Promise<void> — Hide the contact from CRM listings.\n- `Contact.messageThreadById`: messageThreadById(id): MessageThread — A shared message thread scoped to this resource.\n- `Contact.rename`: rename(name): Promise<void> — Rename the contact for the caller's current team.\n- `Contact.timelinePage`: timelinePage(selection?): Promise<{ entries: ({ activity: { action: string; actor: User; actor_id: string; id: string; occurred_at: string; payload?: unknown; }; message?: undefined; type: \"activity\"; } | { activity?: undefined; message: CrmComment; type: \"message\"; })[]; nextCursor: MessageCursor | undefined; previousCursor: MessageCursor | undefined; }> — A mixed message and activity timeline page.\n- `Contact.unhide`: unhide(): Promise<void> — Un-hide the contact, restoring it to CRM listings.\n- `Contact.byId`: static byId(client, id): Contact — A handle to a CRM contact by id.\n- `Contact.from`: static from(client, data): Contact — Build a contact from an API record (pre-seeded, no fetch).\n\n### CrmNamespace (`macro.crm`)\nFields: pipelines\n- `CrmNamespace.companyById`: companyById(id): Company — A handle to a CRM company by id.\n- `CrmNamespace.contactByEmail`: contactByEmail(email): Promise<Contact | undefined> — Resolve a CRM contact by email in the caller's current team, if present.\n- `CrmNamespace.contactById`: contactById(id): Contact — A handle to a CRM contact by id.\n- `CrmNamespace.createCompany`: createCompany(opts): Promise<Company> — Create a CRM company for the caller's current team.\n- `CrmNamespace.resetStages`: resetStages(): Promise<void> — Reset the caller's current team's deal stages to the defaults.\n- `CrmNamespace.searchCompanies`: searchCompanies(query): AsyncGenerator<Company> — Search CRM companies by name/domain, most relevant first, auto-paginated.\n- `CrmNamespace.searchContacts`: searchContacts(query, opts?): Promise<Contact[]> — Search the caller's current team's CRM contacts whose email or name contains query (case-insensitive), most recently interacted first.\n- `CrmNamespace.setStages`: setStages(stages): Promise<CrmStagesResponse> — Replace the caller's current team's deal stages, in pipeline order.\n- `CrmNamespace.settings`: settings(): Promise<CrmTeamSettingsResponse> — The caller's current team's CRM settings.\n- `CrmNamespace.updateSettings`: updateSettings(settings): Promise<CrmTeamSettingsResponse> — Partially update the caller's current team's CRM settings.\n\n### CrmPipeline\nA CRM pipeline with its own sharing boundary and backing table.\nExtends `MacroEntity`.\nFields: accessLevel, id, name, owner, recordType, sharing, team\n- `CrmPipeline.applyOps`: applyOps(ops, options?): Promise<AppliedOps> — Apply an atomic generated database operation batch through this pipeline.\n- `CrmPipeline.queryRows`: queryRows(options?): AsyncGenerator<PipelineRow> — Query pipeline rows, optionally restricting the query to typed row handles.\n- `CrmPipeline.rename`: rename(name): Promise<void> — Rename this pipeline.\n- `CrmPipeline.rows`: rows(): AsyncGenerator<PipelineRow> — Rows in pipeline order, automatically paginated.\n- `CrmPipeline.setSharing`: setSharing(sharing): Promise<void> — Change its sharing scope.\n- `CrmPipeline.setTrashed`: setTrashed(trashed): Promise<void> — Trash or restore the pipeline.\n- `CrmPipeline.sharePermissions`: sharePermissions(): Promise<storage.SharePermissionV2> — Read sharing grants.\n- `CrmPipeline.table`: table(): Promise<PipelineTable> — Read the backing table through the pipeline's authorization boundary.\n- `CrmPipeline.updateSharePermissions`: updateSharePermissions(options): Promise<storage.SharePermissionV2> — Update sharing grants.\n- `CrmPipeline.byId`: static byId(client, id): CrmPipeline — Construct a lazy pipeline handle.\n- `CrmPipeline.from`: static from(client, record): CrmPipeline — Seed from a server record.\n\n### PipelineColumn\nA column belonging to a pipeline table.\nExtends `MacroEntity`.\nFields: id, table\n- `PipelineColumn.name`: name(): Promise<string> — Current column label.\n- `PipelineColumn.toJSON`: toJSON(): { detail?: ColumnDetail; id: string; pipelineId: string; tableId: string; } — Serialize identity within its pipeline.\n- `PipelineColumn.writable`: writable(): Promise<boolean> — Whether the caller can write this column.\n- `PipelineColumn.from`: static from(client, table, record): PipelineColumn — Seed a column handle.\n\n### PipelineRow\nOne pipeline row.\nExtends `MacroEntity`.\nFields: cells, id, pipeline\n- `PipelineRow.refresh`: refresh(): Promise<void> — Reload this row after an operation batch.\n- `PipelineRow.toJSON`: toJSON(): { detail?: StorageRow; id: string; pipelineId: string; } — Serialize identity within its pipeline.\n- `PipelineRow.byId`: static byId(client, pipeline, id): PipelineRow — Construct a scoped row handle.\n- `PipelineRow.from`: static from(client, pipeline, record): PipelineRow — Seed a listed row.\n\n### PipelineTable\nBacking table of a CRM pipeline.\nExtends `MacroEntity`.\nFields: id, pipeline\n- `PipelineTable.columns`: columns(): Promise<PipelineColumn[]> — Columns in this table.\n- `PipelineTable.rowById`: rowById(id): PipelineRow — A scoped row handle.\n- `PipelineTable.rows`: rows(): AsyncGenerator<PipelineRow> — Rows from the authorized pipeline surface.\n- `PipelineTable.toJSON`: toJSON(): { detail?: TableDetail; id: string; pipelineId: string; } — Serialize identity within its pipeline.\n- `PipelineTable.version`: version(): Promise<number> — Table version for optimistic operation batches.\n- `PipelineTable.from`: static from(client, pipeline, record): PipelineTable — Seed a table from a pipeline table response.\n\n### PipelineNamespace\nCRM pipelines in the caller's team.\n- `PipelineNamespace.byId`: byId(id): CrmPipeline — Construct a lazy pipeline handle.\n- `PipelineNamespace.create`: create(options): Promise<CrmPipeline> — Create a pipeline and its backing storage.\n- `PipelineNamespace.list`: list(): Promise<CrmPipeline[]> — List accessible pipelines.\n\nFunctions: `listCrmCommentThreads`, `postCrmComment`\n\nTypes: `CrmCommentParent`, `CrmCommentThread`\n"+ },+ {+ "name": "databases",+ "description": "Read and edit database schemas, rows, and cells.",+ "index": "## databases\nRead and edit database schemas, rows, and cells.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### DatabaseColumn\nOne column of a DatabaseTable: the placement of a property definition on the table.\nFields: id, table\n- `DatabaseColumn.addOptions`: addOptions(labels): Promise<DatabaseColumn> — Add select options to the column.\n- `DatabaseColumn.casts`: casts(): Promise<ColumnCast[]> — What changing this column to each type would do to its values: safe, checked (with how many would not convert, and a few of them), or never (with why).\n- `DatabaseColumn.changeType`: changeType(options): Promise<OpResultOf<\"column\", \"type_changed\">> — Change this column's type.\n- `DatabaseColumn.config`: config(): Promise<ColumnConfig | undefined> — Column-kind configuration (a link), or undefined for a plain value column.\n- `DatabaseColumn.convertIntoNewColumn`: convertIntoNewColumn(options): Promise<DatabaseColumn> — Add a column of another type right after this one, filled with the values that convert, leaving this one as it is.\n- `DatabaseColumn.dataType`: dataType(): Promise<storage.DataType> — The value type the column holds.\n- `DatabaseColumn.definition`: definition(): Promise<PropertyDefinitionWithOptions> — The bound property definition together with its select options — the source of the column's name, type, and allowed values.\n- `DatabaseColumn.delete`: delete(): Promise<void> — Delete this placement and its cells at the table version last read.\n- `DatabaseColumn.detail`: detail(): Promise<ColumnDetail> — The column's record as the API returns it: the placement and the bound property definition.\n- `DatabaseColumn.inferType`: inferType(options): Promise<DatabaseColumn> — Settle the type of an empty column created with inferType enabled.\n- `DatabaseColumn.isMultiSelect`: isMultiSelect(): Promise<boolean> — Whether the column holds multiple values.\n- `DatabaseColumn.name`: name(): Promise<string> — The placement's display name, falling back to its property definition.\n- `DatabaseColumn.position`: position(): Promise<string> — The column's fractional index within the table's column order.\n- `DatabaseColumn.rename`: rename(name): Promise<DatabaseColumn> — Rename this placement, only if its last-read name is still current, without changing its shared property definition.\n- `DatabaseColumn.toJSON`: toJSON(): { id: string; tableId: string; } — { id: string; tableId: string; }\n- `DatabaseColumn.byId`: static byId(table, id): DatabaseColumn — A handle to a column by id, within a table.\n\n### Database\nA Macro database: a named collection of tables, owned and shared as one entity.\nExtends `MacroEntity`.\nFields: access, createdAt, grant, id, name, owner, tables, trashedAt\n- `Database.addColumn`: addColumn(table, options): Promise<DatabaseColumn> — Add a column to one of the database's tables, under an id minted here, either creating a property definition for it or binding an existing one.\n- `Database.addColumnOptions`: addColumnOptions(column, labels): Promise<OpResultOf<\"column\", \"options_added\">> — Add select options to one of the database's columns, each under an id minted here.\n- `Database.applyOps`: applyOps(ops, options?): Promise<OpResult[]> — Apply ops to the database in one transaction: create, rename, reorder, or delete tables and columns; change a column's type; add, edit, or delete select opti...\n- `Database.changeColumnType`: changeColumnType(column, options): Promise<OpResultOf<\"column\", \"type_changed\">> — Change a column's type at the table version last read.\n- `Database.columnCasts`: columnCasts(column): Promise<ColumnCast[]> — What changing a column to each type would do to its values.\n- `Database.columnConversion`: columnConversion(column, to): Promise<ColumnConversion> — What a column's values become under another type: the values that convert, the option labels a new select or tag column of that type needs, and how many valu...\n- `Database.convertColumnIntoNewColumn`: convertColumnIntoNewColumn(column, options): Promise<DatabaseColumn> — Add a column of another type right after this one, filled with the values that convert, in one batch at the table version the conversion was read at.\n- `Database.createTable`: createTable(options): Promise<DatabaseTable> — Create a table in the database, under an id minted here.\n- `Database.createWebhook`: createWebhook(table): Promise<{ token: string; webhook: DatabaseWebhook; }> — Create a webhook that inserts rows into table, writing with the caller's access.\n- `Database.deleteColumn`: deleteColumn(column): Promise<number> — Remove a column and its cells at the table version last read.\n- `Database.deleteTable`: deleteTable(table): Promise<void> — Delete one of the database's tables with its columns, rows, and views.\n- `Database.deleteWebhook`: deleteWebhook(webhook): Promise<void> — Delete one of the database's webhooks; its URL stops working.\n- `Database.importTable`: importTable(request): Promise<DatabaseTable> — Import text rows atomically.\n- `Database.inferColumnType`: inferColumnType(column, options): Promise<InferColumnTypeOutcome> — Adopt a first-value type only while the owned column is empty and inferable.\n- `Database.query`: query(sql, options?): Promise<DatabaseQueryResult> — Run one SQL statement with this database as the default name scope.\n- `Database.renameColumn`: renameColumn(column, name): Promise<number> — Rename this column placement, only if its last-read name is still current, without changing its shared property definition.\n- `Database.renameTable`: renameTable(table, name): Promise<number> — Rename a table only if its last-read name is still current.\n- `Database.reorderColumns`: reorderColumns(table, columns): Promise<number> — Persist a complete column order at the table version last read.\n- `Database.reorderTables`: reorderTables(tables): Promise<DatabaseTable[]> — Persist a new tab order.\n- `Database.rowHistory`: rowHistory(row): Promise<RowHistoryEntry[]> — A row's history: every committed change that touched it, newest first.\n- `Database.schema`: schema(): Promise<DatabaseDetail> — The full schema: the database record, the caller's access, and every table with its columns and views.\n- `Database.sharePermissions`: sharePermissions(): Promise<storage.SharePermissionV2> — Read direct recipients.\n- `Database.table`: table(name): Promise<DatabaseTable | undefined> — The table with the given display name, or undefined if there is none.\n- `Database.updateSharePermissions`: updateSharePermissions(request): Promise<storage.SharePermissionV2> — Add, replace, or remove recipient grants without transferring ownership.\n- `Database.viewPositions`: viewPositions(view): Promise<CardPosition[]> — Where a board view's cards sit: each placed card's lane and key.\n- `Database.webhooks`: webhooks(): Promise<DatabaseWebhook[]> — The database's webhooks, oldest first.\n- `Database.byId`: static byId(client, id): Database — A handle to a database by id.\n- `Database.create`: static create(client, options): Promise<Database> — Create a database owned by the caller.\n- `Database.list`: static list(client): Promise<Database[]> — The databases the caller can see, each with the caller's access level.\n\n### MacroOpRefusedError\nA batch of ops was refused (HTTP 400): nothing in it was written.\nExtends `MacroApiError`.\nFields: column, data, op, row, status, taken\n\n### DatabaseNamespace (`macro.databases`)\nMacro databases: named collections of tables, owned and shared as one entity.\n- `DatabaseNamespace.byId`: byId(id): Database — A handle to a database by id.\n- `DatabaseNamespace.create`: create(options): Promise<Database> — Create a database owned by the caller.\n- `DatabaseNamespace.list`: list(): Promise<Database[]> — The databases the caller can see.\n- `DatabaseNamespace.query`: query(sql, options?): Promise<DatabaseQueryResult> — Run one SQL statement over the caller's visible databases.\n\n### DatabaseRow\nOne row of a DatabaseTable.\nFields: id, table\n- `DatabaseRow.history`: history(): Promise<RowHistoryEntry[]> — Every committed change that touched the row, newest first: who made it, when, how, and the values of the columns it touched before and after.\n- `DatabaseRow.toJSON`: toJSON(): { id: string; tableId: string; } — { id: string; tableId: string; }\n- `DatabaseRow.byId`: static byId(table, id): DatabaseRow — A handle to a row by id, within a table.\n\n### DatabaseTable\nOne table (tab) of a Database.\nFields: database, id\n- `DatabaseTable.addColumn`: addColumn(options): Promise<DatabaseColumn> — Add a column to this table.\n- `DatabaseTable.columns`: columns(): Promise<DatabaseColumn[]> — The table's columns, in display order.\n- `DatabaseTable.createWebhook`: createWebhook(): Promise<{ token: string; webhook: DatabaseWebhook; }> — Create a webhook that inserts rows here.\n- `DatabaseTable.delete`: delete(): Promise<void> — Delete this table.\n- `DatabaseTable.detail`: detail(): Promise<TableDetail> — The table's record as the API returns it: the table, its columns, and its views.\n- `DatabaseTable.name`: name(): Promise<string> — The table's display name.\n- `DatabaseTable.position`: position(): Promise<string> — The table's fractional index within the database's tab order.\n- `DatabaseTable.rename`: rename(name): Promise<DatabaseTable> — Rename only if the last-read display name is still current.\n- `DatabaseTable.reorderColumns`: reorderColumns(columns): Promise<DatabaseTable> — Persist a new column order.\n- `DatabaseTable.row`: row(id): DatabaseRow — A handle to one of the table's rows, by the id an insert answered.\n- `DatabaseTable.toJSON`: toJSON(): { databaseId: string; id: string; } — { databaseId: string; id: string; }\n- `DatabaseTable.version`: version(): Promise<number> — The table's current version, bumped by every committed change to its schema or rows.\n- `DatabaseTable.views`: views(): Promise<DatabaseView[]> — The table's views, in their order.\n- `DatabaseTable.byId`: static byId(database, id): DatabaseTable — A handle to a table by id, within a database.\n\n### DatabaseView\nOne view of a DatabaseTable: which of its rows to show, in what order, drawn as a table or a board.\nFields: id, table\n- `DatabaseView.detail`: detail(): Promise<storage.DatabaseView> — The view's record as the API returns it.\n- `DatabaseView.layout`: layout(): Promise<ViewLayout> — How the view draws its rows: a table, or a board grouped by a column.\n- `DatabaseView.name`: name(): Promise<string> — The view's name, unique among its table's views ignoring case.\n- `DatabaseView.position`: position(): Promise<string> — The view's fractional index within its table's views.\n- `DatabaseView.positions`: positions(): Promise<CardPosition[]> — Where a board's cards sit: each placed card's lane and its key there.\n- `DatabaseView.query`: query(): Promise<ViewQuery> — Which rows the view shows, and in what order.\n- `DatabaseView.toJSON`: toJSON(): { id: string; tableId: string; } — { id: string; tableId: string; }\n- `DatabaseView.byId`: static byId(table, id): DatabaseView — A handle to a view by id, within a table.\n\n### DatabaseWebhook\nA webhook of a DatabaseTable: a secret URL that anyone holding it can POST JSON to, each object becoming a row, written with the access of the user who creat...\nFields: createdBy, id, table\n- `DatabaseWebhook.delete`: delete(): Promise<void> — Delete the webhook; its URL stops working.\n- `DatabaseWebhook.toJSON`: toJSON(): { id: string; tableId: string; tokenPrefix: string; } — { id: string; tableId: string; tokenPrefix: string; }\n- `DatabaseWebhook.fromRecord`: static fromRecord(table, createdBy, record): DatabaseWebhook — A handle from the record the API answered.\n\nTypes: `AddColumnOptions`, `ApplyOpsOptions`, `ChangeColumnTypeOptions`, `ColumnType`, `ConvertIntoNewColumnOptions`, `InferColumnTypeOptions`, `OpResultOf`, `DatabaseQueryOptions`, `DatabaseQueryResult`, `QueryResultSet`, `QueryTableVersion`, `QueryColumn`, `QueryStatement`\n"+ },+ {+ "name": "documents",+ "description": "Search, read, create, and manage documents and tasks.",+ "index": "## documents\nSearch, read, create, and manage documents and tasks.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### DocumentAnchor\nA PDF annotation scoped to its document.\nExtends `MacroEntity`.\nFields: document, id, kind, page\n- `DocumentAnchor.delete`: delete(): Promise<void> — Delete a standalone highlight annotation.\n- `DocumentAnchor.edit`: edit(options): Promise<void> — Edit a placeable comment's position and display settings.\n- `DocumentAnchor.toJSON`: toJSON(): { detail?: PdfAnchor; documentId: string; id: string; } — Serialize identity with its owning resource.\n- `DocumentAnchor.byId`: static byId(client, document, id): DocumentAnchor — Construct a document scoped annotation handle.\n- `DocumentAnchor.from`: static from(client, document, record): DocumentAnchor — Seed an annotation from a document annotation listing.\n\n### Comment\nA comment on a document: a document-parent message, addressed by its document and message UUID.\nExtends `MacroEntity`.\nFields: createdAt, documentId, id, text, updatedAt\n- `Comment.author`: author(): Promise<User> — The user who wrote this comment.\n- `Comment.delete`: delete(): Promise<void> — Delete this comment.\n- `Comment.document`: document(): Document — The document this comment is on.\n- `Comment.edit`: edit(body): Promise<Comment> — Replace the comment's text.\n- `Comment.reply`: reply(body): Promise<Comment> — Reply in this comment's thread.\n- `Comment.threadId`: threadId(): Promise<string> — The id of the thread this comment belongs to: its root, or itself for a root.\n- `Comment.byId`: static byId(client, documentId, id): Comment — A handle to a comment by id.\n- `Comment.from`: static from(client, documentId, record): Comment — Build a comment from a message record (pre-seeded, no fetch).\n\n### Document\nA Macro document.\nExtends `PropertiedEntity`.\nFields: access, branchedFrom, createdAt, deletedAt, entityType, fileType, id, name, owner, project, updatedAt, search\n- `Document.anchors`: anchors(): Promise<DocumentAnchor[]> — PDF annotations in this document.\n- `Document.branchName`: branchName(): Promise<string> — The git branch name derived for the document (task documents).\n- `Document.comment`: comment(body, opts?): Promise<Comment> — Add a comment.\n- `Document.comments`: comments(): Promise<CommentThread[]> — The document's live comment threads, each with its comments, newest thread first.\n- `Document.content`: content(): Promise<string> — Current Markdown for native documents, extracted text for PDF/Word, or raw file content for other formats.\n- `Document.copy`: copy(opts): Promise<Document> — Copy the document under a new name, optionally from a specific version.\n- `Document.createHighlight`: createHighlight(options): Promise<DocumentAnchor> — Create a standalone PDF highlight.\n- `Document.delete`: delete(opts?): Promise<void> — Delete the document.\n- `Document.githubPullRequests`: githubPullRequests(): Promise<storage.GithubPullRequest[]> — GitHub pull requests associated with the document.\n- `Document.meetingNotes`: meetingNotes(): Promise<{ eventTitle: string; note: CalendarNote; }[]> — Meeting links visible to the reader.\n- `Document.messageThreadById`: messageThreadById(id): MessageThread — A shared message thread scoped to this resource.\n- `Document.move`: move(project): Promise<void> — Move the document into a project (or out of one, with null).\n- `Document.permissionsToken`: permissionsToken(): Promise<string> — Mint a scoped permissions token.\n- `Document.prepareSave`: prepareSave(parts): Promise<PreSaveDocumentResponseData> — Prepare multipart content saving and return the service's upload instructions.\n- `Document.rename`: rename(name): Promise<void> — Rename the document.\n- `Document.restore`: restore(): Promise<void> — Restore a soft-deleted document.\n- `Document.save`: save(options): Promise<SaveDocumentResponseData> — Commit uploaded content.\n- `Document.setTeamShare`: setTeamShare(shared): Promise<void> — Share the document with the owner's team, or unshare it.\n- `Document.sharePermissions`: sharePermissions(): Promise<storage.SharePermissionV2> — Sharing configuration.\n- `Document.shortId`: shortId(): Promise<string> — The document's short id (used in compact links and branch names).\n- `Document.simpleSave`: simpleSave(): Promise<SaveDocumentResponseData> — Commit a simple document save.\n- `Document.teamShare`: teamShare(): Promise<DocumentTeamShareResponse> — Whether the document is shared with the owner's team, and which team.\n- `Document.timelinePage`: timelinePage(selection?): Promise<{ entries: ({ activity: { action: string; actor: User; actor_id: string; id: string; occurred_at: string; payload?: unknown; }; message?: undefined; type: \"activity\"; } | { activity?: undefined; message: Comment; type: \"message\"; })[]; nextCursor: MessageCursor | undefined; previousCursor: MessageCursor | undefined; }> — A mixed message and activity timeline page.\n- `Document.toMention`: toMention(): MentionPart — MentionPart\n- `Document.version`: version(version): DocumentVersion — A handle to an immutable version.\n- `Document.webUrl`: webUrl(): string — The document's URL in the Macro web app.\n- `Document.byId`: static byId(client, id): Document — A handle to a document by id.\n- `Document.create`: static create(client, opts): Promise<Document> — Create a markdown document.\n- `Document.createSkill`: static createSkill(client, opts): Promise<Document> — Create a skill: a markdown document containing instructions that AI reads and follows when the skill is referenced in an AI input.\n- `Document.createSnippet`: static createSnippet(client, opts): Promise<Document> — Create a snippet: a reusable markdown document that can be inserted into any markdown area.\n- `Document.recent`: static recent(client, opts?): AsyncGenerator<Document> — The user's recent documents, most recent first, auto-paginated.\n- `Document.recentlyDeleted`: static recentlyDeleted(client): Promise<Document[]> — The user's recently soft-deleted documents.\n\n### DocumentNamespace (`macro.documents`)\n- `DocumentNamespace.byId`: byId(id): Document — A handle to a document by id.\n- `DocumentNamespace.byTeamSlug`: byTeamSlug(slug): Promise<Document> — Resolve a team task reference such as ENG-42.\n- `DocumentNamespace.create`: create(opts): Promise<Document> — Create a markdown document.\n- `DocumentNamespace.createCanvas`: createCanvas(opts): Promise<Document> — Create a native Canvas with shared content ready for reading and editing.\n- `DocumentNamespace.createSkill`: createSkill(opts): Promise<Document> — Create a skill: markdown instructions that AI reads and follows.\n- `DocumentNamespace.createSnippet`: createSnippet(opts): Promise<Document> — Create a snippet: a reusable markdown document.\n- `DocumentNamespace.createUpload`: createUpload(options): Promise<{ content: DocumentContent; contentType: string; document: Document; uploadUrl: string | undefined; }> — Reserve a binary document and return upload instructions.\n- `DocumentNamespace.recent`: recent(opts?): AsyncGenerator<Document> — The user's recent documents, most recent first, auto-paginated.\n- `DocumentNamespace.recentlyDeleted`: recentlyDeleted(): Promise<Document[]> — The user's recently soft-deleted documents.\n- `DocumentNamespace.search`: search(query, opts?): AsyncGenerator<Document> — Search documents by name and content, most relevant first, auto-paginated.\n- `DocumentNamespace.systemSkills`: systemSkills(): Promise<SystemSkill[]> — The built-in system skills: static AI instructions with no document behind them.\n- `DocumentNamespace.validatePermissionsToken`: validatePermissionsToken(token): Promise<{ accessLevel: storage.AccessLevel; document: Document; expiresAt: number; issuer: string; user: User | undefined; }> — Validate a permissions token, returning its document and optional user handles.\n\n### SystemSkill\nA built-in system skill: static, code-defined AI instructions that surface to AI like skill documents but have no document behind them.\nFields: id, name\n- `SystemSkill.list`: static list(client): Promise<SystemSkill[]> — The built-in system skills, in display order.\n\n### DocumentVersion\nAn immutable document version, scoped to its document.\nFields: document, id\n- `DocumentVersion.read`: read(): Promise<GetDocumentResponseData> — Version metadata and the caller's access.\n- `DocumentVersion.toJSON`: toJSON(): { documentId: string; id: number; } — Serialize only scoped identity.\n- `DocumentVersion.byId`: static byId(client, document, id): DocumentVersion — Construct a version handle.\n\nTypes: `CommentThread`\n"+ },+ {+ "name": "email",+ "description": "Search, read, draft, and send email.",+ "index": "## email\nSearch, read, draft, and send email.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### EmailAttachment\nA file attached to an email message.\nExtends `MacroEntity`.\nFields: contentId, dataUrl, filename, id, mimeType, sfsId, size\n- `EmailAttachment.toDocument`: toDocument(): Promise<Document> — The Macro document holding this attachment's content.\n- `EmailAttachment.byId`: static byId(client, id): EmailAttachment — A handle to an attachment by id.\n- `EmailAttachment.from`: static from(client, data): EmailAttachment — Build an attachment from an already-fetched record (pre-seeded, no fetch).\n\n### DraftAttachment\nAn uploaded or forwarded attachment belonging to a draft.\nFields: draft, draftGeneration, forwarded, id\n- `DraftAttachment.complete`: complete(): Promise<void> — Complete verification after uploading the file.\n- `DraftAttachment.remove`: remove(): Promise<void> — Remove this attachment from its draft.\n- `DraftAttachment.toJSON`: toJSON(): { draftGeneration: number; draftId: string; forwarded: boolean; id: string; } — Serialize identity without credentials.\n- `DraftAttachment.byId`: static byId(_client, draft, id, forwarded?, draftGeneration?): DraftAttachment — Construct a draft scoped attachment handle.\n\n### EmailDraft\nA draft email.\nExtends `EmailMessage`.\nFields: bcc, body, cc, draftGeneration, from, id, labels, link, sentAt, subject, to\n- `EmailDraft.addAttachment`: addAttachment(options): Promise<{ attachment: DraftAttachment; contentType: string; uploadUrl: string; }> — Reserve an attachment upload.\n- `EmailDraft.delete`: delete(): Promise<void> — Delete the draft.\n- `EmailDraft.forwardAttachment`: forwardAttachment(attachment): Promise<DraftAttachment> — Forward an existing attachment into this draft.\n- `EmailDraft.removeAttachment`: removeAttachment(attachment): Promise<void> — Remove a draft attachment.\n- `EmailDraft.schedule`: schedule(sendTime, options?): Promise<void> — Schedule this draft for sending.\n- `EmailDraft.unschedule`: unschedule(): Promise<void> — Remove a scheduled send.\n- `EmailDraft.update`: update(options): Promise<void> — Replace draft content without changing its identity or sending it.\n- `EmailDraft.verifyAttachment`: verifyAttachment(attachment): Promise<void> — Complete verification of an uploaded attachment.\n- `EmailDraft.byId`: static byId(client, id): EmailDraft — Construct a lazy draft handle.\n\n### EmailFilter\nAn importance filter matched by sender address or domain.\nExtends `MacroEntity`.\nFields: emailAddress, emailDomain, id, isImportant\n- `EmailFilter.delete`: delete(): Promise<void> — Delete this filter.\n- `EmailFilter.setImportant`: setImportant(isImportant): Promise<void> — Change the importance for the same sender selector.\n- `EmailFilter.byId`: static byId(client, id, inbox?): EmailFilter — Construct a lazy filter handle.\n- `EmailFilter.from`: static from(client, record, inbox?): EmailFilter — Seed from a server record.\n\n### Label\nAn email label.\nExtends `MacroEntity`.\nFields: createdAt, id, labelListVisibility, linkId, messageListVisibility, name, type\n- `Label.delete`: delete(): Promise<void> — Delete this label.\n- `Label.byId`: static byId(client, id): Label — A handle to a label by id.\n- `Label.create`: static create(client, name): Promise<Label> — Create a user label.\n- `Label.list`: static list(client): Promise<Label[]> — All labels across the user's inboxes.\n\n### Link\nAn email link: a connected inbox (e.g.\nExtends `MacroEntity`.\nFields: emailAddress, id, isPrimary, isSyncActive, needsReauth, photoUrl, provider, syncStatus\n- `Link.settingsOperations`: settingsOperations(): Promise<MailboxSettingsOperation[]> — Read category and sender-policy changes for this inbox.\n- `Link.byId`: static byId(client, id): Link — A handle to an email link by id.\n- `Link.list`: static list(client): Promise<Link[]> — The caller's connected email links.\n\n### EmailMessage\nA message in an email thread.\nExtends `MacroEntity`.\nFields: bcc, body, cc, from, id, labels, link, sentAt, subject, to\n- `EmailMessage.addLabel`: addLabel(label): Promise<void> — Add a label to this message.\n- `EmailMessage.completeDraftAttachment`: completeDraftAttachment(attachmentId, draftGeneration?): Promise<void> — Verify an uploaded attachment using the draft generation captured when its upload began.\n- `EmailMessage.operationStatus`: operationStatus(): Promise<MessageOperationResponse> — Read the draft's durable send, upload, or conflict status without retrying it.\n- `EmailMessage.removeLabel`: removeLabel(label): Promise<void> — Remove a label from this message.\n- `EmailMessage.resolveOperation`: resolveOperation(request): Promise<void> — Resolve the displayed operation revision after the user chooses an action.\n- `EmailMessage.thread`: thread(): Promise<EmailThread> — The thread this message belongs to.\n- `EmailMessage.transferDraft`: transferDraft(request): Promise<TransferDraftResponse> — Move a draft to another inbox using a caller-persisted operation UUID.\n- `EmailMessage.byId`: static byId(client, id): EmailMessage — A handle to a message by id.\n- `EmailMessage.from`: static from(client, data): EmailMessage — Build a message from an already-fetched record (pre-seeded, no fetch).\n- `EmailMessage.send`: static send(client, opts): Promise<EmailMessage | undefined> — Send a new email message.\n\n### EmailNamespace (`macro.email`)\n- `EmailNamespace.archive`: archive(threads, archived?): Promise<EmailThread[]> — Archive many threads (or unarchive with false).\n- `EmailNamespace.attachment`: attachment(id): EmailAttachment — A handle to an email attachment by id.\n- `EmailNamespace.blockedSenders`: blockedSenders(): Promise<string[]> — The email addresses currently blocked.\n- `EmailNamespace.blockSender`: blockSender(email): Promise<void> — Block an email sender.\n- `EmailNamespace.byId`: byId(id): EmailThread — A handle to an email thread by id.\n- `EmailNamespace.connectionProviders`: connectionProviders(): Promise<EmailConnectionProviders> — Providers the server currently permits this caller to connect.\n- `EmailNamespace.contacts`: contacts(): Promise<{[key: string]: ContactInfoWithInteraction[]; }> — Address book contacts grouped by the service's interaction buckets.\n- `EmailNamespace.createDraft`: createDraft(options, inbox?): Promise<EmailDraft> — Create a draft without sending it; the inbox defaults to the caller's primary.\n- `EmailNamespace.createLabel`: createLabel(name): Promise<Label> — Create a user label.\n- `EmailNamespace.deleteLabel`: deleteLabel(label): Promise<void> — Delete a label.\n- `EmailNamespace.draftById`: draftById(id): EmailDraft — Construct a lazy draft handle.\n- `EmailNamespace.filters`: filters(inbox?): Promise<EmailFilter[]> — Importance filters.\n- `EmailNamespace.inbox`: inbox(opts?): AsyncGenerator<EmailThread> — The threads in the inbox, most recent first, auto-paginated.\n- `EmailNamespace.label`: label(id): Label — A handle to a label by id.\n- `EmailNamespace.labels`: labels(): Promise<Label[]> — All labels across the user's inboxes.\n- `EmailNamespace.link`: link(id): Link — A handle to a connected inbox (email link) by id.\n- `EmailNamespace.links`: links(): Promise<Link[]> — The caller's connected inboxes (email links).\n- `EmailNamespace.message`: message(id): EmailMessage — A handle to an email message by id.\n- `EmailNamespace.recoverDraftTransfer`: recoverDraftTransfer(operationId): Promise<TransferRecoveryResponse> — Recover a draft move using its original operation UUID; never starts a new move.\n- `EmailNamespace.reminders`: reminders(options?): AsyncGenerator<{ followup: EmailFollowup; thread: EmailThread; }, any, any> — Follow-up reminders with thread handles, automatically paginated.\n- `EmailNamespace.scheduled`: scheduled(options?): AsyncGenerator<EmailDraft> — Scheduled drafts, fetched lazily in bounded pages.\n- `EmailNamespace.search`: search(query, opts?): AsyncGenerator<EmailThread> — Search email threads by subject and content.\n- `EmailNamespace.send`: send(opts): Promise<EmailMessage | undefined> — Send a new email message.\n- `EmailNamespace.unblockSender`: unblockSender(email): Promise<void> — Unblock a previously blocked sender.\n- `EmailNamespace.upsertFilter`: upsertFilter(options, inbox?): Promise<EmailFilter> — Create or replace a filter matching an address or domain.\n\n### EmailThread\nAn email thread.\nExtends `PropertiedEntity`.\nFields: access, accessLevel, createdAt, entityType, id, inboxVisible, isRead, latestInboundAt, latestNonSpamAt, latestOutboundAt, link, project, providerId, updatedAt, search\n- `EmailThread.addEventToCalendar`: addEventToCalendar(message, invitation, options?): Promise<CalendarEvent> — Add a shared event one of this thread's messages carries (a published .ics, such as one sent with Forward by email) to one of the requester's Google calendar...\n- `EmailThread.addLabel`: addLabel(label): Promise<void> — Add a label to every message in the thread.\n- `EmailThread.archive`: archive(archived?): Promise<void> — Archive the thread (or unarchive with false).\n- `EmailThread.attachments`: attachments(): Promise<EmailAttachment[]> — The attachments across this thread's first 100 messages, pre-seeded from the thread detail.\n- `EmailThread.calendarInvitations`: calendarInvitations(): Promise<{[key: string]: InvitationResolution; }> — Calendar invitations resolved from this thread's messages.\n- `EmailThread.followup`: followup(): Promise<EmailFollowupResponse> — Read follow-up state for this thread.\n- `EmailThread.markSeen`: markSeen(): Promise<void> — Mark the thread as seen.\n- `EmailThread.messages`: messages(opts?): Promise<EmailMessage[]> — The messages in this thread, pre-seeded from the list endpoint.\n- `EmailThread.moveToProject`: moveToProject(project): Promise<void> — Attach the thread to a project, or clear the project with null.\n- `EmailThread.operations`: operations(): Promise<MailboxOperation[]> — Read pending or failed mailbox changes without initiating a retry.\n- `EmailThread.participants`: participants(): Promise<ApiContactInfo[]> — Everyone on the thread (senders and recipients), deduped by email.\n- `EmailThread.removeLabel`: removeLabel(label): Promise<void> — Remove a label from every message in the thread.\n- `EmailThread.reply`: reply(opts): Promise<EmailMessage | undefined> — Send a reply within this thread.\n- `EmailThread.setFollowup`: setFollowup(command): Promise<EmailFollowup> — Set or remove a follow-up using a persisted operation id and revision.\n- `EmailThread.subject`: subject(): Promise<string | undefined> — The thread's subject, from its first message with one.\n- `EmailThread.update`: update(options): Promise<void> — Change project membership or share permissions for this thread.\n- `EmailThread.updateState`: updateState(request): Promise<void> — Update provider-neutral read, trash, spam, or star state.\n- `EmailThread.archiveMany`: static archiveMany(client, threads, archived?): Promise<EmailThread[]> — Archive many threads (or unarchive with false), sending one request per 100 threads.\n- `EmailThread.byId`: static byId(client, id): EmailThread — A handle to a thread by id.\n\nFunctions: `draftBody`\n\nTypes: `EmailAttachmentData`, `DraftOptions`, `EmailFilterOptions`, `SendEmailOptions`, `EmailMessageData`, `InboxOptions`, `ReplyEmailOptions`\n"+ },+ {+ "name": "favorites",+ "description": "Manage favorites.",+ "index": "## favorites\nManage favorites.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### FavoritesNamespace (`macro.favorites`)\nThe user's favorites: a manually ordered collection of entity references.\n- `FavoritesNamespace.add`: add(entity): Promise<Favorite> — Favorite an entity.\n- `FavoritesNamespace.list`: list(filter?): Promise<Favorite[]> — The user's favorites, in manual order.\n- `FavoritesNamespace.remove`: remove(entity): Promise<void> — Remove an entity from the user's favorites.\n- `FavoritesNamespace.reorder`: reorder(favorites): Promise<void> — Reorder the favorites: pass every favorited entity in the desired order.\n\nTypes: `FavoritesFilter`\n"+ },+ {+ "name": "foreignEntities",+ "description": "Resolve linked external entities.",+ "index": "## foreignEntities\nResolve linked external entities.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### ForeignEntity\nA read-only mapping to an entity owned by an external system (e.g.\nExtends `FavoritableEntity`.\nFields: createdAt, entityType, foreignEntityId, id, source, storedForAuthEntity, storedForId, updatedAt\n- `ForeignEntity.metadata`: metadata(): Promise<unknown> — Arbitrary source-specific metadata stored with the mapping.\n- `ForeignEntity.byId`: static byId(client, id): ForeignEntity — A handle to a foreign entity by its internal record id.\n- `ForeignEntity.fromRecord`: static fromRecord(client, record): ForeignEntity — Build a foreign entity from an already-fetched record (pre-seeded, no fetch).\n\n### ForeignEntityNamespace (`macro.foreignEntities`)\n- `ForeignEntityNamespace.byId`: byId(id): ForeignEntity — ForeignEntity\n- `ForeignEntityNamespace.bySource`: bySource(source, foreignEntityId): Promise<ForeignEntity> — Look a foreign entity up by the identifier its source system assigned.\n- `ForeignEntityNamespace.githubPullRequestFacets`: githubPullRequestFacets(): Promise<GithubPullRequestFacets> — Repositories, authors, assignees, and labels among the GitHub pull requests visible to the authenticated user and their team, each with how many pull request...\n\nTypes: `GithubPullRequestFacets`, `GithubLabelFacet`, `GithubUserFacet`\n"+ },+ {+ "name": "forms",+ "description": "Build forms and read responses.",+ "index": "## forms\nBuild forms and read responses.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### Form\nA form over a database table.\nExtends `MacroEntity`.\nFields: access, audience, closesAt, database, description, id, name, owner, status, table\n- `Form.editResponse`: editResponse(answers): Promise<FormSubmissionOutcome> — Replace the caller's answers while the form is open; gates are evaluated again.\n- `Form.myResponse`: myResponse(): Promise<MyFormResponse> — Read the caller's receipt and answers without reading anyone else's responses.\n- `Form.questions`: questions(): Promise<FormQuestion[]> — All questions in display order, skipping gates.\n- `Form.replaceLayout`: replaceLayout(sections): Promise<FormLayoutResult> — Save a replacement in the shared draft.\n- `Form.respondUrl`: respondUrl(): string — The respondent page, which public forms also expose without signing in.\n- `Form.responseSummary`: responseSummary(): Promise<FormResponseSummary> — Ledger counts and total table rows; requires edit access.\n- `Form.schema`: schema(): Promise<FormDetail> — The form's presentation and column facts; this never contains response rows.\n- `Form.sections`: sections(): Promise<FormSection[]> — Sections in display order.\n- `Form.sharePermissions`: sharePermissions(): Promise<storage.SharePermissionV2> — Read the form's sharing grants.\n- `Form.submit`: submit(answers): Promise<FormSubmissionOutcome> — Submit answers.\n- `Form.tally`: tally(): Promise<FormQuestionTally[]> — Choice and checkbox counts, available to viewers when tally visibility is enabled.\n- `Form.update`: update(updates): Promise<Form> — Update presentation or owner-controlled settings; null explicitly clears the closing time.\n- `Form.updateSharePermissions`: updateSharePermissions(request): Promise<storage.SharePermissionV2> — Update grants.\n- `Form.webUrl`: webUrl(): string — Open the form's builder in Macro.\n- `Form.byId`: static byId(client, id): Form — A form handle with details loaded on demand.\n- `Form.create`: static create(client, options): Promise<Form> — Create a form, optionally over a table of a database the caller owns.\n- `Form.list`: static list(client, database?): Promise<Form[]> — Forms shared with the caller, or live forms over a specified database.\n\n### FormReference\nA typed reference read from a form answer, without fetching the referenced entity.\nFields: entityType, id\n- `FormReference.byId`: static byId(entityType, id): FormReference — Construct a reference when its kind and identifier are known.\n\n### FormNamespace (`macro.forms`)\nForms collect answers into a database table without granting respondents table access.\n- `FormNamespace.byId`: byId(id): Form — A form handle.\n- `FormNamespace.create`: create(options): Promise<Form> — Create a form over an existing table, or create its own Responses database.\n- `FormNamespace.list`: list(database?): Promise<Form[]> — List forms shared with the caller, or forms over a database the caller can read.\n\n### FormOption\nA choice of one form question, resolved through that question's current options.\nFields: id, question\n- `FormOption.color`: color(): Promise<string | undefined> — The choice's color, when one is set.\n- `FormOption.detail`: detail(): Promise<QuestionOption> — The choice's label and color.\n- `FormOption.label`: label(): Promise<string> — The choice's label.\n- `FormOption.byId`: static byId(question, id): FormOption — A handle to a known choice of a question.\n\n### FormQuestion\nOne question, backed by a column.\nFields: form, id\n- `FormQuestion.column`: column(): Promise<DatabaseColumn> — The column behind the question.\n- `FormQuestion.detail`: detail(): Promise<FormQuestionDetail> — The question's current presentation and column facts.\n- `FormQuestion.options`: options(): Promise<FormOption[]> — Current choices, in display order.\n- `FormQuestion.title`: title(): Promise<string> — The question's current title (its column's name).\n- `FormQuestion.byId`: static byId(form, id): FormQuestion — A question handle within a form.\n\n### FormResponse\nA cached receipt for the caller's response; other respondents' receipts are private.\nFields: form, id\n- `FormResponse.answers`: answers(): Promise<FormAnswer[]> — Answers as submitted or last read.\n- `FormResponse.booking`: booking(): Promise<FormBookingStep | undefined> — The booking step unlocked by this saved response, if any.\n- `FormResponse.refresh`: refresh(): Promise<FormResponse> — Reload the caller's current receipt; requires a signed-in respondent.\n- `FormResponse.row`: row(): Promise<DatabaseRow | undefined> — The receipt's row, if any.\n- `FormResponse.status`: status(): Promise<ResponseStatus> — Whether this receipt was submitted or stopped by a gate.\n- `FormResponse.byId`: static byId(form, id, snapshot?): FormResponse — A response handle, optionally seeded with an already returned receipt.\n\n### FormSection\nAn ordered group of questions, or a gate between groups.\nFields: form, id\n- `FormSection.detail`: detail(): Promise<FormSectionDetail> — The section's current presentation.\n- `FormSection.questions`: questions(): Promise<FormQuestion[]> — Questions in display order; gates contain no questions.\n- `FormSection.title`: title(): Promise<string> — The section heading.\n- `FormSection.byId`: static byId(form, id): FormSection — A section handle within a form.\n\nTypes: `FormEntityHandle`, `FormAnswer`, `FormAnswerValue`, `FormBookingStep`, `FormBookingTarget`, `FormLayoutResult`, `FormQuestionPlacement`, `FormQuestionTally`, `FormResponseSummary`, `FormRuleTest`, `FormRules`, `FormSectionPlacement`, `FormSubmissionOutcome`, `MyFormResponse`\n"+ },+ {+ "name": "notifications",+ "description": "Read and manage notifications.",+ "index": "## notifications\nRead and manage notifications.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### NotificationNamespace (`macro.notifications`)\n- `NotificationNamespace.byId`: byId(id): Notification — A handle to a notification by id.\n- `NotificationNamespace.delete`: delete(ids): Promise<void> — Delete a batch of notifications.\n- `NotificationNamespace.disableType`: disableType(type): Promise<void> — Disable delivery of a notification type.\n- `NotificationNamespace.enableType`: enableType(type): Promise<void> — Re-enable delivery of a notification type.\n- `NotificationNamespace.list`: list(opts?): AsyncGenerator<Notification> — The viewer's notification feed, most recent first, auto-paginated.\n- `NotificationNamespace.markDone`: markDone(ids): Promise<void> — Mark a batch of notifications as done.\n- `NotificationNamespace.markSeen`: markSeen(ids): Promise<void> — Mark a batch of notifications as seen.\n- `NotificationNamespace.preferences`: preferences(): Promise<GetNotificationTypePreferencesResponse> — The viewer's notification type preferences (disabled types).\n\n### Notification\nA notification in the viewer's feed.\nExtends `MacroEntity`.\nFields: createdAt, deletedAt, done, id, metadata, owner, sender, sent, state, type, updatedAt, viewedAt\n- `Notification.delete`: delete(): Promise<void> — Delete the notification.\n- `Notification.markDone`: markDone(): Promise<void> — Mark the notification as done.\n- `Notification.markSeen`: markSeen(): Promise<void> — Mark the notification as seen.\n- `Notification.markUndone`: markUndone(): Promise<void> — Move the notification back to not-done.\n- `Notification.seen`: seen(): Promise<boolean> — Whether the notification is acknowledged (seen or done).\n- `Notification.byId`: static byId(client, id): Notification — A handle to a notification by id.\n- `Notification.from`: static from(client, data): Notification — Build a notification from a list-endpoint record (pre-seeded, no fetch).\n- `Notification.list`: static list(client, opts?): AsyncGenerator<Notification> — The viewer's notification feed, most recent first, auto-paginated.\n\nTypes: `NotificationType`\n"+ },+ {+ "name": "pins",+ "description": "Manage pinned entities.",+ "index": "## pins\nManage pinned entities.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### PinsNamespace (`macro.pins`)\nThe user's pins: items pinned to fixed slots in the home view.\n- `PinsNamespace.add`: add(entity, opts): Promise<void> — Pin an entity to a slot.\n- `PinsNamespace.list`: list(): Promise<PinnedItem[]> — The user's pinned items, with their pin indices.\n- `PinsNamespace.remove`: remove(entity): Promise<void> — Unpin an entity.\n- `PinsNamespace.reorder`: reorder(pins): Promise<void> — Reorder pins: pass each pinned item with its type and new index.\n"+ },+ {+ "name": "projects",+ "description": "Organize entities into projects.",+ "index": "## projects\nOrganize entities into projects.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### ProjectNamespace (`macro.projects`)\n- `ProjectNamespace.byId`: byId(id): Project — Project\n- `ProjectNamespace.create`: create(opts): Promise<Project> — Promise<Project>\n- `ProjectNamespace.search`: search(query, opts?): AsyncGenerator<Project> — AsyncGenerator<Project>\n\n### Project\nA Macro project: a folder-like container for documents, chats, and subprojects.\nExtends `PropertiedEntity`.\nFields: access, createdAt, entityType, id, name, parent, search\n- `Project.accessLevel`: accessLevel(): Promise<\"view\" | \"comment\" | \"edit\" | \"owner\"> — Read the caller's effective access level.\n- `Project.delete`: delete(opts?): Promise<void> — Delete the project and its contents.\n- `Project.items`: items(): Promise<Item[]> — The items (documents, chats, subprojects) directly inside this project.\n- `Project.rename`: rename(name): Promise<void> — Rename the project.\n- `Project.restore`: restore(): Promise<void> — Restore a soft-deleted project.\n- `Project.sharePermissions`: sharePermissions(): Promise<storage.SharePermissionV2> — Read this project's sharing configuration.\n- `Project.byId`: static byId(client, id): Project — A handle to a project by id.\n- `Project.create`: static create(client, opts): Promise<Project> — Create a project, optionally nested inside a parent project.\n"+ },+ {+ "name": "properties",+ "description": "Read and update entity properties.",+ "index": "## properties\nRead and update entity properties.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### PropertiesNamespace (`macro.properties`)\nProperty definitions and tag sets.\n- `PropertiesNamespace.addEntityPropertyOption`: addEntityPropertyOption(opts): Promise<void> — Add a select option to a multi-select property value on an entity.\n- `PropertiesNamespace.bulkEntityProperties`: bulkEntityProperties(request): Promise<Record<string, EntityPropertiesResponse>> — Get properties for multiple entities in a single request.\n- `PropertiesNamespace.create`: create(opts): Promise<PropertyDefinition> — Create a new custom property definition.\n- `PropertiesNamespace.definition`: definition(id): PropertyDefinition — A handle to an existing property definition by id.\n- `PropertiesNamespace.list`: list(opts?): Promise<PropertyDefinition[]> — List property definitions visible to the user, pre-hydrated with their records.\n- `PropertiesNamespace.removeEntityPropertyOption`: removeEntityPropertyOption(opts): Promise<void> — Remove a select option from a multi-select property value on an entity.\n- `PropertiesNamespace.tags`: tags(): Promise<TagSetResponse[]> — The user's tag sets: their personal set, plus their team's when on a team.\n- `PropertiesNamespace.updateEntityPropertyOptions`: updateEntityPropertyOptions(entities, change): Promise<BulkEntityOptionUpdateResult[]> — Apply one multi-select option delta to several entity handles.\n\n### PropertyDefinition\nA property definition: schema for a custom field that can be attached to entities.\nFields: id\n- `PropertyDefinition.addOption`: addOption(option): Promise<PropertyOption> — Add an option to this select-type property.\n- `PropertyDefinition.delete`: delete(): Promise<void> — Delete this property definition.\n- `PropertyDefinition.deleteOption`: deleteOption(option): Promise<void> — Delete an option from this property.\n- `PropertyDefinition.options`: options(): Promise<PropertyOption[]> — The selectable options for this definition (select-type properties).\n- `PropertyDefinition.updateOption`: updateOption(option, updates): Promise<PropertyOption> — Update an option (label, color, display order).\n- `PropertyDefinition.byId`: static byId(client, id): PropertyDefinition — A handle to an existing definition by id.\n- `PropertyDefinition.create`: static create(client, opts): Promise<PropertyDefinition> — Create a new property definition.\n- `PropertyDefinition.fromRecord`: static fromRecord(client, record): PropertyDefinition — Wrap a record already in hand (e.g.\n\n### PropertyOption\nA selectable option on a select-type property definition.\nFields: definitionId, id\n- `PropertyOption.delete`: delete(): Promise<void> — Delete this option from its property definition.\n- `PropertyOption.update`: update(updates): Promise<PropertyOption> — Update this option's label, color, or display order.\n- `PropertyOption.from`: static from(client, definitionId, record): PropertyOption — Wrap a record already in hand (e.g.\n"+ },+ {+ "name": "tasks",+ "description": "Search, create, and update tasks.",+ "index": "## tasks\nSearch, create, and update tasks.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### TaskNamespace (`macro.tasks`)\n- `TaskNamespace.byId`: byId(id): Task — A handle to a task by document id.\n- `TaskNamespace.create`: create(opts): Promise<Task> — Create a task.\n- `TaskNamespace.forPullRequest`: forPullRequest(url): Promise<Task[]> — The tasks the GitHub pull request at url references, oldest link first.\n- `TaskNamespace.search`: search(query, opts?): AsyncGenerator<Task> — Search tasks by name and content, most relevant first, auto-paginated.\n\n### Task\nA Macro task: a document with sub-type task.\nExtends `Document`.\nFields: access, branchedFrom, createdAt, deletedAt, entityType, fileType, id, name, owner, project, updatedAt, search\n- `Task.completed`: completed(): Promise<boolean | undefined> — Whether the task is completed (its Status property is \"Completed\"); undefined if the document is not a task.\n- `Task.webUrl`: webUrl(): string — The task's URL in the Macro web app.\n- `Task.byId`: static byId(client, id): Task — A handle to a task by document id.\n- `Task.create`: static create(client, opts): Promise<Task> — Create a task.\n- `Task.forPullRequest`: static forPullRequest(client, url): Promise<Task[]> — The tasks the GitHub pull request at url references (as MACRO-<id> in its text, branch, or comments), oldest link first.\n"+ },+ {+ "name": "teams",+ "description": "Manage teams and membership.",+ "index": "## teams\nManage teams and membership.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### TeamNamespace (`macro.teams`)\n- `TeamNamespace.byId`: byId(id): Team — A handle to a team by id.\n- `TeamNamespace.current`: current(): Promise<Team> — The caller's current team.\n- `TeamNamespace.list`: list(): Promise<Team[]> — The teams the caller belongs to.\n\n### Team\nA Macro team.\nExtends `MacroEntity`.\nFields: defaultLinkShare, id, name, owner, slug\n- `Team.members`: members(): Promise<TeamMembership[]> — The team's members, with their roles.\n- `Team.byId`: static byId(client, id): Team — A handle to a team by id.\n- `Team.current`: static current(client): Promise<Team> — The caller's current team.\n- `Team.list`: static list(client): Promise<Team[]> — The teams the caller belongs to.\n\nTypes: `TeamMembership`\n"+ },+ {+ "name": "users",+ "description": "Look up users and their profiles.",+ "index": "## users\nLook up users and their profiles.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### UserNamespace (`macro.users`)\n- `UserNamespace.byId`: byId(id): User — A handle to a user by id.\n- `UserNamespace.me`: me(): Promise<User> — The current authenticated user.\n- `UserNamespace.search`: search(query): Promise<User[]> — Find people in your existing Macro contacts by name or email, as in the mention picker.\n\n### User\nA Macro user.\nExtends `PropertiedEntity`.\nFields: entityType, id\n- `User.dm`: dm(): Promise<Channel> — Open (or create) your direct-message channel with this user.\n- `User.email`: email(): string | undefined — This user's email address.\n- `User.name`: name(): Promise<string | undefined> — This user's display name, fetched from the auth service (falling back to your email contacts when the Macro profile has none).\n- `User.toMention`: toMention(): MentionPart — MentionPart\n- `User.byId`: static byId(client, id): User — A handle to a user by id.\n- `User.fromName`: static fromName(client, name): User — A user handle seeded with an already loaded auth-service name.\n- `User.me`: static me(client): Promise<User> — A handle to the current authenticated user.\n"+ },+ {+ "name": "webhooks",+ "description": "Manage API webhook subscriptions.",+ "index": "## webhooks\nManage API webhook subscriptions.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### WebhooksNamespace (`macro.webhooks`)\nWebhook registrations for receiving signed entity-event deliveries.\n- `WebhooksNamespace.byId`: byId(id): Webhook — A handle to an existing webhook by id.\n- `WebhooksNamespace.create`: create(opts): Promise<Webhook> — Register a webhook.\n- `WebhooksNamespace.list`: list(): Promise<Webhook[]> — The caller's webhooks across their personal and team workspaces, newest first.\n\n### Webhook\nA webhook registration: an HTTPS endpoint Macro delivers signed entity events to.\nExtends `MacroEntity`.\nFields: createdAt, createdBy, endpointUrl, filters, id, isValid, name, namespace, signingSecret?, status, workspaceId\n- `Webhook.delete`: delete(): Promise<void> — Delete the webhook.\n- `Webhook.pause`: pause(): Promise<void> — Pause deliveries.\n- `Webhook.rename`: rename(name): Promise<void> — Rename the webhook.\n- `Webhook.resume`: resume(): Promise<void> — Resume deliveries.\n- `Webhook.scope`: scope(): Promise<WebhookScope> — Whether this webhook is owned by the caller personally (user) or by their team (team).\n- `Webhook.setFilters`: setFilters(filters): Promise<void> — Replace the webhook's delivery filters (must be non-empty).\n- `Webhook.setUrl`: setUrl(url): Promise<void> — Point the webhook at a new HTTPS endpoint URL.\n- `Webhook.update`: update(body): Promise<void> — Update the webhook.\n- `Webhook.validate`: validate(): Promise<ValidateWebhookResponse> — Send a signed validation test delivery to the endpoint and report whether it was accepted.\n- `Webhook.byId`: static byId(client, id): Webhook — A handle to a webhook by id.\n- `Webhook.create`: static create(client, opts): Promise<Webhook> — Register a webhook.\n- `Webhook.fromRecord`: static fromRecord(client, record): Webhook — Wrap an already-loaded record.\n"+ },+ {+ "name": "core",+ "description": "SDK construction, entity handles, lazy fields, search options, events and shared types.",+ "index": "## core\nSDK construction, entity handles, lazy fields, search options, events and shared types.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### FavoritableEntity\nAn entity the favorites API can address, and so can be (un)favorited.\nExtends `MacroEntity`.\nFields: entityType, id\n- `FavoritableEntity.favorite`: favorite(): Promise<FavoritableEntity<Detail>> — Add this entity to the user's favorites.\n- `FavoritableEntity.permission`: permission(): Promise<{ permission: EntityPermission; status: \"access\"; } | { status: \"no_access\"; }> — Read the caller's effective permission on this entity.\n- `FavoritableEntity.unfavorite`: unfavorite(): Promise<FavoritableEntity<Detail>> — Remove this entity from the user's favorites.\n\n### MacroEntity\nBase for entity handles: a free-to-construct (client, id) pair whose detail record loads lazily on first field access and is dropped after any mutation.\nFields: id\n- `MacroEntity.toJSON`: toJSON(): { detail?: Detail; id: string; } — { detail?: Detail; id: string; }\n\n### PropertiedEntity\nA favoritable entity that also carries user-defined properties.\nExtends `FavoritableEntity`.\nFields: entityType, id\n- `PropertiedEntity.deleteProperty`: deleteProperty(assignment): Promise<void> — Remove a property from this entity, given its [properties](#properties) entry.\n- `PropertiedEntity.properties`: properties(opts?): Promise<EntityPropertyWithDefinition[]> — The properties set on this entity, each with its definition, value, and options.\n- `PropertiedEntity.propertyReference`: propertyReference(): PropertyTargetReference — This entity's reference for bulk property operations.\n- `PropertiedEntity.setProperty`: setProperty(property, value?): Promise<void> — Set a property value on this entity, or attach the property without a value when value is omitted.\n- `PropertiedEntity.updatePropertyOptions`: updatePropertyOptions(changes): Promise<BulkUpdateEntityPropertyOptionsResponse> — Apply multi-select option deltas atomically across this entity's properties.\n\n### MessageThread\nA shared message thread with resolution and deletion operations.\nExtends `MacroEntity`.\nFields: id, parent, resolved\n- `MessageThread.delete`: delete(nonce?): Promise<void> — Delete the entire thread, including replies.\n- `MessageThread.toJSON`: toJSON(): { detail?: ThreadState; id: string; parentId: string; parentType: \"channel\" | \"document\" | \"call\" | \"crm_company\" | \"crm_contact\"; } — Serialize identity with its owning resource.\n- `MessageThread.update`: update(options): Promise<void> — Resolve the thread or detach its annotation anchor.\n- `MessageThread.byId`: static byId(client, parent, id): MessageThread — Construct a scoped thread handle.\n\n### AccessRequest\nOne access request; resolutions preserve optimistic concurrency.\nExtends `MacroEntity`.\nFields: access, id, requestedLevel, requester, revision, status\n- `AccessRequest.resolve`: resolve(grantedLevel?): Promise<void> — Approve with an access level, or decline by omitting it.\n- `AccessRequest.from`: static from(client, access, record): AccessRequest — Seed a request from a state or submission response.\n\n### EntityAccess\nAccess requests and direct grants scoped to a shareable entity.\n- `EntityAccess.cancel`: cancel(revision): Promise<void> — Cancel the caller's own request at its observed revision.\n- `EntityAccess.direct`: direct(): Promise<{ accessLevel: storage.AccessLevel; user: User; }[]> — Direct grants expressed as user handles.\n- `EntityAccess.grant`: grant(user, accessLevel?): Promise<void> — Grant direct access, or remove it by omitting the access level.\n- `EntityAccess.remove`: remove(user): Promise<void> — Remove one user's direct grant.\n- `EntityAccess.resolve`: resolve(request, resolution): Promise<storage.AccessRequest> — Resolve a request belonging to this entity at an observed revision.\n- `EntityAccess.state`: state(offset?): Promise<{ accessLevel: storage.AccessLevel | undefined; canReview: boolean; mine: AccessRequest | undefined; nextOffset: number | undefined; owner: User | undefined; pendingCount: number; requests: AccessRequest[]; supportedLevels: storage.AccessLevel[]; }> — A page of access requests, including the caller's own request and review rights.\n- `EntityAccess.submit`: submit(requestedLevel, revision?): Promise<AccessRequest> — Request access, optionally naming the revision of an earlier request.\n- `EntityAccess.toJSON`: toJSON(): { entity_id: string; entity_type: ShareEntityType; } — Serialize the entity reference without credentials.\n\n### MacroEvents (`macro.events`)\nPer-instance event receiver.\n- `MacroEvents.handle`: handle(rawBody, headers): Promise<void> — Feed a raw webhook delivery in: verifies the signature, parses, and dispatches to matching handlers.\n- `MacroEvents.listen`: listen(opts?): Promise<() => void> — Open a live Server-Sent Events stream of matching broker events.\n- `MacroEvents.on`: on<E>(event, handler): () => void — Subscribe to an event across all entities.\n- `MacroEvents.onSelfMention`: onSelfMention(handler): () => void — Subscribe to @-mentions of the authenticated caller: message.mentioned deliveries whose mentioned entity is this bot (bot auth) or this user (user auth), in ...\n- `MacroEvents.webhook`: webhook(): (req) => Promise<Response> — A Fetch-style handler to mount at your persisted webhook route.\n\n### Macro\nFields: _client, agents, agentSessions, ai, apiKeys, bots, calendar, calls, channels, crm, databases, documents, email, entityMentions, events, favorites, foreignEntities, forms, githubPullRequests, harnesses, initiatives, meetings, notifications, pins, projects, properties, routines, tasks, teams, unfurls, users, webAppUrl, webhooks, whatsapp\n- `Macro.myPrincipalId`: myPrincipalId(): Promise<string> — The authenticated caller's mentionable principal — bot|<uuid> for bot auth, macro|<email> for user auth — fetched once and cached.\n- `Macro.requestedAs`: requestedAs(user): Macro<T> — Clone of this SDK acting on behalf of user (sent as x-macro-bot-for-macro-user-id).\n\n### Lazy\nA value fetched on first access and cached thereafter.\n- `Lazy.clear`: clear(): void — Drop the cached value so the next read refetches.\n- `Lazy.get`: get(): Promise<T> — Promise<T>\n- `Lazy.peek`: peek(): T | undefined — The cached value, if already loaded — never triggers a fetch.\n\n### MacroApiError\nA non-2xx HTTP response (Macro API, or a raw fetch like presigned downloads).\nExtends `MacroError`.\nFields: data, status\n\n### MacroError\nBase for every error the SDK throws.\nExtends `Error`.\n\n### MacroNotFoundError\nThe API succeeded but the addressed entity doesn't exist in the result.\nExtends `MacroError`.\n\nFunctions: `timeline`, `entitySearch`, `sharePermissionBody`, `msg`, `toBody`, `wrapXml`, `paginate`, `unwrap`\n\nTypes: `MacroOpts`, `BotScope`, `Env`, `MacroAuth`, `ServiceName`, `TokenSource`, `HOSTS`, `WEB_APP_URLS`, `Favoritable`, `Propertied`, `PropertyOptionDelta`, `MacroEntityType`, `TimelineOptions`, `MessageParent`, `TimelineMessage`, `EntityReference`, `SearchOpts`, `SearchOn`, `SharePermissionOptions`, `ListenOptions`, `RequestActivity`, `MentionPart`, `Mentionable`, `RichMessage`, `Interpolation`, `here`, `Page`\n"+ }+ ],+ "symbols": {+ "agent-harness.AccessLevel": "# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom",+ "AgentAction": "# Type Alias: AgentAction\n\n> **AgentAction** = `AgentPromptAction` & \\{ `type`: `\"prompt\"`; \\} \\| `AgentSetModelAction` & \\{ `type`: `\"setModel\"`; \\} \\| `AgentSetConfigOptionAction` & \\{ `type`: `\"setConfigOption\"`; \\} \\| \\{ `type`: `\"compact\"`; \\} \\| \\{ `type`: `\"stop\"`; \\} \\| `AgentRespondElicitationAction` & \\{ `type`: `\"respondElicitation\"`; \\} \\| `AgentPermissionAction` & \\{ `type`: `\"respondToPermission\"`; \\}\n\nOne thing a caller wants an agent to do.",+ "AgentActionId": "# Type Alias: AgentActionId\n\n> **AgentActionId** = `string`\n\nIdentifies one accepted [`AgentAction`] end to end: returned by the\ncontrol endpoint, written as the JSON-RPC request id on the action's wire\nframe, and read back off that frame as `request_id` on the folded message\nit derives.\n\nA v7 uuid, so ids sort by mint time. Minted by the server at accept time,\nor by a client that speculated the action and named it in the control\nrequest - either way the server is the only writer of runtime-bound\nframes, so a uuid-shaped request id remains the whole ownership test. The\nmachine's own handshake request ids (`agent_session:{session}:{n}`) are\nnot uuids and stay `None`.",+ "AgentConversationDto": "# Type Alias: AgentConversationDto\n\n> **AgentConversationDto** = \\{ `available`: `boolean`; `avatarUrl?`: `string` \\| `null`; `botId`: `string`; `channelId`: `string`; `name`: `string`; `sessions`: `AgentConversationSessionDto`[]; `settingsChanged`: `boolean`; `turns`: `AgentConversationTurnDto`[]; \\}\n\nAn agent's conversation in a channel, as the person it is with sees it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-available\"></a> `available` | `boolean` | Whether the caller may currently send a new prompt. |\n| <a id=\"property-avatarurl\"></a> `avatarUrl?` | `string` \\| `null` | Optional persona avatar. |\n| <a id=\"property-botid\"></a> `botId` | `string` | Persona id (without the bot principal prefix). |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel containing the visible transcript. |\n| <a id=\"property-name\"></a> `name` | `string` | Persona's historical display name. |\n| <a id=\"property-sessions\"></a> `sessions` | `AgentConversationSessionDto`[] | The sessions the conversation has run on, oldest first. |\n| <a id=\"property-settingschanged\"></a> `settingsChanged` | `boolean` | Whether new persona settings are available to adopt explicitly. |\n| <a id=\"property-turns\"></a> `turns` | `AgentConversationTurnDto`[] | Persistent state of each accepted message and its current attempt. |",+ "AgentConversationSessionDto": "# Type Alias: AgentConversationSessionDto\n\n> **AgentConversationSessionDto** = \\{ `createdAt`: `string`; `isCurrent`: `boolean`; `sessionId`: `string`; \\}\n\nOne session a conversation has run on; every channel message stays visible.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the session began. |\n| <a id=\"property-iscurrent\"></a> `isCurrent` | `boolean` | Whether this is the current agent context. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Session whose controls and live events belong to this context. |",+ "AgentConversationTurnDto": "# Type Alias: AgentConversationTurnDto\n\n> **AgentConversationTurnDto** = \\{ `actionId`: `string`; `createdAt`: `string`; `replyMessageId?`: `string` \\| `null`; `retryable`: `boolean`; `sessionId`: `string`; `sourceMessageId`: `string`; `state`: `ConversationTurnState`; \\}\n\nExecution status without exposing the persona prompt or stored credentials.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | `string` | Current runtime attempt identity. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the source message was first accepted. |\n| <a id=\"property-replymessageid\"></a> `replyMessageId?` | `string` \\| `null` | The associated agent reply, if it has been posted. |\n| <a id=\"property-retryable\"></a> `retryable` | `boolean` | Whether Retry would be accepted now. A failed attempt is not retryable until its reply says how it ended. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Session carrying this turn. |\n| <a id=\"property-sourcemessageid\"></a> `sourceMessageId` | `string` | The user's message in the channel timeline. |\n| <a id=\"property-state\"></a> `state` | `ConversationTurnState` | Durable execution state. |",+ "AgentPermissionAction": "# Type Alias: AgentPermissionAction\n\n> **AgentPermissionAction** = \\{ `answer`: `PermissionAnswer`; `requestId`: `unknown`; \\}\n\nA user's answer to the agent's `session/request_permission`.\n\nUnlike every other action this is not a new request but the reply to one\nthe agent made, so it carries the agent's own request id rather than\nreceiving a server-minted one.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-answer\"></a> `answer` | `PermissionAnswer` | What the user decided. |\n| <a id=\"property-requestid\"></a> `requestId` | `unknown` | The agent's JSON-RPC request id, echoed verbatim from the folded permission part. A string or a number on the wire; agents mint both, and `7` does not answer `\"7\"`. |",+ "AgentPromptAction": "# Type Alias: AgentPromptAction\n\n> **AgentPromptAction** = \\{ `attachments?`: `PromptAttachment`[]; `prompt`: `string`; \\}\n\nAsk the agent to work on something.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments?` | `PromptAttachment`[] | Files the prompt refers to, in the order the user attached them. Delivered after the text as one `resource_link` block each. |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | What to tell the agent. |",+ "AgentRespondElicitationAction": "# Type Alias: AgentRespondElicitationAction\n\n> **AgentRespondElicitationAction** = `ElicitationAnswer` & \\{ `requestId`: `ElicitationRequestId`; \\}\n\nAnswer an elicitation the agent is waiting on.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `requestId` | `ElicitationRequestId` | The agent's `elicitation/create` request id - not an [`AgentActionId`], because the agent minted it. |",+ "AgentSessionChangesResponse": "# Type Alias: AgentSessionChangesResponse\n\n> **AgentSessionChangesResponse** = \\{ `attempt?`: `null` \\| `CaptureAttemptDto`; `capturing`: `boolean`; `changeset?`: `null` \\| `agent-harness.ChangesetDto`; \\}\n\nResponse body for `GET /agent-sessions/{session_id}/changes`.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attempt\"></a> `attempt?` | `null` \\| `CaptureAttemptDto` | - |\n| <a id=\"property-capturing\"></a> `capturing` | `boolean` | A capture is running right now. |\n| <a id=\"property-changeset\"></a> `changeset?` | `null` \\| `agent-harness.ChangesetDto` | - |",+ "AgentSessionLogEntryDto": "# Type Alias: AgentSessionLogEntryDto\n\n> **AgentSessionLogEntryDto** = `LogFrameDto` & \\{ `createdAt`: `string`; `id`: `string`; `userId?`: `string` \\| `null`; \\}\n\nOne entry of a session's protocol log.\n\nSerializes as `{\"userId\": ..., \"direction\": ..., \"content\": ...}` - the\nframe's own two fields, flattened in beside the attribution, which is the\nsame shape a recorded session's JSONL carries. A reader can deserialize the\n`direction`/`content` pair straight back into the fold's own log type\nrather than through a transport vocabulary of its own.\n\n`agentSessionId` is not repeated per entry: every entry in a response\nbelongs to the session named once at the top.\n\n`Deserialize` is for the wire-contract tests only - nothing server-side\ndecodes its own response type.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `createdAt` | `string` | When the log recorded the frame. The frame itself carries no time, so this comes from the log row. It is what a reader has to order these against anything else it is showing beside them - the fold derives an order among the messages of one session and nothing more. |\n| `id` | `string` | Durable transport row identity; together with `createdAt`, its order cursor. |\n| `userId?` | `string` \\| `null` | The user whose action produced the frame, absent when no user did. Only prompts carry one, and only when the frame was attributed at the time - a replayed or recorded session's are anonymous. |",+ "AgentSessionLogResponse": "# Type Alias: AgentSessionLogResponse\n\n> **AgentSessionLogResponse** = \\{ `bot`: `SessionBot`; `entries`: `AgentSessionLogEntryDto`[]; \\}\n\nResponse body for one session's raw protocol log.\n\nA wrapper rather than a bare array so that anything which is about the\nresponse rather than about a frame has somewhere to go later without\nbreaking every client.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bot\"></a> `bot` | `SessionBot` | The agent whose messages the log derives. Here because a client renders those messages and cannot otherwise work out who sent them: the sender of an agent message is this session's bot, and nothing else names it. |\n| <a id=\"property-entries\"></a> `entries` | `AgentSessionLogEntryDto`[] | Effective history in ascending `(createdAt, id)` order. The first row is the inclusive history boundary cursor: buffered rows before it are obsolete. Reconcile snapshot overlap by row ID, never content. An empty history has no boundary or overlapping rows. |",+ "AgentSessionResponse": "# Type Alias: AgentSessionResponse\n\n> **AgentSessionResponse** = \\{ `acpSessionId?`: `string` \\| `null`; `botId`: `string`; `canEdit`: `boolean`; `createdAt`: `string`; `external?`: `null` \\| `ExternalSessionResponse`; `harness`: `string`; `id`: `string`; `instructions?`: `string` \\| `null`; `isArchived`: `boolean`; `model`: `string`; `modifiedAt`: `string`; `name`: `string`; `originatingMessageId?`: `string` \\| `null`; `ownerId`: `string`; `pullRequestUrl?`: `string` \\| `null`; `repoUrl?`: `string` \\| `null`; `sandboxSize`: `SandboxSize`; `status`: `SessionStatusDto`; `taskId?`: `string` \\| `null`; `threadChannelId?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; `threadParent?`: `null` \\| `agent-harness.MessageParent`; `workspace`: `string`; \\}\n\nResponse body describing an agent session.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-acpsessionid\"></a> `acpSessionId?` | `string` \\| `null` | The ACP session id, if one exists. |\n| <a id=\"property-botid\"></a> `botId` | `string` | The bot running the agent. |\n| <a id=\"property-canedit\"></a> `canEdit` | `boolean` | Whether the caller may drive the session - prompt it, answer its questions, stop it - rather than only watch. Edit access; the creator owns the session, so a create response always says so. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the session was created. |\n| <a id=\"property-external\"></a> `external?` | `null` \\| `ExternalSessionResponse` | - |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness slug. |\n| <a id=\"property-id\"></a> `id` | `string` | The session id. |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` \\| `null` | Instructions the session's runtime works under, when any were stated at creation. Absent otherwise, so existing payloads are unchanged. |\n| <a id=\"property-isarchived\"></a> `isArchived` | `boolean` | Whether the session is archived and read-only. |\n| <a id=\"property-model\"></a> `model` | `string` | Model slug. |\n| <a id=\"property-modifiedat\"></a> `modifiedAt` | `string` | When the session was last modified. |\n| <a id=\"property-name\"></a> `name` | `string` | User-facing session name. |\n| <a id=\"property-originatingmessageid\"></a> `originatingMessageId?` | `string` \\| `null` | The exact message that invoked the bot, if any. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | The user who created and owns the session. |\n| <a id=\"property-pullrequesturl\"></a> `pullRequestUrl?` | `string` \\| `null` | The session's linked pull request. |\n| <a id=\"property-repourl\"></a> `repoUrl?` | `string` \\| `null` | The repository the session works with, when one was stated. |\n| <a id=\"property-sandboxsize\"></a> `sandboxSize` | `SandboxSize` | Compute tier of the managed sandbox. |\n| <a id=\"property-status\"></a> `status` | `SessionStatusDto` | The session's status. |\n| <a id=\"property-taskid\"></a> `taskId?` | `string` \\| `null` | The Macro task the session was linked to. |\n| <a id=\"property-threadchannelid\"></a> `threadChannelId?` | `string` \\| `null` | The channel `thread_id` lives in, when the session was spawned from a channel thread. Derived from `thread_parent`. |\n| <a id=\"property-threadid\"></a> `threadId?` | `string` \\| `null` | The root message of the thread the session was created from, if any. |\n| <a id=\"property-threadparent\"></a> `threadParent?` | `null` \\| `agent-harness.MessageParent` | - |",+ "AgentSetConfigOptionAction": "# Type Alias: AgentSetConfigOptionAction\n\n> **AgentSetConfigOptionAction** = \\{ `configId`: `string`; `value`: `string`; \\}\n\nAsk the agent to change one advertised select-style session setting.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-configid\"></a> `configId` | `string` | Opaque ACP config id advertised by the agent. |\n| <a id=\"property-value\"></a> `value` | `string` | Opaque select value advertised for that config option. |",+ "AgentSetModelAction": "# Type Alias: AgentSetModelAction\n\n> **AgentSetModelAction** = \\{ `model`: `string`; \\}\n\nAsk the agent to run on a different model from here on.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-model\"></a> `model` | `string` | The model slug the agent should switch to. |",+ "AnswerToolApprovalResponse": "# Type Alias: AnswerToolApprovalResponse\n\n> **AnswerToolApprovalResponse** = \\{ `status`: `ToolApprovalStatusDto`; \\}\n\nResponse body for answering a held tool call.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-status\"></a> `status` | `ToolApprovalStatusDto` | Where the call stands now. |",+ "agent-harness.BotId": "# Type Alias: BotId\n\n> **BotId** = `string`",+ "CaptureAttemptDto": "# Type Alias: CaptureAttemptDto\n\n> **CaptureAttemptDto** = \\{ `error?`: `string` \\| `null`; `finishedAt?`: `string` \\| `null`; `outcome?`: `null` \\| `CaptureOutcomeDto`; `startedAt`: `string`; \\}\n\nThe latest capture attempt.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Why it did not capture, in a sentence the user can read. |\n| <a id=\"property-finishedat\"></a> `finishedAt?` | `string` \\| `null` | When it ended; absent while it runs. |\n| <a id=\"property-outcome\"></a> `outcome?` | `null` \\| `CaptureOutcomeDto` | - |\n| <a id=\"property-startedat\"></a> `startedAt` | `string` | When it started. |",+ "CaptureOutcomeDto": "# Type Alias: CaptureOutcomeDto\n\n> **CaptureOutcomeDto** = `\"captured\"` \\| `\"not_ready\"` \\| `\"failed\"`\n\nHow the latest capture attempt ended, on the wire.",+ "agent-harness.ChangedFileDto": "# Type Alias: ChangedFileDto\n\n> **ChangedFileDto** = \\{ `additions`: `number`; `binary`: `boolean`; `deletions`: `number`; `kind`: `agent-harness.FileChangeKindDto`; `patchOmitted`: `boolean`; `path`: `string`; `previousPath?`: `string` \\| `null`; \\}\n\nOne changed file.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added. |\n| <a id=\"property-binary\"></a> `binary` | `boolean` | The diff carries no text for this file. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed. |\n| <a id=\"property-kind\"></a> `kind` | `agent-harness.FileChangeKindDto` | What happened to the file. |\n| <a id=\"property-patchomitted\"></a> `patchOmitted` | `boolean` | The file's hunks were left out of the patch to fit the size budget. |\n| <a id=\"property-path\"></a> `path` | `string` | The file's path after the change, or before it for a deletion. |\n| <a id=\"property-previouspath\"></a> `previousPath?` | `string` \\| `null` | Where a renamed file came from. |",+ "agent-harness.ChangesetDto": "# Type Alias: ChangesetDto\n\n> **ChangesetDto** = \\{ `additions`: `number`; `base`: `agent-harness.GitRefDto`; `capturedAt`: `string`; `deletions`: `number`; `files`: `agent-harness.ChangedFileDto`[]; `head`: `agent-harness.GitRefDto`; `id`: `string`; `patchBytes`: `number`; `repository?`: `string` \\| `null`; `source`: `agent-harness.ChangesetSourceDto`; `truncated`: `boolean`; \\}\n\nOne changeset: the files a patch touches and what happened to each.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added across all files. |\n| <a id=\"property-base\"></a> `base` | `agent-harness.GitRefDto` | The side the work started from. |\n| <a id=\"property-capturedat\"></a> `capturedAt` | `string` | When the diff was taken. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed across all files. |\n| <a id=\"property-files\"></a> `files` | `agent-harness.ChangedFileDto`[] | Every changed file, in patch order. |\n| <a id=\"property-head\"></a> `head` | `agent-harness.GitRefDto` | The side carrying the work. |\n| <a id=\"property-id\"></a> `id` | `string` | The changeset's id; a different id means different changes. |\n| <a id=\"property-patchbytes\"></a> `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| <a id=\"property-repository\"></a> `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| <a id=\"property-source\"></a> `source` | `agent-harness.ChangesetSourceDto` | Where the diff was read from. |\n| <a id=\"property-truncated\"></a> `truncated` | `boolean` | Some files' hunks were left out of the patch. |",+ "agent-harness.ChangesetSourceDto": "# Type Alias: ChangesetSourceDto\n\n> **ChangesetSourceDto** = `\"github_pull_request\"`\n\nThe source of a changeset's diff, on the wire.",+ "agent-harness.ChannelSharePermission": "# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: `agent-harness.AccessLevel`; `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | `agent-harness.AccessLevel` | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |",+ "CodingPreferencesBody": "# Type Alias: CodingPreferencesBody\n\n> **CodingPreferencesBody** = \\{ `createTasks`: `boolean`; `openPullRequests`: `boolean`; \\}\n\nRequest or response body for the caller's coding preferences.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createtasks\"></a> `createTasks` | `boolean` | Whether new coding sessions research prior work and link a Macro task. |\n| <a id=\"property-openpullrequests\"></a> `openPullRequests` | `boolean` | Whether new coding sessions deliver their work as a pull request. |",+ "ControlResponse": "# Type Alias: ControlResponse\n\n> **ControlResponse** = \\{ `actionId`: `AgentActionId`; `status`: `ControlStatusDto`; \\}\n\nResponse body for a control operation.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | `AgentActionId` | Matches `requestId` on the folded message this action derives once it dispatches, and names the queue entry until then. The caller's own `actionId` when it supplied one; a freshly minted id otherwise. |\n| <a id=\"property-status\"></a> `status` | `ControlStatusDto` | Whether the action went out or waits in the queue. |",+ "ControlStatusDto": "# Type Alias: ControlStatusDto\n\n> **ControlStatusDto** = `\"sent\"` \\| `\"queued\"`\n\nWhat accepting a control operation did with it, on the wire.",+ "ConversationTurnState": "# Type Alias: ConversationTurnState\n\n> **ConversationTurnState** = `\"queued\"` \\| `\"running\"` \\| `\"succeeded\"` \\| `\"failed\"` \\| `\"stopped\"` \\| `\"interrupted\"`\n\nThe state of one source message, retained after completion for deduplication.",+ "DecisionVia": "# Type Alias: DecisionVia\n\n> **DecisionVia** = `\"card\"` \\| `\"chat\"` \\| `\"inbox\"`\n\nSurface of a review decision.",+ "agent-harness.DocumentId": "# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.",+ "ElicitationAnswer": "# Type Alias: ElicitationAnswer\n\n> **ElicitationAnswer** = \\{ `action`: `\"accept\"`; `content?`: \\{\\[`key`: `string`\\]: `ElicitationContentValue`; \\} \\| `null`; \\} \\| \\{ `action`: `\"decline\"`; \\} \\| \\{ `action`: `\"cancel\"`; \\}\n\nWhat the user decided about an elicitation. Mirrors ACP's three actions;\nthere is no `Other` because we never originate an action we do not know.\n\n## Union Members\n\n### Type Literal\n\n\\{ `action`: `\"accept\"`; `content?`: \\{\\[`key`: `string`\\]: `ElicitationContentValue`; \\} \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action` | `\"accept\"` | - |\n| `content?` | \\{\\[`key`: `string`\\]: `ElicitationContentValue`; \\} \\| `null` | Form: the submitted values keyed by property. URL: omitted. |\n\n***\n\n### Type Literal\n\n\\{ `action`: `\"decline\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `action`: `\"cancel\"`; \\}",+ "ElicitationContentValue": "# Type Alias: ElicitationContentValue\n\n> **ElicitationContentValue** = `string` \\| `boolean` \\| `number` \\| `number` \\| `string`[]\n\nA value ACP accepts in an elicitation answer.\n\nMirrors ACP's `ElicitationContentValue` so that the contract a caller\nanswers against is the closed union ACP will accept, rather than arbitrary\nJSON narrowed on the way out. An object, a null, or a mixed array is\nrefused when the request is deserialized - where the caller learns of it -\ninstead of at send time, when the elicitation slot has already been\nreleased.",+ "ElicitationRequestId": "# Type Alias: ElicitationRequestId\n\n> **ElicitationRequestId** = `number` \\| `string`\n\nThe JSON-RPC id of an agent's `elicitation/create` request, carried whole\nso the answer echoes exactly what the agent sent.\n\nAgents pick these, not us: Claude Code counts from `0`, others use\nstrings. `null` is not a legal id for a request that expects a response,\nso it is not representable here.",+ "ExecutionActivity": "# Type Alias: ExecutionActivity\n\n> **ExecutionActivity** = \\{ `id`: `number`; `label`: `string`; `status`: `RecordedCallStatus`; \\}\n\nA bounded SDK operation observed during execution; not an authorization or write receipt.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `number` | Request identity within the execution. |\n| <a id=\"property-label\"></a> `label` | `string` | Server-selected label from the generated operation catalog. |\n| <a id=\"property-status\"></a> `status` | `RecordedCallStatus` | Observed request state; unfinished operations have unknown outcomes. |",+ "ExecutionId": "# Type Alias: ExecutionId\n\n> **ExecutionId** = `string`\n\nCaller-selected UUID persisted in tool input before execution begins.",+ "ExecutionRecord": "# Type Alias: ExecutionRecord\n\n> **ExecutionRecord** = \\{ `actingAs?`: `null` \\| `ToolActor`; `activity?`: `ExecutionActivity`[]; `activityTruncated?`: `boolean`; `calls`: `RecordedToolCall`[]; `error?`: `string` \\| `null`; `executionId`: `ExecutionId`; `result?`: `unknown`; `source`: `string`; `status`: `ExecutionStatus`; `turnId?`: `string` \\| `null`; \\}\n\nDurable source and final outcome, with historical bridge calls when present.\nThe full journal is not included in the model's tool result.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actingas\"></a> `actingAs?` | `null` \\| `ToolActor` | - |\n| <a id=\"property-activity\"></a> `activity?` | `ExecutionActivity`[] | Advisory SDK operation activity, without arguments or response contents. |\n| <a id=\"property-activitytruncated\"></a> `activityTruncated?` | `boolean` | Additional request activity was omitted at the bounded observation limit. |\n| <a id=\"property-calls\"></a> `calls` | `RecordedToolCall`[] | Historical bridge calls. Direct HTTP executions leave this empty. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Safe execution failure text. |\n| <a id=\"property-executionid\"></a> `executionId` | `ExecutionId` | Execution identity. |\n| <a id=\"property-result\"></a> `result?` | `unknown` | JSON returned by the program, if successful. |\n| <a id=\"property-source\"></a> `source` | `string` | The submitted JavaScript module. |\n| <a id=\"property-status\"></a> `status` | `ExecutionStatus` | Overall execution state. |\n| <a id=\"property-turnid\"></a> `turnId?` | `string` \\| `null` | Original turn, preventing another requester from replaying a saved result. |",+ "ExecutionStatus": "# Type Alias: ExecutionStatus\n\n> **ExecutionStatus** = `\"running\"` \\| `\"succeeded\"` \\| `\"failed\"` \\| `\"cancelled\"` \\| `\"timed_out\"`\n\nThe recorded outcome of a program.",+ "ExternalSessionResponse": "# Type Alias: ExternalSessionResponse\n\n> **ExternalSessionResponse** = \\{ `name?`: `string` \\| `null`; `provider`: `string`; `url?`: `string` \\| `null`; \\}\n\nThe provider-side identity of an externally-served session.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The provider's display name for the agent, when it reported one. |\n| <a id=\"property-provider\"></a> `provider` | `string` | Which provider serves the session, e.g. `cursor`. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | The agent's page on the provider's site, for a client to link out to. |",+ "agent-harness.FileChangeKindDto": "# Type Alias: FileChangeKindDto\n\n> **FileChangeKindDto** = `\"added\"` \\| `\"modified\"` \\| `\"deleted\"` \\| `\"renamed\"`\n\nWhat happened to a file, on the wire.",+ "agent-harness.GitRefDto": "# Type Alias: GitRefDto\n\n> **GitRefDto** = \\{ `name?`: `string` \\| `null`; `sha?`: `string` \\| `null`; \\}\n\nOne end of the compared range.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The branch name, when known. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The commit, when known. |",+ "agent-harness.LinkShare": "# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.",+ "LogDirectionDto": "# Type Alias: LogDirectionDto\n\n> **LogDirectionDto** = `\"notification\"` \\| `\"to_server\"` \\| `\"to_runtime\"`\n\nWhich way a logged frame travelled, mirroring [`Message`]'s discriminant.",+ "LogFrameDto": "# Type Alias: LogFrameDto\n\n> **LogFrameDto** = \\{ `content`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `direction`: `LogDirectionDto`; \\}\n\nThe two fields [`AgentSessionLogEntryDto`] flattens in.\n\nSchema only. Nothing constructs one: the entry serializes through\n[`Message`], and this exists so the generated clients see `direction` and\n`content` as named fields instead of an open map. A hand-built copy could\ndrift from the fold's wire format, and the point of the endpoint is that it\ncannot - so this describes that format without being able to produce it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content\"></a> `content` | \\{\\[`key`: `string`\\]: `unknown`; \\} | The protocol envelope, verbatim. Opaque here: it is Agent Runtime Protocol, whose shape belongs to the fold rather than this endpoint. |\n| <a id=\"property-direction\"></a> `direction` | `LogDirectionDto` | Which way the frame travelled. |",+ "agent-harness.MessageParent": "# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: `agent-harness.DocumentId`; `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`: `agent-harness.DocumentId`; `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `agent-harness.DocumentId` | 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\"` | - |",+ "PermissionAnswer": "# Type Alias: PermissionAnswer\n\n> **PermissionAnswer** = \\{ `kind`: `\"selected\"`; `optionId`: `string`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\}\n\nThe decision carried by an [`AgentPermissionAction`].\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"selected\"`; `optionId`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"selected\"` | - |\n| `optionId` | `string` | The chosen option's id, as the agent listed it. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}",+ "PromptAttachment": "# Type Alias: PromptAttachment\n\n> **PromptAttachment** = \\{ `mimeType?`: `string` \\| `null`; `name`: `string`; `size?`: `number` \\| `null`; `uri`: `string`; \\}\n\nA file the prompt refers to, by where the agent can fetch it.\n\nMirrors ACP's `resource_link` content block, which every agent must\naccept: bytes never ride the prompt, only a URI (a static file service URL\nin practice) with enough metadata for a client to render a chip and for\nthe agent to decide whether to fetch it. Keeping the wire shape ACP-native\nmeans the harness translates without resolving anything, and the fold\nreads the same fields back off the logged frame.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mimetype\"></a> `mimeType?` | `string` \\| `null` | The file's media type, when known. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, typically the original file name. |\n| <a id=\"property-size\"></a> `size?` | `number` \\| `null` | Size in bytes, when known. |\n| <a id=\"property-uri\"></a> `uri` | `string` | Where the agent can fetch the file. |",+ "PullRequestLinkSource": "# Type Alias: PullRequestLinkSource\n\n> **PullRequestLinkSource** = `\"agent\"` \\| `\"user\"`\n\nWho associated a pull request with a session.",+ "QueuedActionDto": "# Type Alias: QueuedActionDto\n\n> **QueuedActionDto** = \\{ `actionId`: `AgentActionId`; `actorUserId?`: `string` \\| `null`; `attachments?`: `PromptAttachment`[]; `createdAt`: `string`; `kind`: `string`; `prompt?`: `string` \\| `null`; \\}\n\nOne action waiting in a session's queue.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actionid\"></a> `actionId` | `AgentActionId` | The id the action was accepted under. |\n| <a id=\"property-actoruserid\"></a> `actorUserId?` | `string` \\| `null` | The user who queued it, absent when a bot acted on nobody's behalf. |\n| <a id=\"property-attachments\"></a> `attachments?` | `PromptAttachment`[] | Files the prompt refers to, for prompts only. Kept through an edit, which replaces the text alone. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was accepted. |\n| <a id=\"property-kind\"></a> `kind` | `string` | What kind of action waits - `prompt` or `compact`; only turn-occupying actions are ever queued. |\n| <a id=\"property-prompt\"></a> `prompt?` | `string` \\| `null` | The prompt's raw text, present for prompts only. What an edit replaces. |",+ "RecordedCallStatus": "# Type Alias: RecordedCallStatus\n\n> **RecordedCallStatus** = `\"running\"` \\| `\"completed\"` \\| `\"failed\"` \\| `\"unknown\"`\n\nA dispatch result; unfinished work is never reported as success.",+ "RecordedToolCall": "# Type Alias: RecordedToolCall\n\n> **RecordedToolCall** = \\{ `error?`: `string` \\| `null`; `id`: `string`; `input`: `unknown`; `name`: `string`; `output?`: `unknown`; `outputOmitted`: `boolean`; `status`: `RecordedCallStatus`; \\}\n\nA real inner call, recorded by trusted dispatch for the existing renderers.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Safe tool failure, if one was returned. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable, execution-scoped component identity. |\n| <a id=\"property-input\"></a> `input` | `unknown` | Arguments passed to the actual tool. |\n| <a id=\"property-name\"></a> `name` | `string` | Canonical Macro tool name from the allowlisted registry. |\n| <a id=\"property-output\"></a> `output?` | `unknown` | Original tool output, retained independently of the program's return value. |\n| <a id=\"property-outputomitted\"></a> `outputOmitted` | `boolean` | Whether the response was omitted to keep the durable journal bounded. |\n| <a id=\"property-status\"></a> `status` | `RecordedCallStatus` | A started call that never replied has an unknown side-effect outcome. |",+ "ReviewDecisionContext": "# Type Alias: ReviewDecisionContext\n\n> **ReviewDecisionContext** = \\{ `by`: `string`; `items`: `string`[]; `revision`: `number`; `via`: `DecisionVia`; \\}\n\nFacts about the most recent account-holder decision.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-by\"></a> `by` | `string` | Authenticated account holder. |\n| <a id=\"property-items\"></a> `items` | `string`[] | Items selected by this decision. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision claimed by this batch, used in notification deduplication. |\n| <a id=\"property-via\"></a> `via` | `DecisionVia` | Entry surface. |",+ "ReviewId": "# Type Alias: ReviewId\n\n> **ReviewId** = `string`\n\nPersisted review identity.",+ "agent-harness.ReviewItem": "# Type Alias: ReviewItem\n\n> **ReviewItem** = \\{ `draft`: `unknown`; `edited?`: `boolean`; `error?`: `string` \\| `null`; `id`: `string`; `result?`: `unknown`; `status`: `ReviewItemStatus`; \\}\n\nOne editable item and its durable outcome.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `unknown` | Validated arguments for the existing composer/action. |\n| <a id=\"property-edited\"></a> `edited?` | `boolean` | Whether the account holder edited this draft before deciding. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Failure or uncertainty description. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable item identity across stack navigation and edits. |\n| <a id=\"property-result\"></a> `result?` | `unknown` | Actual backend response, never a model assertion. |\n| <a id=\"property-status\"></a> `status` | `ReviewItemStatus` | Current outcome. |",+ "ReviewItemStatus": "# Type Alias: ReviewItemStatus\n\n> **ReviewItemStatus** = `\"pending\"` \\| `\"submitting\"` \\| `\"completed\"` \\| `\"dismissed\"` \\| `\"unknown\"`\n\nReview item state, shared with notification consumers.",+ "ReviewKind": "# Type Alias: ReviewKind\n\n> **ReviewKind** = `\"email\"` \\| `\"calendar\"` \\| `\"import\"`\n\nThe component and action used to finish a review.",+ "ReviewRecord": "# Type Alias: ReviewRecord\n\n> **ReviewRecord** = \\{ `actingUser?`: `string` \\| `null`; `decision?`: `null` \\| `ReviewDecisionContext`; `executionId?`: `null` \\| `ExecutionId`; `id`: `ReviewId`; `items`: `agent-harness.ReviewItem`[]; `kind`: `ReviewKind`; `presentedAt?`: `number` \\| `null`; `revision`: `number`; `sessionId`: `string`; `title`: `string`; `updatedAt`: `number`; \\}\n\nFull UI record, fetched outside the model context.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actinguser\"></a> `actingUser?` | `string` \\| `null` | Account whose email/calendar the drafts use; historical records use the session owner. |\n| <a id=\"property-decision\"></a> `decision?` | `null` \\| `ReviewDecisionContext` | - |\n| <a id=\"property-executionid\"></a> `executionId?` | `null` \\| `ExecutionId` | - |\n| <a id=\"property-id\"></a> `id` | `ReviewId` | Review identity. |\n| <a id=\"property-items\"></a> `items` | `agent-harness.ReviewItem`[] | Drafts and per-item outcomes. |\n| <a id=\"property-kind\"></a> `kind` | `ReviewKind` | Component kind. |\n| <a id=\"property-presentedat\"></a> `presentedAt?` | `number` \\| `null` | Durable presentation acknowledgment, separate from user decisions. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Compare-and-swap revision for edits and submissions. |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | Owning session. |\n| <a id=\"property-title\"></a> `title` | `string` | Stack label. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `number` | Milliseconds since epoch of the last state change. |",+ "SandboxSize": "# Type Alias: SandboxSize\n\n> **SandboxSize** = `\"small\"` \\| `\"default\"` \\| `\"large\"`\n\nNamed compute tier for a managed sandbox.\n\nThe API and database store the name. CPU, RAM, and disk live in\n`crates/agent_harness/sandbox_sizes.json`.",+ "SessionBot": "# Type Alias: SessionBot\n\n> **SessionBot** = \\{ `avatarUrl?`: `string` \\| `null`; `handle`: `string`; `id`: `agent-harness.BotId`; `name`: `string`; \\}\n\nThe agent behind a session, as much of it as rendering a message needs.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatarurl\"></a> `avatarUrl?` | `string` \\| `null` | Avatar, when it has one. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable `@` handle, without a leading `@`. |\n| <a id=\"property-id\"></a> `id` | `agent-harness.BotId` | The bot's id. A message it sent has `\"bot\\|{id}\"` as its sender. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |",+ "SessionStatusDto": "# Type Alias: SessionStatusDto\n\n> **SessionStatusDto** = \\{ `kind`: `\"no_messages\"`; \\} \\| \\{ `event`: `string`; `kind`: `\"event\"`; \\} \\| \\{ `kind`: `\"disconnected\"`; \\}\n\nTransport representation of a session's status, mirroring\n[`SessionStatus`].\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"no_messages\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `event`: `string`; `kind`: `\"event\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `event` | `string` | The wire name of the system event, e.g. `acp_ready`. |\n| `kind` | `\"event\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}",+ "agent-harness.SharePermissionV2": "# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: `agent-harness.ChannelSharePermission`[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| `agent-harness.LinkShare`; `linkShareAccessLevel?`: `null` \\| `agent-harness.AccessLevel`; `owner`: `string`; `teamShareAccessLevel?`: `null` \\| `agent-harness.AccessLevel`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | `agent-harness.ChannelSharePermission`[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| `agent-harness.LinkShare` | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| `agent-harness.AccessLevel` | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| `agent-harness.AccessLevel` | - |",+ "ToolActor": "# Type Alias: ToolActor\n\n> **ToolActor** = `\"requester\"` \\| `\"owner\"`\n\nWhich authenticated participant's access a tool call requests.",+ "ToolApprovalAnswerDto": "# Type Alias: ToolApprovalAnswerDto\n\n> **ToolApprovalAnswerDto** = `\"approve\"` \\| `\"approve_and_remember\"` \\| `\"deny\"` \\| `\"cancel\"`\n\nHow a person answers a held tool call.",+ "ToolApprovalStatusDto": "# Type Alias: ToolApprovalStatusDto\n\n> **ToolApprovalStatusDto** = `\"pending\"` \\| `\"approved\"` \\| `\"denied\"` \\| `\"cancelled\"` \\| `\"expired\"`\n\nWhere a held tool call stands once answered.",+ "EmailConnectionProviders": "# Type Alias: EmailConnectionProviders\n\n> **EmailConnectionProviders** = \\{ `gmail`: `boolean`; `outlook`: `boolean`; `outlook_admin_consent_url?`: `string` \\| `null`; \\}\n\nActual deployment availability for the provider selector.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-gmail\"></a> `gmail` | `boolean` | - |\n| <a id=\"property-outlook\"></a> `outlook` | `boolean` | - |\n| <a id=\"property-outlook_admin_consent_url\"></a> `outlook_admin_consent_url?` | `string` \\| `null` | Where a Microsoft 365 administrator approves Macro for their whole directory. Present when Outlook is configured and the request named an `original_url` for the administrator's browser to return to. |",+ "Language": "# Type Alias: Language\n\n> **Language** = `\"en\"` \\| `\"de\"` \\| `\"fr\"` \\| `\"es\"` \\| `\"it\"` \\| `\"nl\"` \\| `\"pt-PT\"` \\| `\"sv\"` \\| `\"da\"` \\| `\"nb\"` \\| `\"fi\"` \\| `\"pl\"` \\| `\"ru\"` \\| `\"ja\"` \\| `\"ko\"` \\| `\"zh-Hans\"` \\| `\"zh-Hant\"` \\| `\"hi\"` \\| `\"id\"` \\| `\"vi\"` \\| `\"th\"`\n\nA language the app's interface is available in, as a BCP 47 tag.",+ "auth.LinkShare": "# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.",+ "MacroApiTokenResponse": "# Type Alias: MacroApiTokenResponse\n\n> **MacroApiTokenResponse** = \\{ `macro_api_token`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-macro_api_token\"></a> `macro_api_token` | `string` | The newly created macro_api_token |",+ "auth.Team": "# Type Alias: Team\n\n> **Team** = \\{ `allow_non_admin_invites`: `boolean`; `auto_join_domain?`: `string` \\| `null`; `crm_enabled`: `boolean`; `default_link_share?`: `null` \\| `auth.LinkShare`; `enterprise`: `boolean`; `id`: `string`; `language?`: `null` \\| `Language`; `name`: `string`; `owner_id`: `string`; `slug`: `string`; \\}\n\nThe Team struct\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_non_admin_invites\"></a> `allow_non_admin_invites` | `boolean` | Whether non-admin members may invite users to the team. Defaults to true; admins can turn it off so only admins/owners may invite. |\n| <a id=\"property-auto_join_domain\"></a> `auto_join_domain?` | `string` \\| `null` | The email domain new users are automatically joined to this team with, when automatic domain joining is enabled (None otherwise). |\n| <a id=\"property-crm_enabled\"></a> `crm_enabled` | `boolean` | Whether the CRM is enabled for this team (from `team_crm_settings`; `false` when no row exists). |\n| <a id=\"property-default_link_share\"></a> `default_link_share?` | `null` \\| `auth.LinkShare` | - |\n| <a id=\"property-enterprise\"></a> `enterprise` | `boolean` | Whether this team is on an enterprise license. Enterprise teams are billed out-of-band; membership changes skip all Stripe subscription bookkeeping (no seat counts, no subscription backfill, no paying check). |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-language\"></a> `language?` | `null` \\| `Language` | - |\n| <a id=\"property-name\"></a> `name` | `string` | - |\n| <a id=\"property-owner_id\"></a> `owner_id` | `string` | - |\n| <a id=\"property-slug\"></a> `slug` | `string` | - |",+ "auth.TeamRole": "# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom",+ "UserName": "# Type Alias: UserName\n\n> **UserName** = \\{ `first_name?`: `string` \\| `null`; `id`: `string`; `last_name?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-first_name\"></a> `first_name?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-last_name\"></a> `last_name?` | `string` \\| `null` |",+ "calendar.AttendeeResponseStatus": "# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.",+ "calendar.CalendarAttendee": "# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: `calendar.AttendeeResponseStatus`; \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | `calendar.AttendeeResponseStatus` | RSVP state. |",+ "CalendarAttendeeInputBody": "# Type Alias: CalendarAttendeeInputBody\n\n> **CalendarAttendeeInputBody** = \\{ `email`: `string`; `isOptional?`: `boolean`; \\}\n\nAn attendee supplied to a calendar mutation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Attendee email address. |\n| <a id=\"property-isoptional\"></a> `isOptional?` | `boolean` | Whether attendance is optional. |",+ "CalendarCapabilities": "# Type Alias: CalendarCapabilities\n\n> **CalendarCapabilities** = \\{ `autoDecline`: `boolean`; `conferenceProvider?`: `null` \\| `calendar.ConferenceProvider`; `customRecurrence`: `boolean`; `emailReminders`: `boolean`; `guestPolicy`: `boolean`; `removeConference`: `boolean`; `resetRsvp`: `boolean`; \\}\n\nActual provider capabilities used by calendar editors.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodecline\"></a> `autoDecline` | `boolean` | Whether event-level automatic invitation declines are supported. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| `calendar.ConferenceProvider` | - |\n| <a id=\"property-customrecurrence\"></a> `customRecurrence` | `boolean` | Whether arbitrary RFC 5545 recurrence properties can be written. |\n| <a id=\"property-emailreminders\"></a> `emailReminders` | `boolean` | Whether email reminders are delivered by the provider or Macro. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `boolean` | Whether the organizer can set what guests may do. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | Whether an existing conference can be detached. |\n| <a id=\"property-resetrsvp\"></a> `resetRsvp` | `boolean` | Whether an attendee can reset their RSVP to unanswered. |",+ "CalendarDeletionScopeParam": "# Type Alias: CalendarDeletionScopeParam\n\n> **CalendarDeletionScopeParam** = `\"all\"` \\| `\"this_event\"` \\| `\"this_and_following\"`\n\nHow much of a recurring series a deletion removes.",+ "calendar.CalendarEvent": "# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: `calendar.CalendarAttendee`[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| `calendar.ConferenceProvider`; `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `calendar.EventType`; `guestPolicy`: `calendar.GuestPolicy`; `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: `calendar.EventReminders`; `sequence`: `number`; `sources?`: `calendar.CalendarEventSourceContent`[]; `status`: `calendar.EventStatus`; `time`: `calendar.EventTime`; `title`: `string`; `transparency`: `calendar.EventTransparency`; `updatedAt`: `string`; `viewerCan`: `calendar.ViewerCapabilities`; `visibility`: `calendar.EventVisibility`; \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `calendar.CalendarAttendee`[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| `calendar.ConferenceProvider` | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | `calendar.EventType` | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `calendar.GuestPolicy` | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | `calendar.EventReminders` | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | `calendar.CalendarEventSourceContent`[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | `calendar.EventStatus` | Event status. |\n| <a id=\"property-time\"></a> `time` | `calendar.EventTime` | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | `calendar.EventTransparency` | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `calendar.ViewerCapabilities` | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | `calendar.EventVisibility` | Event visibility. |",+ "calendar.CalendarEventSourceContent": "# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: `calendar.EventType`; `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: `calendar.EventReminders`; `title`: `string`; `transparency`: `calendar.EventTransparency`; `visibility`: `calendar.EventVisibility`; \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | `calendar.EventType` | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | `calendar.EventReminders` | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | `calendar.EventTransparency` | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | `calendar.EventVisibility` | Event visibility. |",+ "CalendarGuestInputBody": "# Type Alias: CalendarGuestInputBody\n\n> **CalendarGuestInputBody** = \\{ `email`: `string`; `optional?`: `boolean`; \\}\n\nA guest added to an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Guest email address. |\n| <a id=\"property-optional\"></a> `optional?` | `boolean` | Whether attendance is optional. |",+ "CalendarJoinRequestStatus": "# Type Alias: CalendarJoinRequestStatus\n\n> **CalendarJoinRequestStatus** = `\"pending\"` \\| `\"accepted\"` \\| `\"declined\"`\n\nLifecycle of a request to be added as a guest of a shared event.",+ "CalendarMentionEvent": "# Type Alias: CalendarMentionEvent\n\n> **CalendarMentionEvent** = \\{ `attendeeCount`: `number`; `canRequestToJoin?`: `boolean`; `description?`: `string` \\| `null`; `isRecurring`: `boolean`; `joinRequestStatus?`: `null` \\| `CalendarJoinRequestStatus`; `location?`: `string` \\| `null`; `occurrenceKey?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `time`: `calendar.EventTime`; `title`: `string`; `updatedAt`: `string`; `viewerCopy?`: `null` \\| `CalendarMentionViewerCopy`; `viewerEventId?`: `string` \\| `null`; \\}\n\nMeeting-level fields shown in a calendar event mention preview, taken from\nthe requester's own projection of the meeting, or — when the requester has\nnone — from the mentioned projection a channel they belong to was given.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Number of attendees on the previewed copy. |\n| <a id=\"property-canrequesttojoin\"></a> `canRequestToJoin?` | `boolean` | For a channel-shared preview, whether the person who shared it can add the requester as a guest. Always false for the requester's own copy. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Provider description, plain text or HTML, truncated for the preview. Clients must sanitize it before rendering. |\n| <a id=\"property-isrecurring\"></a> `isRecurring` | `boolean` | Whether the event repeats. |\n| <a id=\"property-joinrequeststatus\"></a> `joinRequestStatus?` | `null` \\| `CalendarJoinRequestStatus` | - |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location label, when set. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey?` | `string` \\| `null` | Key of the previewed instance, absent when no occurrence is materialized. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-time\"></a> `time` | `calendar.EventTime` | Time of the previewed instance: the requested occurrence when it exists, else the next upcoming one, else the latest past one, else the series start. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time of the previewed copy. |\n| <a id=\"property-viewercopy\"></a> `viewerCopy?` | `null` \\| `CalendarMentionViewerCopy` | - |\n| <a id=\"property-viewereventid\"></a> `viewerEventId?` | `string` \\| `null` | The requester's own event entity for the mentioned meeting. Differs from the mentioned id when the mention came from another attendee. Absent when the meeting is on none of the requester's calendars and they see it only because it was shared with one of their channels: that preview is read-only and there is no event of theirs to open. |",+ "CalendarMentionViewerCopy": "# Type Alias: CalendarMentionViewerCopy\n\n> **CalendarMentionViewerCopy** = `\"snapshot\"` \\| `\"invitation\"` \\| `\"event\"`\n\nHow a requester holds a mentioned meeting on their own calendar, decided\nby the copy's own inbox, the way viewer capabilities decide organizer and\nguest.",+ "CalendarProvider": "# Type Alias: CalendarProvider\n\n> **CalendarProvider** = `\"google\"` \\| `\"outlook\"`\n\nProvider selected from the persisted calendar account and email binding.",+ "CalendarReplacementView": "# Type Alias: CalendarReplacementView\n\n> **CalendarReplacementView** = \\{ `attendeeCount`: `number`; `completedSteps`: `number`; `event?`: `null` \\| `calendar.CalendarEvent`; `isSeries`: `boolean`; `operationId`: `string`; `providerUrl?`: `string` \\| `null`; `removeConference`: `boolean`; `replacementUrl?`: `string` \\| `null`; `status`: `ReplacementStatus`; `time`: `calendar.EventTime`; `title`: `string`; `totalSteps`: `number`; \\}\n\nSafe preview and recovery response; never exposes the opaque provider snapshot.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Guest count for cancellation and reinvitation confirmation. |\n| <a id=\"property-completedsteps\"></a> `completedSteps` | `number` | Number of completed provider steps. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| `calendar.CalendarEvent` | - |\n| <a id=\"property-isseries\"></a> `isSeries` | `boolean` | Entire recurring series, including exceptions, is replaced. |\n| <a id=\"property-operationid\"></a> `operationId` | `string` | Use this identity when confirming or checking progress. |\n| <a id=\"property-providerurl\"></a> `providerUrl?` | `string` \\| `null` | Original event for manual review. |\n| <a id=\"property-removeconference\"></a> `removeConference` | `boolean` | The provider conference is removed. |\n| <a id=\"property-replacementurl\"></a> `replacementUrl?` | `string` \\| `null` | New provider event, when creation was confirmed. |\n| <a id=\"property-status\"></a> `status` | `ReplacementStatus` | Current durable state. |\n| <a id=\"property-time\"></a> `time` | `calendar.EventTime` | Frozen time. |\n| <a id=\"property-title\"></a> `title` | `string` | Frozen title. |\n| <a id=\"property-totalsteps\"></a> `totalSteps` | `number` | Number of provider steps in this operation. |",+ "CalendarRsvpScopeParam": "# Type Alias: CalendarRsvpScopeParam\n\n> **CalendarRsvpScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an RSVP applies to.\n\nUnlike deletion there is no this-and-following variant: the provider\ncannot express a forward-scoped response, so offering one would be a\npromise sync could not keep.",+ "CalendarUpdateScopeParam": "# Type Alias: CalendarUpdateScopeParam\n\n> **CalendarUpdateScopeParam** = `\"all\"` \\| `\"this_event\"`\n\nHow much of a recurring series an update applies to.\n\nLike RSVPs there is no this-and-following variant: the provider cannot\nexpress a forward-scoped edit as one write, and emulating it (truncate\nthe series, insert an edited clone) is non-atomic and re-invites the\nattendees of the clone. Compose it from a this-and-following deletion\nand a create when that shape is wanted.",+ "ConferenceChange": "# Type Alias: ConferenceChange\n\n> **ConferenceChange** = `\"provider_default\"` \\| `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"none\"`\n\nA requested change to an event's conferencing. Omitting the field leaves\nthe existing conference untouched; only these values change it.",+ "calendar.ConferenceProvider": "# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.",+ "DocumentNoteLink": "# Type Alias: DocumentNoteLink\n\n> **DocumentNoteLink** = \\{ `canViewMeeting`: `boolean`; `documentName`: `string`; `event?`: `null` \\| `CalendarMentionEvent`; `eventId`: `string`; `eventTitle`: `string`; `occurrenceKey`: `string`; `team?`: `null` \\| `NoteTeam`; `teamEvent?`: `null` \\| `TeamCalendarItem`; \\}\n\nA visible meeting link, or an owner's durable grant they can no longer open.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canviewmeeting\"></a> `canViewMeeting` | `boolean` | Whether the reader may resolve this exact meeting's details right now. |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | Current name of the markdown document. |\n| <a id=\"property-event\"></a> `event?` | `null` \\| `CalendarMentionEvent` | - |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Linked calendar copy. |\n| <a id=\"property-eventtitle\"></a> `eventTitle` | `string` | Current title, or a safe placeholder when meeting details are unavailable. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Original occurrence start, or `single` for a one-time meeting. |\n| <a id=\"property-team\"></a> `team?` | `null` \\| `NoteTeam` | - |\n| <a id=\"property-teamevent\"></a> `teamEvent?` | `null` \\| `TeamCalendarItem` | - |",+ "calendar.EventReminderOverride": "# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |",+ "calendar.EventReminders": "# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: `calendar.EventReminderOverride`[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | `calendar.EventReminderOverride`[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |",+ "calendar.EventStatus": "# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.",+ "calendar.EventTime": "# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |",+ "calendar.EventTransparency": "# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.",+ "calendar.EventType": "# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.",+ "calendar.EventVisibility": "# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.",+ "calendar.GuestPolicy": "# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |",+ "MeetingNote": "# Type Alias: MeetingNote\n\n> **MeetingNote** = \\{ `canManage`: `boolean`; `documentId`: `string`; `name`: `string`; `team?`: `null` \\| `NoteTeam`; \\}\n\nOne linked document and the extra access this link grants.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canmanage\"></a> `canManage` | `boolean` | Whether this viewer can change this document's sharing. |\n| <a id=\"property-documentid\"></a> `documentId` | `string` | Markdown document identity. |\n| <a id=\"property-name\"></a> `name` | `string` | Current document name. |\n| <a id=\"property-team\"></a> `team?` | `null` \\| `NoteTeam` | - |",+ "NoteTeam": "# Type Alias: NoteTeam\n\n> **NoteTeam** = \\{ `id`: `string`; `name`: `string`; \\}\n\nAn additional team audience, separate from the meeting's audience.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Team identity. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |",+ "OutOfOfficeAutoDeclineMode": "# Type Alias: OutOfOfficeAutoDeclineMode\n\n> **OutOfOfficeAutoDeclineMode** = `\"decline_none\"` \\| `\"decline_all_conflicting_invitations\"` \\| `\"decline_only_new_conflicting_invitations\"`\n\nHow an out-of-office event responds to conflicting invitations, mirroring\nGoogle's `autoDeclineMode`.",+ "OutOfOfficeProperties": "# Type Alias: OutOfOfficeProperties\n\n> **OutOfOfficeProperties** = \\{ `autoDeclineMode?`: `OutOfOfficeAutoDeclineMode`; `declineMessage?`: `string` \\| `null`; \\}\n\nThe extra properties Google requires on an out-of-office event, mirroring\nits `outOfOfficeProperties` block. Their presence on a draft or patch is\nwhat marks the mutation as out-of-office.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodeclinemode\"></a> `autoDeclineMode?` | `OutOfOfficeAutoDeclineMode` | How conflicting invitations are handled while the user is out. |\n| <a id=\"property-declinemessage\"></a> `declineMessage?` | `string` \\| `null` | Message returned to organizers whose invitations are auto-declined. |",+ "ReplacementStatus": "# Type Alias: ReplacementStatus\n\n> **ReplacementStatus** = `\"needs_confirmation\"` \\| `\"in_progress\"` \\| `\"complete\"`\n\nUser-visible workflow state.",+ "TeamCalendarContent": "# Type Alias: TeamCalendarContent\n\n> **TeamCalendarContent** = \\{ `kind`: `\"busy\"`; \\} \\| \\{ `details`: `calendar.TeamCalendarDetails`; `kind`: `\"details\"`; \\}\n\nDisjoint busy/detail shapes prevent new event fields leaking by default.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"busy\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `details`: `calendar.TeamCalendarDetails`; `kind`: `\"details\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `details` | `calendar.TeamCalendarDetails` | Detail projection. |\n| `kind` | `\"details\"` | - |",+ "calendar.TeamCalendarDetails": "# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: `calendar.CalendarAttendee`[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `calendar.CalendarAttendee`[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |",+ "TeamCalendarItem": "# Type Alias: TeamCalendarItem\n\n> **TeamCalendarItem** = `TeamCalendarContent` & \\{ `contributesToAvailability`: `boolean`; `id`: `string`; `ownerId`: `string`; `time`: `calendar.EventTime`; \\}\n\nA read-only team calendar occurrence.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `contributesToAvailability` | `boolean` | Whether this occurrence blocks the sharer's personal availability. A subscribed calendar's block can be shared without occupying the sharer. |\n| `id` | `string` | Stable opaque projection identity, never an event entity id. |\n| `ownerId` | `string` | The person sharing access to the source. |\n| `time` | `calendar.EventTime` | Occurrence interval. |",+ "calendar.TeamCalendarSharing": "# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.",+ "calendar.ViewerCapabilities": "# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |",+ "VisibleCalendar": "# Type Alias: VisibleCalendar\n\n> **VisibleCalendar** = \\{ `capabilities`: `CalendarCapabilities`; `color?`: `string` \\| `null`; `defaultReminders`: `calendar.EventReminderOverride`[]; `emailAddress`: `string`; `emailLinkId`: `string`; `id`: `string`; `isPrimary`: `boolean`; `isSubscription`: `boolean`; `isWritable`: `boolean`; `name`: `string`; `provider`: `CalendarProvider`; `syncError?`: `string` \\| `null`; \\}\n\nA calendar visible to a requester, listed for pickers and filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-capabilities\"></a> `capabilities` | `CalendarCapabilities` | Provider features available on this actual calendar. |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | Provider color. |\n| <a id=\"property-defaultreminders\"></a> `defaultReminders` | `calendar.EventReminderOverride`[] | Default reminders applied to events that keep `useDefault`. |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | Connected inbox address, for grouping in multi-inbox pickers. |\n| <a id=\"property-emaillinkid\"></a> `emailLinkId` | `string` | Connected inbox that syncs this calendar. |\n| <a id=\"property-id\"></a> `id` | `string` | Persisted Macro calendar identifier. |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `boolean` | Whether this is its account's primary calendar. |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `boolean` | Whether this is one of Google's shared system calendars (holidays, birthdays) the account subscribes to rather than one a person maintains. |\n| <a id=\"property-iswritable\"></a> `isWritable` | `boolean` | Whether the grant can create and modify events on this calendar. |\n| <a id=\"property-name\"></a> `name` | `string` | Provider display name. |\n| <a id=\"property-provider\"></a> `provider` | `CalendarProvider` | Calendar provider, for display and reconnect routing. |\n| <a id=\"property-syncerror\"></a> `syncError?` | `string` \\| `null` | A persistent sync failure isolated to this calendar, surfaced so the settings row can badge it. `None` while the calendar is syncing normally or a failure has not yet crossed the persistence threshold. |",+ "AiFeature": "# Type Alias: AiFeature\n\n> **AiFeature** = `\"chat\"` \\| `\"memory\"` \\| `\"automation\"` \\| `\"dynamic_completions_api\"` \\| `\"chat_rename\"` \\| `\"call_summary\"` \\| `\"channel_bot\"` \\| `\"ai_projection\"` \\| `\"ai_editing\"` \\| `\"import\"` \\| `\"agent_session\"` \\| `\"agent_repository_choice\"` \\| `\"dictation\"` \\| `\"image_generation\"`\n\nEverything we use AI for. The wire / DB form of each variant is its\n`snake_case` name.",+ "CompletionUsage": "# Type Alias: CompletionUsage\n\n> **CompletionUsage** = \\{ `cost`: `Usage`; `entity?`: `string` \\| `null`; `feature`: `AiFeature`; `user`: `cognition.MacroUserIdStr`; \\}\n\nUser and feature attribution for one invocation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cost\"></a> `cost` | `Usage` | Measured usage and resolved cost. |\n| <a id=\"property-entity\"></a> `entity?` | `string` \\| `null` | Related entity, if any. |\n| <a id=\"property-feature\"></a> `feature` | `AiFeature` | Feature that performed the invocation. |\n| <a id=\"property-user\"></a> `user` | `cognition.MacroUserIdStr` | User the invocation was performed for. |",+ "DatabaseChange": "# Type Alias: DatabaseChange\n\n> **DatabaseChange** = \\{ `kind`: `\"none\"`; \\} \\| \\{ `kind`: `\"schema\"`; \\} \\| \\{ `count`: `number`; `kind`: `\"rows\"`; \\}\n\nWhat a successful tool call committed to the user's databases.",+ "DecisionRequest": "# Type Alias: DecisionRequest\n\n> **DecisionRequest** = \\{ `input`: `unknown`; `questions`: \\{\\[`key`: `string`\\]: `string`; \\}; \\}\n\nNamed yes/no questions to evaluate against one arbitrary JSON input.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-input\"></a> `input` | `unknown` | Data to classify. The entire compact request must fit in 64 KiB. |\n| <a id=\"property-questions\"></a> `questions` | \\{\\[`key`: `string`\\]: `string`; \\} | One to 32 questions, each at most 500 characters. Keys must be nonblank and at most 80 UTF-8 bytes; they are preserved in the response. |",+ "DecisionResponse": "# Type Alias: DecisionResponse\n\n> **DecisionResponse** = \\{ `probabilities`: \\{\\[`key`: `string`\\]: `number`; \\}; \\}\n\nThe probability of yes for every requested question, under its original key.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-probabilities\"></a> `probabilities` | \\{\\[`key`: `string`\\]: `number`; \\} | Probabilities between zero and one, inclusive; not boolean decisions. |",+ "DynamicSchema": "# Type Alias: DynamicSchema\n\n> **DynamicSchema** = \\{ `description?`: `string` \\| `null`; `name`: `string`; `schema`: `unknown`; \\}\n\nSchema definition for dynamic structured completions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description of what the schema represents. |\n| <a id=\"property-name\"></a> `name` | `string` | Name of the schema. |\n| <a id=\"property-schema\"></a> `schema` | `unknown` | The JSON schema to validate against. |",+ "FeatureUsage": "# Type Alias: FeatureUsage\n\n> **FeatureUsage** = \\{ `entries`: `CompletionUsage`[]; `feature`: `AiFeature`; `total`: `number`; \\}\n\nRecorded invocations and total for one feature.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entries\"></a> `entries` | `CompletionUsage`[] | Recorded invocations. |\n| <a id=\"property-feature\"></a> `feature` | `AiFeature` | Feature attribution. |\n| <a id=\"property-total\"></a> `total` | `number` | Total cost (USD). |",+ "cognition.MacroUserIdStr": "# Type Alias: MacroUserIdStr\n\n> **MacroUserIdStr** = `string`",+ "Price": "# Type Alias: Price\n\n> **Price** = \\{ `price_per_audio_minute?`: `number` \\| `null`; `price_per_million_cache_read?`: `number` \\| `null`; `price_per_million_cache_write?`: `number` \\| `null`; `price_per_million_in`: `number`; `price_per_million_out`: `number`; `total`: `number`; \\}\n\nRates applied to an invocation and its resolved dollar cost.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-price_per_audio_minute\"></a> `price_per_audio_minute?` | `number` \\| `null` | Price per audio minute (USD), absent for token billing. |\n| <a id=\"property-price_per_million_cache_read\"></a> `price_per_million_cache_read?` | `number` \\| `null` | Price per million cache-read input tokens (USD), absent when the model has no published rate and for audio billing. |\n| <a id=\"property-price_per_million_cache_write\"></a> `price_per_million_cache_write?` | `number` \\| `null` | Price per million cache-write input tokens (USD), absent when the model has no published rate and for audio billing. |\n| <a id=\"property-price_per_million_in\"></a> `price_per_million_in` | `number` | Price per million input tokens (USD); zero for audio billing. |\n| <a id=\"property-price_per_million_out\"></a> `price_per_million_out` | `number` | Price per million output tokens (USD); zero for audio billing. |\n| <a id=\"property-total\"></a> `total` | `number` | Total cost (USD). |",+ "StructuredCompletionOutcome": "# Type Alias: StructuredCompletionOutcome\n\n> **StructuredCompletionOutcome** = \\{ `result`: `unknown`; `status`: `\"completed\"`; \\} \\| \\{ `reason`: `string`; `status`: `\"interrupted\"`; \\}",+ "StructuredCompletionRequest": "# Type Alias: StructuredCompletionRequest\n\n> **StructuredCompletionRequest** = \\{ `additional_instructions?`: `string` \\| `null`; `model`: `string`; `output_schema`: `DynamicSchema`; `prompt`: `string`; `toolset?`: `ToolSet`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-additional_instructions\"></a> `additional_instructions?` | `string` \\| `null` |\n| <a id=\"property-model\"></a> `model` | `string` |\n| <a id=\"property-output_schema\"></a> `output_schema` | `DynamicSchema` |\n| <a id=\"property-prompt\"></a> `prompt` | `string` |\n| <a id=\"property-toolset\"></a> `toolset?` | `ToolSet` |",+ "StructuredCompletionResponse": "# Type Alias: StructuredCompletionResponse\n\n> **StructuredCompletionResponse** = \\{ `outcome`: `StructuredCompletionOutcome`; `toolActivity`: `StructuredToolActivity`[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-outcome\"></a> `outcome` | `StructuredCompletionOutcome` | - |\n| <a id=\"property-toolactivity\"></a> `toolActivity` | `StructuredToolActivity`[] | Actual completed tools, independent of the model's claims. |",+ "StructuredToolActivity": "# Type Alias: StructuredToolActivity\n\n> **StructuredToolActivity** = \\{ `name`: `string`; `outcome`: `ToolOutcome`; \\}\n\nOne tool call the agent finished, and what it did.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-outcome\"></a> `outcome` | `ToolOutcome` |",+ "ToolOutcome": "# Type Alias: ToolOutcome\n\n> **ToolOutcome** = \\{ `changes`: `DatabaseChange`; `status`: `\"succeeded\"`; \\} \\| \\{ `status`: `\"failed\"`; \\}",+ "ToolSet": "# Type Alias: ToolSet\n\n> **ToolSet** = \\{ `type`: `\"all\"`; \\} \\| \\{ `type`: `\"none\"`; \\} \\| \\{ `type`: `\"databases\"`; \\} \\| \\{ `type`: `\"databases_read_only\"`; \\}",+ "Usage": "# Type Alias: Usage\n\n> **Usage** = \\{ `audio_seconds?`: `number` \\| `null`; `cache_read_input_tokens`: `number`; `cache_write_input_tokens`: `number`; `created_at`: `string`; `input_tokens`: `number`; `model`: `string`; `output_tokens`: `number`; `price?`: `null` \\| `Price`; \\}\n\nMeasured usage for one invocation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audio_seconds\"></a> `audio_seconds?` | `number` \\| `null` | Audio duration in seconds, absent for token billing. |\n| <a id=\"property-cache_read_input_tokens\"></a> `cache_read_input_tokens` | `number` | Input tokens read from a prompt cache; zero for audio billing. |\n| <a id=\"property-cache_write_input_tokens\"></a> `cache_write_input_tokens` | `number` | Input tokens written to a prompt cache; zero for audio billing. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Recording timestamp. |\n| <a id=\"property-input_tokens\"></a> `input_tokens` | `number` | Uncached input tokens; zero for audio billing. |\n| <a id=\"property-model\"></a> `model` | `string` | Provider model identifier. |\n| <a id=\"property-output_tokens\"></a> `output_tokens` | `number` | Output tokens; zero for audio billing. |\n| <a id=\"property-price\"></a> `price?` | `null` \\| `Price` | - |",+ "UsageRequest": "# Type Alias: UsageRequest\n\n> **UsageRequest** = \\{ `features?`: `AiFeature`[]; `from?`: `string` \\| `null`; `include_users?`: `string`[]; `until?`: `string` \\| `null`; \\}\n\nRequest body for [`get_usage_handler`].\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-features\"></a> `features?` | `AiFeature`[] | If empty, include all features. |\n| <a id=\"property-from\"></a> `from?` | `string` \\| `null` | Inclusive lower bound on `created_at`. |\n| <a id=\"property-include_users\"></a> `include_users?` | `string`[] | If empty, include all users. |\n| <a id=\"property-until\"></a> `until?` | `string` \\| `null` | Exclusive upper bound on `created_at`. |",+ "UsageSummary": "# Type Alias: UsageSummary\n\n> **UsageSummary** = \\{ `entries`: `FeatureUsage`[]; `total`: `number`; \\}\n\nPer-feature breakdown and grand total.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entries\"></a> `entries` | `FeatureUsage`[] | Per-feature usage. |\n| <a id=\"property-total\"></a> `total` | `number` | Grand total (USD). |",+ "email.AccessLevel": "# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom",+ "ApiAttachmentDraft": "# Type Alias: ApiAttachmentDraft\n\n> **ApiAttachmentDraft** = \\{ `content_id?`: `string` \\| `null`; `content_type`: `string`; `draft_id`: `string`; `file_name`: `string`; `id`: `string`; `is_inline`: `boolean`; `s3_key`: `string`; `sha`: `string`; `size`: `number`; `upload_pending`: `boolean`; \\}\n\nAPI representation of a draft attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-content_type\"></a> `content_type` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-file_name\"></a> `file_name` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_inline\"></a> `is_inline` | `boolean` |\n| <a id=\"property-s3_key\"></a> `s3_key` | `string` |\n| <a id=\"property-sha\"></a> `sha` | `string` |\n| <a id=\"property-size\"></a> `size` | `number` |\n| <a id=\"property-upload_pending\"></a> `upload_pending` | `boolean` |",+ "ApiAttachmentForwarded": "# Type Alias: ApiAttachmentForwarded\n\n> **ApiAttachmentForwarded** = \\{ `attachment_id`: `string`; `draft_id`: `string`; `filename?`: `string` \\| `null`; `message_provider_id`: `string`; `mime_type?`: `string` \\| `null`; `provider_attachment_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a forwarded attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment_id\"></a> `attachment_id` | `string` |\n| <a id=\"property-draft_id\"></a> `draft_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-message_provider_id\"></a> `message_provider_id` | `string` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_attachment_id\"></a> `provider_attachment_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |",+ "ApiContactInfo": "# Type Alias: ApiContactInfo\n\n> **ApiContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nAPI representation of a contact (sender or recipient).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |",+ "ApiDraftContactInfo": "# Type Alias: ApiDraftContactInfo\n\n> **ApiDraftContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\nContact info for draft request/response (backward-compatible with MessageToSend shape).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Email address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | Profile photo URL. |",+ "ApiDraftInput": "# Type Alias: ApiDraftInput\n\n> **ApiDraftInput** = \\{ `bcc?`: `ApiDraftContactInfo`[] \\| `null`; `body_html?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `cc?`: `ApiDraftContactInfo`[] \\| `null`; `db_id?`: `string` \\| `null`; `draft_generation?`: `number`; `headers_json?`: `null` \\| `Value`; `include_signature?`: `boolean` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `subject`: `string`; `thread_db_id?`: `string` \\| `null`; `to?`: `ApiDraftContactInfo`[] \\| `null`; \\}\n\nThe draft input matching the current `MessageToSend` JSON shape for backward compat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | `ApiDraftContactInfo`[] \\| `null` | Bcc recipients. |\n| <a id=\"property-body_html\"></a> `body_html?` | `string` \\| `null` | HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage. |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | Macro body format. |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | Plain text body. |\n| <a id=\"property-cc\"></a> `cc?` | `ApiDraftContactInfo`[] \\| `null` | Cc recipients. |\n| <a id=\"property-db_id\"></a> `db_id?` | `string` \\| `null` | Existing message DB ID (for updating an existing draft). |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation from the last loaded draft; legacy clients begin at zero. |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `null` \\| `Value` | - |\n| <a id=\"property-include_signature\"></a> `include_signature?` | `boolean` \\| `null` | Per-message override for whether to include the signature on send: `Some(false)` to exclude (user dismissed it). Omit to use the inbox's default policy. Ignored for drafts. |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | Provider message ID. |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | Provider thread ID. |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | ID of the message this draft is replying to. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id?` | `string` \\| `null` | Thread DB ID. |\n| <a id=\"property-to\"></a> `to?` | `ApiDraftContactInfo`[] \\| `null` | To recipients. |",+ "ApiEmailFilter": "# Type Alias: ApiEmailFilter\n\n> **ApiEmailFilter** = \\{ `created_at`: `string`; `email_address?`: `string` \\| `null`; `email_domain?`: `string` \\| `null`; `id`: `string`; `is_important`: `boolean`; \\}\n\nA single email filter in API responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-email_address\"></a> `email_address?` | `string` \\| `null` |\n| <a id=\"property-email_domain\"></a> `email_domain?` | `string` \\| `null` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-is_important\"></a> `is_important` | `boolean` |",+ "ApiLabel": "# Type Alias: ApiLabel\n\n> **ApiLabel** = \\{ `createdAt`: `string`; `id`: `string`; `labelListVisibility`: `ApiLabelListVisibility`; `linkId`: `string`; `messageListVisibility`: `ApiMessageListVisibility`; `name`: `string`; `providerLabelId`: `string`; `type`: `ApiLabelType`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | `ApiLabelListVisibility` |\n| <a id=\"property-linkid\"></a> `linkId` | `string` |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | `ApiMessageListVisibility` |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-providerlabelid\"></a> `providerLabelId` | `string` |\n| <a id=\"property-type\"></a> `type` | `ApiLabelType` |",+ "ApiLabelListVisibility": "# Type Alias: ApiLabelListVisibility\n\n> **ApiLabelListVisibility** = `\"LabelShow\"` \\| `\"LabelShowIfUnread\"` \\| `\"LabelHide\"`",+ "ApiLabelType": "# Type Alias: ApiLabelType\n\n> **ApiLabelType** = `\"System\"` \\| `\"User\"`",+ "ApiMessage": "# Type Alias: ApiMessage\n\n> **ApiMessage** = \\{ `attachments`: `ApiMessageAttachment`[]; `attachments_draft`: `ApiAttachmentDraft`[]; `attachments_forwarded`: `ApiAttachmentForwarded`[]; `bcc`: `ApiContactInfo`[]; `body_html_sanitized?`: `string` \\| `null`; `body_macro?`: `string` \\| `null`; `body_replyless?`: `string` \\| `null`; `body_text?`: `string` \\| `null`; `calendar_invitations?`: `CalendarInvitation`[]; `cc`: `ApiContactInfo`[]; `created_at`: `string`; `db_id`: `string`; `draft_generation`: `number`; `from?`: `null` \\| `ApiContactInfo`; `global_id?`: `string` \\| `null`; `has_attachments`: `boolean`; `headers_json?`: `unknown`; `internal_date_ts?`: `string` \\| `null`; `is_draft`: `boolean`; `is_read`: `boolean`; `is_sent`: `boolean`; `is_starred`: `boolean`; `labels`: `ApiMessageLabel`[]; `link_id`: `string`; `operation_status?`: `null` \\| `ApiMessageOperation`; `provider_history_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `provider_thread_id?`: `string` \\| `null`; `replying_to_id?`: `string` \\| `null`; `scheduled_send_status?`: `null` \\| `ScheduledSendStatus`; `scheduled_send_time?`: `string` \\| `null`; `sent_at?`: `string` \\| `null`; `size_estimate?`: `number` \\| `null`; `snippet?`: `string` \\| `null`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: `ApiContactInfo`[]; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `ApiMessageAttachment`[] | - |\n| <a id=\"property-attachments_draft\"></a> `attachments_draft` | `ApiAttachmentDraft`[] | - |\n| <a id=\"property-attachments_forwarded\"></a> `attachments_forwarded` | `ApiAttachmentForwarded`[] | - |\n| <a id=\"property-bcc\"></a> `bcc` | `ApiContactInfo`[] | - |\n| <a id=\"property-body_html_sanitized\"></a> `body_html_sanitized?` | `string` \\| `null` | - |\n| <a id=\"property-body_macro\"></a> `body_macro?` | `string` \\| `null` | - |\n| <a id=\"property-body_replyless\"></a> `body_replyless?` | `string` \\| `null` | - |\n| <a id=\"property-body_text\"></a> `body_text?` | `string` \\| `null` | - |\n| <a id=\"property-calendar_invitations\"></a> `calendar_invitations?` | `CalendarInvitation`[] | - |\n| <a id=\"property-cc\"></a> `cc` | `ApiContactInfo`[] | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation` | `number` | Draft edit generation; changes at send and cancellation boundaries. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| `ApiContactInfo` | - |\n| <a id=\"property-global_id\"></a> `global_id?` | `string` \\| `null` | - |\n| <a id=\"property-has_attachments\"></a> `has_attachments` | `boolean` | - |\n| <a id=\"property-headers_json\"></a> `headers_json?` | `unknown` | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-is_draft\"></a> `is_draft` | `boolean` | - |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` | - |\n| <a id=\"property-is_sent\"></a> `is_sent` | `boolean` | - |\n| <a id=\"property-is_starred\"></a> `is_starred` | `boolean` | - |\n| <a id=\"property-labels\"></a> `labels` | `ApiMessageLabel`[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-operation_status\"></a> `operation_status?` | `null` \\| `ApiMessageOperation` | - |\n| <a id=\"property-provider_history_id\"></a> `provider_history_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-provider_thread_id\"></a> `provider_thread_id?` | `string` \\| `null` | - |\n| <a id=\"property-replying_to_id\"></a> `replying_to_id?` | `string` \\| `null` | - |\n| <a id=\"property-scheduled_send_status\"></a> `scheduled_send_status?` | `null` \\| `ScheduledSendStatus` | - |\n| <a id=\"property-scheduled_send_time\"></a> `scheduled_send_time?` | `string` \\| `null` | - |\n| <a id=\"property-sent_at\"></a> `sent_at?` | `string` \\| `null` | - |\n| <a id=\"property-size_estimate\"></a> `size_estimate?` | `number` \\| `null` | - |\n| <a id=\"property-snippet\"></a> `snippet?` | `string` \\| `null` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | `ApiContactInfo`[] | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |",+ "ApiMessageAttachment": "# Type Alias: ApiMessageAttachment\n\n> **ApiMessageAttachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAPI representation of a provider attachment on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` |",+ "ApiMessageLabel": "# Type Alias: ApiMessageLabel\n\n> **ApiMessageLabel** = \\{ `created_at`: `string`; `id?`: `string` \\| `null`; `label_list_visibility?`: `null` \\| `ApiLabelListVisibility`; `link_id`: `string`; `message_list_visibility?`: `null` \\| `ApiMessageListVisibility`; `name?`: `string` \\| `null`; `provider_label_id`: `string`; `type_?`: `null` \\| `ApiLabelType`; \\}\n\nAPI representation of a label on a message.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` |\n| <a id=\"property-label_list_visibility\"></a> `label_list_visibility?` | `null` \\| `ApiLabelListVisibility` |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-message_list_visibility\"></a> `message_list_visibility?` | `null` \\| `ApiMessageListVisibility` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-provider_label_id\"></a> `provider_label_id` | `string` |\n| <a id=\"property-type_\"></a> `type_?` | `null` \\| `ApiLabelType` |",+ "ApiMessageListVisibility": "# Type Alias: ApiMessageListVisibility\n\n> **ApiMessageListVisibility** = `\"Show\"` \\| `\"Hide\"`",+ "ApiMessageOperation": "# Type Alias: ApiMessageOperation\n\n> **ApiMessageOperation** = \\{ `issue?`: `null` \\| `ApiMessageOperationIssue`; `remote_version?`: `string` \\| `null`; `revision`: `string`; `state`: `ApiMessageOperationState`; \\}\n\nVersions are opaque decimal strings so clients never truncate an i64.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-issue\"></a> `issue?` | `null` \\| `ApiMessageOperationIssue` |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |\n| <a id=\"property-state\"></a> `state` | `ApiMessageOperationState` |",+ "ApiMessageOperationIssue": "# Type Alias: ApiMessageOperationIssue\n\n> **ApiMessageOperationIssue** = `\"ACCEPTING_REMOTE\"` \\| `\"DRAFT_CONFLICT\"` \\| `\"CREATION_UNKNOWN\"` \\| `\"ATTACHMENT_UNKNOWN\"` \\| `\"SEND_UNKNOWN\"` \\| `\"SEND_REJECTED\"` \\| `\"ACCESS_REVOKED\"` \\| `\"INVALID_CONTENT\"` \\| `\"MOVE_PENDING\"` \\| `\"MOVE_CONFLICT\"` \\| `\"MOVE_SOURCE_SENT\"` \\| `\"MOVE_REAUTHORIZATION\"` \\| `\"MOVE_ORIGINAL_REMAINS\"`\n\nProvider-neutral state exposed to clients.",+ "ApiMessageOperationState": "# Type Alias: ApiMessageOperationState\n\n> **ApiMessageOperationState** = `\"PENDING\"` \\| `\"SYNCHRONIZED\"` \\| `\"CONFLICT\"` \\| `\"UNCERTAIN\"` \\| `\"SUBMITTING\"` \\| `\"CONFIRMING\"` \\| `\"SENT\"` \\| `\"DELETED\"` \\| `\"CANCELLED\"` \\| `\"FAILED\"`\n\nProvider-neutral state exposed to clients.",+ "ApiMessageResolutionAction": "# Type Alias: ApiMessageResolutionAction\n\n> **ApiMessageResolutionAction** = `\"keep_local\"` \\| `\"use_provider\"` \\| `\"recheck\"` \\| `\"retry_send\"` \\| `\"keep_original\"`\n\nA deliberate resolution of a particular observed operation version.",+ "ApiSortMethod": "# Type Alias: ApiSortMethod\n\n> **ApiSortMethod** = `\"viewed_at\"` \\| `\"updated_at\"` \\| `\"created_at\"` \\| `\"viewed_updated\"`\n\ncommon types of sorts based on timestamps",+ "ApiThread": "# Type Alias: ApiThread\n\n> **ApiThread** = \\{ `access_level`: `email.AccessLevel`; `created_at`: `string`; `db_id`: `string`; `inbox_visible`: `boolean`; `is_read`: `boolean`; `latest_inbound_message_ts?`: `string` \\| `null`; `latest_non_spam_message_ts?`: `string` \\| `null`; `latest_outbound_message_ts?`: `string` \\| `null`; `link_id`: `string`; `messages`: `ApiMessage`[]; `project_id?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `updated_at`: `string`; \\}\n\nAPI representation of a fully assembled email thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | `email.AccessLevel` |\n| <a id=\"property-created_at\"></a> `created_at` | `string` |\n| <a id=\"property-db_id\"></a> `db_id` | `string` |\n| <a id=\"property-inbox_visible\"></a> `inbox_visible` | `boolean` |\n| <a id=\"property-is_read\"></a> `is_read` | `boolean` |\n| <a id=\"property-latest_inbound_message_ts\"></a> `latest_inbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_non_spam_message_ts\"></a> `latest_non_spam_message_ts?` | `string` \\| `null` |\n| <a id=\"property-latest_outbound_message_ts\"></a> `latest_outbound_message_ts?` | `string` \\| `null` |\n| <a id=\"property-link_id\"></a> `link_id` | `string` |\n| <a id=\"property-messages\"></a> `messages` | `ApiMessage`[] |\n| <a id=\"property-project_id\"></a> `project_id?` | `string` \\| `null` |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |",+ "Attachment": "# Type Alias: Attachment\n\n> **Attachment** = \\{ `content_id?`: `string` \\| `null`; `data_url?`: `string` \\| `null`; `db_id`: `string`; `filename?`: `string` \\| `null`; `mime_type?`: `string` \\| `null`; `provider_id?`: `string` \\| `null`; `reference_url?`: `string` \\| `null`; `sfs_id?`: `string` \\| `null`; `size_bytes?`: `number` \\| `null`; \\}\n\nAttachments of a message, as sent to us by the provider.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-content_id\"></a> `content_id?` | `string` \\| `null` | - |\n| <a id=\"property-data_url\"></a> `data_url?` | `string` \\| `null` | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-filename\"></a> `filename?` | `string` \\| `null` | - |\n| <a id=\"property-mime_type\"></a> `mime_type?` | `string` \\| `null` | - |\n| <a id=\"property-provider_id\"></a> `provider_id?` | `string` \\| `null` | - |\n| <a id=\"property-reference_url\"></a> `reference_url?` | `string` \\| `null` | Cloud reference: open this provider page instead of downloading bytes. |\n| <a id=\"property-sfs_id\"></a> `sfs_id?` | `string` \\| `null` | - |\n| <a id=\"property-size_bytes\"></a> `size_bytes?` | `number` \\| `null` | - |",+ "email.AttendeeResponseStatus": "# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.",+ "email.CalendarAttendee": "# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: `email.AttendeeResponseStatus`; \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | `email.AttendeeResponseStatus` | RSVP state. |",+ "email.CalendarEvent": "# Type Alias: CalendarEvent\n\n> **CalendarEvent** = \\{ `attendees`: `email.CalendarAttendee`[]; `calendarId?`: `string` \\| `null`; `conferenceProvider?`: `null` \\| `email.ConferenceProvider`; `conferenceUrl?`: `string` \\| `null`; `createdAt`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `email.EventType`; `guestPolicy`: `email.GuestPolicy`; `icalUid`: `string`; `id`: `string`; `isReadOnly`: `boolean`; `isSnapshot`: `boolean`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `ownerId`: `string`; `recurrenceLines`: `string`[]; `reminders?`: `email.EventReminders`; `sequence`: `number`; `sources?`: `email.CalendarEventSourceContent`[]; `status`: `email.EventStatus`; `time`: `email.EventTime`; `title`: `string`; `transparency`: `email.EventTransparency`; `updatedAt`: `string`; `viewerCan`: `email.ViewerCapabilities`; `visibility`: `email.EventVisibility`; \\}\n\nA stable, first-class Macro calendar event entity.\n\nContent fields hold the canonical source's values: the account's primary\ncalendar copy when one is synced, else the freshest remaining copy.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `email.CalendarAttendee`[] | Attendees, keyed by email during persistence. |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` | Calendar the canonical source belongs to, when known. Absent only in projections stored before calendars were attributed. |\n| <a id=\"property-conferenceprovider\"></a> `conferenceProvider?` | `null` \\| `email.ConferenceProvider` | - |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Direct join URL when known. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Entity creation time. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. Distinct from the organizer when someone writes onto a calendar they do not own. Omitted from stored projections when unknown so events ingested before this field still compare equal. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType?` | `email.EventType` | Provider event type. Skipped when it is the regular type so projections stored before event types were modeled still compare equal. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `email.GuestPolicy` | What the organizer lets guests do: the canonical copy's values, or Google's defaults for an event synced before the policy was modeled. |\n| <a id=\"property-icaluid\"></a> `icalUid` | `string` | RFC 5545 UID used to reconcile provider and email sources. |\n| <a id=\"property-id\"></a> `id` | `string` | Macro entity identifier. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the canonical source's calendar prohibits editing it. |\n| <a id=\"property-issnapshot\"></a> `isSnapshot` | `boolean` | Whether this is a snapshot of a meeting shared with the owner, which Macro added to their calendar as a private copy: the meeting's changes never reach it, and nothing done to it reaches the meeting. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer email. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who owns this event entity. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | `email.EventReminders` | Per-user reminder configuration. Skipped when it is the provider default so projections stored before reminders were modeled still compare equal. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Provider/iCalendar sequence number. |\n| <a id=\"property-sources\"></a> `sources?` | `email.CalendarEventSourceContent`[] | Content of every active copy of this event, canonical first: the primary calendar's copy, then the freshest. A client picks the copy whose calendar it is showing and falls back to the first. Populated only on the read path, so stored projections omit it. |\n| <a id=\"property-status\"></a> `status` | `email.EventStatus` | Event status. |\n| <a id=\"property-time\"></a> `time` | `email.EventTime` | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | `email.EventTransparency` | Availability behavior. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Entity update time. |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `email.ViewerCapabilities` | What the viewing requester may do with the event. Resolved only on the read path, alongside each attendee's `is_self`; nothing when no viewer is known. Source projections never store it. |\n| <a id=\"property-visibility\"></a> `visibility` | `email.EventVisibility` | Event visibility. |",+ "email.CalendarEventSourceContent": "# Type Alias: CalendarEventSourceContent\n\n> **CalendarEventSourceContent** = \\{ `calendarId`: `string`; `creatorEmail?`: `string` \\| `null`; `creatorName?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType`: `email.EventType`; `isReadOnly`: `boolean`; `location?`: `string` \\| `null`; `reminders`: `email.EventReminders`; `title`: `string`; `transparency`: `email.EventTransparency`; `visibility`: `email.EventVisibility`; \\}\n\nThe content one provider copy of an event carries.\n\nGoogle keeps these fields per calendar copy: a shared calendar's copy of a\nmember's event can have its own title, type, reminders, and access role.\nThe entity holds its canonical source's values. Every other copy's values\nare read from here so a client can show the copy that belongs to the\ncalendar being viewed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` | Calendar this copy lives on. |\n| <a id=\"property-creatoremail\"></a> `creatorEmail?` | `string` \\| `null` | Provider-reported creator email. |\n| <a id=\"property-creatorname\"></a> `creatorName?` | `string` \\| `null` | Provider-reported creator display name. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | `email.EventType` | Provider event type. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the calendar's access role prohibits editing this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Optional physical or virtual location label. |\n| <a id=\"property-reminders\"></a> `reminders` | `email.EventReminders` | Reminder configuration of this copy. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency` | `email.EventTransparency` | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility` | `email.EventVisibility` | Event visibility. |",+ "CalendarInvitation": "# Type Alias: CalendarInvitation\n\n> **CalendarInvitation** = \\{ `attendees`: `InvitationParticipant`[]; `comment?`: `string` \\| `null`; `conference_url?`: `string` \\| `null`; `description?`: `string` \\| `null`; `dtstamp?`: `string` \\| `null`; `end?`: `null` \\| `InvitationDateTime`; `id`: `string`; `last_modified?`: `string` \\| `null`; `location?`: `string` \\| `null`; `method`: `InvitationMethod`; `organizer?`: `null` \\| `InvitationParticipant`; `recurrence?`: `string`[] \\| `null`; `recurrence_id?`: `null` \\| `InvitationDateTime`; `recurrence_id_raw?`: `string` \\| `null`; `sequence`: `number`; `start?`: `null` \\| `InvitationDateTime`; `status?`: `string` \\| `null`; `title?`: `string` \\| `null`; `uid`: `string`; \\}\n\nDisplay snapshot of one meaningful VEVENT, owned by the email domain.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `InvitationParticipant`[] | Historical attendee identities and participation metadata. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Reply or counter-proposal comment. |\n| <a id=\"property-conference_url\"></a> `conference_url?` | `string` \\| `null` | Validated HTTP(S) conferencing URL; never fetched during rendering. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Plaintext description, retaining passwords and dial-in instructions. |\n| <a id=\"property-dtstamp\"></a> `dtstamp?` | `string` \\| `null` | Scheduling timestamp in its original spelling. |\n| <a id=\"property-end\"></a> `end?` | `null` \\| `InvitationDateTime` | - |\n| <a id=\"property-id\"></a> `id` | `string` | Content-derived component identity, stable across repeated extraction. |\n| <a id=\"property-last_modified\"></a> `last_modified?` | `string` \\| `null` | Last modification timestamp in its original spelling. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Plaintext event location. |\n| <a id=\"property-method\"></a> `method` | `InvitationMethod` | Original scheduling method. |\n| <a id=\"property-organizer\"></a> `organizer?` | `null` \\| `InvitationParticipant` | - |\n| <a id=\"property-recurrence\"></a> `recurrence?` | `string`[] \\| `null` | Raw `RRULE`, `RDATE` and `EXDATE` lines, empty for a single event. `None` on snapshots saved before recurrence was recorded, where a series cannot be told apart from a single event. |\n| <a id=\"property-recurrence_id\"></a> `recurrence_id?` | `null` \\| `InvitationDateTime` | - |\n| <a id=\"property-recurrence_id_raw\"></a> `recurrence_id_raw?` | `string` \\| `null` | Original recurrence identifier spelling and parameters. |\n| <a id=\"property-sequence\"></a> `sequence` | `number` | Scheduling revision, distinct from delivery order. |\n| <a id=\"property-start\"></a> `start?` | `null` \\| `InvitationDateTime` | - |\n| <a id=\"property-status\"></a> `status?` | `string` \\| `null` | Original event status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Event summary. |\n| <a id=\"property-uid\"></a> `uid` | `string` | iCalendar UID; never a Google provider event ID. |",+ "email.CalendarOccurrence": "# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: `email.EventTime`; \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | `email.EventTime` | Instance time. |",+ "email.ConferenceProvider": "# Type Alias: ConferenceProvider\n\n> **ConferenceProvider** = `\"microsoft_teams\"` \\| `\"google_meet\"` \\| `\"other\"`\n\nThe conferencing system backing an event's join URL.\n\nCalendars can create Google Meet or Microsoft Teams according to their\ncapabilities. Imported third-party conferences are labeled separately.\nOmitting a conference change preserves the current conference; explicit\nchanges still require provider and calendar capability validation.",+ "ContactInfo": "# Type Alias: ContactInfo\n\n> **ContactInfo** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |",+ "ContactInfoLegacy": "# Type Alias: ContactInfoLegacy\n\n> **ContactInfoLegacy** = \\{ `email`: `string`; `email_address`: `string`; `name?`: `string` \\| `null`; `photo_url?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` |\n| <a id=\"property-email_address\"></a> `email_address` | `string` |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` |",+ "ContactInfoWithInteraction": "# Type Alias: ContactInfoWithInteraction\n\n> **ContactInfoWithInteraction** = `ContactInfoLegacy` & \\{ `last_interaction`: `string`; \\}\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `last_interaction` | `string` |",+ "email.EventReminderOverride": "# Type Alias: EventReminderOverride\n\n> **EventReminderOverride** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder: how it alerts and how many minutes before the event start\n(before midnight in the calendar's zone for all-day events) it fires.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider method, stored verbatim; only `popup` fires Macro notifications. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |",+ "email.EventReminders": "# Type Alias: EventReminders\n\n> **EventReminders** = \\{ `overrides?`: `email.EventReminderOverride`[]; `useDefault`: `boolean`; \\}\n\nPer-user reminder configuration for an event, mirroring Google's model:\neither the calendar's default reminders apply, or the explicit overrides\nreplace them entirely.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | `email.EventReminderOverride`[] | Explicit reminders replacing the defaults when `use_default` is off. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the calendar's default reminders apply. |",+ "email.EventStatus": "# Type Alias: EventStatus\n\n> **EventStatus** = `\"confirmed\"` \\| `\"tentative\"` \\| `\"cancelled\"`\n\nCanonical event status.",+ "email.EventTime": "# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |",+ "email.EventTransparency": "# Type Alias: EventTransparency\n\n> **EventTransparency** = `\"opaque\"` \\| `\"transparent\"`\n\nWhether an event blocks availability.",+ "email.EventType": "# Type Alias: EventType\n\n> **EventType** = `\"default\"` \\| `\"out_of_office\"` \\| `\"focus_time\"` \\| `\"working_location\"` \\| `\"birthday\"` \\| `\"from_gmail\"`\n\nGoogle's event type: ordinary meetings versus the status-style entries\n(working location, out of office, focus time, birthdays) Google renders\nand notifies differently. Immutable at the provider after creation.",+ "email.EventVisibility": "# Type Alias: EventVisibility\n\n> **EventVisibility** = `\"default\"` \\| `\"public\"` \\| `\"private\"` \\| `\"confidential\"`\n\nVisibility of event details.",+ "GetAttachmentResponse": "# Type Alias: GetAttachmentResponse\n\n> **GetAttachmentResponse** = \\{ `attachment`: `Attachment`; \\}\n\nThe response returned from the get attachment endpoint\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachment\"></a> `attachment` | `Attachment` |",+ "GetAttachmentResponses": "# Type Alias: GetAttachmentResponses\n\n> **GetAttachmentResponses** = \\{ `200`: `GetAttachmentResponse`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | `GetAttachmentResponse` |",+ "GetMessageResponses": "# Type Alias: GetMessageResponses\n\n> **GetMessageResponses** = \\{ `200`: `ParsedMessage`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | `ParsedMessage` |",+ "email.GuestPolicy": "# Type Alias: GuestPolicy\n\n> **GuestPolicy** = \\{ `canInviteOthers`: `boolean`; `canModify`: `boolean`; `canSeeOtherGuests`: `boolean`; \\}\n\nThe switches an organizer sets on an event to bound what its guests may\ndo. Google omits a switch from the payload while it holds its default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninviteothers\"></a> `canInviteOthers` | `boolean` | Whether guests may invite others. |\n| <a id=\"property-canmodify\"></a> `canModify` | `boolean` | Whether guests may change the event, including its guest list. |\n| <a id=\"property-canseeotherguests\"></a> `canSeeOtherGuests` | `boolean` | Whether guests may see the guest list. |",+ "InvitationDateTime": "# Type Alias: InvitationDateTime\n\n> **InvitationDateTime** = \\{ `kind`: `\"date\"`; `value`: `string`; \\} \\| \\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\} \\| \\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\nPreserve date-only and unresolved times without manufacturing UTC instants.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `value` | `string` | ISO calendar date. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"zoned\"`; `time_zone`: `string`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"zoned\"` | - |\n| `time_zone` | `string` | IANA zone of the original TZID, or UTC. |\n| `value` | `string` | RFC3339 instant. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unresolved\"`; `time_zone?`: `string` \\| `null`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"unresolved\"` | - |\n| `time_zone?` | `string` \\| `null` | Original TZID if present. |\n| `value` | `string` | ISO local wall time, without an offset. |",+ "InvitationMethod": "# Type Alias: InvitationMethod\n\n> **InvitationMethod** = `\"request\"` \\| `\"reply\"` \\| `\"cancel\"` \\| `\"counter\"` \\| `\"publish\"` \\| `\"unknown\"`\n\nOriginal scheduling method, including methods unsupported for actions.",+ "InvitationParticipant": "# Type Alias: InvitationParticipant\n\n> **InvitationParticipant** = \\{ `email`: `string`; `name?`: `string` \\| `null`; `participation_status?`: `string` \\| `null`; \\}\n\nScheduling participant; saved responses are historical, not current RSVP.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `string` | Participant calendar address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Sender-supplied display name. |\n| <a id=\"property-participation_status\"></a> `participation_status?` | `string` \\| `null` | Original PARTSTAT, retaining extensions. |",+ "InvitationResolution": "# Type Alias: InvitationResolution\n\n> **InvitationResolution** = \\{ `kind`: `\"disconnected\"`; \\} \\| \\{ `kind`: `\"still_syncing\"`; \\} \\| \\{ `kind`: `\"cancelled\"`; \\} \\| \\{ `kind`: `\"unavailable\"`; \\} \\| \\{ `kind`: `\"no_match\"`; \\} \\| \\{ `kind`: `\"ambiguous\"`; \\} \\| \\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: `email.CalendarEvent`; `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: `email.CalendarOccurrence`; `responding_email`: `string`; \\}\n\nRefreshable result, distinct from the immutable email contents.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"disconnected\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"still_syncing\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"cancelled\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"unavailable\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"no_match\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"ambiguous\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `can_join`: `boolean`; `can_respond`: `boolean`; `event`: `email.CalendarEvent`; `is_stale`: `boolean`; `kind`: `\"resolved\"`; `occurrence`: `email.CalendarOccurrence`; `responding_email`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `can_join` | `boolean` | Whether the conference link belongs to the reconciled scheduling target. |\n| `can_respond` | `boolean` | Whether a response is currently allowed. |\n| `event` | `email.CalendarEvent` | Current occurrence-specific content. |\n| `is_stale` | `boolean` | Whether the provider projection trails the email revision. |\n| `kind` | `\"resolved\"` | - |\n| `occurrence` | `email.CalendarOccurrence` | Original occurrence identity and current time. |\n| `responding_email` | `string` | Connected address that would respond. |",+ "LabelInfo": "# Type Alias: LabelInfo\n\n> **LabelInfo** = \\{ `name`: `string`; `provider_id`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-provider_id\"></a> `provider_id` | `string` |",+ "email.Link": "# Type Alias: Link\n\n> **Link** = \\{ `calendar_disabled`: `boolean`; `created_at`: `string`; `email_address`: `string`; `fusionauth_user_id`: `string`; `has_calendar_data`: `boolean`; `id`: `string`; `is_primary`: `boolean`; `is_sync_active`: `boolean`; `macro_id`: `string`; `needs_calendar_permission`: `boolean`; `needs_reauth`: `boolean`; `photo_url?`: `string` \\| `null`; `provider`: `UserProvider`; `settings`: `Settings`; `sync_status`: `SyncStatus`; `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar_disabled\"></a> `calendar_disabled` | `boolean` | Whether the user turned calendar off for this inbox, which also removed its calendar data. `needs_calendar_permission` is true either way, so this is what separates \"never granted\" from \"deliberately off\" — unprompted calendar nags must stay quiet for the latter. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-email_address\"></a> `email_address` | `string` | - |\n| <a id=\"property-fusionauth_user_id\"></a> `fusionauth_user_id` | `string` | - |\n| <a id=\"property-has_calendar_data\"></a> `has_calendar_data` | `boolean` | Whether Macro holds calendar data for this inbox. Drives the turn-off control on its own, so removing that data never depends on the recorded scopes still matching the set Macro requests today — a set that changes as the integration narrows, stranding data behind a capability check that no longer recognizes an older grant. |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_primary\"></a> `is_primary` | `boolean` | - |\n| <a id=\"property-is_sync_active\"></a> `is_sync_active` | `boolean` | - |\n| <a id=\"property-macro_id\"></a> `macro_id` | `string` | - |\n| <a id=\"property-needs_calendar_permission\"></a> `needs_calendar_permission` | `boolean` | Whether the link's Google grant is missing the calendar scope. True for inboxes connected before the calendar capability existed (and for grants where the user declined it); drives the per-inbox calendar upgrade prompt. Re-running the connect flow records the new grant. |\n| <a id=\"property-needs_reauth\"></a> `needs_reauth` | `boolean` | Whether the link's Google grant needs to be reconnected. Drives the per-inbox reconnect prompt independently of the sync-status badge. |\n| <a id=\"property-photo_url\"></a> `photo_url?` | `string` \\| `null` | The inbox's own profile photo (its self-contact's SFS photo), if synced. |\n| <a id=\"property-provider\"></a> `provider` | `UserProvider` | - |\n| <a id=\"property-settings\"></a> `settings` | `Settings` | - |\n| <a id=\"property-sync_status\"></a> `sync_status` | `SyncStatus` | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |",+ "MailboxAction": "# Type Alias: MailboxAction\n\n> **MailboxAction** = \\{ `kind`: `\"read\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"archived\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"junk\"`; `value`: `boolean`; \\} \\| \\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\nDesired organization state. Categories never stand in for folders or flags.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"read\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"read\"` | - |\n| `value` | `boolean` | Mark correspondence read or unread. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"flagged\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"flagged\"` | - |\n| `value` | `boolean` | Set the follow-up star. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"archived\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"archived\"` | - |\n| `value` | `boolean` | Archive inbox messages, or restore received correspondence to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"trashed\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"trashed\"` | - |\n| `value` | `boolean` | Move to recoverable trash, or restore correspondence to Inbox (drafts to Drafts). |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"junk\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"junk\"` | - |\n| `value` | `boolean` | Move to junk, or restore to the inbox. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"category\"`; `value`: \\{ `name`: `string`; `present`: `boolean`; \\}; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"category\"` | - |\n| `value` | \\{ `name`: `string`; `present`: `boolean`; \\} | Add/remove a category while preserving other provider assignments. |\n| `value.name` | `string` | - |\n| `value.present` | `boolean` | - |",+ "MailboxOperation": "# Type Alias: MailboxOperation\n\n> **MailboxOperation** = \\{ `action`: `MailboxAction`; `id`: `string`; `state`: `MailboxOperationState`; `updated_at`: `string`; \\}\n\nDurable outcome of an accepted organization action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-action\"></a> `action` | `MailboxAction` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-state\"></a> `state` | `MailboxOperationState` |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` |",+ "MailboxOperationState": "# Type Alias: MailboxOperationState\n\n> **MailboxOperationState** = `\"pending\"` \\| `\"applied\"` \\| `\"failed\"` \\| `\"cancelled\"`",+ "MailboxSettingsChange": "# Type Alias: MailboxSettingsChange\n\n> **MailboxSettingsChange** = `\"create_label\"` \\| `\"delete_label\"` \\| `\"sender_block\"`",+ "MailboxSettingsOperation": "# Type Alias: MailboxSettingsOperation\n\n> **MailboxSettingsOperation** = \\{ `enabled`: `boolean`; `id`: `string`; `kind`: `MailboxSettingsChange`; `needs_attention`: `boolean`; `resource`: `string`; \\}\n\nAn accepted inbox configuration change awaiting provider confirmation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-kind\"></a> `kind` | `MailboxSettingsChange` |\n| <a id=\"property-needs_attention\"></a> `needs_attention` | `boolean` |\n| <a id=\"property-resource\"></a> `resource` | `string` |",+ "MessageOperationResponse": "# Type Alias: MessageOperationResponse\n\n> **MessageOperationResponse** = \\{ `operation?`: `null` \\| `ApiMessageOperation`; \\}\n\nAuthorized polling response. Gmail has no asynchronous draft operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-operation\"></a> `operation?` | `null` \\| `ApiMessageOperation` |",+ "ParsedMessage": "# Type Alias: ParsedMessage\n\n> **ParsedMessage** = \\{ `bcc`: `ContactInfo`[]; `body_parsed?`: `string` \\| `null`; `cc`: `ContactInfo`[]; `db_id`: `string`; `draft_generation?`: `number`; `from?`: `null` \\| `ContactInfo`; `internal_date_ts?`: `string` \\| `null`; `labels`: `LabelInfo`[]; `link_id`: `string`; `subject?`: `string` \\| `null`; `thread_db_id`: `string`; `to`: `ContactInfo`[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `ContactInfo`[] | - |\n| <a id=\"property-body_parsed\"></a> `body_parsed?` | `string` \\| `null` | - |\n| <a id=\"property-cc\"></a> `cc` | `ContactInfo`[] | - |\n| <a id=\"property-db_id\"></a> `db_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Draft edit generation captured with this message snapshot. |\n| <a id=\"property-from\"></a> `from?` | `null` \\| `ContactInfo` | - |\n| <a id=\"property-internal_date_ts\"></a> `internal_date_ts?` | `string` \\| `null` | - |\n| <a id=\"property-labels\"></a> `labels` | `LabelInfo`[] | - |\n| <a id=\"property-link_id\"></a> `link_id` | `string` | - |\n| <a id=\"property-subject\"></a> `subject?` | `string` \\| `null` | - |\n| <a id=\"property-thread_db_id\"></a> `thread_db_id` | `string` | - |\n| <a id=\"property-to\"></a> `to` | `ContactInfo`[] | - |",+ "ResolveMessageOperationRequest": "# Type Alias: ResolveMessageOperationRequest\n\n> **ResolveMessageOperationRequest** = \\{ `accept_duplicate_risk?`: `boolean`; `action`: `ApiMessageResolutionAction`; `remote_version?`: `string` \\| `null`; `revision`: `string`; \\}\n\nStale versions fail without altering the current operation.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-accept_duplicate_risk\"></a> `accept_duplicate_risk?` | `boolean` |\n| <a id=\"property-action\"></a> `action` | `ApiMessageResolutionAction` |\n| <a id=\"property-remote_version\"></a> `remote_version?` | `string` \\| `null` |\n| <a id=\"property-revision\"></a> `revision` | `string` |",+ "ScheduledSendStatus": "# Type Alias: ScheduledSendStatus\n\n> **ScheduledSendStatus** = `\"pending\"` \\| `\"sending\"` \\| `\"failed\"` \\| `\"unconfirmed\"`\n\nThe user-visible delivery state of an unsent scheduled message.",+ "Settings": "# Type Alias: Settings\n\n> **Settings** = \\{ `signature?`: `string` \\| `null`; `signature_on_replies_forwards?`: `boolean` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-signature\"></a> `signature?` | `string` \\| `null` | The user's email signature content (HTML). On a patch, omit or send `null` to leave unchanged (both deserialize to `None`); pass an empty string to clear it. The column cannot be set to SQL NULL via patch. |\n| <a id=\"property-signature_on_replies_forwards\"></a> `signature_on_replies_forwards?` | `boolean` \\| `null` | - |",+ "SyncStatus": "# Type Alias: SyncStatus\n\n> **SyncStatus** = `\"SYNCING\"` \\| `\"UP_TO_DATE\"` \\| `\"ERROR\"` \\| `\"NEEDS_REAUTH\"` \\| `\"INACTIVE\"`\n\nCoarse sync state for an inbox, used to render a one-line hint in the\nmulti-inbox settings list. Derived from the link's `is_sync_active` flag, its\nreauth health, and its most recent backfill job.",+ "ThreadStateField": "# Type Alias: ThreadStateField\n\n> **ThreadStateField** = `\"read\"` \\| `\"starred\"` \\| `\"trashed\"` \\| `\"junk\"`\n\nSemantic mailbox facts, independent of folder/category names.",+ "TransferDraftRequest": "# Type Alias: TransferDraftRequest\n\n> **TransferDraftRequest** = \\{ `destination_link_id`: `string`; `draft_generation?`: `number`; `operation_id`: `string`; \\}\n\nReuse the same operation ID when retrying after a lost response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-destination_link_id\"></a> `destination_link_id` | `string` | - |\n| <a id=\"property-draft_generation\"></a> `draft_generation?` | `number` | Generation captured with the source draft. |\n| <a id=\"property-operation_id\"></a> `operation_id` | `string` | - |",+ "TransferDraftResponse": "# Type Alias: TransferDraftResponse\n\n> **TransferDraftResponse** = \\{ `attachments`: `ApiAttachmentDraft`[]; `message_id`: `string`; `source_id`: `string`; `source_thread_id`: `string`; `thread_id`: `string`; \\}\n\nA new identity prevents delayed writes from mutating the moved copy.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `ApiAttachmentDraft`[] |\n| <a id=\"property-message_id\"></a> `message_id` | `string` |\n| <a id=\"property-source_id\"></a> `source_id` | `string` |\n| <a id=\"property-source_thread_id\"></a> `source_thread_id` | `string` |\n| <a id=\"property-thread_id\"></a> `thread_id` | `string` |",+ "TransferRecoveryResponse": "# Type Alias: TransferRecoveryResponse\n\n> **TransferRecoveryResponse** = \\{ `committed?`: `null` \\| `TransferDraftResponse`; \\}\n\nA null result confirms that the move cannot commit, even if its request was delayed.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-committed\"></a> `committed?` | `null` \\| `TransferDraftResponse` |",+ "UpdateThreadStateRequest": "# Type Alias: UpdateThreadStateRequest\n\n> **UpdateThreadStateRequest** = \\{ `field`: `ThreadStateField`; `value`: `boolean`; \\}\n\nDesired state for every applicable message in an authorized thread.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-field\"></a> `field` | `ThreadStateField` |\n| <a id=\"property-value\"></a> `value` | `boolean` |",+ "UserProvider": "# Type Alias: UserProvider\n\n> **UserProvider** = `\"GMAIL\"` \\| `\"OUTLOOK\"`",+ "Value": "# Type Alias: Value\n\n> **Value** = `unknown`",+ "email.ViewerCapabilities": "# Type Alias: ViewerCapabilities\n\n> **ViewerCapabilities** = \\{ `editDetails`: `boolean`; `inviteGuests`: `boolean`; `organize`: `boolean`; `removeGuests`: `boolean`; `rsvp`: `boolean`; `setGuestPolicy`: `boolean`; \\}\n\nWhat the viewing requester may do with an event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-editdetails\"></a> `editDetails` | `boolean` | Change the event's details (title, time, description, conference). |\n| <a id=\"property-inviteguests\"></a> `inviteGuests` | `boolean` | Add guests. |\n| <a id=\"property-organize\"></a> `organize` | `boolean` | Act as the event's organizer: replace its whole guest list and manage its conferencing. |\n| <a id=\"property-removeguests\"></a> `removeGuests` | `boolean` | Remove guests. |\n| <a id=\"property-rsvp\"></a> `rsvp` | `boolean` | Answer the invitation. |\n| <a id=\"property-setguestpolicy\"></a> `setGuestPolicy` | `boolean` | Change the event's guest policy, which only Google calendars have. |",+ "AgentSessionMentionedMetadata": "# Type Alias: AgentSessionMentionedMetadata\n\n> **AgentSessionMentionedMetadata** = `AgentSessionNotificationRef` & \\{ `actionId`: `string`; `mentionedBy?`: `string` \\| `null`; \\}\n\nSomeone named the recipient in a prompt to an agent session.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `actionId` | `string` | The action carrying the prompt. |\n| `mentionedBy?` | `string` \\| `null` | Who wrote the prompt, absent when a bot acted on nobody's behalf. |",+ "AgentSessionNotificationRef": "# Type Alias: AgentSessionNotificationRef\n\n> **AgentSessionNotificationRef** = \\{ `announcementMessageId?`: `string` \\| `null`; `botId`: `string`; `botName`: `string`; `channelId?`: `string` \\| `null`; `parent?`: `null` \\| `AgentSessionOriginParent`; `sessionId`: `string`; `sessionName`: `string`; `threadId?`: `string` \\| `null`; \\}\n\nFlattened into each agent-session kind so the wire keeps these keys at the\ntop level of the metadata, the way [`CommonChannelMetadata`] does.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcementmessageid\"></a> `announcementMessageId?` | `string` \\| `null` | The magic-chip message for the turn in question, when one was posted. |\n| <a id=\"property-botid\"></a> `botId` | `string` | The bot the session runs for. A string on the wire: system bots have fixed ids like `00000000-0000-0000-0000-00000000a2a2`, which are not RFC 4122 uuids and fail a `format: uuid` check on the client. |\n| <a id=\"property-botname\"></a> `botName` | `string` | The bot's display name; agent notifications have no user sender, so this is who they read as being from. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | The channel the session was opened from, when it was opened from a channel thread. |\n| <a id=\"property-parent\"></a> `parent?` | `null` \\| `AgentSessionOriginParent` | - |\n| <a id=\"property-sessionid\"></a> `sessionId` | `string` | The session; what a click opens. |\n| <a id=\"property-sessionname\"></a> `sessionName` | `string` | The session's name at the time of the event. |\n| <a id=\"property-threadid\"></a> `threadId?` | `string` \\| `null` | The thread the session was opened from, when it was. |",+ "AgentSessionOriginParent": "# Type Alias: AgentSessionOriginParent\n\n> **AgentSessionOriginParent** = \\{ `id`: `string`; `type`: `string`; \\}\n\nThe session an agent-session notification is about, and where its magic\nchip lives when it was opened from a thread.\n\nThe conversation an agent session was opened from: a channel, document,\nor initiative. Spelled like the message API's parent for client routing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | The parent entity id. |\n| <a id=\"property-type\"></a> `type` | `string` | `channel`, `document`, or `initiative`. |",+ "AgentSessionSettledMetadata": "# Type Alias: AgentSessionSettledMetadata\n\n> **AgentSessionSettledMetadata** = `AgentSessionNotificationRef` & \\{ `actor?`: `string` \\| `null`; `excerpt?`: `string` \\| `null`; `stopReason`: `string`; `turn`: `number`; \\}\n\nAn agent finished a turn with nothing queued behind it.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `actor?` | `string` \\| `null` | Who prompted the turn, absent when a bot acted on nobody's behalf. |\n| `excerpt?` | `string` \\| `null` | The agent's last prose in the turn, whole; `None` when it wrote none. |\n| `stopReason` | `string` | The ACP stop reason, or `error`. |\n| `turn` | `number` | The turn that ended. |",+ "AgentSessionWaitingForInputMetadata": "# Type Alias: AgentSessionWaitingForInputMetadata\n\n> **AgentSessionWaitingForInputMetadata** = `AgentSessionNotificationRef` & \\{ `question`: `string`; `turn`: `number`; \\}\n\nAn agent is blocked on a question only the session's owner can answer.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `question` | `string` | The question, as the agent phrased it. |\n| `turn` | `number` | The turn asking. |",+ "AiResponseMetadata": "# Type Alias: AiResponseMetadata\n\n> **AiResponseMetadata** = \\{ `messageId`: `string`; `summary`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` |\n| <a id=\"property-summary\"></a> `summary` | `string` |",+ "ApiUserNotification": "# Type Alias: ApiUserNotification\n\n> **ApiUserNotification** = `Entity` & \\{ `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `id`: `string`; `notification_event_type`: `string`; `notification_metadata`: `NotifEvent`; `owner_id`: `string`; `sender_id?`: `string` \\| `null`; `sent`: `boolean`; `state`: `notification.NotificationState`; `updated_at`: `string`; `viewed_at?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `created_at` | `string` | When the notification was created. |\n| `deleted_at?` | `string` \\| `null` | When the notification was deleted. |\n| `id` | `string` | The notification ID. |\n| `notification_event_type` | `string` | The notification event type string (e.g. \"channel_mention\"). TODO make this a new type |\n| `notification_metadata` | `NotifEvent` | Deserialized notification metadata. |\n| `owner_id` | `string` | The user who owns this notification. |\n| `sender_id?` | `string` \\| `null` | The user who triggered the notification. |\n| `sent` | `boolean` | Whether the notification has been sent. |\n| `state` | `notification.NotificationState` | The authoritative notification lifecycle state. |\n| `updated_at` | `string` | When the notification was last updated. |\n| `viewed_at?` | `string` \\| `null` | When the notification was viewed/seen. |",+ "CalendarEventJoinRequestMetadata": "# Type Alias: CalendarEventJoinRequestMetadata\n\n> **CalendarEventJoinRequestMetadata** = \\{ `eventId`: `string`; `requestId`: `string`; `title`: `string`; \\}\n\nA channel member who sees a calendar event only through a channel share\nasked the person who shared it to add them as a guest. Sent to the sharer,\nwith the requester as sender.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | The shared calendar event entity the request is for. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity, answered from the event's details. |\n| <a id=\"property-title\"></a> `title` | `string` | Event title when the request was made. |",+ "CalendarEventReminderMetadata": "# Type Alias: CalendarEventReminderMetadata\n\n> **CalendarEventReminderMetadata** = \\{ `endsAt?`: `string` \\| `null`; `eventId`: `string`; `minutesBefore`: `number`; `occurrenceKey`: `string`; `startDate?`: `string` \\| `null`; `startsAt?`: `string` \\| `null`; `timeZone?`: `string` \\| `null`; `title`: `string`; \\}\n\nA calendar event alarm came due. Like [`ReminderMetadata`], these are\nself-notifications: `sender_id` must stay `None` or the only recipient is\nfiltered out. Everything the alert renders rides in here so the\ndispatcher never has to resolve the event again at display time.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-endsat\"></a> `endsAt?` | `string` \\| `null` | Instance end, for timed events. |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | The calendar event entity the alarm belongs to. |\n| <a id=\"property-minutesbefore\"></a> `minutesBefore` | `number` | Minutes before the start the alarm was configured to fire. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable occurrence key of the instance that is starting. |\n| <a id=\"property-startdate\"></a> `startDate?` | `string` \\| `null` | Instance start date, for all-day events. |\n| <a id=\"property-startsat\"></a> `startsAt?` | `string` \\| `null` | Instance start, for timed events. |\n| <a id=\"property-timezone\"></a> `timeZone?` | `string` \\| `null` | IANA zone for rendering local clock times, when known. |\n| <a id=\"property-title\"></a> `title` | `string` | Event display title at dispatch time. |",+ "CallStartedMetadata": "# Type Alias: CallStartedMetadata\n\n> **CallStartedMetadata** = \\{ `channel_name?`: `string` \\| `null`; `sender_profile_picture_url?`: `string` \\| `null`; \\}\n\nMetadata for a notification that a call has started in a channel.\n\nMirrors the producer-side `CallStartedNotification` in the `call` crate:\nboth serialize the same wire shape (snake_case fields) under the same\n`call_started` [`Notification::TYPE_NAME`]. This type is the read-side\nmodel used by [`crate::NotifEvent`]; the producer keeps its own type\nbecause it additionally builds the incoming-call APNS/VoIP push.\n\nRows persisted before the type name was normalized used the kebab-case\n`call-started`; the [`crate::NotifEvent::CallStarted`] variant carries a\n`#[serde(alias = \"call-started\")]` so those rows still deserialize.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_name\"></a> `channel_name?` | `string` \\| `null` | The name of the channel the call started in, when available. |\n| <a id=\"property-sender_profile_picture_url\"></a> `sender_profile_picture_url?` | `string` \\| `null` | Profile picture URL of the user who started the call, when available. |",+ "ChannelInviteMetadata": "# Type Alias: ChannelInviteMetadata\n\n> **ChannelInviteMetadata** = \\{ `channelName?`: `string`; `invitedBy`: `string`; `isDirectMessage?`: `boolean`; `messageContent?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; \\}\n\nMetadata for when a user is invited to a channel.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` | The name of the channel |\n| <a id=\"property-invitedby\"></a> `invitedBy` | `string` | The user who sent the invitation |\n| <a id=\"property-isdirectmessage\"></a> `isDirectMessage?` | `boolean` | Whether this is a direct message rather than a channel invitation. Older notification payloads retain channel-invitation wording. |\n| <a id=\"property-messagecontent\"></a> `messageContent?` | `string` \\| `null` | Message content to show in the invite email, when the invite was triggered by a message. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | The sender's profile picture URL, if available. |",+ "ChannelMentionMetadata": "# Type Alias: ChannelMentionMetadata\n\n> **ChannelMentionMetadata** = `CommonChannelMetadata` & \\{ `messageContent`: `string`; `messageId`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent` | `string` | The message content |\n| `messageId` | `string` | The message you were mentioned in |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| `threadId?` | `string` \\| `null` | the id of the thread |",+ "ChannelMessageReactionMetadata": "# Type Alias: ChannelMessageReactionMetadata\n\n> **ChannelMessageReactionMetadata** = `CommonChannelMetadata` & \\{ `emoji`: `string`; `messageContent`: `string`; `messageId`: `string`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId?`: `string` \\| `null`; \\}\n\nMetadata for a reaction added to one of the recipient's channel messages.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `emoji` | `string` | The emoji added by the reactor. |\n| `messageContent` | `string` | The reacted-to message content. |\n| `messageId` | `string` | The reacted-to message id. |\n| `senderProfilePictureUrl?` | `string` \\| `null` | Optional reactor profile picture URL. |\n| `threadId?` | `string` \\| `null` | The thread root id when the reacted-to message is a reply. |",+ "ChannelMessageSendMetadata": "# Type Alias: ChannelMessageSendMetadata\n\n> **ChannelMessageSendMetadata** = `CommonChannelMetadata` & \\{ `messageContent?`: `string`; `messageId`: `string`; `sender?`: `string` \\| `null`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent?` | `string` | The content of the message |\n| `messageId` | `string` | The message id |\n| `sender?` | `string` \\| `null` | The user who sent the message, when sent by a user |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |",+ "ChannelReplyMetadata": "# Type Alias: ChannelReplyMetadata\n\n> **ChannelReplyMetadata** = `CommonChannelMetadata` & \\{ `messageContent`: `string`; `messageId`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `threadId`: `string`; `threadParentSenderId?`: `string` \\| `null`; `userId?`: `string` \\| `null`; \\}\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageContent` | `string` | The message content |\n| `messageId` | `string` | The id of the new message |\n| `senderDisplayName?` | `string` \\| `null` | Display name for non-user senders such as bots |\n| `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| `threadId` | `string` | The id of the thread that has the reply |\n| `threadParentSenderId?` | `string` \\| `null` | The user who sent the root message of the thread |\n| `userId?` | `string` \\| `null` | The sender id of the reply, when sent by a user |",+ "notification.ChannelType": "# Type Alias: ChannelType\n\n> **ChannelType** = `\"public\"` \\| `\"private\"` \\| `\"directMessage\"` \\| `\"team\"`",+ "CommentRef": "# Type Alias: CommentRef\n\n> **CommentRef** = `number` \\| `string`\n\nIdentity of a document comment or its thread. Comments written before the\nshared message store carry the legacy numeric ids; comments in the shared\nstore carry the message and root UUIDs.",+ "CommentedOnDocumentMetadata": "# Type Alias: CommentedOnDocumentMetadata\n\n> **CommentedOnDocumentMetadata** = \\{ `commentId`: `CommentRef`; `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| `NotificationDocumentSubType`; `text`: `string`; `threadId`: `CommentRef`; \\}\n\nNotification sent when someone comments on a document the user owns.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | `CommentRef` | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| `NotificationDocumentSubType` | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | `CommentRef` | the thread id |",+ "CommonChannelMetadata": "# Type Alias: CommonChannelMetadata\n\n> **CommonChannelMetadata** = \\{ `channelName?`: `string`; `channelType`: `notification.ChannelType`; \\}\n\nCommon metadata for notifications on channels\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-channelname\"></a> `channelName?` | `string` |\n| <a id=\"property-channeltype\"></a> `channelType` | `notification.ChannelType` |",+ "CrmDiscussionMetadata": "# Type Alias: CrmDiscussionMetadata\n\n> **CrmDiscussionMetadata** = \\{ `messageId`: `string`; `reason`: `CrmDiscussionReason`; `recordName`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `text`: `string`; `threadId`: `string`; \\}\n\nCRM discussion metadata. The notification entity identifies the company or\ncontact; message and thread UUIDs select the discussion inside it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Canonical shared message UUID. |\n| <a id=\"property-reason\"></a> `reason` | `CrmDiscussionReason` | Semantic reason selected by the message delivery domain. |\n| <a id=\"property-recordname\"></a> `recordName` | `string` | Company or contact display name. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public display name for a bot author. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | Optional avatar for push notification attachments. |\n| <a id=\"property-text\"></a> `text` | `string` | Posted Markdown content. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Canonical discussion root UUID. |",+ "CrmDiscussionReason": "# Type Alias: CrmDiscussionReason\n\n> **CrmDiscussionReason** = `\"mention\"` \\| `\"reply\"` \\| `\"owner\"`\n\nWhy a CRM discussion notification was delivered.",+ "DocumentMentionMetadata": "# Type Alias: DocumentMentionMetadata\n\n> **DocumentMentionMetadata** = `ChannelMentionMetadata` & \\{ `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `subType?`: `null` \\| `NotificationDocumentSubType`; \\}\n\nSomeone mentioned a document in a channel\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `documentName` | `string` | The name of the document |\n| `fileType?` | `string` \\| `null` | The file type of the document |\n| `owner` | `string` | The owner of the document |\n| `subType?` | `null` \\| `NotificationDocumentSubType` | - |",+ "Entity": "# Type Alias: Entity\n\n> **Entity** = \\{ `entity_id`: `string`; `entity_type`: `notification.EntityType`; \\}\n\nThe Entity describes the minimum amount of information required to describe a unique thing in Macro\nThis contains the type of the entity [EntityType] and the string id of that entity\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | The id of that entity |\n| <a id=\"property-entity_type\"></a> `entity_type` | `notification.EntityType` | The type of entity we are describing |",+ "EntityAccessGrantedMetadata": "# Type Alias: EntityAccessGrantedMetadata\n\n> **EntityAccessGrantedMetadata** = \\{ `accessLevel`: `RequestedAccessLevel`; `entityName`: `string`; `fileType?`: `string` \\| `null`; `requestId`: `string`; `revision`: `number`; \\}\n\nA person granted you access to a shared entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `RequestedAccessLevel` | Requested or granted permission. |\n| <a id=\"property-entityname\"></a> `entityName` | `string` | Shared item's name. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | Document file type for routing. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision that generated this notification. |",+ "EntityAccessRequestedMetadata": "# Type Alias: EntityAccessRequestedMetadata\n\n> **EntityAccessRequestedMetadata** = \\{ `accessLevel`: `RequestedAccessLevel`; `entityName`: `string`; `fileType?`: `string` \\| `null`; `requestId`: `string`; `revision`: `number`; \\}\n\nA person requested access to a shared entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `RequestedAccessLevel` | Requested or granted permission. |\n| <a id=\"property-entityname\"></a> `entityName` | `string` | Shared item's name. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | Document file type for routing. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable request identity. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Revision that generated this notification. |",+ "notification.EntityType": "# Type Alias: EntityType\n\n> **EntityType** = `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`\n\nThe type of an entity in Macro",+ "GetNotificationTypePreferencesResponse": "# Type Alias: GetNotificationTypePreferencesResponse\n\n> **GetNotificationTypePreferencesResponse** = \\{ `disabled_types`: `string`[]; \\}\n\nResponse for listing disabled notification types.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-disabled_types\"></a> `disabled_types` | `string`[] | The notification types that the user has disabled. |",+ "GithubPrCheckRun": "# Type Alias: GithubPrCheckRun\n\n> **GithubPrCheckRun** = `GithubPrNotificationCommon` & \\{ `checkName`: `string`; `checkRunGithubId`: `number`; `checkStatus`: `string`; `checkUrl`: `string`; `completedAt`: `string`; `conclusion`: `string`; `state`: `GithubPrCheckRunState`; \\}\n\nMetadata for a notification that a GitHub pull request check run completed.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checkName` | `string` | The display name GitHub reported for the check run. |\n| `checkRunGithubId` | `number` | The GitHub numeric id of the check run. |\n| `checkStatus` | `string` | The raw GitHub check run status. |\n| `checkUrl` | `string` | The public GitHub URL for the check run. |\n| `completedAt` | `string` | When GitHub marked the check run as complete. |\n| `conclusion` | `string` | The raw GitHub check run conclusion. |\n| `state` | `GithubPrCheckRunState` | The normalized notification state for this check run. |",+ "GithubPrCheckRunState": "# Type Alias: GithubPrCheckRunState\n\n> **GithubPrCheckRunState** = `\"completed\"` \\| `\"failed\"`\n\nThe normalized result state for a GitHub pull request check-run notification.",+ "GithubPrComment": "# Type Alias: GithubPrComment\n\n> **GithubPrComment** = `GithubPrNotificationCommon` & \\{ `commentGithubId?`: `number` \\| `null`; `commentKind`: `GithubPrCommentKind`; `commentSnippet`: `string`; `commentUrl?`: `string` \\| `null`; \\}\n\nMetadata for a notification that a GitHub pull request was commented on.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `commentGithubId?` | `number` \\| `null` | The GitHub numeric id of the comment, when available. |\n| `commentKind` | `GithubPrCommentKind` | The kind of comment that was posted. |\n| `commentSnippet` | `string` | A truncated excerpt of the comment body. |\n| `commentUrl?` | `string` \\| `null` | The public GitHub URL for the comment, when available. |",+ "GithubPrCommentKind": "# Type Alias: GithubPrCommentKind\n\n> **GithubPrCommentKind** = `\"issue\"` \\| `\"review_comment\"`\n\nThe kind of GitHub comment that triggered a [`GithubPrComment`] notification.",+ "GithubPrEventAction": "# Type Alias: GithubPrEventAction\n\n> **GithubPrEventAction** = `\"opened\"` \\| `\"reopened\"` \\| `\"closed\"`\n\nThe GitHub pull request webhook action that triggered the notification.",+ "GithubPrEventStatus": "# Type Alias: GithubPrEventStatus\n\n> **GithubPrEventStatus** = `\"open\"` \\| `\"closed\"` \\| `\"merged\"`\n\nThe normalized lifecycle status for a GitHub pull request notification.",+ "GithubPrMention": "# Type Alias: GithubPrMention\n\n> **GithubPrMention** = `GithubPrNotificationCommon` & \\{ `commentGithubId?`: `number` \\| `null`; `commentUrl?`: `string` \\| `null`; `location`: `GithubPrMentionLocation`; `textSnippet`: `string`; \\}\n\nMetadata for a notification that the user was mentioned on a GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `commentGithubId?` | `number` \\| `null` | The GitHub numeric id of the comment or review containing the mention, when available. |\n| `commentUrl?` | `string` \\| `null` | The public GitHub URL for the text containing the mention, when available. |\n| `location` | `GithubPrMentionLocation` | Where the mention appeared. |\n| `textSnippet` | `string` | A truncated excerpt of the text containing the mention. |",+ "GithubPrMentionLocation": "# Type Alias: GithubPrMentionLocation\n\n> **GithubPrMentionLocation** = `\"pr_body\"` \\| `\"comment\"` \\| `\"review\"` \\| `\"review_comment\"`\n\nWhere in a GitHub pull request the user was mentioned.",+ "GithubPrNotificationCommon": "# Type Alias: GithubPrNotificationCommon\n\n> **GithubPrNotificationCommon** = \\{ `displayName`: `string`; `foreignEntityId`: `string`; `githubKey`: `string`; `number`: `number`; `owner`: `string`; `repo`: `string`; `senderGithubAvatarUrl?`: `string` \\| `null`; `senderGithubLogin?`: `string` \\| `null`; `senderGithubUserId?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\}\n\nFields shared by every GitHub pull request notification type.\n\nEmbedded with `#[serde(flatten)]` so the wire shape keeps these keys at the\ntop level of the metadata object.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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` | The source-specific internal foreign entity row id for this pull request. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The external GitHub key, in `owner/repo/pull/number` format. |\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-sendergithubavatarurl\"></a> `senderGithubAvatarUrl?` | `string` \\| `null` | The GitHub avatar URL for the sender, when available. |\n| <a id=\"property-sendergithublogin\"></a> `senderGithubLogin?` | `string` \\| `null` | The GitHub login for the sender, when available. |\n| <a id=\"property-sendergithubuserid\"></a> `senderGithubUserId?` | `string` \\| `null` | The stable GitHub numeric user id for the sender, serialized as a string. |\n| <a id=\"property-title\"></a> `title` | `string` | The GitHub pull request title. Falls back to `display_name` when GitHub has no title. |\n| <a id=\"property-url\"></a> `url` | `string` | The public GitHub URL for the pull request. |",+ "GithubPrReview": "# Type Alias: GithubPrReview\n\n> **GithubPrReview** = `GithubPrNotificationCommon` & \\{ `reviewGithubId?`: `number` \\| `null`; `reviewSnippet?`: `string` \\| `null`; `reviewUrl?`: `string` \\| `null`; `state`: `GithubPrReviewState`; \\}\n\nMetadata for a notification that a review was submitted on the user's GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `reviewGithubId?` | `number` \\| `null` | The GitHub numeric id of the review, when available. |\n| `reviewSnippet?` | `string` \\| `null` | A truncated excerpt of the review body, when any was written. |\n| `reviewUrl?` | `string` \\| `null` | The public GitHub URL for the review, when available. |\n| `state` | `GithubPrReviewState` | The review decision state. |",+ "GithubPrReviewState": "# Type Alias: GithubPrReviewState\n\n> **GithubPrReviewState** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"commented\"`\n\nThe state of a submitted GitHub pull request review.",+ "GithubPrStatusChanged": "# Type Alias: GithubPrStatusChanged\n\n> **GithubPrStatusChanged** = `GithubPrNotificationCommon` & \\{ `action`: `GithubPrEventAction`; `baseBranch?`: `string` \\| `null`; `headBranch?`: `string` \\| `null`; `mergedAt?`: `string` \\| `null`; `previousStatus?`: `null` \\| `GithubPrEventStatus`; `status`: `GithubPrEventStatus`; \\}\n\nMetadata for a GitHub pull request lifecycle notification.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action` | `GithubPrEventAction` | The webhook action that triggered this notification. |\n| `baseBranch?` | `string` \\| `null` | The pull request base branch, when available. |\n| `headBranch?` | `string` \\| `null` | The pull request head branch, when available. |\n| `mergedAt?` | `string` \\| `null` | When the pull request was merged, when available. |\n| `previousStatus?` | `null` \\| `GithubPrEventStatus` | - |\n| `status` | `GithubPrEventStatus` | The current normalized pull request status. |",+ "GithubReviewRequested": "# Type Alias: GithubReviewRequested\n\n> **GithubReviewRequested** = `GithubPrNotificationCommon` & \\{ `requestedReviewerGithubLogin?`: `string` \\| `null`; `requestedReviewerGithubUserId?`: `string` \\| `null`; \\}\n\nMetadata for a notification that the user's review was requested on a GitHub pull request.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `requestedReviewerGithubLogin?` | `string` \\| `null` | The GitHub login of the requested reviewer, when available. |\n| `requestedReviewerGithubUserId?` | `string` \\| `null` | The stable GitHub numeric user id of the requested reviewer, serialized as a string. |",+ "InboxReauthRequiredMetadata": "# Type Alias: InboxReauthRequiredMetadata\n\n> **InboxReauthRequiredMetadata** = \\{ `emailAddress`: `string`; \\}\n\nMetadata for a notification that a linked inbox's grant has died and the\ninbox must be reconnected. Fanned out to the inbox owner and every delegate,\nsince any of them holding the Google grant can restore sync.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `string` | The address of the inbox that needs to be reconnected. |",+ "InitiativeDiscussionMetadata": "# Type Alias: InitiativeDiscussionMetadata\n\n> **InitiativeDiscussionMetadata** = \\{ `messageId`: `string`; `owner`: `string`; `projectName`: `string`; `reason`: `InitiativeDiscussionReason`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `text`: `string`; `threadId`: `string`; \\}\n\nProject discussion metadata. The notification entity identifies the initiative;\nmessage and thread UUIDs select the discussion inside that project.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Canonical shared message UUID. |\n| <a id=\"property-owner\"></a> `owner` | `string` | Authenticated project owner. |\n| <a id=\"property-projectname\"></a> `projectName` | `string` | Name displayed in the project header. |\n| <a id=\"property-reason\"></a> `reason` | `InitiativeDiscussionReason` | Semantic reason selected by the message delivery domain. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public display name for a bot author. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | Optional avatar for push notification attachments. |\n| <a id=\"property-text\"></a> `text` | `string` | Posted Markdown content. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Canonical discussion root UUID. |",+ "InitiativeDiscussionReason": "# Type Alias: InitiativeDiscussionReason\n\n> **InitiativeDiscussionReason** = `\"mention\"` \\| `\"reply\"` \\| `\"assignee\"` \\| `\"owner\"`\n\nWhy a project discussion notification was delivered.",+ "InviteToTeamMetadata": "# Type Alias: InviteToTeamMetadata\n\n> **InviteToTeamMetadata** = \\{ `invitedBy`: `string`; `inviteePlan?`: `InviteePlan`; `reminder?`: `boolean`; `role?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `teamId`: `string`; `teamInviteId`: `string`; `teamName`: `string`; \\}\n\nMetadata for when a user is invited to a team.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-invitedby\"></a> `invitedBy` | `string` | The user who sent the invitation |\n| <a id=\"property-inviteeplan\"></a> `inviteePlan?` | `InviteePlan` | What the invitee gets by joining, as the team stood when the invite was sent. |\n| <a id=\"property-reminder\"></a> `reminder?` | `boolean` | Whether this email reminds the invitee of an invite they have not answered. |\n| <a id=\"property-role\"></a> `role?` | `string` \\| `null` | Role/permission level in the team |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | The sender's profile picture URL, if available. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | The unique identifier of the team |\n| <a id=\"property-teaminviteid\"></a> `teamInviteId` | `string` | The unique identifier of the team invite |\n| <a id=\"property-teamname\"></a> `teamName` | `string` | The name of the team being invited to |",+ "InviteePlan": "# Type Alias: InviteePlan\n\n> **InviteePlan** = `\"free\"` \\| `\"premium\"`\n\nWhat a team invitee gets by joining.",+ "MentionedInDocumentCommentMetadata": "# Type Alias: MentionedInDocumentCommentMetadata\n\n> **MentionedInDocumentCommentMetadata** = \\{ `commentId`: `CommentRef`; `documentName`: `string`; `fileType?`: `string` \\| `null`; `mentionId`: `string`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| `NotificationDocumentSubType`; `text`: `string`; `threadId`: `CommentRef`; \\}\n\nNotification sent when a user is mentioned in a document comment.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | `CommentRef` | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-mentionid\"></a> `mentionId` | `string` | The mention ID. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| `NotificationDocumentSubType` | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | `CommentRef` | the thread id |",+ "NewEmailMetadata": "# Type Alias: NewEmailMetadata\n\n> **NewEmailMetadata** = \\{ `sender?`: `string` \\| `null`; `snippet`: `string`; `subject`: `string`; `threadId`: `string`; `toEmail`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-sender\"></a> `sender?` | `string` \\| `null` |\n| <a id=\"property-snippet\"></a> `snippet` | `string` |\n| <a id=\"property-subject\"></a> `subject` | `string` |\n| <a id=\"property-threadid\"></a> `threadId` | `string` |\n| <a id=\"property-toemail\"></a> `toEmail` | `string` |",+ "NotifEvent": "# Type Alias: NotifEvent\n\n> **NotifEvent** = \\{ `content`: `ChannelMentionMetadata`; `tag`: `\"channel_mention\"`; \\} \\| \\{ `content`: `DocumentMentionMetadata`; `tag`: `\"document_mention\"`; \\} \\| \\{ `content`: `MentionedInDocumentCommentMetadata`; `tag`: `\"mentioned_in_document_comment\"`; \\} \\| \\{ `content`: `RepliedToDocumentCommentThreadMetadata`; `tag`: `\"replied_to_document_comment_thread\"`; \\} \\| \\{ `content`: `CommentedOnDocumentMetadata`; `tag`: `\"commented_on_document\"`; \\} \\| \\{ `content`: `EntityAccessRequestedMetadata`; `tag`: `\"entity_access_requested\"`; \\} \\| \\{ `content`: `EntityAccessGrantedMetadata`; `tag`: `\"entity_access_granted\"`; \\} \\| \\{ `content`: `InitiativeDiscussionMetadata`; `tag`: `\"initiative_discussion\"`; \\} \\| \\{ `content`: `CrmDiscussionMetadata`; `tag`: `\"crm_discussion\"`; \\} \\| \\{ `content`: `ChannelInviteMetadata`; `tag`: `\"channel_invite\"`; \\} \\| \\{ `content`: `ChannelMessageSendMetadata`; `tag`: `\"channel_message_send\"`; \\} \\| \\{ `content`: `ChannelReplyMetadata`; `tag`: `\"channel_message_reply\"`; \\} \\| \\{ `content`: `CallStartedMetadata`; `tag`: `\"call_started\"`; \\} \\| \\{ `content`: `NewEmailMetadata`; `tag`: `\"new_email\"`; \\} \\| \\{ `content`: `InboxReauthRequiredMetadata`; `tag`: `\"inbox_reauth_required\"`; \\} \\| \\{ `content`: `InviteToTeamMetadata`; `tag`: `\"invite_to_team\"`; \\} \\| \\{ `content`: `TaskAssignedMetadata`; `tag`: `\"task_assigned\"`; \\} \\| \\{ `content`: `ReminderMetadata`; `tag`: `\"reminder\"`; \\} \\| \\{ `content`: `WhatsappGroupMessageMetadata`; `tag`: `\"whatsapp_group_message\"`; \\} \\| \\{ `content`: `CalendarEventReminderMetadata`; `tag`: `\"calendar_event_reminder\"`; \\} \\| \\{ `content`: `AiResponseMetadata`; `tag`: `\"ai_response\"`; \\} \\| \\{ `content`: `GithubPrStatusChanged`; `tag`: `\"github_pr_status_changed\"`; \\} \\| \\{ `content`: `GithubPrCheckRun`; `tag`: `\"github_pr_check_run\"`; \\} \\| \\{ `content`: `GithubReviewRequested`; `tag`: `\"github_review_requested\"`; \\} \\| \\{ `content`: `GithubPrComment`; `tag`: `\"github_pr_comment\"`; \\} \\| \\{ `content`: `GithubPrMention`; `tag`: `\"github_pr_mention\"`; \\} \\| \\{ `content`: `GithubPrReview`; `tag`: `\"github_pr_review\"`; \\} \\| \\{ `content`: `AgentSessionSettledMetadata`; `tag`: `\"agent_session_settled\"`; \\} \\| \\{ `content`: `AgentSessionWaitingForInputMetadata`; `tag`: `\"agent_session_waiting_for_input\"`; \\} \\| \\{ `content`: `AgentSessionMentionedMetadata`; `tag`: `\"agent_session_mentioned\"`; \\} \\| \\{ `content`: `ChannelMessageReactionMetadata`; `tag`: `\"channel_message_reaction\"`; \\} \\| \\{ `content`: `CalendarEventJoinRequestMetadata`; `tag`: `\"calendar_event_join_request\"`; \\}\n\nMirrors [`model_notifications::NotificationEvent`] but uses `tag` / `content`\nas the serde adjacently-tagged field names so it can be deserialized from the\nshape produced by [`UserNotificationRow::into_tagged`] +\n[`UserNotificationRow::into_json`].\n\nOnly includes variants whose metadata types implement the `Notification` trait.\n\n## Union Members\n\n### Type Literal\n\n\\{ `content`: `ChannelMentionMetadata`; `tag`: `\"channel_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ChannelMentionMetadata` | Someone mentioned you in a channel. |\n| `tag` | `\"channel_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `DocumentMentionMetadata`; `tag`: `\"document_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `DocumentMentionMetadata` | Someone mentioned a document in a channel. |\n| `tag` | `\"document_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `MentionedInDocumentCommentMetadata`; `tag`: `\"mentioned_in_document_comment\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `MentionedInDocumentCommentMetadata` | User was mentioned in a comment in a document |\n| `tag` | `\"mentioned_in_document_comment\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `RepliedToDocumentCommentThreadMetadata`; `tag`: `\"replied_to_document_comment_thread\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `RepliedToDocumentCommentThreadMetadata` | Someone replied to a document comment thread the user participated in. |\n| `tag` | `\"replied_to_document_comment_thread\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `CommentedOnDocumentMetadata`; `tag`: `\"commented_on_document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `CommentedOnDocumentMetadata` | Someone commented on a document the user owns. |\n| `tag` | `\"commented_on_document\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `EntityAccessRequestedMetadata`; `tag`: `\"entity_access_requested\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `EntityAccessRequestedMetadata` | Someone requested more access to a shared entity. |\n| `tag` | `\"entity_access_requested\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `EntityAccessGrantedMetadata`; `tag`: `\"entity_access_granted\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `EntityAccessGrantedMetadata` | An owner granted requested access. |\n| `tag` | `\"entity_access_granted\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `InitiativeDiscussionMetadata`; `tag`: `\"initiative_discussion\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `InitiativeDiscussionMetadata` | Someone commented, replied, or mentioned the recipient on a project. |\n| `tag` | `\"initiative_discussion\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `CrmDiscussionMetadata`; `tag`: `\"crm_discussion\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `CrmDiscussionMetadata` | Someone commented, replied, or mentioned the recipient on a CRM company or contact. |\n| `tag` | `\"crm_discussion\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `ChannelInviteMetadata`; `tag`: `\"channel_invite\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ChannelInviteMetadata` | The user was invited to a channel. |\n| `tag` | `\"channel_invite\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `ChannelMessageSendMetadata`; `tag`: `\"channel_message_send\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ChannelMessageSendMetadata` | A user sent a message in a channel. |\n| `tag` | `\"channel_message_send\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `ChannelReplyMetadata`; `tag`: `\"channel_message_reply\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ChannelReplyMetadata` | Someone replied to a thread in a channel that the user is part of. |\n| `tag` | `\"channel_message_reply\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `CallStartedMetadata`; `tag`: `\"call_started\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `CallStartedMetadata` | A call has started in a channel the user is a member of. The `call-started` alias keeps rows persisted before the type name was normalized to snake_case (`call_started`) deserializable. |\n| `tag` | `\"call_started\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `NewEmailMetadata`; `tag`: `\"new_email\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `NewEmailMetadata` | A new email has been sent to the user. |\n| `tag` | `\"new_email\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `InboxReauthRequiredMetadata`; `tag`: `\"inbox_reauth_required\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `InboxReauthRequiredMetadata` | A linked inbox's grant died and must be reconnected. |\n| `tag` | `\"inbox_reauth_required\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `InviteToTeamMetadata`; `tag`: `\"invite_to_team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `InviteToTeamMetadata` | A user was invited to a team. |\n| `tag` | `\"invite_to_team\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `TaskAssignedMetadata`; `tag`: `\"task_assigned\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `TaskAssignedMetadata` | A user was assigned to a task. |\n| `tag` | `\"task_assigned\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `ReminderMetadata`; `tag`: `\"reminder\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ReminderMetadata` | A reminder the user set for themselves came due. |\n| `tag` | `\"reminder\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `WhatsappGroupMessageMetadata`; `tag`: `\"whatsapp_group_message\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `WhatsappGroupMessageMetadata` | A live message in a shared WhatsApp group. |\n| `tag` | `\"whatsapp_group_message\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `CalendarEventReminderMetadata`; `tag`: `\"calendar_event_reminder\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `CalendarEventReminderMetadata` | A calendar event alarm came due. |\n| `tag` | `\"calendar_event_reminder\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `AiResponseMetadata`; `tag`: `\"ai_response\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `AiResponseMetadata` | An AI assistant responded to a chat. |\n| `tag` | `\"ai_response\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubPrStatusChanged`; `tag`: `\"github_pr_status_changed\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubPrStatusChanged` | A GitHub pull request changed lifecycle state. The `github_pr_event` alias keeps rows and queue messages persisted before the rename deserializable. |\n| `tag` | `\"github_pr_status_changed\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubPrCheckRun`; `tag`: `\"github_pr_check_run\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubPrCheckRun` | A GitHub pull request check run completed. |\n| `tag` | `\"github_pr_check_run\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubReviewRequested`; `tag`: `\"github_review_requested\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubReviewRequested` | The user's review was requested on a GitHub pull request. |\n| `tag` | `\"github_review_requested\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubPrComment`; `tag`: `\"github_pr_comment\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubPrComment` | A GitHub pull request was commented on. |\n| `tag` | `\"github_pr_comment\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubPrMention`; `tag`: `\"github_pr_mention\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubPrMention` | The user was mentioned on a GitHub pull request. |\n| `tag` | `\"github_pr_mention\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `GithubPrReview`; `tag`: `\"github_pr_review\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `GithubPrReview` | A review was submitted on the user's GitHub pull request. |\n| `tag` | `\"github_pr_review\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `AgentSessionSettledMetadata`; `tag`: `\"agent_session_settled\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `AgentSessionSettledMetadata` | An agent finished a turn with nothing queued behind it. |\n| `tag` | `\"agent_session_settled\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `AgentSessionWaitingForInputMetadata`; `tag`: `\"agent_session_waiting_for_input\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `AgentSessionWaitingForInputMetadata` | An agent is blocked on a question for the session's owner. |\n| `tag` | `\"agent_session_waiting_for_input\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `AgentSessionMentionedMetadata`; `tag`: `\"agent_session_mentioned\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `AgentSessionMentionedMetadata` | The user was named in a prompt to an agent session. |\n| `tag` | `\"agent_session_mentioned\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `ChannelMessageReactionMetadata`; `tag`: `\"channel_message_reaction\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ChannelMessageReactionMetadata` | Someone reacted to one of the user's channel messages. |\n| `tag` | `\"channel_message_reaction\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `CalendarEventJoinRequestMetadata`; `tag`: `\"calendar_event_join_request\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `CalendarEventJoinRequestMetadata` | A channel member asked to be added as a guest of an event the user shared with the channel. |\n| `tag` | `\"calendar_event_join_request\"` | - |",+ "NotificationDocumentSubType": "# Type Alias: NotificationDocumentSubType\n\n> **NotificationDocumentSubType** = \\{ `type`: `\"task\"`; \\} \\| \\{ `type`: `\"snippet\"`; \\} \\| \\{ `type`: `\"skill\"`; \\} \\| \\{ `type`: `\"initiative_description\"`; \\}\n\nThe sub type of a document in a notification.\nSerializes as `{ \"type\": \"task\" }` matching the storage service pattern.",+ "notification.NotificationState": "# Type Alias: NotificationState\n\n> **NotificationState** = `\"unseen\"` \\| `\"seen\"` \\| `\"done\"`\n\nThe mutually exclusive lifecycle states of a user's notification.",+ "ReminderMetadata": "# Type Alias: ReminderMetadata\n\n> **ReminderMetadata** = \\{ `description`: `string`; `reminderId`: `string`; `scheduledFor?`: `string` \\| `null`; \\}\n\nMetadata for a reminder the user set for themselves coming due.\n\nThere is no sender: a reminder is self-set, so the dispatcher sends it with\n`sender_id: None` (a recipient who is also the sender is filtered out of\ntheir own notification). Every formatter here must therefore work without\none.\n\nThe associated entity, when there is one, lives on the notification row\nrather than in here, and clients resolve its name from that — so the\ndispatcher does not have to look up a name across five entity types.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What the user asked to be reminded about. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | The reminder that fired. |\n| <a id=\"property-scheduledfor\"></a> `scheduledFor?` | `string` \\| `null` | Which firing this is — the occurrence the reminder came due for. What distinguishes two firings of the same recurring reminder, which are otherwise identical: same id, same description. The collapse key is built from it, so without it Tuesday's alert would replace Monday's unread one on the lock screen. Optional because notifications written before recurring dispatch existed have no such field, and they still have to read back. |",+ "RepliedToDocumentCommentThreadMetadata": "# Type Alias: RepliedToDocumentCommentThreadMetadata\n\n> **RepliedToDocumentCommentThreadMetadata** = \\{ `commentId`: `CommentRef`; `documentName`: `string`; `fileType?`: `string` \\| `null`; `owner`: `string`; `senderDisplayName?`: `string` \\| `null`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| `NotificationDocumentSubType`; `text`: `string`; `threadId`: `CommentRef`; \\}\n\nNotification sent when someone replies to a document comment thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-commentid\"></a> `commentId` | `CommentRef` | the comment id |\n| <a id=\"property-documentname\"></a> `documentName` | `string` | The name of the document. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | The file type of the document. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the document. |\n| <a id=\"property-senderdisplayname\"></a> `senderDisplayName?` | `string` \\| `null` | Public bot name when the author is an agent rather than a Macro user. |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| `NotificationDocumentSubType` | - |\n| <a id=\"property-text\"></a> `text` | `string` | the text of the comment |\n| <a id=\"property-threadid\"></a> `threadId` | `CommentRef` | the thread id |",+ "RequestedAccessLevel": "# Type Alias: RequestedAccessLevel\n\n> **RequestedAccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"`\n\nPermission level used by an access request, excluding ownership.",+ "TaskAssignedMetadata": "# Type Alias: TaskAssignedMetadata\n\n> **TaskAssignedMetadata** = \\{ `assignedBy`: `string`; `senderProfilePictureUrl?`: `string` \\| `null`; `subType?`: `null` \\| `NotificationDocumentSubType`; `taskId`: `string`; `taskName?`: `string` \\| `null`; \\}\n\nMetadata for when a user is assigned to a task\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-assignedby\"></a> `assignedBy` | `string` | The user who assigned the task |\n| <a id=\"property-senderprofilepictureurl\"></a> `senderProfilePictureUrl?` | `string` \\| `null` | - |\n| <a id=\"property-subtype\"></a> `subType?` | `null` \\| `NotificationDocumentSubType` | - |\n| <a id=\"property-taskid\"></a> `taskId` | `string` | The unique identifier of the task |\n| <a id=\"property-taskname\"></a> `taskName?` | `string` \\| `null` | The name of the task (optional) |",+ "WhatsappGroupMessageMetadata": "# Type Alias: WhatsappGroupMessageMetadata\n\n> **WhatsappGroupMessageMetadata** = \\{ `groupName`: `string`; `messageId`: `string`; \\}\n\nA live message in an independently shared WhatsApp group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-groupname\"></a> `groupName` | `string` | Group name, independent of its remote subject. |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Stable message id; retries use it as their notification id. |",+ "AddNumberOptionRequest": "# Type Alias: AddNumberOptionRequest\n\n> **AddNumberOptionRequest** = \\{ `display_order`: `number`; `value`: `number`; \\}\n\nType-safe request to add a number option to a SelectNumber property.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `number` |",+ "AddPropertyOptionRequest": "# Type Alias: AddPropertyOptionRequest\n\n> **AddPropertyOptionRequest** = \\{ `option`: `AddStringOptionRequest`; `type`: `\"select_string\"`; \\} \\| \\{ `option`: `AddNumberOptionRequest`; `type`: `\"select_number\"`; \\}\n\nEnum for type-safe property option addition requests.",+ "AddStringOptionRequest": "# Type Alias: AddStringOptionRequest\n\n> **AddStringOptionRequest** = \\{ `color?`: `string` \\| `null`; `display_order`: `number`; `value`: `string`; \\}\n\nType-safe request to add a string option to a SelectString property.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `string` |",+ "BulkEntityOptionUpdateResult": "# Type Alias: BulkEntityOptionUpdateResult\n\n> **BulkEntityOptionUpdateResult** = \\{ `entity_id`: `string`; `entity_type`: `PropertyTargetEntityType`; `error?`: `string` \\| `null`; `option_ids?`: `string`[] \\| `null`; `status`: `BulkEntityOptionUpdateStatus`; \\}\n\nOne entity's result in a cross-entity bulk option update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` | The entity's id this result is for. |\n| <a id=\"property-entity_type\"></a> `entity_type` | `PropertyTargetEntityType` | The entity's type this result is for. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | A human-readable reason, present only when `failed`. |\n| <a id=\"property-option_ids\"></a> `option_ids?` | `string`[] \\| `null` | The entity's reconciled final option ids, present only when `applied`. |\n| <a id=\"property-status\"></a> `status` | `BulkEntityOptionUpdateStatus` | Whether the delta was applied, skipped, or failed for this entity. |",+ "BulkEntityOptionUpdateStatus": "# Type Alias: BulkEntityOptionUpdateStatus\n\n> **BulkEntityOptionUpdateStatus** = `\"applied\"` \\| `\"skipped_no_permission\"` \\| `\"failed\"`\n\nPer-entity outcome of a cross-entity bulk option update.",+ "BulkEntityPropertiesRequest": "# Type Alias: BulkEntityPropertiesRequest\n\n> **BulkEntityPropertiesRequest** = \\{ `entities`: `PropertyTargetReference`[]; `property_ids?`: `string`[]; \\}\n\nRequest for getting properties for multiple entities in bulk\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entities\"></a> `entities` | `PropertyTargetReference`[] | Array of entity references (entity_id and entity_type pairs) |\n| <a id=\"property-property_ids\"></a> `property_ids?` | `string`[] | Optional: only return properties with these definition IDs. If empty, returns all. |",+ "BulkUpdateEntityPropertyOptionsResponse": "# Type Alias: BulkUpdateEntityPropertyOptionsResponse\n\n> **BulkUpdateEntityPropertyOptionsResponse** = \\{ `properties`: `EntityPropertyOptionSelectionResponse`[]; \\}\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`[] | The final option ids per updated property. |",+ "CreatePropertyScope": "# Type Alias: CreatePropertyScope\n\n> **CreatePropertyScope** = `\"user\"` \\| `\"team\"`\n\nOwnership scope a client may request when creating a property definition.\nThe owning user or team is derived server-side from the authenticated caller -\nclients never supply owner ids. System properties are not creatable via the API.",+ "properties.DataType": "# 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.",+ "EntityPropertiesResponse": "# Type Alias: EntityPropertiesResponse\n\n> **EntityPropertiesResponse** = \\{ `entity_id`: `string`; `properties`: `EntityPropertyWithDefinition`[]; \\}\n\nResponse for document/entity properties endpoint.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-entity_id\"></a> `entity_id` | `string` |\n| <a id=\"property-properties\"></a> `properties` | `EntityPropertyWithDefinition`[] |",+ "EntityProperty": "# Type Alias: EntityProperty\n\n> **EntityProperty** = \\{ `created_at`: `string`; `entity_id`: `string`; `entity_type`: `properties.EntityType`; `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` | `properties.EntityType` |\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` |",+ "EntityPropertyOptionSelectionResponse": "# 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. |",+ "EntityPropertyWithDefinition": "# Type Alias: EntityPropertyWithDefinition\n\n> **EntityPropertyWithDefinition** = \\{ `definition`: `properties.PropertyDefinition`; `options?`: `properties.PropertyOption`[] \\| `null`; `property`: `EntityProperty`; `value?`: `null` \\| `properties.PropertyValue`; \\}\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` | `properties.PropertyDefinition` |\n| <a id=\"property-options\"></a> `options?` | `properties.PropertyOption`[] \\| `null` |\n| <a id=\"property-property\"></a> `property` | `EntityProperty` |\n| <a id=\"property-value\"></a> `value?` | `null` \\| `properties.PropertyValue` |",+ "properties.EntityReference": "# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: `properties.EntityType`; `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` | `properties.EntityType` | - |\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. |",+ "properties.EntityType": "# 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.",+ "PropertyDataType": "# Type Alias: PropertyDataType\n\n> **PropertyDataType** = \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"string\"`; \\} \\| \\{ `multi`: `boolean`; `options`: `SelectNumberOption`[]; `type`: `\"select_number\"`; \\} \\| \\{ `multi`: `boolean`; `options`: `SelectStringOption`[]; `type`: `\"select_string\"`; \\} \\| \\{ `multi`: `boolean`; `specific_type?`: `null` \\| `properties.EntityType`; `type`: `\"entity\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"link\"`; \\}\n\nData type with embedded options for requests - provides compile-time validation.",+ "properties.PropertyDefinition": "# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: `properties.DataType`; `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: `properties.PropertyOwner`; `specific_entity_type`: `null` \\| `properties.EntityType`; `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` | `properties.DataType` | - |\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` | `properties.PropertyOwner` | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| `properties.EntityType` | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |",+ "PropertyDefinitionDetailResponse": "# Type Alias: PropertyDefinitionDetailResponse\n\n> **PropertyDefinitionDetailResponse** = `properties.PropertyOwner` & \\{ `createdAt?`: `string` \\| `null`; `dataType`: `properties.DataType`; `displayName`: `string`; `id`: `string`; `isMetadata`: `boolean`; `isMultiSelect`: `boolean`; `isSystem`: `boolean`; `specificEntityType?`: `null` \\| `properties.EntityType`; `updatedAt?`: `string` \\| `null`; \\}\n\nProperty definition response (API representation).\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `createdAt?` | `string` \\| `null` | - |\n| `dataType` | `properties.DataType` | - |\n| `displayName` | `string` | - |\n| `id` | `string` | - |\n| `isMetadata` | `boolean` | Flag to indicate if this is a system-generated metadata property |\n| `isMultiSelect` | `boolean` | - |\n| `isSystem` | `boolean` | Flag to indicate if this is a system property (managed by the system) |\n| `specificEntityType?` | `null` \\| `properties.EntityType` | - |\n| `updatedAt?` | `string` \\| `null` | - |",+ "properties.PropertyOption": "# 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`: `properties.PropertyOptionValue`; \\}\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` | `properties.PropertyOptionValue` |",+ "PropertyOptionResponse": "# Type Alias: PropertyOptionResponse\n\n> **PropertyOptionResponse** = \\{ `color?`: `string` \\| `null`; `displayOrder`: `number`; `id`: `string`; `propertyDefinitionId`: `string`; `value`: `properties.PropertyOptionValue`; \\}\n\nProperty option response (API representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` |\n| <a id=\"property-displayorder\"></a> `displayOrder` | `number` |\n| <a id=\"property-id\"></a> `id` | `string` |\n| <a id=\"property-propertydefinitionid\"></a> `propertyDefinitionId` | `string` |\n| <a id=\"property-value\"></a> `value` | `properties.PropertyOptionValue` |",+ "properties.PropertyOptionValue": "# 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 |",+ "properties.PropertyOwner": "# 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.",+ "PropertyScope": "# Type Alias: PropertyScope\n\n> **PropertyScope** = `\"user\"` \\| `\"team\"` \\| `\"system\"` \\| `\"all\"`\n\nScope filter for property queries",+ "PropertyTargetEntityType": "# 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.",+ "PropertyTargetReference": "# Type Alias: PropertyTargetReference\n\n> **PropertyTargetReference** = \\{ `entity_id`: `string`; `entity_type`: `PropertyTargetEntityType`; \\}\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` | Canonical entity type. |",+ "properties.PropertyValue": "# 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`: `properties.EntityReference`[]; \\} \\| \\{ `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`: `properties.EntityReference`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | `properties.EntityReference`[] | 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+) |",+ "SelectNumberOption": "# Type Alias: SelectNumberOption\n\n> **SelectNumberOption** = \\{ `display_order`: `number`; `value`: `number`; \\}\n\nOption for select number properties in requests.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `number` |",+ "SelectStringOption": "# Type Alias: SelectStringOption\n\n> **SelectStringOption** = \\{ `display_order`: `number`; `value`: `string`; \\}\n\nOption for select-type properties in requests.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-display_order\"></a> `display_order` | `number` |\n| <a id=\"property-value\"></a> `value` | `string` |",+ "properties.SetPropertyValue": "# 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`: `properties.EntityReference`; `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: `properties.EntityReference`[]; `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.",+ "TagScope": "# Type Alias: TagScope\n\n> **TagScope** = `\"user\"` \\| `\"team\"`\n\nWhich owner a tag set belongs to.",+ "TagSetResponse": "# Type Alias: TagSetResponse\n\n> **TagSetResponse** = \\{ `definition?`: `null` \\| `PropertyDefinitionDetailResponse`; `options`: `PropertyOptionResponse`[]; `scope`: `TagScope`; \\}\n\nA tag set the caller can use. `definition` is absent until the set is provisioned\n(on first label create), in which case `options` is empty.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition?` | `null` \\| `PropertyDefinitionDetailResponse` |\n| <a id=\"property-options\"></a> `options` | `PropertyOptionResponse`[] |\n| <a id=\"property-scope\"></a> `scope` | `TagScope` |",+ "UpdatePropertyOptionRequest": "# Type Alias: UpdatePropertyOptionRequest\n\n> **UpdatePropertyOptionRequest** = \\{ `color?`: `string` \\| `null`; `display_order?`: `number` \\| `null`; `value?`: `string` \\| `null`; \\}\n\nRequest to update a property option in place. Omitted fields keep their current value.\nThe option id is preserved, so the change propagates to every entity referencing it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | New color as a hex string like `#RRGGBB`. |\n| <a id=\"property-display_order\"></a> `display_order?` | `number` \\| `null` | New display order. |\n| <a id=\"property-value\"></a> `value?` | `string` \\| `null` | New string value (label text). Only valid for SelectString and Tag properties. |",+ "ActionExecutionRecord": "# Type Alias: ActionExecutionRecord\n\n> **ActionExecutionRecord** = \\{ `action_id`: `string`; `created_at`: `string`; `end_time`: `string`; `id?`: `string` \\| `null`; `is_success`: `boolean`; `resource_id?`: `string` \\| `null`; `result`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `start_time`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-action_id\"></a> `action_id` | `string` | - |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-end_time\"></a> `end_time` | `string` | - |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | - |\n| <a id=\"property-is_success\"></a> `is_success` | `boolean` | - |\n| <a id=\"property-resource_id\"></a> `resource_id?` | `string` \\| `null` | ID of the primary resource produced by this run. Its type is recorded in `result`, independently of the routine's current configuration. |\n| <a id=\"property-result\"></a> `result` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| <a id=\"property-start_time\"></a> `start_time` | `string` | - |",+ "ActionKind": "# Type Alias: ActionKind\n\n> **ActionKind** = `\"Agent\"`",+ "ActionTrigger": "# Type Alias: ActionTrigger\n\n> **ActionTrigger** = \\{ `schedule`: `Schedule`; `timezone`: `string`; `type`: `\"cron\"`; \\} \\| \\{ `filters`: `EventFilters`; `type`: `\"events\"`; \\} \\| \\{ `triggers`: `RoutineTriggers`; `type`: `\"multiple\"`; \\}\n\nA routine may run on one trigger or any of several schedules and Macro events.",+ "scheduled-action.AgentMcpServer": "# Type Alias: AgentMcpServer\n\n> **AgentMcpServer** = \\{ `app_slug`: `string`; `server_name`: `string`; \\}\n\nOne Pipedream app an agent lists under [`AgentMcpServers::Selected`].\n\nOnly the catalog identity is stored. Whether a given person has connected\nthe app is theirs, resolved at call time by the egress proxy, never here.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-app_slug\"></a> `app_slug` | `string` | Pipedream app slug, e.g. `linear`. |\n| <a id=\"property-server_name\"></a> `server_name` | `string` | Display name, e.g. `Linear`. |",+ "AgentTaskAgent": "# Type Alias: AgentTaskAgent\n\n> **AgentTaskAgent** = \\{ `bot_id`: `string`; \\}\n\nA persona selection, independent of its runtime and current default model.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-bot_id\"></a> `bot_id` | `string` |",+ "EventFilter": "# Type Alias: EventFilter\n\n> **EventFilter** = \\{ `condition?`: `string` \\| `null`; `events`: `EventName`[]; `ids?`: `string`[] \\| `null`; \\}\n\nAn event name AND an entity ID must match within the same filter. A\ncondition further requires the event's content to answer it with yes.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition?` | `string` \\| `null` | Yes/no question about the triggering content, e.g. \"Is this email an invoice?\". The routine runs only when the answer is yes. |\n| <a id=\"property-events\"></a> `events` | `EventName`[] | - |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | - |",+ "EventFilters": "# Type Alias: EventFilters\n\n> **EventFilters** = `EventFilter`[]\n\nBounded nonempty OR of filters, canonicalized to remove duplicates.",+ "EventName": "# Type Alias: EventName\n\n> **EventName** = `\"document.created\"` \\| `\"document.updated\"` \\| `\"document.deleted\"` \\| `\"task.created\"` \\| `\"task.status_changed\"` \\| `\"task.priority_changed\"` \\| `\"task.property_changed\"` \\| `\"email.message_received\"` \\| `\"channel.created\"` \\| `\"channel.message_posted\"` \\| `\"channel.mentioned\"` \\| `\"channel.message_patched\"` \\| `\"channel.message_attachment_created\"` \\| `\"call.started\"` \\| `\"call.ended\"`\n\nClosed allowlist: unknown names, deletions and ambiguous attribution are not\nselectors. Adding a broker variant does not automatically enable routines.",+ "RoutineTrigger": "# Type Alias: RoutineTrigger\n\n> **RoutineTrigger** = \\{ `schedule`: `Schedule`; `timezone`: `string`; `type`: `\"cron\"`; \\} \\| \\{ `filters`: `EventFilters`; `type`: `\"events\"`; \\}\n\nAn individual trigger in a routine's trigger list.",+ "RoutineTriggers": "# Type Alias: RoutineTriggers\n\n> **RoutineTriggers** = `RoutineTrigger`[]\n\nBounded schedules and one combined set of event filters.",+ "RunVisibility": "# Type Alias: RunVisibility\n\n> **RunVisibility** = `\"listed\"` \\| `\"unlisted\"`\n\nWhether a routine's runs are listed in Home and the Agents list. Routines\nthat run often would bury the owner's own work, so runs start unlisted;\neither way they stay in the routine's history. The string form is the\n`scheduled_action.run_visibility` column's.",+ "Schedule": "# Type Alias: Schedule\n\n> **Schedule** = `string`",+ "ScheduledAction": "# Type Alias: ScheduledAction\n\n> **ScheduledAction** = \\{ `claimed?`: `string` \\| `null`; `configuration_revision`: `number`; `created_at`: `string`; `enabled`: `boolean`; `event_activated_at?`: `string` \\| `null`; `id?`: `string` \\| `null`; `kind`: `ActionKind`; `name`: `string`; `next_run_at?`: `string` \\| `null`; `owner`: `string`; `run_visibility`: `RunVisibility`; `task`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `trigger`: `ActionTrigger`; `updated_at`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-claimed\"></a> `claimed?` | `string` \\| `null` | - |\n| <a id=\"property-configuration_revision\"></a> `configuration_revision` | `number` | Independent of execution bookkeeping in `updated_at`. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-enabled\"></a> `enabled` | `boolean` | When false, automatic dispatch skips this action. `run_now` remains available regardless. |\n| <a id=\"property-event_activated_at\"></a> `event_activated_at?` | `string` \\| `null` | Event publication boundary; absent for cron actions. |\n| <a id=\"property-id\"></a> `id?` | `string` \\| `null` | - |\n| <a id=\"property-kind\"></a> `kind` | `ActionKind` | - |\n| <a id=\"property-name\"></a> `name` | `string` | - |\n| <a id=\"property-next_run_at\"></a> `next_run_at?` | `string` \\| `null` | Next cron firing, absent for event-triggered actions. |\n| <a id=\"property-owner\"></a> `owner` | `string` | Who the action belongs to. Every action is user-owned today, but the type no longer says so: the principal string on the wire and in the `owner` column is the same, and a bot- or team-owned row decodes rather than failing to parse. |\n| <a id=\"property-run_visibility\"></a> `run_visibility` | `RunVisibility` | Whether the action's runs are listed in Home and the Agents list. |\n| <a id=\"property-task\"></a> `task` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| <a id=\"property-trigger\"></a> `trigger` | `ActionTrigger` | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |",+ "ScheduledActionResponse": "# Type Alias: ScheduledActionResponse\n\n> **ScheduledActionResponse** = `ScheduledAction` & \\{ `schedule?`: `string` \\| `null`; `timezone?`: `string` \\| `null`; \\}\n\nCanonical trigger plus deprecated cron fields for existing clients. Event\nresponses omit legacy fields rather than inventing a schedule or timezone.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `schedule?` | `string` \\| `null` | Deprecated: use `trigger.schedule`. Present only for cron actions. **Deprecated** |\n| `timezone?` | `string` \\| `null` | Deprecated: use `trigger.timezone`. Present only for cron actions. **Deprecated** |",+ "AgentSessionFilters": "# Type Alias: AgentSessionFilters\n\n> **AgentSessionFilters** = \\{ `ids?`: `string`[]; `include?`: `boolean`; `owners?`: `string`[]; \\}\n\nFilters for agent sessions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] | Agent session ids to filter by. Empty to include all accessible sessions. |\n| <a id=\"property-include\"></a> `include?` | `boolean` | Opt this query into agent sessions at all. Agent sessions are off by default — see [`crate::ast::agent_session::AgentSessionLiteral::Include`]. Asking for specific `ids` or `owners` also opts in. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by session owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every owner. |",+ "CalendarEventFilters": "# Type Alias: CalendarEventFilters\n\n> **CalendarEventFilters** = \\{ `attendees?`: `string`[]; `calendar_event_ids?`: `string`[]; `ends_after?`: `string` \\| `null`; `organizers?`: `string`[]; `starts_before?`: `string` \\| `null`; `statuses?`: `string`[]; \\}\n\nFilters for canonical calendar-event entities.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | `string`[] | Attendee email addresses. |\n| <a id=\"property-calendar_event_ids\"></a> `calendar_event_ids?` | `string`[] | Canonical event ids. |\n| <a id=\"property-ends_after\"></a> `ends_after?` | `string` \\| `null` | Include master events ending after this instant. |\n| <a id=\"property-organizers\"></a> `organizers?` | `string`[] | Organizer email addresses. |\n| <a id=\"property-starts_before\"></a> `starts_before?` | `string` \\| `null` | Include master events starting before this instant. |\n| <a id=\"property-statuses\"></a> `statuses?` | `string`[] | Event statuses such as `confirmed`, `tentative`, or `cancelled`. |",+ "CallFilters": "# Type Alias: CallFilters\n\n> **CallFilters** = \\{ `attended?`: `boolean` \\| `null`; `call_ids?`: `string`[]; `channel_ids?`: `string`[]; `speaker_ids?`: `string`[]; `status?`: `null` \\| `search.CallStatus`; \\}\n\nFilters for call records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attended\"></a> `attended?` | `boolean` \\| `null` | Legacy filter by whether the requesting user attended the call. Prefer [`CallFilters::status`] for new callers. `None` = no filter, `Some(true)` = only calls the user joined, `Some(false)` = only calls the user did not join. |\n| <a id=\"property-call_ids\"></a> `call_ids?` | `string`[] | Call record IDs to filter by. Empty to include all calls. |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs to filter calls by. Empty to include all calls. |\n| <a id=\"property-speaker_ids\"></a> `speaker_ids?` | `string`[] | Speaker macro user ids. Empty to include all. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| `search.CallStatus` | - |",+ "search.CallStatus": "# Type Alias: CallStatus\n\n> **CallStatus** = `\"ATTENDED\"` \\| `\"MISSED\"` \\| `\"UNATTENDED\"`\n\nViewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.",+ "ChannelFilters": "# Type Alias: ChannelFilters\n\n> **ChannelFilters** = \\{ `channel_ids?`: `string`[]; `channel_types?`: `string`[]; `importance?`: `boolean` \\| `null`; `is_participant?`: `boolean` \\| `null`; `mentions?`: `string`[]; `notification_filters?`: `NotificationFilters`; `org_id?`: `number` \\| `null`; `sender_ids?`: `string`[]; `team_id?`: `string` \\| `null`; `thread_ids?`: `string`[]; \\}\n\nThe channel message filters used to filter down what channel messages you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels. |\n| <a id=\"property-channel_types\"></a> `channel_types?` | `string`[] | Channel types to filter by. Examples: ['public'], ['direct_message', 'private']. Empty to search all channel types. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by channel importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-is_participant\"></a> `is_participant?` | `boolean` \\| `null` | Filter by whether the requesting user is an active participant of the channel. Presence of this filter also widens the candidate set to team channels of the user's teams that they have not joined, so `false` matches those channels. None to ignore (participant channels only, today's default). |\n| <a id=\"property-mentions\"></a> `mentions?` | `string`[] | Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by channel notification state. |\n| <a id=\"property-org_id\"></a> `org_id?` | `number` \\| `null` | Channel organization ID to search within. Empty to ignore organization filtering. |\n| <a id=\"property-sender_ids\"></a> `sender_ids?` | `string`[] | Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders. |\n| <a id=\"property-team_id\"></a> `team_id?` | `string` \\| `null` | Channel team ID to search within. Empty to ignore team filtering. |\n| <a id=\"property-thread_ids\"></a> `thread_ids?` | `string`[] | Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads. |",+ "ChannelThreadFilters": "# Type Alias: ChannelThreadFilters\n\n> **ChannelThreadFilters** = \\{ `channel_ids?`: `string`[]; `participant_ids?`: `string`[]; `root_sender_ids?`: `string`[]; `thread_ids?`: `string`[]; \\}\n\nThe channel thread filters used to filter down channel-thread entities.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Channel IDs containing the thread. Empty to include threads from all accessible channels. |\n| <a id=\"property-participant_ids\"></a> `participant_ids?` | `string`[] | Thread participant user IDs. A participant is the root message sender, anyone who replied in the thread, or anyone @-mentioned in the thread (group mentions like **Here** count through their per-user expansion at send time). Empty to include threads regardless of participants. |\n| <a id=\"property-root_sender_ids\"></a> `root_sender_ids?` | `string`[] | Sender IDs for the root thread message. Empty to include all root senders. |\n| <a id=\"property-thread_ids\"></a> `thread_ids?` | `string`[] | Channel thread parent message IDs to include. Empty to include all accessible threads. |",+ "ChatFilters": "# Type Alias: ChatFilters\n\n> **ChatFilters** = \\{ `chat_ids?`: `string`[]; `importance?`: `boolean` \\| `null`; `notification_filters?`: `NotificationFilters`; `owners?`: `string`[]; `project_ids?`: `string`[]; `role?`: `string`[]; \\}\n\nThe chat filters used to filter down what chats you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-chat_ids\"></a> `chat_ids?` | `string`[] | Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by chat importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by chat notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by chat owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering. |\n| <a id=\"property-role\"></a> `role?` | `string`[] | Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles. |",+ "CrmCompanyFilters": "# Type Alias: CrmCompanyFilters\n\n> **CrmCompanyFilters** = \\{ `company_ids?`: `string`[]; `hidden?`: `boolean` \\| `null`; \\}\n\nThe crm company filters used to narrow which CRM companies appear in soup.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-company_ids\"></a> `company_ids?` | `string`[] | CRM company ids to filter by. Examples: ['11111111-...']. Empty to include all of the team's visible CRM companies. |\n| <a id=\"property-hidden\"></a> `hidden?` | `boolean` \\| `null` | Optional `crm_companies.hidden` filter. `None` = visible only (default for back-compat with non-admin callers). `Some(false)` = visible only (explicit). `Some(true)` = hidden only — requires admin/owner team role; enforced by the CRM service from the caller's team receipt. |",+ "DocumentFilters": "# Type Alias: DocumentFilters\n\n> **DocumentFilters** = \\{ `document_ids?`: `string`[]; `file_types?`: `string`[]; `importance?`: `boolean` \\| `null`; `is_email_attachment?`: `boolean` \\| `null`; `notification_filters?`: `NotificationFilters`; `owners?`: `string`[]; `project_ids?`: `string`[]; `sub_types?`: `string`[]; `task_filters?`: `TaskFilters`; \\}\n\nThe document filters used to filter down what documents you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-document_ids\"></a> `document_ids?` | `string`[] | Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents. |\n| <a id=\"property-file_types\"></a> `file_types?` | `string`[] | Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by document importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-is_email_attachment\"></a> `is_email_attachment?` | `boolean` \\| `null` | Filter by email attachment status. true = only email attachments, false = only non-email attachments, None = both. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by document notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by document owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Examples: ['project1']. filtering. Empty to ignore project filtering. |\n| <a id=\"property-sub_types\"></a> `sub_types?` | `string`[] | Filter by document sub type. Examples: ['task']. Empty to search all sub types. |\n| <a id=\"property-task_filters\"></a> `task_filters?` | `TaskFilters` | Task-specific filters that only apply to task subtype documents. |",+ "EmailFilters": "# Type Alias: EmailFilters\n\n> **EmailFilters** = \\{ `bcc?`: `string`[]; `calendar_only?`: `boolean` \\| `null`; `cc?`: `string`[]; `crm_addresses?`: `string`[]; `crm_domains?`: `string`[]; `email_thread_ids?`: `string`[]; `exclude_labels?`: `string`[]; `importance?`: `boolean` \\| `null`; `include_labels?`: `string`[]; `is_read?`: `boolean` \\| `null`; `link_ids?`: `string`[]; `notification_filters?`: `NotificationFilters`; `project_ids?`: `string`[]; `recipients?`: `string`[]; `senders?`: `string`[]; `shared?`: `SharedEmailFilter`; \\}\n\nThe email filters used to filter down what emails you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | `string`[] | Email BCC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by BCC. |\n| <a id=\"property-calendar_only\"></a> `calendar_only?` | `boolean` \\| `null` | When `Some(true)`, only include threads that have at least one message with an iCalendar attachment (`.ics` filename or `application/ics` mime type). `Some(false)` and `None` apply no constraint. |\n| <a id=\"property-cc\"></a> `cc?` | `string`[] | Email CC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by CC. |\n| <a id=\"property-crm_addresses\"></a> `crm_addresses?` | `string`[] | CRM-scoped address filter. When non-empty, expands visibility to every teammate's mailbox and restricts to threads involving any of these fully-qualified addresses. Each address is authorized against `crm_contacts` + `crm_companies` (contact must not be hidden, company must not be hidden, `email_sync` must be true). Mutually exclusive with `crm_domains`. |\n| <a id=\"property-crm_domains\"></a> `crm_domains?` | `string`[] | CRM-scoped domain filter. When non-empty, expands visibility to every teammate's mailbox and restricts to threads involving any of these domains (in any of sender/cc/bcc/recipient). Each domain is authorized against `crm_domains` + `crm_companies` (must exist for the caller's team, company must not be hidden, `email_sync` must be true). Mutually exclusive with `crm_addresses`. |\n| <a id=\"property-email_thread_ids\"></a> `email_thread_ids?` | `string`[] | Email thread IDs to filter by. Examples: ['thread-uuid-1']. Empty to search all threads. |\n| <a id=\"property-exclude_labels\"></a> `exclude_labels?` | `string`[] | Exclude emails that have any of these labels. Supports both Gmail system labels (e.g. \"CATEGORY_PROMOTIONS\") and user-created labels. Empty to not exclude any labels. Note: SPAM and TRASH emails are not indexed in OpenSearch, so they are already excluded by default. |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by email importance. None to not filter. True to show only important emails (drafts, personal, sent, or uncategorized). False to show only unimportant emails (those categorized as promotions, social, updates, or forums). |\n| <a id=\"property-include_labels\"></a> `include_labels?` | `string`[] | Only include emails that have at least one of these labels. Supports both Gmail system labels (e.g. \"INBOX\", \"CATEGORY_PROMOTIONS\") and user-created labels (e.g. \"github\"). Empty to not filter by included labels. Note: SPAM and TRASH emails are not indexed in OpenSearch, so they will never appear in results regardless of this filter. |\n| <a id=\"property-is_read\"></a> `is_read?` | `boolean` \\| `null` | Filter by the email thread's read flag, independently of notification state. |\n| <a id=\"property-link_ids\"></a> `link_ids?` | `string`[] | Restrict to specific inboxes by email_links.id. Empty means \"any inbox the caller can access\" (soup expands to the full set at the router edge). |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by email notification state. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | A list of project ids to search within. Empty to ignore project filtering. |\n| <a id=\"property-recipients\"></a> `recipients?` | `string`[] | Email Recipient addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by Recipient. |\n| <a id=\"property-senders\"></a> `senders?` | `string`[] | Email sender addresses to filter by. Examples: ['[email protected]']. Empty to search all senders. |\n| <a id=\"property-shared\"></a> `shared?` | `SharedEmailFilter` | Controls whether shared email threads are included in results. Defaults to \"exclude\" (only the user's own threads). |",+ "EntityFilters": "# Type Alias: EntityFilters\n\n> **EntityFilters** = \\{ `agent_session_filters?`: `AgentSessionFilters`; `calendar_event_filters?`: `CalendarEventFilters`; `call_filters?`: `CallFilters`; `channel_filters?`: `ChannelFilters`; `channel_thread_filters?`: `ChannelThreadFilters`; `chat_filters?`: `ChatFilters`; `crm_company_filters?`: `CrmCompanyFilters`; `document_filters?`: `DocumentFilters`; `email_filters?`: `EmailFilters`; `favorites_only?`: `boolean` \\| `null`; `foreign_entity_filters?`: `ForeignEntityFilters`; `initiative_filters?`: `InitiativeFilters`; `project_filters?`: `ProjectFilters`; `property_filters?`: `PropertyFilter`[]; `tag_filter_mode?`: `TagFilterMode`; `tag_option_ids?`: `string`[]; \\}\n\na bundle of all of the filters for each entity type\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-agent_session_filters\"></a> `agent_session_filters?` | `AgentSessionFilters` | the bundled [AgentSessionFilters] |\n| <a id=\"property-calendar_event_filters\"></a> `calendar_event_filters?` | `CalendarEventFilters` | the bundled [CalendarEventFilters] |\n| <a id=\"property-call_filters\"></a> `call_filters?` | `CallFilters` | the bundled [CallFilters] |\n| <a id=\"property-channel_filters\"></a> `channel_filters?` | `ChannelFilters` | the bundled [ChannelFilters] |\n| <a id=\"property-channel_thread_filters\"></a> `channel_thread_filters?` | `ChannelThreadFilters` | the bundled [ChannelThreadFilters] |\n| <a id=\"property-chat_filters\"></a> `chat_filters?` | `ChatFilters` | the bundled [ChatFilters] |\n| <a id=\"property-crm_company_filters\"></a> `crm_company_filters?` | `CrmCompanyFilters` | the bundled [CrmCompanyFilters] |\n| <a id=\"property-document_filters\"></a> `document_filters?` | `DocumentFilters` | the bundled [DocumentFilters] |\n| <a id=\"property-email_filters\"></a> `email_filters?` | `EmailFilters` | the bundled [EmailFilters] |\n| <a id=\"property-favorites_only\"></a> `favorites_only?` | `boolean` \\| `null` | Restrict results to the authenticated viewer's favorites when true. |\n| <a id=\"property-foreign_entity_filters\"></a> `foreign_entity_filters?` | `ForeignEntityFilters` | the bundled [ForeignEntityFilters] |\n| <a id=\"property-initiative_filters\"></a> `initiative_filters?` | `InitiativeFilters` | Initiative filters. Initiatives are opt-in. |\n| <a id=\"property-project_filters\"></a> `project_filters?` | `ProjectFilters` | the bundled [ProjectFilters] |\n| <a id=\"property-property_filters\"></a> `property_filters?` | `PropertyFilter`[] | property-based filters applied across entity types |\n| <a id=\"property-tag_filter_mode\"></a> `tag_filter_mode?` | `TagFilterMode` | How the `tag_option_ids` combine: `any` (default) matches entities holding at least one selected tag, `all` requires every selected tag. |\n| <a id=\"property-tag_option_ids\"></a> `tag_option_ids?` | `string`[] | tag option ids matched against `properties.values`, OR'd together across all tag definitions. Option ids are globally unique, so the match ignores the owning definition id (personal and team tags combine into one OR). |",+ "ForeignEntityFilters": "# Type Alias: ForeignEntityFilters\n\n> **ForeignEntityFilters** = \\{ `foreign_entity_ids?`: `string`[]; `foreign_entity_sources?`: `string`[]; `ids?`: `string`[]; `includes_me?`: `boolean`; `notification_filters?`: `NotificationFilters`; \\}\n\nFilters for foreign entity records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-foreign_entity_ids\"></a> `foreign_entity_ids?` | `string`[] | External entity identifiers to filter by. Empty to include all external IDs. |\n| <a id=\"property-foreign_entity_sources\"></a> `foreign_entity_sources?` | `string`[] | External source names to filter by. Empty to include all sources. |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] | Internal foreign entity record IDs to filter by. Empty to include all records. |\n| <a id=\"property-includes_me\"></a> `includes_me?` | `boolean` | When true, only return foreign entities whose metadata lists the requesting user as a participant (GitHub `involves:me` semantics for `github_pull_request` records). False or absent applies no filter. Serialized in filter ASTs as the `\"me\"` literal. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by the notification state of the foreign entity (e.g. whether the requesting user's GitHub PR notification is done/seen). |",+ "InitiativeFilters": "# Type Alias: InitiativeFilters\n\n> **InitiativeFilters** = \\{ `due_after?`: `string` \\| `null`; `due_before?`: `string` \\| `null`; `include?`: `boolean`; `initiative_ids?`: `string`[]; `name?`: `string` \\| `null`; `owners?`: `string`[]; \\}\n\nFilters for initiatives.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-due_after\"></a> `due_after?` | `string` \\| `null` | Inclusive lower due-date bound. |\n| <a id=\"property-due_before\"></a> `due_before?` | `string` \\| `null` | Inclusive upper due-date bound. |\n| <a id=\"property-include\"></a> `include?` | `boolean` | Opt this query into initiatives at all. Initiatives are off by default — see [`crate::ast::initiative::InitiativeLiteral::Include`]. Asking for specific `initiative_ids` or `owners` also opts in. |\n| <a id=\"property-initiative_ids\"></a> `initiative_ids?` | `string`[] | Initiative ids to filter by. Empty to include all accessible initiatives. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Case-insensitive name substring. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by initiative owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every owner. |",+ "NotificationFilters": "# Type Alias: NotificationFilters\n\n> **NotificationFilters** = \\{ `states?`: `search.NotificationState`[]; \\}\n\nNotification-level filters that apply to an entity type.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-states\"></a> `states?` | `search.NotificationState`[] | Include entities with a non-deleted notification in any of these exact states. Empty means no notification restriction. Active means `[unseen, seen]`. |",+ "search.NotificationState": "# Type Alias: NotificationState\n\n> **NotificationState** = `\"unseen\"` \\| `\"seen\"` \\| `\"done\"`\n\nThe mutually exclusive lifecycle states of a user's notification.",+ "ProjectFilters": "# Type Alias: ProjectFilters\n\n> **ProjectFilters** = \\{ `importance?`: `boolean` \\| `null`; `include_root?`: `boolean`; `notification_filters?`: `NotificationFilters`; `owners?`: `string`[]; `project_ids?`: `string`[]; \\}\n\nThe project filters used to filter down what projects you search over.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-importance\"></a> `importance?` | `boolean` \\| `null` | Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing. |\n| <a id=\"property-include_root\"></a> `include_root?` | `boolean` | When true, `project_ids` also matches the projects themselves in addition to their children. |\n| <a id=\"property-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by project notification state. |\n| <a id=\"property-owners\"></a> `owners?` | `string`[] | Filter by project owner principal — a user ('macro\\|[email protected]'), a bot ('bot\\|<uuid>'), or a team (a bare hyphenated uuid). Examples: ['macro\\|[email protected]'], ['macro\\|[email protected]', 'bot\\|0199...']. Empty to search all owners. |\n| <a id=\"property-project_ids\"></a> `project_ids?` | `string`[] | Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects. By default matches children of these projects; set `include_root` to also match the projects themselves. |",+ "PropertyFilter": "# Type Alias: PropertyFilter\n\n> **PropertyFilter** = \\{ `entity_ids?`: `string`[]; `entity_type?`: `string` \\| `null`; `option_ids?`: `string`[]; `property_definition_id`: `string`; \\}\n\nA single property-based filter condition.\n\nEach filter targets a specific property definition on entities of a given type,\nmatching against select option UUIDs or entity reference IDs.\nMultiple values within a single filter are OR'd together.\nMultiple filters are AND'd together.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entity_ids\"></a> `entity_ids?` | `string`[] | Entity reference IDs to match. Multiple values are OR'd together. |\n| <a id=\"property-entity_type\"></a> `entity_type?` | `string` \\| `null` | The entity type for the property lookup (e.g., \"TASK\", \"DOCUMENT\", \"PROJECT\"). When None, matches across all entity types. |\n| <a id=\"property-option_ids\"></a> `option_ids?` | `string`[] | Select option UUIDs to match. Multiple values are OR'd together. |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` | The UUID of the property definition to filter on. |",+ "SharedEmailFilter": "# Type Alias: SharedEmailFilter\n\n> **SharedEmailFilter** = `\"exclude\"` \\| `\"include\"` \\| `\"only\"`\n\nControls whether shared email threads are included in results.",+ "TagFilterMode": "# Type Alias: TagFilterMode\n\n> **TagFilterMode** = `\"any\"` \\| `\"all\"`\n\nHow multiple `tag_option_ids` combine when filtering.",+ "TaskFilters": "# Type Alias: TaskFilters\n\n> **TaskFilters** = \\{ `include_cbm_atm_nc?`: `boolean` \\| `null`; \\}\n\nTask-only filters nested under document filters.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-include_cbm_atm_nc\"></a> `include_cbm_atm_nc?` | `boolean` \\| `null` | Include tasks that are created by me, assigned to me, and not completed, even when they do not match other document filters. |",+ "storage.AccessLevel": "# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom",+ "storage.AccessRequest": "# Type Alias: AccessRequest\n\n> **AccessRequest** = \\{ `createdAt`: `string`; `grantedLevel?`: `null` \\| `storage.AccessLevel`; `id`: `string`; `requestedLevel`: `storage.AccessLevel`; `requesterId`: `string`; `resolvedAt?`: `string` \\| `null`; `retryAfter?`: `string` \\| `null`; `revision`: `number`; `status`: `RequestStatus`; `updatedAt`: `string`; \\}\n\nLatest request for one person and one entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Start of this request attempt. |\n| <a id=\"property-grantedlevel\"></a> `grantedLevel?` | `null` \\| `storage.AccessLevel` | - |\n| <a id=\"property-id\"></a> `id` | `string` | Stable request identity across revisions. |\n| <a id=\"property-requestedlevel\"></a> `requestedLevel` | `storage.AccessLevel` | Requested upgrade. |\n| <a id=\"property-requesterid\"></a> `requesterId` | `string` | Person requesting access. |\n| <a id=\"property-resolvedat\"></a> `resolvedAt?` | `string` \\| `null` | When the request stopped being pending. |\n| <a id=\"property-retryafter\"></a> `retryAfter?` | `string` \\| `null` | Earliest next submission or level change; cancellation preserves this deadline. Submissions wait one minute, denials wait 24 hours, and approval clears it. |\n| <a id=\"property-revision\"></a> `revision` | `number` | Optimistic concurrency token. |\n| <a id=\"property-status\"></a> `status` | `RequestStatus` | Current outcome. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Most recent change. |",+ "AccessiblePipeline": "# Type Alias: AccessiblePipeline\n\n> **AccessiblePipeline** = `Pipeline` & \\{ `grant`: `storage.AccessLevel`; \\}\n\nMetadata together with the caller's effective grant.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `grant` | `storage.AccessLevel` | Highest effective access. |",+ "ActivityType": "# Type Alias: ActivityType\n\n> **ActivityType** = `\"view\"` \\| `\"interact\"`\n\nThe kind of activity a user performs in a channel.",+ "storage.Agent": "# Type Alias: Agent\n\n> **Agent** = \\{ `auto_accept_permissions?`: `boolean` \\| `null`; `bot`: `Bot`; `channel_ids`: `string`[]; `channel_scope`: `AgentChannelScope`; `default_model`: `string`; `harness`: `string`; `harness_id?`: `null` \\| `HarnessId`; `instructions`: `string`; `is_coding`: `boolean`; `mcp`: `AgentMcpServers`; \\}\n\nA persisted user- or team-owned AI agent.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auto_accept_permissions\"></a> `auto_accept_permissions?` | `boolean` \\| `null` | Whether the agent's sessions approve ACP permission requests without asking. `None` means always prompt. Bypass also requires the harness's opt-in. |\n| <a id=\"property-bot\"></a> `bot` | `Bot` | The bot identity used for mentions and channel participation. |\n| <a id=\"property-channel_ids\"></a> `channel_ids` | `string`[] | Selected channel ids. Empty for a global agent. |\n| <a id=\"property-channel_scope\"></a> `channel_scope` | `AgentChannelScope` | Whether the agent is global or channel-specific. |\n| <a id=\"property-default_model\"></a> `default_model` | `string` | Model selected specifically for this agent. |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness used to run the agent. |\n| <a id=\"property-harness_id\"></a> `harness_id?` | `null` \\| `HarnessId` | - |\n| <a id=\"property-instructions\"></a> `instructions` | `string` | Instructions supplied to the agent at the start of a conversation. |\n| <a id=\"property-is_coding\"></a> `is_coding` | `boolean` | Whether the agent works in a repository, which decides how it answers a channel mention: a coding agent posts a magic chip into its live session, a chat agent replies in the thread. Chosen in the agent's settings; the persona's word, not the runtime's. |\n| <a id=\"property-mcp\"></a> `mcp` | `AgentMcpServers` | Which MCP servers sessions of this agent are handed. |",+ "AgentChannelScope": "# Type Alias: AgentChannelScope\n\n> **AgentChannelScope** = `\"all\"` \\| `\"selected\"`\n\nWhether an agent is available everywhere or only in selected channels.",+ "storage.AgentMcpServer": "# Type Alias: AgentMcpServer\n\n> **AgentMcpServer** = \\{ `app_slug`: `string`; `server_name`: `string`; \\}\n\nOne Pipedream app an agent lists under [`AgentMcpServers::Selected`].\n\nOnly the catalog identity is stored. Whether a given person has connected\nthe app is theirs, resolved at call time by the egress proxy, never here.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-app_slug\"></a> `app_slug` | `string` | Pipedream app slug, e.g. `linear`. |\n| <a id=\"property-server_name\"></a> `server_name` | `string` | Display name, e.g. `Linear`. |",+ "AgentMcpServers": "# Type Alias: AgentMcpServers\n\n> **AgentMcpServers** = \\{ `scope`: `\"owner_connections\"`; \\} \\| \\{ `scope`: `\"selected\"`; `servers`: `storage.AgentMcpServer`[]; \\}\n\nWhich Pipedream MCP servers an agent's sessions are handed.\n\nOne value for the whole choice, so a selection can never travel without\nits scope or a scope without its selection. Serialized with a `scope` tag,\nwhich the generated TypeScript sees as a discriminated union.\n\n## Union Members\n\n### Type Literal\n\n\\{ `scope`: `\"owner_connections\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `scope`: `\"selected\"`; `servers`: `storage.AgentMcpServer`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `scope` | `\"selected\"` | - |\n| `servers` | `storage.AgentMcpServer`[] | The apps, in the order the agent's author picked them. |",+ "Anchor": "# Type Alias: Anchor\n\n> **Anchor** = `PdfAnchor`",+ "ApiActivity": "# Type Alias: ApiActivity\n\n> **ApiActivity** = \\{ `channel_id`: `string`; `created_at`: `string`; `id`: `string`; `interacted_at?`: `string` \\| `null`; `updated_at`: `string`; `user_id`: `string`; `viewed_at?`: `string` \\| `null`; \\}\n\nA user's activity (view/interaction) within a channel.\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 activity row was created. |\n| <a id=\"property-id\"></a> `id` | `string` | Activity id. |\n| <a id=\"property-interacted_at\"></a> `interacted_at?` | `string` \\| `null` | The last time the user interacted with the channel. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | When the activity row was last updated. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User id. |\n| <a id=\"property-viewed_at\"></a> `viewed_at?` | `string` \\| `null` | The last time the user viewed the channel. |",+ "ApiChannelAttachment": "# 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). |",+ "ApiChannelAttachmentsPage": "# Type Alias: ApiChannelAttachmentsPage\n\n> **ApiChannelAttachmentsPage** = \\{ `items`: `ApiChannelAttachment`[]; `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`[] | 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. |",+ "ApiChannelDetail": "# Type Alias: ApiChannelDetail\n\n> **ApiChannelDetail** = \\{ `channel_id`: `string`; `channel_name`: `string`; `channel_type`: `storage.ChannelType`; `participants`: `ApiChannelParticipant`[]; \\}\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` | `storage.ChannelType` | Channel type. |\n| <a id=\"property-participants\"></a> `participants` | `ApiChannelParticipant`[] | Active participants. |",+ "ApiChannelParticipant": "# Type Alias: ApiChannelParticipant\n\n> **ApiChannelParticipant** = \\{ `channel_id`: `string`; `joined_at`: `string`; `role`: `ApiParticipantRole`; `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` | Role in the channel. |\n| <a id=\"property-user_id\"></a> `user_id` | `string` | User id. |",+ "ApiParticipantRole": "# Type Alias: ApiParticipantRole\n\n> **ApiParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nParticipant role in a channel.",+ "AppliedOps": "# Type Alias: AppliedOps\n\n> **AppliedOps** = \\{ `changes`: `CommittedChange`[]; `results`: `OpResult`[]; \\}\n\nWhat a committed batch answers: a result per op, and the journal's change\nfor each table version it produced.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-changes\"></a> `changes` | `CommittedChange`[] | The journal's changes. |\n| <a id=\"property-results\"></a> `results` | `OpResult`[] | One result per op, in order. |",+ "storage.AttendeeResponseStatus": "# Type Alias: AttendeeResponseStatus\n\n> **AttendeeResponseStatus** = `\"needs_action\"` \\| `\"accepted\"` \\| `\"declined\"` \\| `\"tentative\"`\n\nRSVP state for an attendee.",+ "Audience": "# Type Alias: Audience\n\n> **Audience** = `\"members\"` \\| `\"public\"`\n\nWho may respond to a form.",+ "BTreeMap": "# Type Alias: BTreeMap\n\n> **BTreeMap** = \\{\\[`key`: `string`\\]: `string`; \\}\n\n## Index Signature\n\n\\[`key`: `string`\\]: `string`",+ "BasicDocument": "# Type Alias: BasicDocument\n\n> **BasicDocument** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `owner`: `string`; `projectId?`: `string` \\| `null`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| `BasicDocumentSubType`; `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-documentfamilyid\"></a> `documentFamilyId?` | `number` \\| `null` | The id of the document family this document belongs to |\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 (e.g. pdf, docx) |\n| <a id=\"property-id\"></a> `id` | `string` | The document id |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the document |\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-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` \\| `BasicDocumentSubType` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the document instance / document BOM was updated |",+ "BasicDocumentSubType": "# Type Alias: BasicDocumentSubType\n\n> **BasicDocumentSubType** = \\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\} \\| \\{ `type`: `\"snippet\"`; \\} \\| \\{ `type`: `\"skill\"`; \\} \\| \\{ `type`: `\"initiative_description\"`; \\}\n\nSub type of a document with associated properties encoded in each variant.\nThis ensures type-safety: task properties only exist when the document is a task.\n\n## Union Members\n\n### Type Literal\n\n\\{ `is_completed`: `boolean`; `type`: `\"task\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `is_completed` | `boolean` | Whether the task is completed. True if the Status property is set to \"Completed\". |\n| `type` | `\"task\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"snippet\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"skill\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"initiative_description\"`; \\}",+ "BomPart": "# 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. |",+ "BookingTarget": "# Type Alias: BookingTarget\n\n> **BookingTarget** = \\{ `eventTypeId`: `string`; `profileId`: `string`; \\}\n\nAn existing native Macro scheduling event offered after an accepted response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventtypeid\"></a> `eventTypeId` | `string` | The event type to book. |\n| <a id=\"property-profileid\"></a> `profileId` | `string` | The scheduling profile that owns the event. |",+ "Bot": "# Type Alias: Bot\n\n> **Bot** = \\{ `avatar_url?`: `string` \\| `null`; `created_at`: `string`; `created_by?`: `string` \\| `null`; `deleted_at?`: `string` \\| `null`; `description?`: `string` \\| `null`; `handle`: `string`; `has_agent`: `boolean`; `id`: `storage.BotId`; `kind`: `BotKind`; `name`: `string`; `owner?`: `null` \\| `BotOwner`; `updated_at`: `string`; \\}\n\nBot row.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Optional avatar URL. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by\"></a> `created_by?` | `string` \\| `null` | User that created this bot. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Soft-delete timestamp. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable handle. |\n| <a id=\"property-has_agent\"></a> `has_agent` | `boolean` | Whether mentioning this bot opens a sandboxed coding-agent session. |\n| <a id=\"property-id\"></a> `id` | `storage.BotId` | Bot id. |\n| <a id=\"property-kind\"></a> `kind` | `BotKind` | Bot kind. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner\"></a> `owner?` | `null` \\| `BotOwner` | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |",+ "BotChannel": "# Type Alias: BotChannel\n\n> **BotChannel** = \\{ `channel_id`: `string`; `channel_type`: `BotChannelType`; `joined_at`: `string`; `name?`: `string` \\| `null`; \\}\n\nChannel containing a bot.\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_type\"></a> `channel_type` | `BotChannelType` | Channel type. |\n| <a id=\"property-joined_at\"></a> `joined_at` | `string` | Timestamp when the bot joined the channel. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Channel display name. |",+ "BotChannelType": "# Type Alias: BotChannelType\n\n> **BotChannelType** = `\"public\"` \\| `\"private\"` \\| `\"direct_message\"` \\| `\"team\"`\n\nChannel type for a channel containing a bot.",+ "storage.BotId": "# Type Alias: BotId\n\n> **BotId** = `string`",+ "BotKind": "# Type Alias: BotKind\n\n> **BotKind** = `\"owned\"` \\| `\"system\"`\n\nBot kind.",+ "BotOwner": "# Type Alias: BotOwner\n\n> **BotOwner** = \\{ `type`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\nBot owner.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"user\"`; `user_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"user\"` | - |\n| `user_id` | `string` | Owner user id. |\n\n***\n\n### Type Literal\n\n\\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `team_id` | `string` | Owner team id. |\n| `type` | `\"team\"` | - |",+ "BotSenderProfile": "# 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. |",+ "storage.CalendarAttendee": "# Type Alias: CalendarAttendee\n\n> **CalendarAttendee** = \\{ `comment?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `isSelf`: `boolean`; `responseStatus`: `storage.AttendeeResponseStatus`; \\}\n\nAn attendee on a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Optional attendee comment. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Provider display name. |\n| <a id=\"property-email\"></a> `email` | `string` | Normalized email address. |\n| <a id=\"property-isoptional\"></a> `isOptional` | `boolean` | Whether attendance is optional. |\n| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee is the organizer. |\n| <a id=\"property-isself\"></a> `isSelf` | `boolean` | Whether this attendee is one of the viewing requester's inboxes. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | `storage.AttendeeResponseStatus` | RSVP state. |",+ "storage.CalendarOccurrence": "# Type Alias: CalendarOccurrence\n\n> **CalendarOccurrence** = \\{ `eventId`: `string`; `isCancelled`: `boolean`; `occurrenceKey`: `string`; `recurrenceId?`: `string` \\| `null`; `time`: `storage.EventTime`; \\}\n\nA materialized recurrence instance optimized for range queries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Owning event entity. |\n| <a id=\"property-iscancelled\"></a> `isCancelled` | `boolean` | Whether the instance was cancelled. |\n| <a id=\"property-occurrencekey\"></a> `occurrenceKey` | `string` | Stable key within the event. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` \\| `null` | Provider recurrence identifier, when applicable. |\n| <a id=\"property-time\"></a> `time` | `storage.EventTime` | Instance time. |",+ "CallProvider": "# Type Alias: CallProvider\n\n> **CallProvider** = `\"macro\"` \\| `\"granola\"`\n\nSupported call and transcript providers. Add variants as integrations grow.",+ "storage.CallRecord": "# 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`[]; `isActive`: `boolean`; `participants`: `CallRecordParticipant`[]; `recordingPreviewUrl?`: `string` \\| `null`; `recordingStartedAt?`: `string` \\| `null`; `recordingUrl?`: `string` \\| `null`; `roomName?`: `string` \\| `null`; `shareWithTeam`: `boolean`; `source?`: `null` \\| `CallRecordSource`; `startedAt`: `string`; `status?`: `null` \\| `storage.CallStatus`; `summary?`: `string` \\| `null`; `teamShareAccessLevel?`: `null` \\| `storage.AccessLevel`; `transcript`: `CallRecordTranscriptSegment`[]; `userAccessLevel?`: `null` \\| `storage.AccessLevel`; `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`[] | 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`[] | 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` \\| `null` | The RTC room name. `None` for imported calls, which never had a room. |\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-source\"></a> `source?` | `null` \\| `CallRecordSource` | - |\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` \\| `storage.CallStatus` | - |\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` \\| `storage.AccessLevel` | - |\n| <a id=\"property-transcript\"></a> `transcript` | `CallRecordTranscriptSegment`[] | Transcript segments ordered by `sequence_num`. |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel?` | `null` \\| `storage.AccessLevel` | - |\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. |",+ "CallRecordGuest": "# Type Alias: CallRecordGuest\n\n> **CallRecordGuest** = \\{ `displayName`: `string`; `id`: `GuestId`; `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` | 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). |",+ "CallRecordParticipant": "# 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. |",+ "CallRecordSource": "# Type Alias: CallRecordSource\n\n> **CallRecordSource** = \\{ `externalUrl?`: `string` \\| `null`; `provider`: `CallProvider`; \\}\n\nWhere an imported call came from.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-externalurl\"></a> `externalUrl?` | `string` \\| `null` | Link to the call in the provider's app, if it has one. |\n| <a id=\"property-provider\"></a> `provider` | `CallProvider` | Provider that supplied the call. |",+ "CallRecordTranscriptSegment": "# 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. |",+ "storage.CallStatus": "# Type Alias: CallStatus\n\n> **CallStatus** = `\"ATTENDED\"` \\| `\"MISSED\"` \\| `\"UNATTENDED\"`\n\nViewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.",+ "CardPosition": "# Type Alias: CardPosition\n\n> **CardPosition** = \\{ `lane`: `LaneKey`; `position`: `string`; `row`: `string`; \\}\n\nWhere one card sits on a board: its lane, and its fractional key there.\nA card whose row has since moved to another lane has no place until it is\nmoved again.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-lane\"></a> `lane` | `LaneKey` | The lane. |\n| <a id=\"property-position\"></a> `position` | `string` | The card's key in that lane. |\n| <a id=\"property-row\"></a> `row` | `string` | The card's row. |",+ "CastVerdict": "# Type Alias: CastVerdict\n\n> **CastVerdict** = `\"safe\"` \\| `\"checked\"` \\| `\"never\"`\n\nWhether a column's values convert to a type.",+ "CellValue": "# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: `OptionRef`[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: `EntityRef`[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: `OptionRef`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | `OptionRef`[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: `EntityRef`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | `EntityRef`[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}",+ "CellWrite": "# Type Alias: CellWrite\n\n> **CellWrite** = \\{ `column`: `string`; `value`: `CellValue`; \\}\n\nOne cell of a row: which column, and its new value.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column placement. |\n| <a id=\"property-value\"></a> `value` | `CellValue` | The value, or [`CellValue::Clear`] to empty the cell. |",+ "storage.ChangedFileDto": "# Type Alias: ChangedFileDto\n\n> **ChangedFileDto** = \\{ `additions`: `number`; `binary`: `boolean`; `deletions`: `number`; `kind`: `storage.FileChangeKindDto`; `patchOmitted`: `boolean`; `path`: `string`; `previousPath?`: `string` \\| `null`; \\}\n\nOne changed file.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added. |\n| <a id=\"property-binary\"></a> `binary` | `boolean` | The diff carries no text for this file. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed. |\n| <a id=\"property-kind\"></a> `kind` | `storage.FileChangeKindDto` | What happened to the file. |\n| <a id=\"property-patchomitted\"></a> `patchOmitted` | `boolean` | The file's hunks were left out of the patch to fit the size budget. |\n| <a id=\"property-path\"></a> `path` | `string` | The file's path after the change, or before it for a deletion. |\n| <a id=\"property-previouspath\"></a> `previousPath?` | `string` \\| `null` | Where a renamed file came from. |",+ "storage.ChangesetDto": "# Type Alias: ChangesetDto\n\n> **ChangesetDto** = \\{ `additions`: `number`; `base`: `storage.GitRefDto`; `capturedAt`: `string`; `deletions`: `number`; `files`: `storage.ChangedFileDto`[]; `head`: `storage.GitRefDto`; `id`: `string`; `patchBytes`: `number`; `repository?`: `string` \\| `null`; `source`: `storage.ChangesetSourceDto`; `truncated`: `boolean`; \\}\n\nOne changeset: the files a patch touches and what happened to each.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions` | `number` | Lines added across all files. |\n| <a id=\"property-base\"></a> `base` | `storage.GitRefDto` | The side the work started from. |\n| <a id=\"property-capturedat\"></a> `capturedAt` | `string` | When the diff was taken. |\n| <a id=\"property-deletions\"></a> `deletions` | `number` | Lines removed across all files. |\n| <a id=\"property-files\"></a> `files` | `storage.ChangedFileDto`[] | Every changed file, in patch order. |\n| <a id=\"property-head\"></a> `head` | `storage.GitRefDto` | The side carrying the work. |\n| <a id=\"property-id\"></a> `id` | `string` | The changeset's id; a different id means different changes. |\n| <a id=\"property-patchbytes\"></a> `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| <a id=\"property-repository\"></a> `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| <a id=\"property-source\"></a> `source` | `storage.ChangesetSourceDto` | Where the diff was read from. |\n| <a id=\"property-truncated\"></a> `truncated` | `boolean` | Some files' hunks were left out of the patch. |",+ "storage.ChangesetSourceDto": "# Type Alias: ChangesetSourceDto\n\n> **ChangesetSourceDto** = `\"github_pull_request\"`\n\nThe source of a changeset's diff, on the wire.",+ "ChannelLabel": "# Type Alias: ChannelLabel\n\n> **ChannelLabel** = \\{ `channelCount`: `number`; `channelIds`: `string`[]; `createdAt`: `string`; `id`: `string`; `name`: `string`; `rule?`: `null` \\| `ChannelLabelRule`; `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` | - |\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. |",+ "ChannelLabelRule": "# 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. |",+ "storage.ChannelSharePermission": "# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: `storage.AccessLevel`; `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | `storage.AccessLevel` | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |",+ "storage.ChannelType": "# Type Alias: ChannelType\n\n> **ChannelType** = `\"public\"` \\| `\"private\"` \\| `\"direct_message\"` \\| `\"team\"`\n\nType of channel.",+ "Chat": "# Type Alias: Chat\n\n> **Chat** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `isPersistent`: `boolean`; `model?`: `string` \\| `null`; `name`: `string`; `projectId?`: `string` \\| `null`; `tokenCount?`: `number` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the chat was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | The time the chat was deleted |\n| <a id=\"property-id\"></a> `id` | `string` | The chat uuid |\n| <a id=\"property-ispersistent\"></a> `isPersistent` | `boolean` | - |\n| <a id=\"property-model\"></a> `model?` | `string` \\| `null` | The model used to generate the chat |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the chat |\n| <a id=\"property-projectid\"></a> `projectId?` | `string` \\| `null` | The project id of the chat |\n| <a id=\"property-tokencount\"></a> `tokenCount?` | `number` \\| `null` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the chat was last updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | Who the chat belongs to |",+ "Column": "# Type Alias: Column\n\n> **Column** = \\{ `config`: `null` \\| `ColumnConfig`; `display_name`: `string` \\| `null`; `id`: `string`; `infer_type`: `boolean`; `nullable?`: `boolean`; `position`: `string`; `property_definition_id`: `string`; `protections?`: `ColumnProtection`[]; `table_id`: `string`; \\}\n\nA column: the placement of a property definition on a table.\n\nThe definition carries name, [`DataType`], multi-select flag, and options;\nthis carries only where it appears and column-kind configuration.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-config\"></a> `config` | `null` \\| `ColumnConfig` | - |\n| <a id=\"property-display_name\"></a> `display_name` | `string` \\| `null` | The placement's own label, which also names it in SQL; `None` shows the definition's name. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier of the placement. |\n| <a id=\"property-infer_type\"></a> `infer_type` | `boolean` | Whether the first nonempty value may settle this new text column's type. |\n| <a id=\"property-nullable\"></a> `nullable?` | `boolean` | Whether a row may omit this cell; empty collections also count as absent. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for column ordering. |\n| <a id=\"property-property_definition_id\"></a> `property_definition_id` | `string` | The bound property definition. |\n| <a id=\"property-protections\"></a> `protections?` | `ColumnProtection`[] | Schema operations reserved by a feature; ordinary edits cannot clear them. |\n| <a id=\"property-table_id\"></a> `table_id` | `string` | Table the column appears on. |",+ "ColumnCast": "# Type Alias: ColumnCast\n\n> **ColumnCast** = \\{ `cast`: `CastVerdict`; `data_type`: `storage.DataType`; `examples`: `string`[]; `failures`: `number`; `is_multi_select`: `boolean`; `reason`: `string` \\| `null`; `relation`: `boolean`; `specific_entity_type`: `null` \\| `storage.EntityType`; `summary`: `string` \\| `null`; \\}\n\nWhat changing a column to one type would do to its values: the dry run\nof a type change, for one target.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cast\"></a> `cast` | `CastVerdict` | Whether the values convert. |\n| <a id=\"property-data_type\"></a> `data_type` | `storage.DataType` | The target property type. |\n| <a id=\"property-examples\"></a> `examples` | `string`[] | Up to three of the values that would not convert. |\n| <a id=\"property-failures\"></a> `failures` | `number` | For a `checked` cast, how many cells would not convert. |\n| <a id=\"property-is_multi_select\"></a> `is_multi_select` | `boolean` | Whether the target holds several values. |\n| <a id=\"property-reason\"></a> `reason` | `string` \\| `null` | Why nothing converts, for a `never` cast. |\n| <a id=\"property-relation\"></a> `relation` | `boolean` | Whether the target is a relation to another table's rows. |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| `storage.EntityType` | - |\n| <a id=\"property-summary\"></a> `summary` | `string` \\| `null` | For a `checked` cast with failures, what is wrong with them, as in `3 values aren't numbers`. |",+ "ColumnChange": "# Type Alias: ColumnChange\n\n> **ColumnChange** = \\{ `after?`: `string`; `definition`: `NewColumn`; `kind`: `\"create\"`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"change_type\"`; `to`: `ColumnKind`; \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"add_options\"`; `options`: `NewOption`[]; \\} \\| \\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\} \\| \\{ `formula`: `Formula`; `kind`: `\"set_formula\"`; \\} \\| \\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\nA change to one column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `after?`: `string`; `definition`: `NewColumn`; `kind`: `\"create\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` | The column it goes right after; left out, it goes after the table's last column. |\n| `definition` | `NewColumn` | What the column holds. |\n| `kind` | `\"create\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the table ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the column goes by another one now. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"change_type\"`; `to`: `ColumnKind`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"change_type\"` | - |\n| `to` | `ColumnKind` | The type it becomes. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"add_options\"`; `options`: `NewOption`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"add_options\"` | - |\n| `options` | `NewOption`[] | The options, each under an id the client mints. |\n\n***\n\n### Type Literal\n\n\\{ `color?`: `string` \\| `null`; `kind`: `\"update_option\"`; `label?`: `string`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` \\| `null` | Its new colour, a hex string like `#RRGGBB`, or `null` to clear it; left out, it keeps its own. A tag option always has one. |\n| `kind` | `\"update_option\"` | - |\n| `label?` | `string` | Its new label; left out, it keeps its own. Labels are unique within a column, ignoring case. |\n| `option` | `string` | The option. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: `Formula`; `kind`: `\"set_formula\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | `Formula` | The formula, over the table's other columns. |\n| `kind` | `\"set_formula\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete_option\"`; `option`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete_option\"` | - |\n| `option` | `string` | The option. |",+ "ColumnConfig": "# Type Alias: ColumnConfig\n\n> **ColumnConfig** = \\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\} \\| \\{ `formula`: `Formula`; `kind`: `\"derived\"`; \\}\n\nColumn-kind specific configuration stored on the placement.\n\n## Union Members\n\n### Type Literal\n\n\\{ `database_id`: `string`; `kind`: `\"link\"`; `table_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database_id` | `string` | Target database. |\n| `kind` | `\"link\"` | - |\n| `table_id` | `string` | Target table. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: `Formula`; `kind`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | `Formula` | How its cells are computed. |\n| `kind` | `\"derived\"` | - |",+ "ColumnConversion": "# Type Alias: ColumnConversion\n\n> **ColumnConversion** = \\{ `cells`: `ConvertedCell`[]; `misfits`: `number`; `options`: `string`[]; `tableVersion`: `TableVersion`; \\}\n\nWhat a column's values become under another type, for a new column of\nthat type beside it: the values that convert, the options they need,\nand how many do not convert. Nothing is changed by reading it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | `ConvertedCell`[] | Each row whose value converts, with that value, options named by label. |\n| <a id=\"property-misfits\"></a> `misfits` | `number` | How many values do not convert, and are left out. |\n| <a id=\"property-options\"></a> `options` | `string`[] | The option labels a new select or tag column needs, in order. |\n| <a id=\"property-tableversion\"></a> `tableVersion` | `TableVersion` | The table's version the cells were read at; a batch writing the new column sends it as its base version. |",+ "ColumnDetail": "# Type Alias: ColumnDetail\n\n> **ColumnDetail** = \\{ `column`: `Column`; `definition`: `PropertyDefinitionWithOptions`; `shared_outside_database`: `boolean`; `sql_name`: `string`; `writable`: `boolean`; \\}\n\nOne column placement with the definition behind it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `Column` | The placement. |\n| <a id=\"property-definition\"></a> `definition` | `PropertyDefinitionWithOptions` | The bound definition (name, type, options). |\n| <a id=\"property-shared_outside_database\"></a> `shared_outside_database` | `boolean` | Whether the definition belongs to something beyond this database (a person's, a team's or a system property), so changing its options changes them everywhere that property is used. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the column by: its display name, quoted. |\n| <a id=\"property-writable\"></a> `writable` | `boolean` | Whether SQL may write this column. |",+ "ColumnId": "# Type Alias: ColumnId\n\n> **ColumnId** = `string`\n\nIdentifier of a column placement within a table.",+ "ColumnKind": "# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: `EntityKind`; `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: `EntityKind`; `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | `EntityKind` | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |",+ "ColumnProtection": "# Type Alias: ColumnProtection\n\n> **ColumnProtection** = `\"delete\"` \\| `\"change_type\"`\n\nA schema operation reserved by a feature using a column.",+ "ColumnResult": "# Type Alias: ColumnResult\n\n> **ColumnResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"type_changed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\} \\| \\{ `kind`: `\"option_updated\"`; \\} \\| \\{ `kind`: `\"option_deleted\"`; \\} \\| \\{ `kind`: `\"formula_set\"`; \\}\n\nWhat happened to a column.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"type_changed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `added`: `string`[]; `kind`: `\"options_added\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `added` | `string`[] | The options created, in order: those sent, less any whose label the column already had. |\n| `kind` | `\"options_added\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_updated\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"option_deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"formula_set\"`; \\}",+ "CommittedChange": "# Type Alias: CommittedChange\n\n> **CommittedChange** = \\{ `change`: `number`; `table`: `string`; `version`: `TableVersion`; \\}\n\nOne change a committed batch journaled: a table, the version the batch\nproduced, and the journal's id for it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-change\"></a> `change` | `number` | The journal's id of the change. |\n| <a id=\"property-table\"></a> `table` | `string` | The table. |\n| <a id=\"property-version\"></a> `version` | `TableVersion` | The version the batch produced. |",+ "Conjunction": "# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.",+ "ConvertedCell": "# Type Alias: ConvertedCell\n\n> **ConvertedCell** = \\{ `row`: `string`; `value`: `CellValue`; \\}\n\nOne row's converted value.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-row\"></a> `row` | `string` | The row. |\n| <a id=\"property-value\"></a> `value` | `CellValue` | Its value under the new type. |",+ "CountedReaction": "# 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. |",+ "CreateAgentRequest": "# Type Alias: CreateAgentRequest\n\n> **CreateAgentRequest** = \\{ `auto_accept_permissions?`: `boolean` \\| `null`; `avatar_url?`: `string` \\| `null`; `channel_ids?`: `string`[]; `channel_scope`: `AgentChannelScope`; `default_model`: `string`; `description?`: `string` \\| `null`; `handle`: `string`; `harness`: `string`; `harness_id?`: `null` \\| `HarnessId`; `instructions`: `string`; `is_coding`: `boolean`; `mcp?`: `AgentMcpServers`; `name`: `string`; `team_id?`: `string` \\| `null`; \\}\n\nRequest to create a persisted AI agent.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auto_accept_permissions\"></a> `auto_accept_permissions?` | `boolean` \\| `null` | Whether the agent's sessions approve ACP permission requests without asking. Omit to always prompt. |\n| <a id=\"property-avatar_url\"></a> `avatar_url?` | `string` \\| `null` | Optional avatar URL or data URL. |\n| <a id=\"property-channel_ids\"></a> `channel_ids?` | `string`[] | Selected channels. Must be non-empty only for `selected` scope. |\n| <a id=\"property-channel_scope\"></a> `channel_scope` | `AgentChannelScope` | Whether the agent is global or channel-specific. |\n| <a id=\"property-default_model\"></a> `default_model` | `string` | Model selected specifically for this agent. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Optional description. |\n| <a id=\"property-handle\"></a> `handle` | `string` | Stable `@` handle. |\n| <a id=\"property-harness\"></a> `harness` | `string` | Harness used to run the agent. |\n| <a id=\"property-harness_id\"></a> `harness_id?` | `null` \\| `HarnessId` | - |\n| <a id=\"property-instructions\"></a> `instructions` | `string` | Instructions supplied to the agent at the start of a conversation. |\n| <a id=\"property-is_coding\"></a> `is_coding` | `boolean` | Whether the agent is a coding agent: a mention is answered with a magic chip into its live session (`true`) or a reply in the thread (`false`). |\n| <a id=\"property-mcp\"></a> `mcp?` | `AgentMcpServers` | Which MCP servers sessions of this agent are handed. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-team_id\"></a> `team_id?` | `string` \\| `null` | Team owner. Omit for a private, user-owned agent. |",+ "CreateCrmCompanyRequest": "# 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. |",+ "CreateMeetingRequest": "# Type Alias: CreateMeetingRequest\n\n> **CreateMeetingRequest** = \\{ `preparationId?`: `string` \\| `null`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `title?`: `string` \\| `null`; \\}\n\nInputs for creating a meeting without starting its RTC room.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-preparationid\"></a> `preparationId?` | `string` \\| `null` | Optional unused room reserved by this actor on the setup screen. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Optional scheduled end. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Optional scheduled start. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Optional display title. |",+ "CreatePairingRequest": "# Type Alias: CreatePairingRequest\n\n> **CreatePairingRequest** = \\{ `allow_permission_bypass?`: `boolean` \\| `null`; `host?`: `string` \\| `null`; `name`: `string`; `scope?`: `null` \\| `RequestedHarnessScope`; \\}\n\nRequest to open a pairing: the daemon asks for a code the user approves.\n\nThe daemon serializes this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_permission_bypass\"></a> `allow_permission_bypass?` | `boolean` \\| `null` | Daemon operator consent ceiling. Omitted by older clients; web approval decides. |\n| <a id=\"property-host\"></a> `host?` | `string` \\| `null` | Display-only description of the machine, e.g. `eric@macbook / darwin`. |\n| <a id=\"property-name\"></a> `name` | `string` | Requested harness display name (typically the machine's hostname). |\n| <a id=\"property-scope\"></a> `scope?` | `null` \\| `RequestedHarnessScope` | - |",+ "CreatePipeline": "# Type Alias: CreatePipeline\n\n> **CreatePipeline** = \\{ `name`: `string`; `recordType`: `PipelineRecordType`; `sharing?`: `PipelineSharing`; \\}\n\nRequest to create an empty pipeline with the standard CRM columns.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Pipeline name. |\n| <a id=\"property-recordtype\"></a> `recordType` | `PipelineRecordType` | Company or contact entries. |\n| <a id=\"property-sharing\"></a> `sharing?` | `PipelineSharing` | Defaults to private. |",+ "CrmCompanyResponse": "# Type Alias: CrmCompanyResponse\n\n> **CrmCompanyResponse** = \\{ `contacts`: `CrmContactResponse`[]; `createdAt`: `string`; `description?`: `string` \\| `null`; `domains`: `CrmDomainResponse`[]; `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`[] | 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`[] | 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. |",+ "CrmContactResponse": "# 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. |",+ "CrmDomainResponse": "# 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. |",+ "CrmPermissionRole": "# 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.",+ "CrmStageInput": "# 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. |",+ "CrmStageResponse": "# 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. |",+ "CrmStagesResponse": "# Type Alias: CrmStagesResponse\n\n> **CrmStagesResponse** = \\{ `definition_id`: `string`; `stages`: `CrmStageResponse`[]; \\}\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`[] | Stages in pipeline order. |",+ "CrmTeamSettingsResponse": "# Type Alias: CrmTeamSettingsResponse\n\n> **CrmTeamSettingsResponse** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role`: `CrmPermissionRole`; `edit_stages_role`: `CrmPermissionRole`; `legacy_stage_ids`: \\{\\[`key`: `string`\\]: `string`; \\}; `move_closed_deals_role`: `CrmPermissionRole`; `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` | Who can delete (hide) CRM records. |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role` | `CrmPermissionRole` | 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` | 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. |",+ "CustomSpeakerAssignment": "# Type Alias: CustomSpeakerAssignment\n\n> **CustomSpeakerAssignment** = \\{ `customSpeaker`: `string`; `diarizedSpeakerId`: `string`; \\}\n\nOne per-diarized-speaker override, used in [`EditCallTranscriptRequest`].\n\n`custom_speaker = None` clears any existing override for this\n`diarized_speaker_id`; `Some(macro_user_id)` sets it. The string is\nexpected to parse as a `MacroUserId` (e.g. `macro|[email protected]`);\nthe service layer rejects malformed values with `400 Bad Request`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-customspeaker\"></a> `customSpeaker` | `string` | Macro user id to attribute matching rows to, or `None` to clear. |\n| <a id=\"property-diarizedspeakerid\"></a> `diarizedSpeakerId` | `string` | The diarization label whose rows this assignment targets. |",+ "storage.DataType": "# 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.",+ "storage.Database": "# Type Alias: Database\n\n> **Database** = \\{ `created_at`: `string`; `id`: `string`; `name`: `string`; `owner_id`: `string`; `trashed_at`: `string` \\| `null`; \\}\n\nA database: a named collection of tables, owned and shared as one entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation time. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner_id\"></a> `owner_id` | `string` | Owning user. |\n| <a id=\"property-trashed_at\"></a> `trashed_at` | `string` \\| `null` | Set when trashed. |",+ "DatabaseDetail": "# Type Alias: DatabaseDetail\n\n> **DatabaseDetail** = \\{ `database`: `storage.Database`; `grant`: `storage.AccessLevel`; `tables`: `TableDetail`[]; \\}\n\nEverything a client needs to render and edit one database: tables,\ncolumn placements with their definitions, and the SQL names the query\nsurface exposes them under.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-database\"></a> `database` | `storage.Database` | The database. |\n| <a id=\"property-grant\"></a> `grant` | `storage.AccessLevel` | The viewer's access. |\n| <a id=\"property-tables\"></a> `tables` | `TableDetail`[] | Tables in tab order. |",+ "DatabaseId": "# Type Alias: DatabaseId\n\n> **DatabaseId** = `string`\n\nIdentifier of reusable database storage. Its optional Macro entity uses\nthe same identity, so existing routes and grants keep their IDs.",+ "DatabaseOp": "# Type Alias: DatabaseOp\n\n> **DatabaseOp** = \\{ `change`: `TableChange`; `kind`: `\"table\"`; `table`: `string`; \\} \\| \\{ `change`: `ColumnChange`; `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\} \\| \\{ `change`: `RowsChange`; `kind`: `\"rows\"`; `table`: `string`; \\} \\| \\{ `change`: `ViewChange`; `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\nOne write to a database: its tables, columns, options, rows or views,\ngrouped by the resource it changes. A request's ops apply in order and\ntogether, or not at all, and every op names a table of the database the\nrequest is for (or, creating one, adds it there).\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: `TableChange`; `kind`: `\"table\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `TableChange` | What changes. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table; for a creation, its new id, minted by the client, which later ops of the request may name. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `ColumnChange`; `column`: `string`; `kind`: `\"column\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `ColumnChange` | What changes. |\n| `column` | `string` | The column; for a creation, its new id, minted by the client, which later ops of the request may name. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `RowsChange`; `kind`: `\"rows\"`; `table`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `RowsChange` | What changes. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table the rows belong to. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `ViewChange`; `kind`: `\"view\"`; `table`: `string`; `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `ViewChange` | What changes. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `view` | `string` | The view; for a creation, its new id, minted by the client. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `order` | `string`[] | Every table, in its new order. |",+ "storage.DatabaseView": "# Type Alias: DatabaseView\n\n> **DatabaseView** = \\{ `createdAt`: `string`; `databaseId`: `string`; `id`: `string`; `layout`: `ViewLayout`; `name`: `string`; `position`: `string`; `query`: `ViewQuery`; `tableId`: `string`; `updatedAt`: `string`; \\}\n\nA view of one table, as stored.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database the table belongs to. |\n| <a id=\"property-id\"></a> `id` | `string` | The view. |\n| <a id=\"property-layout\"></a> `layout` | `ViewLayout` | How it draws them. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name, unique among the table's views ignoring case. |\n| <a id=\"property-position\"></a> `position` | `string` | Where it sorts among the table's views: a fractional key. |\n| <a id=\"property-query\"></a> `query` | `ViewQuery` | Which rows it shows, in what order. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table it shows. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When it last changed. |",+ "DatabaseWebhookResponse": "# Type Alias: DatabaseWebhookResponse\n\n> **DatabaseWebhookResponse** = \\{ `createdAt`: `string`; `createdBy`: `string`; `databaseId`: `string`; `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\nA webhook of a database. Its token is never shown again after creation.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Creation time. |\n| <a id=\"property-createdby\"></a> `createdBy` | `string` | Who created it; its calls write with their access. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table its calls insert rows into. |\n| <a id=\"property-tokenprefix\"></a> `tokenPrefix` | `string` | The token's first characters, to tell webhooks apart. |",+ "DateOperator": "# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.",+ "DocumentContent": "# Type Alias: DocumentContent\n\n> **DocumentContent** = \\{ `location?`: `null` \\| `DocumentContentLocation`; `state`: `DocumentContentState`; \\}\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` | - |\n| <a id=\"property-state\"></a> `state` | `DocumentContentState` | The current lifecycle state of the content. |",+ "DocumentContentLocation": "# 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.",+ "DocumentContentState": "# Type Alias: DocumentContentState\n\n> **DocumentContentState** = `\"unknown\"` \\| `\"pending\"` \\| `\"ready\"`\n\nAPI-visible content lifecycle state derived from current document metadata.",+ "storage.DocumentId": "# Type Alias: DocumentId\n\n> **DocumentId** = `string`\n\nA validated document identifier. Historical document ids need not be UUIDs.",+ "DocumentMetadata": "# Type Alias: DocumentMetadata\n\n> **DocumentMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentBom?`: `BomPart`[] \\| `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`; `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`[] \\| `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` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the document instance / document BOM was updated |",+ "DocumentMetadataWithContent": "# Type Alias: DocumentMetadataWithContent\n\n> **DocumentMetadataWithContent** = `DocumentMetadata` & \\{ `content`: `DocumentContent`; `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` | 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. |",+ "DocumentResponseMetadata": "# Type Alias: DocumentResponseMetadata\n\n> **DocumentResponseMetadata** = \\{ `branchedFromId?`: `string` \\| `null`; `branchedFromVersionId?`: `number` \\| `null`; `createdAt?`: `string` \\| `null`; `documentBom?`: `BomPart`[] \\| `null`; `documentFamilyId?`: `number` \\| `null`; `documentId`: `string`; `documentName`: `string`; `documentVersionId`: `number`; `fileType?`: `string` \\| `null`; `modificationData?`: `unknown`; `owner`: `string`; `sha?`: `string` \\| `null`; `subType?`: `null` \\| `DocumentSubType`; `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-documentbom\"></a> `documentBom?` | `BomPart`[] \\| `null` | If the document is a DOCX document, 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 |\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-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` | - |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the document instance / document BOM was updated |",+ "DocumentSubType": "# 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.",+ "DocumentTeamShareResponse": "# 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. |",+ "EditPdfPlaceableCommentAnchorRequest": "# Type Alias: EditPdfPlaceableCommentAnchorRequest\n\n> **EditPdfPlaceableCommentAnchorRequest** = \\{ `allowableEdits?`: `unknown`; `heightPct?`: `number` \\| `null`; `originalIndex?`: `number` \\| `null`; `originalPage?`: `number` \\| `null`; `page?`: `number` \\| `null`; `rotation?`: `number` \\| `null`; `shouldLockOnSave?`: `boolean` \\| `null`; `uuid`: `string`; `wasDeleted?`: `boolean` \\| `null`; `wasEdited?`: `boolean` \\| `null`; `widthPct?`: `number` \\| `null`; `xPct?`: `number` \\| `null`; `yPct?`: `number` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-allowableedits\"></a> `allowableEdits?` | `unknown` |\n| <a id=\"property-heightpct\"></a> `heightPct?` | `number` \\| `null` |\n| <a id=\"property-originalindex\"></a> `originalIndex?` | `number` \\| `null` |\n| <a id=\"property-originalpage\"></a> `originalPage?` | `number` \\| `null` |\n| <a id=\"property-page\"></a> `page?` | `number` \\| `null` |\n| <a id=\"property-rotation\"></a> `rotation?` | `number` \\| `null` |\n| <a id=\"property-shouldlockonsave\"></a> `shouldLockOnSave?` | `boolean` \\| `null` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |\n| <a id=\"property-wasdeleted\"></a> `wasDeleted?` | `boolean` \\| `null` |\n| <a id=\"property-wasedited\"></a> `wasEdited?` | `boolean` \\| `null` |\n| <a id=\"property-widthpct\"></a> `widthPct?` | `number` \\| `null` |\n| <a id=\"property-xpct\"></a> `xPct?` | `number` \\| `null` |\n| <a id=\"property-ypct\"></a> `yPct?` | `number` \\| `null` |",+ "EmailFollowup": "# Type Alias: EmailFollowup\n\n> **EmailFollowup** = \\{ `condition`: `EmailReminderCondition`; `linkId`: `string`; `remindAt`: `string`; `reminderId`: `string`; `revision`: `string`; `state`: `FollowupState`; `threadId`: `string`; \\}\n\nPublic status shown on email and in the Reminders editor.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-condition\"></a> `condition` | `EmailReminderCondition` | Condition, defaulting to no reply for new follow-ups. |\n| <a id=\"property-linkid\"></a> `linkId` | `string` | Canonical owned/delegated inbox. |\n| <a id=\"property-remindat\"></a> `remindAt` | `string` | Confirmed schedule. |\n| <a id=\"property-reminderid\"></a> `reminderId` | `string` | Identity of the snooze and its delivery records. |\n| <a id=\"property-revision\"></a> `revision` | `string` | Last accepted operation; edits/removal compare this to prevent stale undo. |\n| <a id=\"property-state\"></a> `state` | `FollowupState` | Durable lifecycle progress. |\n| <a id=\"property-threadid\"></a> `threadId` | `string` | Conversation identity. |",+ "EmailFollowupCommand": "# Type Alias: EmailFollowupCommand\n\n> **EmailFollowupCommand** = \\{ `condition`: `EmailReminderCondition`; `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\} \\| \\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\nIdempotent email command. Reusing an operation ID with different data fails.\n\n## Union Members\n\n### Type Literal\n\n\\{ `condition`: `EmailReminderCondition`; `expectedRevision?`: `string` \\| `null`; `operationId`: `string`; `remindAt`: `string`; `type`: `\"set\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition` | `EmailReminderCondition` | Reply condition. |\n| `expectedRevision?` | `string` \\| `null` | None for creation, the current revision for edits. |\n| `operationId` | `string` | Unique request identity retained across network retries. |\n| `remindAt` | `string` | One future instant; conditional recurrence is deliberately absent. |\n| `type` | `\"set\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `expectedRevision`: `string`; `operationId`: `string`; `type`: `\"remove\"`; `undo?`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `expectedRevision` | `string` | Reject removal if a newer edit has replaced this operation. |\n| `operationId` | `string` | Unique request identity. |\n| `type` | `\"remove\"` | - |\n| `undo?` | `boolean` | Undo restores original visibility; ordinary Remove returns to inbox. |",+ "EmailFollowupResponse": "# Type Alias: EmailFollowupResponse\n\n> **EmailFollowupResponse** = \\{ `followup?`: `null` \\| `EmailFollowup`; \\}\n\nLookup response, including an email with no follow-up yet.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-followup\"></a> `followup?` | `null` \\| `EmailFollowup` |",+ "EmailReminderCondition": "# Type Alias: EmailReminderCondition\n\n> **EmailReminderCondition** = `\"if_no_reply\"` \\| `\"regardless\"`\n\nWhen an email follow-up should return the conversation.",+ "EntityKind": "# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.",+ "EntityPermission": "# Type Alias: EntityPermission\n\n> **EntityPermission** = \\{ `access_level`: `storage.AccessLevel`; `type`: `\"access_level\"`; \\} \\| \\{ `type`: `\"channel_view_only\"`; \\} \\| \\{ `role`: `ParticipantRole`; `type`: `\"channel_role\"`; \\} \\| \\{ `role`: `storage.TeamRole`; `type`: `\"team_role\"`; \\}\n\nA user's permission for an entity, discriminated by entity kind.\n\nItems (documents, chats, projects, threads) use access levels.\nChannels use view-only permission or participant roles.\n\n## Union Members\n\n### Type Literal\n\n\\{ `access_level`: `storage.AccessLevel`; `type`: `\"access_level\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `access_level` | `storage.AccessLevel` | The access level the user has. |\n| `type` | `\"access_level\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"channel_view_only\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `role`: `ParticipantRole`; `type`: `\"channel_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | `ParticipantRole` | The role the user has in the channel. |\n| `type` | `\"channel_role\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `role`: `storage.TeamRole`; `type`: `\"team_role\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `role` | `storage.TeamRole` | The role the user has in the team. |\n| `type` | `\"team_role\"` | - |",+ "EntityRef": "# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: `EntityKind`; \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | `EntityKind` | What kind of entity it is; it must be the kind the column points at. |",+ "storage.EntityReference": "# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity_id`: `string`; `entity_type`: `storage.EntityType`; `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` | `storage.EntityType` | - |\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. |",+ "storage.EntityType": "# 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.",+ "storage.EventTime": "# Type Alias: EventTime\n\n> **EventTime** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape of a calendar event.\n\nFields are renamed per variant rather than with `rename_all_fields`\nbecause utoipa only honors variant-level serde renames when it\nderives the OpenAPI schema.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant; equal to the start for an imported point event. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant. |\n| `timeZone?` | `string` \\| `null` | Original IANA time-zone identifier, when supplied. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date. |",+ "Favorite": "# Type Alias: Favorite\n\n> **Favorite** = \\{ `channelId?`: `string` \\| `null`; `channelType?`: `string` \\| `null`; `createdAt`: `string`; `documentSubType?`: `string` \\| `null`; `entityId`: `string`; `entityType`: `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`; `fileType?`: `string` \\| `null`; `sortOrder`: `number`; \\}\n\nA single favorited entity, including display metadata hydrated from the\nfavorited entity where available. Display names are deliberately not\nincluded: clients resolve them from the entity previews pipeline, which\nis viewer-relative for DM channels and updated by renames.\n\nA favorite is identified by `(entity_type, entity_id)` within the user's\ncollection; there is no surrogate id.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | Owning channel id of the favorited channel message, when applicable. |\n| <a id=\"property-channeltype\"></a> `channelType?` | `string` \\| `null` | Channel type (e.g. `public`, `direct_message`) of the favorited channel, when applicable. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the favorite was created. |\n| <a id=\"property-documentsubtype\"></a> `documentSubType?` | `string` \\| `null` | Document sub type (e.g. `task`) of the favorited document, when applicable. |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The id of the favorited entity. |\n| <a id=\"property-entitytype\"></a> `entityType` | `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | The type of the favorited entity. |\n| <a id=\"property-filetype\"></a> `fileType?` | `string` \\| `null` | File type of the favorited document, when applicable. |\n| <a id=\"property-sortorder\"></a> `sortOrder` | `number` | Manual ordering value; lower sorts first. |",+ "FavoriteEntityRef": "# Type Alias: FavoriteEntityRef\n\n> **FavoriteEntityRef** = \\{ `entityId`: `string`; `entityType`: `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"`; \\}\n\nA reference to a favorited entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The id of the favorited entity. |\n| <a id=\"property-entitytype\"></a> `entityType` | `\"user\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"project\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"team\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | The type of the favorited entity. |",+ "storage.FileChangeKindDto": "# Type Alias: FileChangeKindDto\n\n> **FileChangeKindDto** = `\"added\"` \\| `\"modified\"` \\| `\"deleted\"` \\| `\"renamed\"`\n\nWhat happened to a file, on the wire.",+ "FilterCondition": "# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: `FilterTest`; \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | `FilterTest` | What its cell must be. The test's kind must fit the column's type. |",+ "FilterGroup": "# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: `FilterNode`[]; `conjunction`: `Conjunction`; \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | `FilterNode`[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | `Conjunction` | Whether every condition must hold, or any one. |",+ "FilterNode": "# Type Alias: FilterNode\n\n> **FilterNode** = `FilterCondition` & \\{ `kind`: `\"condition\"`; \\} \\| `FilterGroup` & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.",+ "FilterTest": "# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: `PresenceOperator`; \\} \\| \\{ `kind`: `\"text\"`; `operator`: `TextOperator`; `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: `NumberOperator`; `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: `DateOperator`; `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: `SetOperator`; `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: `SetOperator`; \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: `PresenceOperator`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | `PresenceOperator` | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: `TextOperator`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | `TextOperator` | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: `NumberOperator`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | `NumberOperator` | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: `DateOperator`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | `DateOperator` | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: `SetOperator`; `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | `SetOperator` | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: `SetOperator`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | `SetOperator` | How the cell's references relate to these. |",+ "FollowupState": "# Type Alias: FollowupState\n\n> **FollowupState** = `\"archiving\"` \\| `\"pending\"` \\| `\"returning\"` \\| `\"returned\"` \\| `\"cancelled\"` \\| `\"removed\"`\n\nDurable progress of an email operation.",+ "storage.ForeignEntity": "# Type Alias: ForeignEntity\n\n> **ForeignEntity** = \\{ `createdAt`: `string`; `foreignEntityId`: `string`; `foreignEntitySource`: `string`; `id`: `string`; `metadata`: `unknown`; `storedForAuthEntity`: `string`; `storedForId`: `string`; `updatedAt`: `string`; \\}\n\nA persisted mapping to an entity owned by an external system.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Timestamp when the record was created. |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId` | `string` | Identifier assigned by the external system. |\n| <a id=\"property-foreignentitysource\"></a> `foreignEntitySource` | `string` | Source system that owns the external identifier. |\n| <a id=\"property-id\"></a> `id` | `string` | Internal primary key for this foreign entity record. |\n| <a id=\"property-metadata\"></a> `metadata` | `unknown` | Arbitrary metadata stored with the mapping. |\n| <a id=\"property-storedforauthentity\"></a> `storedForAuthEntity` | `string` | Internal auth entity namespace this foreign entity is stored for. |\n| <a id=\"property-storedforid\"></a> `storedForId` | `string` | Internal entity identifier this foreign entity is stored for. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | Timestamp when the record was last updated. |",+ "storage.Form": "# Type Alias: Form\n\n> **Form** = \\{ `audience`: `Audience`; `closesAt`: `string` \\| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `isHiddenInDrive`: `boolean`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \\| `null`; `status`: `FormStatus`; `submittedColumnId`: `string` \\| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \\}\n\nA form: a view of one database table whose rows are its responses.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience` | `Audience` | Who may respond. |\n| <a id=\"property-closesat\"></a> `closesAt` | `string` \\| `null` | When it stops taking responses, if it does. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage` | `string` | What a respondent reads once their response is saved; empty for the default. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database holding its responses. |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read under the name. |\n| <a id=\"property-id\"></a> `id` | `string` | The form. |\n| <a id=\"property-ishiddenindrive\"></a> `isHiddenInDrive` | `boolean` | Whether Drive leaves it, and the database behind it, out of its listings, as for a channel poll. |\n| <a id=\"property-name\"></a> `name` | `string` | Its display name. A standalone form follows the database it created; a form attached to an existing table has its own name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Its owner. |\n| <a id=\"property-respondentcolumnid\"></a> `respondentColumnId` | `string` \\| `null` | The person column each signed-in submission names its respondent in; `null` once deleted. |\n| <a id=\"property-status\"></a> `status` | `FormStatus` | Whether its owner closed it. |\n| <a id=\"property-submittedcolumnid\"></a> `submittedColumnId` | `string` \\| `null` | The date column each submission stamps; `null` once deleted. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table whose rows are its responses. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible` | `boolean` | Whether respondents may read option tallies. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When its facts or layout last changed. |",+ "FormAccess": "# Type Alias: FormAccess\n\n> **FormAccess** = `\"view\"` \\| `\"edit\"` \\| `\"owner\"`\n\nThe caller's level on a form: view responds, edit changes questions and\nreads responses, owner also sets the audience, closes and trashes it.",+ "FormDetail": "# Type Alias: FormDetail\n\n> **FormDetail** = \\{ `access`: `FormAccess`; `form`: `storage.Form`; `sections`: `FormSectionDetail`[]; `tableGone`: `boolean`; \\}\n\nA form with its layout, as the caller may see it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `FormAccess` | The caller's level on it. |\n| <a id=\"property-form\"></a> `form` | `storage.Form` | The form's facts. |\n| <a id=\"property-sections\"></a> `sections` | `FormSectionDetail`[] | Its sections, in order. |\n| <a id=\"property-tablegone\"></a> `tableGone` | `boolean` | Whether its database is in the trash, so it has no table to show or write: its sections keep no questions and it takes no responses. |",+ "FormPublicationProblem": "# Type Alias: FormPublicationProblem\n\n> **FormPublicationProblem** = \\{ `kind`: `\"invalidDraft\"`; \\} \\| \\{ `kind`: `\"layout\"`; `problem`: `LayoutProblem`; \\} \\| \\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\} \\| \\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\} \\| \\{ `kind`: `\"pending\"`; \\}\n\nAn editor's saved draft is not yet the version respondents can use.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"invalidDraft\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"layout\"`; `problem`: `LayoutProblem`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"layout\"` | - |\n| `problem` | `LayoutProblem` | The invariant the editor needs to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"widgetMismatch\"` | - |\n| `question` | `string` | The question to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"pending\"`; \\}",+ "FormQuestionDetail": "# Type Alias: FormQuestionDetail\n\n> **FormQuestionDetail** = \\{ `column`: `string`; `helpText`: `string`; `id`: `string`; `kind`: `ColumnKind`; `options`: `QuestionOption`[]; `required`: `boolean`; `title`: `string`; `widget`: `null` \\| `Widget`; \\}\n\nA question with its column's facts.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column it writes. |\n| <a id=\"property-helptext\"></a> `helpText` | `string` | What respondents read under the title. |\n| <a id=\"property-id\"></a> `id` | `string` | The question. |\n| <a id=\"property-kind\"></a> `kind` | `ColumnKind` | The column's type. |\n| <a id=\"property-options\"></a> `options` | `QuestionOption`[] | The column's options, in order, for a select or tag column. |\n| <a id=\"property-required\"></a> `required` | `boolean` | Whether a response must answer it. |\n| <a id=\"property-title\"></a> `title` | `string` | The column's name. |\n| <a id=\"property-widget\"></a> `widget` | `null` \\| `Widget` | - |",+ "FormSectionDetail": "# Type Alias: FormSectionDetail\n\n> **FormSectionDetail** = \\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: `FormQuestionDetail`[]; `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: `FilterGroup`; `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: `BookingTarget`; `title`: `string`; \\}\n\nOne section of a form as it reads.\n\n## Union Members\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: `FormQuestionDetail`[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"questions\"` | - |\n| `questions` | `FormQuestionDetail`[] | Its questions, in order. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: `FilterGroup`; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"gate\"` | - |\n| `message` | `string` | What a stopped respondent reads. |\n| `rules` | `FilterGroup` | The rules. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: `BookingTarget`; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"booking\"` | - |\n| `target?` | `BookingTarget` | Editors can configure the destination; respondent layouts omit it. |\n| `title` | `string` | Its title. |",+ "FormStatus": "# Type Alias: FormStatus\n\n> **FormStatus** = `\"open\"` \\| `\"closed\"`\n\nWhether a form takes responses, as its owner set it. A form also stops\ntaking them once its closing time passes.",+ "Formula": "# Type Alias: Formula\n\n> **Formula** = \\{ `column`: `string`; `kind`: `\"column\"`; \\} \\| \\{ `kind`: `\"number\"`; `value`: `number`; \\} \\| \\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: `Operator`; `right`: `Formula`; \\} \\| \\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\nAn expression over one row's cells.\n\n## Union Members\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"column\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column placement. |\n| `kind` | `\"column\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `value` | `number` | The value; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"binary\"`; `left`: `Formula`; `operator`: `Operator`; `right`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"binary\"` | - |\n| `left` | `Formula` | The left operand. |\n| `operator` | `Operator` | How. |\n| `right` | `Formula` | The right operand. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"negate\"`; `operand`: `Formula`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"negate\"` | - |\n| `operand` | `Formula` | The expression negated; a number. |",+ "GetChannelAttachmentsResponses": "# Type Alias: GetChannelAttachmentsResponses\n\n> **GetChannelAttachmentsResponses** = \\{ `200`: `ApiChannelAttachmentsPage`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | `ApiChannelAttachmentsPage` |",+ "GetChannelParticipantsResponses": "# Type Alias: GetChannelParticipantsResponses\n\n> **GetChannelParticipantsResponses** = \\{ `200`: `ApiChannelParticipant`[]; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-200\"></a> `200` | `ApiChannelParticipant`[] |",+ "GetDocumentResponseData": "# Type Alias: GetDocumentResponseData\n\n> **GetDocumentResponseData** = \\{ `documentMetadata`: `DocumentMetadata`; `userAccessLevel`: `storage.AccessLevel`; `viewLocation?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentmetadata\"></a> `documentMetadata` | `DocumentMetadata` | The metadata of the document |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel` | `storage.AccessLevel` | The users level of access to the document |\n| <a id=\"property-viewlocation\"></a> `viewLocation?` | `string` \\| `null` | The users view location if there is one |",+ "storage.GitRefDto": "# Type Alias: GitRefDto\n\n> **GitRefDto** = \\{ `name?`: `string` \\| `null`; `sha?`: `string` \\| `null`; \\}\n\nOne end of the compared range.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The branch name, when known. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The commit, when known. |",+ "storage.GithubLabelFacet": "# Type Alias: GithubLabelFacet\n\n> **GithubLabelFacet** = \\{ `color?`: `string` \\| `null`; `count`: `number`; `name`: `string`; \\}\n\nA label among the visible GitHub pull requests. Labels with the same name in different\nrepositories count together.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | The label's most recently synced color, as six hex digits without `#`. |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests with the label. |\n| <a id=\"property-name\"></a> `name` | `string` | The label's name. |",+ "storage.GithubPullRequest": "# Type Alias: GithubPullRequest\n\n> **GithubPullRequest** = \\{ `additions?`: `number` \\| `null`; `checks?`: `GithubPullRequestCheckRun`[] \\| `null`; `comments?`: `GithubPullRequestComment`[] \\| `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`[] \\| `null` | Check runs collected from the pull request head commit, when enrichment data is available. |\n| <a id=\"property-comments\"></a> `comments?` | `GithubPullRequestComment`[] \\| `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. |",+ "GithubPullRequestCheckRun": "# 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. |",+ "GithubPullRequestComment": "# 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. |",+ "GithubPullRequestLabel": "# Type Alias: GithubPullRequestLabel\n\n> **GithubPullRequestLabel** = \\{ `color?`: `string` \\| `null`; `name`: `string`; \\}\n\nA label on a GitHub pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color?` | `string` \\| `null` | The label color as six hex digits without a leading `#`, when known. |\n| <a id=\"property-name\"></a> `name` | `string` | The label name, unique within its repository regardless of case. |",+ "GithubPullRequestReview": "# Type Alias: GithubPullRequestReview\n\n> **GithubPullRequestReview** = \\{ `reviewerGithubUserId`: `string`; `reviewerLogin?`: `string` \\| `null`; `state`: `GithubPullRequestReviewState`; `submittedAt?`: `string` \\| `null`; \\}\n\nA reviewer's latest submitted review on a pull request.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-reviewergithubuserid\"></a> `reviewerGithubUserId` | `string` | The stable numeric GitHub user id of the reviewer, as a string. |\n| <a id=\"property-reviewerlogin\"></a> `reviewerLogin?` | `string` \\| `null` | The reviewer's GitHub login, when known. |\n| <a id=\"property-state\"></a> `state` | `GithubPullRequestReviewState` | What the review said. |\n| <a id=\"property-submittedat\"></a> `submittedAt?` | `string` \\| `null` | When the review was submitted, when known. |",+ "GithubPullRequestReviewDecision": "# Type Alias: GithubPullRequestReviewDecision\n\n> **GithubPullRequestReviewDecision** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"review_required\"`\n\nWhere a pull request's review stands, from its reviewers' latest reviews.",+ "GithubPullRequestReviewState": "# Type Alias: GithubPullRequestReviewState\n\n> **GithubPullRequestReviewState** = `\"approved\"` \\| `\"changes_requested\"` \\| `\"commented\"` \\| `\"dismissed\"`\n\nWhat a reviewer's latest review on a pull request said.",+ "GithubPullRequestUser": "# Type Alias: GithubPullRequestUser\n\n> **GithubPullRequestUser** = \\{ `githubUserId`: `string`; `login?`: `string` \\| `null`; \\}\n\nA GitHub user named on a pull request, such as an assignee.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-githubuserid\"></a> `githubUserId` | `string` | The stable numeric GitHub user id, as a string. |\n| <a id=\"property-login\"></a> `login?` | `string` \\| `null` | The user's GitHub login, when known. |",+ "GithubRepositoryFacet": "# Type Alias: GithubRepositoryFacet\n\n> **GithubRepositoryFacet** = \\{ `count`: `number`; `repository`: `string`; `repositoryId`: `string`; \\}\n\nA repository among the visible GitHub pull requests.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests in the repository. |\n| <a id=\"property-repository\"></a> `repository` | `string` | The repository's most recently synced name, as `owner/repo`. |\n| <a id=\"property-repositoryid\"></a> `repositoryId` | `string` | The numeric GitHub repository id, which survives renames and transfers. |",+ "storage.GithubUserFacet": "# Type Alias: GithubUserFacet\n\n> **GithubUserFacet** = \\{ `count`: `number`; `githubUserId`: `string`; `login?`: `string` \\| `null`; \\}\n\nA GitHub user among the visible pull requests, as an author or an assignee.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of visible pull requests the user opened, or is assigned to. |\n| <a id=\"property-githubuserid\"></a> `githubUserId` | `string` | The user's numeric GitHub user id. |\n| <a id=\"property-login\"></a> `login?` | `string` \\| `null` | The user's most recently synced GitHub login, when known. |",+ "GuestId": "# 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.",+ "storage.Harness": "# Type Alias: Harness\n\n> **Harness** = \\{ `allow_permission_bypass?`: `boolean`; `connected`: `boolean`; `created_at`: `string`; `created_by`: `string`; `id`: `HarnessId`; `kind`: `string`; `last_connected_at?`: `string` \\| `null`; `name`: `string`; `owner`: `HarnessOwner`; `updated_at`: `string`; \\}\n\nA registered user-run harness.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-allow_permission_bypass\"></a> `allow_permission_bypass?` | `boolean` | Whether agents may bypass ACP permission requests on this harness. |\n| <a id=\"property-connected\"></a> `connected` | `boolean` | Whether the daemon currently holds a runtime connection. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by\"></a> `created_by` | `string` | User that registered this harness. |\n| <a id=\"property-id\"></a> `id` | `HarnessId` | Harness id. |\n| <a id=\"property-kind\"></a> `kind` | `string` | Runtime kind. Currently always `macrod`. |\n| <a id=\"property-last_connected_at\"></a> `last_connected_at?` | `string` \\| `null` | When the daemon last attached a runtime connection. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-owner\"></a> `owner` | `HarnessOwner` | Owner. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |",+ "HarnessId": "# Type Alias: HarnessId\n\n> **HarnessId** = `string`",+ "HarnessOwner": "# Type Alias: HarnessOwner\n\n> **HarnessOwner** = \\{ `type`: `\"user\"`; `user_id`: `string`; \\} \\| \\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\nHarness owner.\n\nExactly one of a user or a team, mirroring the bots owner pattern. There\nare no system harnesses.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"user\"`; `user_id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"user\"` | - |\n| `user_id` | `string` | Owner user id. |\n\n***\n\n### Type Literal\n\n\\{ `team_id`: `string`; `type`: `\"team\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `team_id` | `string` | Owner team id. |\n| `type` | `\"team\"` | - |",+ "HighlightType": "# Type Alias: HighlightType\n\n> **HighlightType** = `1` \\| `2` \\| `3`",+ "ImportTable": "# Type Alias: ImportTable\n\n> **ImportTable** = \\{ `columns`: `string`[]; `name`: `string`; `requestId`: `string`; `rows`: `string`[][]; \\}\n\nAn import is identified once, before sending, so retries cannot duplicate rows.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | `string`[] | Header names, in order. All imported values remain text. |\n| <a id=\"property-name\"></a> `name` | `string` | New table's display name. |\n| <a id=\"property-requestid\"></a> `requestId` | `string` | Stable key for this import, retained through retries. |\n| <a id=\"property-rows\"></a> `rows` | `string`[][] | Rectangular text rows. Empty fields are preserved. |",+ "ImportedAuthor": "# 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. |",+ "InferColumnTypeOutcome": "# Type Alias: InferColumnTypeOutcome\n\n> **InferColumnTypeOutcome** = \\{ `column`: `ColumnDetail`; `table_version`: `TableVersion`; \\}\n\nSettled schema and the version against which its first value can be written.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `ColumnDetail` | Updated placement, property definition, and SQL name. |\n| <a id=\"property-table_version\"></a> `table_version` | `TableVersion` | Version after settling the column. |",+ "InferColumnTypeRequest": "# Type Alias: InferColumnTypeRequest\n\n> **InferColumnTypeRequest** = \\{ `baseVersion`: `TableVersion`; `dataType`: `storage.DataType`; `specificEntityType?`: `null` \\| `storage.EntityType`; \\}\n\nRequest to settle an empty column's first-value type.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversion\"></a> `baseVersion` | `TableVersion` | Table version used when interpreting the first value. |\n| <a id=\"property-datatype\"></a> `dataType` | `storage.DataType` | First-value type: STRING, NUMBER, or ENTITY. |\n| <a id=\"property-specificentitytype\"></a> `specificEntityType?` | `null` \\| `storage.EntityType` | - |",+ "InitialPropertyValue": "# Type Alias: InitialPropertyValue\n\n> **InitialPropertyValue** = \\{ `propertyDefinitionId`: `string`; `value`: `storage.SetPropertyValue`; \\}\n\nA property value set on a new initiative as part of its create.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-propertydefinitionid\"></a> `propertyDefinitionId` | `string` | Property definition to set. |\n| <a id=\"property-value\"></a> `value` | `storage.SetPropertyValue` | Value, validated by the properties service like any other property write. |",+ "InitiativeDetail": "# Type Alias: InitiativeDetail\n\n> **InitiativeDetail** = \\{ `createdAt`: `string`; `id`: `InitiativeId`; `memberIds`: `storage.MacroUserIdStr`[]; `name`: `string`; `ownerId`: `storage.MacroUserIdStr`; `sharePermission`: `storage.SharePermissionV2`; `taskIds`: `string`[]; `updatedAt`: `string`; `userAccessLevel`: `storage.AccessLevel`; \\}\n\nFull initiative returned to a caller, including members, tasks, and share state.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the initiative was created. |\n| <a id=\"property-id\"></a> `id` | `InitiativeId` | Opaque identifier. |\n| <a id=\"property-memberids\"></a> `memberIds` | `storage.MacroUserIdStr`[] | Member user ids. The owner is never stored here. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `storage.MacroUserIdStr` | Owner of the initiative. |\n| <a id=\"property-sharepermission\"></a> `sharePermission` | `storage.SharePermissionV2` | Current share permission. |\n| <a id=\"property-taskids\"></a> `taskIds` | `string`[] | Task ids currently assigned to the initiative. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When the initiative was last updated. |\n| <a id=\"property-useraccesslevel\"></a> `userAccessLevel` | `storage.AccessLevel` | Caller's access level on this initiative. |",+ "InitiativeId": "# Type Alias: InitiativeId\n\n> **InitiativeId** = `string`\n\nOpaque identifier for an initiative. Minted as UUIDv7 in application code.",+ "Item": "# Type Alias: Item\n\n> **Item** = \\{ `type`: `\"document\"`; \\} & `BasicDocument` \\| \\{ `type`: `\"chat\"`; \\} & `Chat` \\| \\{ `type`: `\"project\"`; \\} & `storage.Project`",+ "Lane": "# Type Alias: Lane\n\n> **Lane** = \\{ `hidden?`: `boolean`; `key`: `LaneKey`; \\}\n\nHow one lane shows in a board layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-hidden\"></a> `hidden?` | `boolean` | Whether it is hidden. |\n| <a id=\"property-key\"></a> `key` | `LaneKey` | The lane. |",+ "LaneKey": "# Type Alias: LaneKey\n\n> **LaneKey** = \\{ `id`: `string`; `kind`: `\"option\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"user\"`; \\} \\| \\{ `kind`: `\"none\"`; \\}\n\nA lane of a board, named by what its cards' grouping cells hold: one\noption of a select, one person, or nothing.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"option\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards holding this option of the board's select column. |\n| `kind` | `\"option\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"user\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The cards naming this person in the board's person column. |\n| `kind` | `\"user\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"none\"`; \\}",+ "LayoutProblem": "# Type Alias: LayoutProblem\n\n> **LayoutProblem** = \\{ `kind`: `\"bookingMustBeLast\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\} \\| \\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\} \\| \\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\nWhy a layout does not fit the form's table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"bookingMustBeLast\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"unknownColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"managedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"repeatedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The id. |\n| `kind` | `\"repeatedId\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"gateNamesLaterColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"gateRule\"` | - |\n| `reason` | `string` | Why. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"textTooLong\"` | - |\n| `max` | `number` | The longest allowed. |",+ "storage.LinkShare": "# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.",+ "LinkedAccount": "# Type Alias: LinkedAccount\n\n> **LinkedAccount** = \\{ `authorizationGeneration`: `number`; `id`: `string`; `identityJid?`: `string` \\| `null`; `state`: `LinkedAccountState`; `userId`: `string`; \\}\n\nOne person's account, never owned by a workspace.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-authorizationgeneration\"></a> `authorizationGeneration` | `number` | Explicit consent generation; reconnecting a socket never changes it. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable account identity. |\n| <a id=\"property-identityjid\"></a> `identityJid?` | `string` \\| `null` | WhatsApp-verified identity, absent until the first pairing succeeds. |\n| <a id=\"property-state\"></a> `state` | `LinkedAccountState` | Lifecycle. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Authenticated owner. |",+ "LinkedAccountState": "# Type Alias: LinkedAccountState\n\n> **LinkedAccountState** = `\"pairing\"` \\| `\"connected\"` \\| `\"logged_out\"` \\| `\"disconnected\"`\n\nAccount lifecycle. Transport outages are not stored: a connected account\nstays connected while its session service reconnects.",+ "LinkedAttachment": "# Type Alias: LinkedAttachment\n\n> **LinkedAttachment** = \\{ `documentId?`: `string` \\| `null`; `durationSeconds?`: `number` \\| `null`; `fileName`: `string`; `height?`: `number` \\| `null`; `mime`: `string`; `ordinal`: `number`; `presentation?`: `null` \\| `LinkedMediaPresentation`; `size`: `number`; `state`: `LinkedAttachmentState`; `width?`: `number` \\| `null`; \\}\n\nOne attachment of a linked message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentid\"></a> `documentId?` | `string` \\| `null` | The private document, once ready. |\n| <a id=\"property-durationseconds\"></a> `durationSeconds?` | `number` \\| `null` | Length of audio or video in whole seconds, when declared. |\n| <a id=\"property-filename\"></a> `fileName` | `string` | Display filename. |\n| <a id=\"property-height\"></a> `height?` | `number` \\| `null` | Pixel height, when declared. |\n| <a id=\"property-mime\"></a> `mime` | `string` | Declared MIME type. |\n| <a id=\"property-ordinal\"></a> `ordinal` | `number` | Position within the message. |\n| <a id=\"property-presentation\"></a> `presentation?` | `null` \\| `LinkedMediaPresentation` | - |\n| <a id=\"property-size\"></a> `size` | `number` | Declared size in bytes. |\n| <a id=\"property-state\"></a> `state` | `LinkedAttachmentState` | Current state. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Pixel width of an image, sticker or video, when WhatsApp declared it. |",+ "LinkedAttachmentState": "# Type Alias: LinkedAttachmentState\n\n> **LinkedAttachmentState** = `\"loading\"` \\| `\"ready\"` \\| `\"unavailable\"` \\| `\"unsupported\"`\n\nWhere an attachment of a linked message stands.",+ "LinkedBackfill": "# Type Alias: LinkedBackfill\n\n> **LinkedBackfill** = \\{ `imported`: `number`; `state`: `LinkedBackfillState`; \\}\n\nEarlier messages imported after adding a group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-imported\"></a> `imported` | `number` | Messages received from the phone so far (including ones already shown). |\n| <a id=\"property-state\"></a> `state` | `LinkedBackfillState` | Progress. |",+ "LinkedBackfillState": "# Type Alias: LinkedBackfillState\n\n> **LinkedBackfillState** = `\"waiting_for_message\"` \\| `\"pending\"` \\| `\"running\"` \\| `\"waiting_for_phone\"` \\| `\"done\"` \\| `\"partial\"`\n\nWhere importing a group's earlier messages stands.",+ "LinkedCannotAdd": "# Type Alias: LinkedCannotAdd\n\n> **LinkedCannotAdd** = `\"not_in_group\"` \\| `\"community\"` \\| `\"own_chat\"` \\| `\"not_in_chat_list\"`\n\nWhy a chat can't be added to Macro; the app words it from the code.",+ "LinkedCapabilities": "# Type Alias: LinkedCapabilities\n\n> **LinkedCapabilities** = \\{ `attachmentLimitBytes`: `number`; `attachmentTypes`: `string`[]; `maxAttachments`: `number`; `mutations`: `LinkedMutation`[]; `mutationWindowSeconds`: `number`; `textLimitBytes`: `number`; \\}\n\nOperations implemented for linked groups, independent of current permission.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachmentlimitbytes\"></a> `attachmentLimitBytes` | `number` | Largest attachment in bytes. |\n| <a id=\"property-attachmenttypes\"></a> `attachmentTypes` | `string`[] | Supported attachment MIME types. |\n| <a id=\"property-maxattachments\"></a> `maxAttachments` | `number` | Attachments per send. |\n| <a id=\"property-mutations\"></a> `mutations` | `LinkedMutation`[] | Supported message operations. |\n| <a id=\"property-mutationwindowseconds\"></a> `mutationWindowSeconds` | `number` | Edits and deletes are offered this long after sending. |\n| <a id=\"property-textlimitbytes\"></a> `textLimitBytes` | `number` | Maximum UTF-8 bytes per text send. |",+ "LinkedChat": "# Type Alias: LinkedChat\n\n> **LinkedChat** = \\{ `archived`: `boolean`; `canAdd`: `boolean`; `cannotAddReason?`: `null` \\| `LinkedCannotAdd`; `community?`: `null` \\| `LinkedCommunityReference`; `group?`: `null` \\| `LinkedGroupReference`; `jid`: `string`; `kind`: `LinkedChatKind`; `lastActivityAt?`: `string` \\| `null`; `name`: `string`; `pinned`: `boolean`; `shared?`: `null` \\| `LinkedSharedGroupReference`; \\}\n\nOne chat of the caller's WhatsApp chat list, as WhatsApp Web lists it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-archived\"></a> `archived` | `boolean` | Archived in WhatsApp. |\n| <a id=\"property-canadd\"></a> `canAdd` | `boolean` | \"Add to Macro\" works now. |\n| <a id=\"property-cannotaddreason\"></a> `cannotAddReason?` | `null` \\| `LinkedCannotAdd` | - |\n| <a id=\"property-community\"></a> `community?` | `null` \\| `LinkedCommunityReference` | - |\n| <a id=\"property-group\"></a> `group?` | `null` \\| `LinkedGroupReference` | - |\n| <a id=\"property-jid\"></a> `jid` | `string` | WhatsApp chat JID: a group, or the other person's phone-number JID (LID when WhatsApp never told us the number). |\n| <a id=\"property-kind\"></a> `kind` | `LinkedChatKind` | Group or direct chat. |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt?` | `string` \\| `null` | Newest activity WhatsApp reported (message or history sync); `null` when unknown. The list is sorted by it, newest first, unknown last. |\n| <a id=\"property-name\"></a> `name` | `string` | Group: the subject, or member names for an unnamed group. Direct: the contact or WhatsApp name, else `+<phone>`. Always non-empty. |\n| <a id=\"property-pinned\"></a> `pinned` | `boolean` | Pinned in WhatsApp. |\n| <a id=\"property-shared\"></a> `shared?` | `null` \\| `LinkedSharedGroupReference` | - |",+ "LinkedChatKind": "# Type Alias: LinkedChatKind\n\n> **LinkedChatKind** = `\"group\"` \\| `\"direct\"`\n\nWhether a WhatsApp chat is a group or a one-to-one chat.",+ "LinkedCommunityReference": "# Type Alias: LinkedCommunityReference\n\n> **LinkedCommunityReference** = \\{ `announcements`: `boolean`; `id`: `string`; `name`: `string`; \\}\n\nThe WhatsApp community a group belongs to.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcements\"></a> `announcements` | `boolean` | This group is the community's announcement group. |\n| <a id=\"property-id\"></a> `id` | `string` | The community's WhatsApp JID. |\n| <a id=\"property-name\"></a> `name` | `string` | The community's name. |",+ "LinkedDeliveryState": "# Type Alias: LinkedDeliveryState\n\n> **LinkedDeliveryState** = `\"pending\"` \\| `\"sending\"` \\| `\"unknown\"` \\| `\"accepted\"` \\| `\"failed\"`\n\nObserved send state. `unknown` means the request may have reached WhatsApp;\nit is never sent again automatically.",+ "LinkedGroupReference": "# Type Alias: LinkedGroupReference\n\n> **LinkedGroupReference** = \\{ `id`: `string`; `name`: `string`; \\}\n\nA group entity bound to a remote group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Group entity id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, following WhatsApp. |",+ "LinkedMediaKind": "# Type Alias: LinkedMediaKind\n\n> **LinkedMediaKind** = `\"image\"` \\| `\"audio\"` \\| `\"video\"` \\| `\"document\"`\n\nAttachment categories WhatsApp distinguishes.",+ "LinkedMediaPresentation": "# Type Alias: LinkedMediaPresentation\n\n> **LinkedMediaPresentation** = `\"sticker\"` \\| `\"gif\"` \\| `\"voice_note\"`\n\nHow WhatsApp shows an attachment, when not as a plain file of its kind.",+ "LinkedMutation": "# Type Alias: LinkedMutation\n\n> **LinkedMutation** = `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`\n\nDeliberate operations on an existing linked-group message.",+ "LinkedReplyBlock": "# Type Alias: LinkedReplyBlock\n\n> **LinkedReplyBlock** = `\"sending_disabled\"` \\| `\"no_account\"` \\| `\"disconnected\"` \\| `\"not_observing\"` \\| `\"not_allowed_in_group\"` \\| `\"group_unavailable\"`\n\nWhy the viewer cannot send now.",+ "LinkedReplyContent": "# Type Alias: LinkedReplyContent\n\n> **LinkedReplyContent** = \\{ `mentions?`: `string`[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string` \\| `null`; `type`: `\"media\"`; `uploadId`: `string`; \\} \\| \\{ `messageId`: `string`; `operation`: `LinkedMutation`; `text?`: `string` \\| `null`; `type`: `\"mutation\"`; \\}\n\nContent of a deliberate send.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mentions?`: `string`[]; `text`: `string`; `type`: `\"text\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mentions?` | `string`[] | Group participants the text @-mentions, by their WhatsApp id (`jid` of a roster participant); the text must contain `@<digits before the @ of the id>` for each. |\n| `text` | `string` | UTF-8 text, at most [`TEXT_LIMIT_BYTES`] bytes. |\n| `type` | `\"text\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `caption?`: `string` \\| `null`; `type`: `\"media\"`; `uploadId`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `caption?` | `string` \\| `null` | Optional caption; audio has none. |\n| `type` | `\"media\"` | - |\n| `uploadId` | `string` | The staged upload, which becomes the message's private document. |\n\n***\n\n### Type Literal\n\n\\{ `messageId`: `string`; `operation`: `LinkedMutation`; `text?`: `string` \\| `null`; `type`: `\"mutation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageId` | `string` | Existing group message, resolved to its WhatsApp source by the server. |\n| `operation` | `LinkedMutation` | Explicit operation. |\n| `text?` | `string` \\| `null` | Replacement text or emoji; absent for delete, empty to remove a reaction. |\n| `type` | `\"mutation\"` | - |",+ "LinkedSendProgress": "# Type Alias: LinkedSendProgress\n\n> **LinkedSendProgress** = \\{ `createdAt`: `string`; `errorCode?`: `string` \\| `null`; `groupId`: `string`; `id`: `string`; `messageId?`: `string` \\| `null`; `payload`: `LinkedSendReply`; `state`: `LinkedDeliveryState`; `userId`: `string`; \\}\n\nDurable result of a deliberate send.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Intent creation time. |\n| <a id=\"property-errorcode\"></a> `errorCode?` | `string` \\| `null` | Sanitized failure code. |\n| <a id=\"property-groupid\"></a> `groupId` | `string` | Group entity. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable intent id. |\n| <a id=\"property-messageid\"></a> `messageId?` | `string` \\| `null` | Group message, once WhatsApp accepted it. |\n| <a id=\"property-payload\"></a> `payload` | `LinkedSendReply` | The original request, so a failed draft can be recovered. |\n| <a id=\"property-state\"></a> `state` | `LinkedDeliveryState` | Current state. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Person who submitted it. |",+ "LinkedSendReply": "# Type Alias: LinkedSendReply\n\n> **LinkedSendReply** = \\{ `idempotencyKey`: `string`; `message`: `LinkedReplyContent`; `replyTo?`: `string` \\| `null`; \\}\n\nExplicit send action from a person. Only deliberate sends reach WhatsApp.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-idempotencykey\"></a> `idempotencyKey` | `string` | Stable client intent key. A changed payload with this key is a conflict. |\n| <a id=\"property-message\"></a> `message` | `LinkedReplyContent` | Content. |\n| <a id=\"property-replyto\"></a> `replyTo?` | `string` \\| `null` | Group message being quoted, within this group. |",+ "LinkedSharedGroupReference": "# Type Alias: LinkedSharedGroupReference\n\n> **LinkedSharedGroupReference** = \\{ `id`: `string`; `name`: `string`; `ownerId`: `string`; \\}\n\nAnother person's group entity the caller can view.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Group entity id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, following WhatsApp. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Macro user who added the group and shared it. |",+ "LinkedUploadedAttachment": "# Type Alias: LinkedUploadedAttachment\n\n> **LinkedUploadedAttachment** = \\{ `filename`: `string`; `kind`: `LinkedMediaKind`; `uploadId`: `string`; \\}\n\nA staged attachment, sent only by a later deliberate send.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filename\"></a> `filename` | `string` | Display filename. |\n| <a id=\"property-kind\"></a> `kind` | `LinkedMediaKind` | Category. |\n| <a id=\"property-uploadid\"></a> `uploadId` | `string` | Use as `upload_id` in a media send; also the future document id. |",+ "ListOccurrencesData": "# Type Alias: ListOccurrencesData\n\n> **ListOccurrencesData** = \\{ `body?`: `never`; `path?`: `never`; `query`: \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\}; `url`: `\"/calendar-events\"`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-body\"></a> `body?` | `never` | - |\n| <a id=\"property-path\"></a> `path?` | `never` | - |\n| <a id=\"property-query\"></a> `query` | \\{ `cursor?`: `string`; `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `query.cursor?` | `string` | Opaque continuation cursor returned by the previous page. |\n| `query.end` | `string` | Exclusive UTC viewport end. |\n| `query.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `query.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `query.start` | `string` | Inclusive UTC viewport start. |\n| `query.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n| <a id=\"property-url\"></a> `url` | `\"/calendar-events\"` | - |",+ "storage.MacroUserIdStr": "# Type Alias: MacroUserIdStr\n\n> **MacroUserIdStr** = `string`",+ "storage.Meeting": "# Type Alias: Meeting\n\n> **Meeting** = \\{ `callId?`: `string` \\| `null`; `channelId?`: `string` \\| `null`; `id`: `string`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `shareToken`: `MeetingToken`; `title`: `string`; \\}\n\nPersistent meeting metadata. No channel contents or archived media are exposed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-callid\"></a> `callId?` | `string` \\| `null` | Currently active call session, if any. |\n| <a id=\"property-channelid\"></a> `channelId?` | `string` \\| `null` | Associated channel, for links to existing channel calls only. |\n| <a id=\"property-id\"></a> `id` | `string` | Persistent meeting identifier. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Scheduled end, or none for an instant meeting. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Scheduled start, or none for an instant meeting. |\n| <a id=\"property-sharetoken\"></a> `shareToken` | `MeetingToken` | Bearer capability embedded in the invitation URL. |\n| <a id=\"property-title\"></a> `title` | `string` | Human-readable meeting title. |",+ "MeetingInvitePermissions": "# Type Alias: MeetingInvitePermissions\n\n> **MeetingInvitePermissions** = \\{ `canInvite`: `boolean`; \\}\n\nWhether the authenticated caller can invite teammates to this meeting.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-caninvite\"></a> `canInvite` | `boolean` | True for the owner of an uncancelled standalone meeting. |",+ "MeetingToken": "# Type Alias: MeetingToken\n\n> **MeetingToken** = `string`\n\nAn invitation capability for joining a meeting's RTC room. Chat additionally\nrequires the resulting participant credential and current guest membership.",+ "storage.Message": "# Type Alias: Message\n\n> **Message** = \\{ `attachments`: `MessageAttachment`[]; `bot_profile?`: `null` \\| `BotSenderProfile`; `content`: `string`; `created_at`: `string`; `deleted_at?`: `string` \\| `null`; `edited_at?`: `string` \\| `null`; `guest_name?`: `string` \\| `null`; `id`: `string`; `imported_author?`: `null` \\| `ImportedAuthor`; `mentions`: `SimpleMention`[]; `parent`: `storage.MessageParent`; `reactions`: `CountedReaction`[]; `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`[] | Attached entities. |\n| <a id=\"property-bot_profile\"></a> `bot_profile?` | `null` \\| `BotSenderProfile` | - |\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` | - |\n| <a id=\"property-mentions\"></a> `mentions` | `SimpleMention`[] | Tracked mentions, retained when a caller changes attachments only. |\n| <a id=\"property-parent\"></a> `parent` | `storage.MessageParent` | Entity that owns this conversation. |\n| <a id=\"property-reactions\"></a> `reactions` | `CountedReaction`[] | 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. |",+ "MessageAttachment": "# 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. |",+ "MessageCursor": "# Type Alias: MessageCursor\n\n> **MessageCursor** = \\{ `created_at`: `string`; `id`: `string`; \\}\n\nCursor for a chronological parent timeline.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Last message creation time or activity occurrence time. |\n| <a id=\"property-id\"></a> `id` | `string` | Last entry UUID, used to break timestamp ties across both sources. |",+ "MessageDirection": "# Type Alias: MessageDirection\n\n> **MessageDirection** = `\"older\"` \\| `\"newer\"`\n\nDirection through a parent timeline, retaining channel cursor semantics.",+ "storage.MessageParent": "# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `id`: `string`; `type`: `\"channel\"`; \\} \\| \\{ `id`: `storage.DocumentId`; `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`: `storage.DocumentId`; `type`: `\"document\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `storage.DocumentId` | 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\"` | - |",+ "NewColumn": "# Type Alias: NewColumn\n\n> **NewColumn** = \\{ `inferType?`: `boolean`; `name`: `string`; `options?`: `NewOption`[]; `source`: `\"new\"`; `type`: `ColumnKind`; \\} \\| \\{ `formula`: `Formula`; `name`: `string`; `source`: `\"derived\"`; \\} \\| \\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\nWhat a new column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `inferType?`: `boolean`; `name`: `string`; `options?`: `NewOption`[]; `source`: `\"new\"`; `type`: `ColumnKind`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `inferType?` | `boolean` | Let the column's first value settle its type: only for a plain text column. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `options?` | `NewOption`[] | For a select or tag column, the options it starts with, in order, each under an id the client mints. A select column with none accepts nothing until options are added. |\n| `source` | `\"new\"` | - |\n| `type` | `ColumnKind` | Its type. A relation names the table whose rows it holds, one the caller can see. |\n\n***\n\n### Type Literal\n\n\\{ `formula`: `Formula`; `name`: `string`; `source`: `\"derived\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `formula` | `Formula` | How its cells are computed: arithmetic over the table's number, date and other derived columns. |\n| `name` | `string` | The column's name, unique within the table ignoring case. |\n| `source` | `\"derived\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `property`: `string`; `source`: `\"existing\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `property` | `string` | The property's definition. |\n| `source` | `\"existing\"` | - |",+ "NewOption": "# Type Alias: NewOption\n\n> **NewOption** = \\{ `id`: `string`; `label`: `string`; \\}\n\nA select or tag option to create.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | Its id, minted by the client; later ops of the request may name it. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label, unique within the column ignoring case. A numeric select's labels are numbers. |",+ "NewView": "# Type Alias: NewView\n\n> **NewView** = \\{ `layout`: `RequestedLayout`; `name`: `string`; `query?`: `ViewQuery`; \\}\n\nA view's contents as an op creates it; the server gives it its id,\nposition and times.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-layout\"></a> `layout` | `RequestedLayout` | How it draws them; a board left without a card title gets the table's first column. |\n| <a id=\"property-name\"></a> `name` | `string` | Its name. |\n| <a id=\"property-query\"></a> `query?` | `ViewQuery` | Which rows it shows, in what order. |",+ "NumberOperator": "# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.",+ "OpRefusalResponse": "# Type Alias: OpRefusalResponse\n\n> **OpRefusalResponse** = \\{ `column`: `string` \\| `null`; `message`: `string`; `op`: `number`; `row`: `number` \\| `null`; `taken`: `null` \\| `TakenId`; \\}\n\nWhy an op of a batch was refused. Nothing in the batch was written.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` \\| `null` | The column placement at fault, when one is. |\n| <a id=\"property-message\"></a> `message` | `string` | What is wrong. |\n| <a id=\"property-op\"></a> `op` | `number` | The refused op's index in the request. |\n| <a id=\"property-row\"></a> `row` | `number` \\| `null` | The row's index within the op, when one row is at fault. |\n| <a id=\"property-taken\"></a> `taken` | `null` \\| `TakenId` | - |",+ "OpResult": "# Type Alias: OpResult\n\n> **OpResult** = \\{ `change`: `TableResult`; `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: `TableVersion`; \\} \\| \\{ `change`: `ColumnResult`; `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: `TableVersion`; \\} \\| \\{ `change`: `RowsResult`; `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: `TableVersion`; \\} \\| \\{ `change`: `ViewResult`; `kind`: `\"view\"`; `table`: `string`; `tableVersion`: `TableVersion`; `view`: `string`; \\} \\| \\{ `kind`: `\"reorder_tables\"`; `tables`: `VersionedTable`[]; \\}\n\nWhat one op did, in the order the ops were sent, grouped as the ops are:\na result's `kind` is its op's, naming the same resource, and its\n`change` says what happened to it.\n\n## Union Members\n\n### Type Literal\n\n\\{ `change`: `TableResult`; `kind`: `\"table\"`; `table`: `string`; `tableVersion?`: `TableVersion`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `TableResult` | What happened to it. |\n| `kind` | `\"table\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion?` | `TableVersion` | Its version once the request committed; left out when the op removed it. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `ColumnResult`; `column`: `string`; `kind`: `\"column\"`; `table`: `string`; `tableVersion`: `TableVersion`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `ColumnResult` | What happened to it. |\n| `column` | `string` | The column. |\n| `kind` | `\"column\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | `TableVersion` | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `RowsResult`; `kind`: `\"rows\"`; `table`: `string`; `tableVersion`: `TableVersion`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `RowsResult` | What happened to them. |\n| `kind` | `\"rows\"` | - |\n| `table` | `string` | The table. |\n| `tableVersion` | `TableVersion` | The table's version once the request committed. |\n\n***\n\n### Type Literal\n\n\\{ `change`: `ViewResult`; `kind`: `\"view\"`; `table`: `string`; `tableVersion`: `TableVersion`; `view`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `change` | `ViewResult` | What happened to it. |\n| `kind` | `\"view\"` | - |\n| `table` | `string` | The view's table. |\n| `tableVersion` | `TableVersion` | The table's version once the request committed. |\n| `view` | `string` | The view. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_tables\"`; `tables`: `VersionedTable`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_tables\"` | - |\n| `tables` | `VersionedTable`[] | Every table, in its new order, with its version once the request committed. |",+ "Operator": "# Type Alias: Operator\n\n> **Operator** = `\"add\"` \\| `\"subtract\"` \\| `\"multiply\"` \\| `\"divide\"`\n\nAn arithmetic operator.",+ "OptionId": "# Type Alias: OptionId\n\n> **OptionId** = `string`\n\nIdentifier of an option of a select or tag column.",+ "OptionRef": "# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |",+ "PairingDetails": "# Type Alias: PairingDetails\n\n> **PairingDetails** = \\{ `code`: `string`; `created_at`: `string`; `expires_at`: `string`; `host?`: `string` \\| `null`; `requested_allow_permission_bypass?`: `boolean` \\| `null`; `requested_name`: `string`; `requested_scope?`: `null` \\| `RequestedHarnessScope`; \\}\n\nA pending pairing, as shown to the approving user.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-code\"></a> `code` | `string` | The pairing code, normalized to `XXXX-XXXX`. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the pairing was created. |\n| <a id=\"property-expires_at\"></a> `expires_at` | `string` | When the pairing expires. |\n| <a id=\"property-host\"></a> `host?` | `string` \\| `null` | Display-only description of the machine. |\n| <a id=\"property-requested_allow_permission_bypass\"></a> `requested_allow_permission_bypass?` | `boolean` \\| `null` | Daemon operator consent ceiling; false forbids bypass at approval. |\n| <a id=\"property-requested_name\"></a> `requested_name` | `string` | Harness display name the daemon asked for. |\n| <a id=\"property-requested_scope\"></a> `requested_scope?` | `null` \\| `RequestedHarnessScope` | - |",+ "ParticipantRole": "# Type Alias: ParticipantRole\n\n> **ParticipantRole** = `\"owner\"` \\| `\"admin\"` \\| `\"member\"`\n\nThe role a user has within a channel.",+ "PatchWebhookRequest": "# Type Alias: PatchWebhookRequest\n\n> **PatchWebhookRequest** = \\{ `endpoint_url?`: `string` \\| `null`; `filters?`: `null` \\| `storage.Vec`; `headers?`: `null` \\| `BTreeMap`; `name?`: `string` \\| `null`; `status?`: `null` \\| `WebhookStatus`; \\}\n\nRequest to patch a webhook. The webhook's namespace is fixed at creation\ntime and is deliberately not patchable.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-endpoint_url\"></a> `endpoint_url?` | `string` \\| `null` | Endpoint URL. HTTPS is required outside local environments. |\n| <a id=\"property-filters\"></a> `filters?` | `null` \\| `storage.Vec` | - |\n| <a id=\"property-headers\"></a> `headers?` | `null` \\| `BTreeMap` | - |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Display name. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| `WebhookStatus` | - |",+ "PdfAnchor": "# Type Alias: PdfAnchor\n\n> **PdfAnchor** = `PdfPlaceableCommentAnchor` & \\{ `anchorType`: `\"placeable\"`; \\} \\| `PdfHighlightAnchor` & \\{ `anchorType`: `\"highlight\"`; \\}",+ "PdfHighlightAnchor": "# Type Alias: PdfHighlightAnchor\n\n> **PdfHighlightAnchor** = \\{ `alpha`: `number`; `blue`: `number`; `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `documentId`: `string`; `green`: `number`; `highlightRects`: `PdfHighlightRect`[]; `highlightType`: `HighlightType`; `owner`: `string`; `page`: `number`; `pageViewportHeight`: `number`; `pageViewportWidth`: `number`; `red`: `number`; `rootId?`: `string` \\| `null`; `text`: `string`; `updatedAt?`: `string` \\| `null`; `uuid`: `string`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-alpha\"></a> `alpha` | `number` |\n| <a id=\"property-blue\"></a> `blue` | `number` |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` |\n| <a id=\"property-documentid\"></a> `documentId` | `string` |\n| <a id=\"property-green\"></a> `green` | `number` |\n| <a id=\"property-highlightrects\"></a> `highlightRects` | `PdfHighlightRect`[] |\n| <a id=\"property-highlighttype\"></a> `highlightType` | `HighlightType` |\n| <a id=\"property-owner\"></a> `owner` | `string` |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-pageviewportheight\"></a> `pageViewportHeight` | `number` |\n| <a id=\"property-pageviewportwidth\"></a> `pageViewportWidth` | `number` |\n| <a id=\"property-red\"></a> `red` | `number` |\n| <a id=\"property-rootid\"></a> `rootId?` | `string` \\| `null` |\n| <a id=\"property-text\"></a> `text` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |",+ "PdfHighlightAnchorRequest": "# Type Alias: PdfHighlightAnchorRequest\n\n> **PdfHighlightAnchorRequest** = \\{ `alpha`: `number`; `blue`: `number`; `green`: `number`; `highlightRects`: `PdfHighlightRectAnchorRequest`[]; `highlightType`: `HighlightType`; `page`: `number`; `pageViewportHeight`: `number`; `pageViewportWidth`: `number`; `red`: `number`; `text`: `string`; `uuid?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-alpha\"></a> `alpha` | `number` |\n| <a id=\"property-blue\"></a> `blue` | `number` |\n| <a id=\"property-green\"></a> `green` | `number` |\n| <a id=\"property-highlightrects\"></a> `highlightRects` | `PdfHighlightRectAnchorRequest`[] |\n| <a id=\"property-highlighttype\"></a> `highlightType` | `HighlightType` |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-pageviewportheight\"></a> `pageViewportHeight` | `number` |\n| <a id=\"property-pageviewportwidth\"></a> `pageViewportWidth` | `number` |\n| <a id=\"property-red\"></a> `red` | `number` |\n| <a id=\"property-text\"></a> `text` | `string` |\n| <a id=\"property-uuid\"></a> `uuid?` | `string` \\| `null` |",+ "PdfHighlightRect": "# Type Alias: PdfHighlightRect\n\n> **PdfHighlightRect** = \\{ `height`: `number`; `id`: `number`; `left`: `number`; `top`: `number`; `width`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `number` |\n| <a id=\"property-id\"></a> `id` | `number` |\n| <a id=\"property-left\"></a> `left` | `number` |\n| <a id=\"property-top\"></a> `top` | `number` |\n| <a id=\"property-width\"></a> `width` | `number` |",+ "PdfHighlightRectAnchorRequest": "# Type Alias: PdfHighlightRectAnchorRequest\n\n> **PdfHighlightRectAnchorRequest** = \\{ `height`: `number`; `left`: `number`; `top`: `number`; `width`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `number` |\n| <a id=\"property-left\"></a> `left` | `number` |\n| <a id=\"property-top\"></a> `top` | `number` |\n| <a id=\"property-width\"></a> `width` | `number` |",+ "PdfPlaceableCommentAnchor": "# Type Alias: PdfPlaceableCommentAnchor\n\n> **PdfPlaceableCommentAnchor** = \\{ `allowableEdits?`: `unknown`; `documentId`: `string`; `heightPct`: `number`; `originalIndex`: `number`; `originalPage`: `number`; `owner`: `string`; `page`: `number`; `rootId?`: `string` \\| `null`; `rotation`: `number`; `shouldLockOnSave`: `boolean`; `uuid`: `string`; `wasDeleted`: `boolean`; `wasEdited`: `boolean`; `widthPct`: `number`; `xPct`: `number`; `yPct`: `number`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-allowableedits\"></a> `allowableEdits?` | `unknown` |\n| <a id=\"property-documentid\"></a> `documentId` | `string` |\n| <a id=\"property-heightpct\"></a> `heightPct` | `number` |\n| <a id=\"property-originalindex\"></a> `originalIndex` | `number` |\n| <a id=\"property-originalpage\"></a> `originalPage` | `number` |\n| <a id=\"property-owner\"></a> `owner` | `string` |\n| <a id=\"property-page\"></a> `page` | `number` |\n| <a id=\"property-rootid\"></a> `rootId?` | `string` \\| `null` |\n| <a id=\"property-rotation\"></a> `rotation` | `number` |\n| <a id=\"property-shouldlockonsave\"></a> `shouldLockOnSave` | `boolean` |\n| <a id=\"property-uuid\"></a> `uuid` | `string` |\n| <a id=\"property-wasdeleted\"></a> `wasDeleted` | `boolean` |\n| <a id=\"property-wasedited\"></a> `wasEdited` | `boolean` |\n| <a id=\"property-widthpct\"></a> `widthPct` | `number` |\n| <a id=\"property-xpct\"></a> `xPct` | `number` |\n| <a id=\"property-ypct\"></a> `yPct` | `number` |",+ "PinnedItem": "# Type Alias: PinnedItem\n\n> **PinnedItem** = \\{ `activity`: `Item`; `item`: `Item`; `pinIndex`: `number`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-activity\"></a> `activity` | `Item` | legacy will be removed later |\n| <a id=\"property-item\"></a> `item` | `Item` | The activity that was pinned |\n| <a id=\"property-pinindex\"></a> `pinIndex` | `number` | The pin index |",+ "Pipeline": "# Type Alias: Pipeline\n\n> **Pipeline** = \\{ `createdAt`: `string`; `databaseId`: `string`; `id`: `string`; `name`: `string`; `primaryColumnId`: `string`; `recordType`: `PipelineRecordType`; `sharing`: `PipelineSharing`; `tableId`: `string`; `teamId`: `string`; `trashedAt`: `string` \\| `null`; `userId`: `string`; \\}\n\nPipeline metadata; table schema and data are read through the database service.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | Creation time. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | Dedicated backing database. |\n| <a id=\"property-id\"></a> `id` | `string` | Entity identity, used with `CrmPipeline` access receipts. |\n| <a id=\"property-name\"></a> `name` | `string` | Pipeline display name. |\n| <a id=\"property-primarycolumnid\"></a> `primaryColumnId` | `string` | Protected primary column. |\n| <a id=\"property-recordtype\"></a> `recordType` | `PipelineRecordType` | Kind of the primary reference. |\n| <a id=\"property-sharing\"></a> `sharing` | `PipelineSharing` | Whether the pipeline has a team grant. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | Table of entries. |\n| <a id=\"property-teamid\"></a> `teamId` | `string` | Team owning the pipeline; references retain their own access controls. |\n| <a id=\"property-trashedat\"></a> `trashedAt` | `string` \\| `null` | Trashed pipelines are omitted from navigation. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Owning user; sharing never changes ownership. |",+ "PipelineRecordType": "# Type Alias: PipelineRecordType\n\n> **PipelineRecordType** = `\"company\"` \\| `\"contact\"`\n\nWhich CRM entity each row references. Fixed when a pipeline is created.",+ "PipelineSharing": "# Type Alias: PipelineSharing\n\n> **PipelineSharing** = `\"private\"` \\| `\"team\"`\n\nInitial sharing, or the desired team grant. Individual ownership is preserved.",+ "PreSaveDocumentResponseData": "# Type Alias: PreSaveDocumentResponseData\n\n> **PreSaveDocumentResponseData** = \\{ `presignedUrls`: `PresignedUrl`[]; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurls\"></a> `presignedUrls` | `PresignedUrl`[] | Contains any presigned urls you need to upload specific bom parts with. |",+ "PresenceOperator": "# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.",+ "PresignedUrl": "# Type Alias: PresignedUrl\n\n> **PresignedUrl** = \\{ `presignedUrl`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-presignedurl\"></a> `presignedUrl` | `string` | The presigned url used to upload the sha |\n| <a id=\"property-sha\"></a> `sha` | `string` | The sha of the item |",+ "storage.Project": "# Type Alias: Project\n\n> **Project** = \\{ `createdAt?`: `string` \\| `null`; `deletedAt?`: `string` \\| `null`; `id`: `string`; `name`: `string`; `parentId?`: `string` \\| `null`; `updatedAt?`: `string` \\| `null`; `userId`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt?` | `string` \\| `null` | The time the project was created |\n| <a id=\"property-deletedat\"></a> `deletedAt?` | `string` \\| `null` | - |\n| <a id=\"property-id\"></a> `id` | `string` | The id of the project |\n| <a id=\"property-name\"></a> `name` | `string` | The name of the project |\n| <a id=\"property-parentid\"></a> `parentId?` | `string` \\| `null` | The parent project id |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` \\| `null` | The time the project was updated |\n| <a id=\"property-userid\"></a> `userId` | `string` | The user id of who created the project |",+ "storage.PropertyDefinition": "# Type Alias: PropertyDefinition\n\n> **PropertyDefinition** = \\{ `created_at`: `string`; `data_type`: `storage.DataType`; `display_name`: `string`; `id`: `string`; `is_metadata`: `boolean`; `is_multi_select`: `boolean`; `is_system`: `boolean`; `owner`: `storage.PropertyOwner`; `specific_entity_type`: `null` \\| `storage.EntityType`; `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` | `storage.DataType` | - |\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` | `storage.PropertyOwner` | - |\n| <a id=\"property-specific_entity_type\"></a> `specific_entity_type` | `null` \\| `storage.EntityType` | - |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | - |",+ "PropertyDefinitionWithOptions": "# Type Alias: PropertyDefinitionWithOptions\n\n> **PropertyDefinitionWithOptions** = \\{ `definition`: `storage.PropertyDefinition`; `property_options`: `storage.PropertyOption`[]; \\}\n\nProperty definition with its associated options (service representation).\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-definition\"></a> `definition` | `storage.PropertyDefinition` |\n| <a id=\"property-property_options\"></a> `property_options` | `storage.PropertyOption`[] |",+ "storage.PropertyOption": "# 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`: `storage.PropertyOptionValue`; \\}\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` | `storage.PropertyOptionValue` |",+ "storage.PropertyOptionValue": "# 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 |",+ "storage.PropertyOwner": "# 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.",+ "storage.PropertyValue": "# 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`: `storage.EntityReference`[]; \\} \\| \\{ `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`: `storage.EntityReference`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"EntityReference\"` | - |\n| `value` | `storage.EntityReference`[] | 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+) |",+ "QuestionOption": "# Type Alias: QuestionOption\n\n> **QuestionOption** = \\{ `color`: `string` \\| `null`; `id`: `string`; `label`: `string`; \\}\n\nOne option of a question's column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` | Its colour, a hex string, if it has one. |\n| <a id=\"property-id\"></a> `id` | `string` | The option. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label. |",+ "ReorderPinRequest": "# Type Alias: ReorderPinRequest\n\n> **ReorderPinRequest** = \\{ `pinIndex`: `number`; `pinnedItemId`: `string`; `pinnedItemType`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pinindex\"></a> `pinIndex` | `number` | The index of the pin |\n| <a id=\"property-pinneditemid\"></a> `pinnedItemId` | `string` | The id of the pinned item |\n| <a id=\"property-pinneditemtype\"></a> `pinnedItemType` | `string` | The type of the pin |",+ "ReplaceCrmStagesRequest": "# Type Alias: ReplaceCrmStagesRequest\n\n> **ReplaceCrmStagesRequest** = \\{ `stages`: `CrmStageInput`[]; \\}\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`[] | Stages first to last. |",+ "RequestStatus": "# Type Alias: RequestStatus\n\n> **RequestStatus** = `\"pending\"` \\| `\"granted\"` \\| `\"denied\"` \\| `\"cancelled\"`\n\nDurable outcome; reading a notification never changes it.",+ "RequestedHarnessScope": "# Type Alias: RequestedHarnessScope\n\n> **RequestedHarnessScope** = `\"private\"` \\| `\"team\"`\n\nThe ownership scope a daemon's config asks for.\n\nAdvisory, not binding: the approving user confirms it in the dialog, which\narrives preselected to this. Approval is what actually sets ownership.",+ "RequestedLayout": "# Type Alias: RequestedLayout\n\n> **RequestedLayout** = \\{ `columns`: `ViewColumn`[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: `Lane`[]; `title?`: `string`; \\}\n\nA layout as an op asks for it: a board may leave its card title out.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: `ViewColumn`[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | `ViewColumn`[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: `Lane`[]; `title?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | `Lane`[] | How lanes show, in display order. |\n| `title?` | `string` | The column a card is titled by. Left out, a board keeps the title it has, and a new board takes the table's first column. |",+ "ResolveRequest": "# Type Alias: ResolveRequest\n\n> **ResolveRequest** = \\{ `grantedLevel?`: `null` \\| `storage.AccessLevel`; `revision`: `number`; \\}\n\nOwner's decision; omission of a granted level means deny.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-grantedlevel\"></a> `grantedLevel?` | `null` \\| `storage.AccessLevel` | - |\n| <a id=\"property-revision\"></a> `revision` | `number` | Request revision being reviewed. |",+ "ResponseStatus": "# Type Alias: ResponseStatus\n\n> **ResponseStatus** = `\"submitted\"` \\| `\"stopped\"`\n\nWhether a ledger entry is a saved response or a stop at a gate.",+ "ResultColumn": "# Type Alias: ResultColumn\n\n> **ResultColumn** = \\{ `kind`: `SqlOutcomeKind`; `name`: `string`; `options?`: `SqlSelectOption`[]; `relatedTable?`: `null` \\| `TableId`; `target?`: `null` \\| `SqlEntityKind`; \\}\n\nOne result column, with what its cells mean.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-kind\"></a> `kind` | `SqlOutcomeKind` | What its cells hold. |\n| <a id=\"property-name\"></a> `name` | `string` | The name or alias the statement gave it. |\n| <a id=\"property-options\"></a> `options?` | `SqlSelectOption`[] | For a select column, its options: its cells hold their ids. |\n| <a id=\"property-relatedtable\"></a> `relatedTable?` | `null` \\| `TableId` | - |\n| <a id=\"property-target\"></a> `target?` | `null` \\| `SqlEntityKind` | - |",+ "RowChange": "# Type Alias: RowChange\n\n> **RowChange** = \\{ `cells`: `CellWrite`[]; `row`: `string`; \\}\n\nOne row's cells in a [`RowChanges::PerRow`] update.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | `CellWrite`[] | Its new cells. |\n| <a id=\"property-row\"></a> `row` | `string` | The row. |",+ "RowChangeKind": "# Type Alias: RowChangeKind\n\n> **RowChangeKind** = `\"insert\"` \\| `\"update\"` \\| `\"delete\"`\n\nHow a change touched a row.",+ "RowChanges": "# Type Alias: RowChanges\n\n> **RowChanges** = \\{ `cells`: `CellWrite`[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\} \\| \\{ `kind`: `\"per_row\"`; `rows`: `RowChange`[]; \\}\n\nWhich rows an update writes, and with what.\n\n## Union Members\n\n### Type Literal\n\n\\{ `cells`: `CellWrite`[]; `kind`: `\"uniform\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cells` | `CellWrite`[] | The cells each of them gets. |\n| `kind` | `\"uniform\"` | - |\n| `rows` | `string`[] | The rows. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"per_row\"`; `rows`: `RowChange`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"per_row\"` | - |\n| `rows` | `RowChange`[] | The rows and their cells, in order. |",+ "RowHistoryEntry": "# Type Alias: RowHistoryEntry\n\n> **RowHistoryEntry** = \\{ `actingBot`: `string` \\| `null`; `actor`: `string` \\| `null`; `after`: \\{\\[`key`: `string`\\]: `CellValue`; \\}; `at`: `string`; `before`: \\{\\[`key`: `string`\\]: `CellValue`; \\}; `change`: `number`; `columns`: `string`[]; `kind`: `RowChangeKind`; `version`: `number`; \\}\n\nOne change of a row, as its history shows it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actingbot\"></a> `actingBot` | `string` \\| `null` | The agent acting for them, if one was. |\n| <a id=\"property-actor\"></a> `actor` | `string` \\| `null` | Who made it; `null` for an internal caller, or a removed user. |\n| <a id=\"property-after\"></a> `after` | \\{\\[`key`: `string`\\]: `CellValue`; \\} | Those columns' values it wrote, by column id; a cell it emptied is left out. |\n| <a id=\"property-at\"></a> `at` | `string` | When it committed. |\n| <a id=\"property-before\"></a> `before` | \\{\\[`key`: `string`\\]: `CellValue`; \\} | Those columns' values before it, by column id; an empty cell is left out. |\n| <a id=\"property-change\"></a> `change` | `number` | The change's id in the journal. |\n| <a id=\"property-columns\"></a> `columns` | `string`[] | The columns it wrote; for a removal, those the row had values in. |\n| <a id=\"property-kind\"></a> `kind` | `RowChangeKind` | How it touched the row. |\n| <a id=\"property-version\"></a> `version` | `number` | The table version it produced. |",+ "RowId": "# Type Alias: RowId\n\n> **RowId** = `string`\n\nIdentifier of a row.",+ "RowsChange": "# Type Alias: RowsChange\n\n> **RowsChange** = \\{ `kind`: `\"insert\"`; `rows`: `CellWrite`[][]; \\} \\| \\{ `changes`: `RowChanges`; `kind`: `\"update\"`; \\} \\| \\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\nA write to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"`; `rows`: `CellWrite`[][]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` | - |\n| `rows` | `CellWrite`[][] | One entry per new row: the cells it starts with. Columns left out start empty. |\n\n***\n\n### Type Literal\n\n\\{ `changes`: `RowChanges`; `kind`: `\"update\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `changes` | `RowChanges` | Which rows get which cells. |\n| `kind` | `\"update\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete\"` | - |\n| `rows` | `string`[] | The rows, each named once. |",+ "RowsResult": "# Type Alias: RowsResult\n\n> **RowsResult** = \\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\} \\| \\{ `affected`: `number`; `kind`: `\"updated\"`; \\} \\| \\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\nWhat happened to a table's rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"inserted\"`; `rows`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"inserted\"` | - |\n| `rows` | `string`[] | The new rows, in the order they were sent. |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"updated\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op updated. |\n| `kind` | `\"updated\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `affected`: `number`; `kind`: `\"deleted\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `affected` | `number` | How many rows the op deleted. |\n| `kind` | `\"deleted\"` | - |",+ "SaveBomPart": "# Type Alias: SaveBomPart\n\n> **SaveBomPart** = \\{ `path`: `string`; `sha`: `string`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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. |",+ "SaveDocumentRequest": "# Type Alias: SaveDocumentRequest\n\n> **SaveDocumentRequest** = \\{ `modificationData?`: `unknown`; `newBom?`: `SaveBomPart`[] \\| `null`; `sha?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-modificationdata\"></a> `modificationData?` | `unknown` | The modification data for the document instance. Used to store highlights and other overlays onto a static file |\n| <a id=\"property-newbom\"></a> `newBom?` | `SaveBomPart`[] \\| `null` | **DOCX ONLY** The updated BOM for the document. Containing the file path and the sha. |\n| <a id=\"property-sha\"></a> `sha?` | `string` \\| `null` | The sha of the new document. This is used to generate a presigned url to upload the new document content to s3. |",+ "SaveDocumentResponseData": "# Type Alias: SaveDocumentResponseData\n\n> **SaveDocumentResponseData** = \\{ `documentMetadata`: `DocumentResponseMetadata`; `presignedUrl?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentmetadata\"></a> `documentMetadata` | `DocumentResponseMetadata` | The updated document metadata |\n| <a id=\"property-presignedurl\"></a> `presignedUrl?` | `string` \\| `null` | If the document is an editable file, we provide a presigned url to save the updated file to. |",+ "SetOperator": "# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.",+ "storage.SetPropertyValue": "# 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`: `storage.EntityReference`; `type`: `\"entity_reference\"`; \\} \\| \\{ `references`: `storage.EntityReference`[]; `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.",+ "ShareEntityType": "# Type Alias: ShareEntityType\n\n> **ShareEntityType** = `\"document\"` \\| `\"chat\"` \\| `\"project\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"call\"` \\| `\"email_thread\"` \\| `\"agent_session\"` \\| `\"whatsapp_group\"`\n\nAn entity type with an existing Share surface.",+ "storage.SharePermissionV2": "# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: `storage.ChannelSharePermission`[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| `storage.LinkShare`; `linkShareAccessLevel?`: `null` \\| `storage.AccessLevel`; `owner`: `string`; `teamShareAccessLevel?`: `null` \\| `storage.AccessLevel`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | `storage.ChannelSharePermission`[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| `storage.LinkShare` | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| `storage.AccessLevel` | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| `storage.AccessLevel` | - |",+ "SimpleMention": "# 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. |",+ "SmartTagChannelMatch": "# 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. |",+ "SmartTagPreview": "# Type Alias: SmartTagPreview\n\n> **SmartTagPreview** = \\{ `channels`: `SmartTagChannelMatch`[]; `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`[] | First matches, in alphabetical order. |\n| <a id=\"property-totalcount\"></a> `totalCount` | `number` | Number of matching channels the caller participates in, including overflow. |",+ "SortDirection": "# Type Alias: SortDirection\n\n> **SortDirection** = `\"ascending\"` \\| `\"descending\"`\n\nA sort direction. Empty cells sort last either way.",+ "SortKey": "# Type Alias: SortKey\n\n> **SortKey** = \\{ `column`: `string`; `direction`: `SortDirection`; \\}\n\nOne sort key.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column sorted on. |\n| <a id=\"property-direction\"></a> `direction` | `SortDirection` | Which way. |",+ "SqlCell": "# Type Alias: SqlCell\n\n> **SqlCell** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"bool\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"options\"`; `value`: `OptionId`[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"row\"`; `value`: `RowId`; \\}\n\nA cell as fetched. An absent cell is `NULL`; an absent multi-valued cell\nis the empty set.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Text or link. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"bool\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"bool\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: `OptionId`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | `OptionId`[] | The selected option ids; one for single-select columns. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | `string`[] | The referenced entity ids; one for single-valued columns. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"row\"`; `value`: `RowId`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"row\"` | - |\n| `value` | `RowId` | A table row's own id, the `row_id` column. |",+ "SqlEntityKind": "# Type Alias: SqlEntityKind\n\n> **SqlEntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"` \\| `\"DATABASE_ROW\"`\n\nWhat an entity column's references point at: a kind of Macro entity, or\nthe rows of another table for a relation.\n\nSpelled as the properties system spells entity types (`USER`,\n`DATABASE_ROW`), on the wire and in SQL, where it parses\ncase-insensitively.",+ "SqlOutcomeKind": "# Type Alias: SqlOutcomeKind\n\n> **SqlOutcomeKind** = `\"text\"` \\| `\"number\"` \\| `\"boolean\"` \\| `\"date\"` \\| `\"select\"` \\| `\"entity\"` \\| `\"row\"`\n\nThe value kind of a result column.",+ "SqlSelectOption": "# Type Alias: SqlSelectOption\n\n> **SqlSelectOption** = \\{ `id`: `OptionId`; `label`: `string`; \\}\n\nOne option of a select column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `OptionId` | The option id. |\n| <a id=\"property-label\"></a> `label` | `string` | The label users type in SQL. |",+ "SqlStatement": "# Type Alias: SqlStatement\n\n> **SqlStatement** = \\{ `databaseId`: `DatabaseId`; `kind`: `\"schema\"`; `summary`: `string`; \\} \\| \\{ `kind`: `\"select\"`; \\} \\| \\{ `kind`: `\"insert\"`; `tableId`: `TableId`; `tableName`: `string`; \\} \\| \\{ `kind`: `\"update\"`; `tableId`: `TableId`; `tableName`: `string`; \\} \\| \\{ `kind`: `\"delete\"`; `tableId`: `TableId`; `tableName`: `string`; \\} \\| \\{ `columnId`: `ColumnId`; `columnName`: `string`; `kind`: `\"alterColumnType\"`; `tableId`: `TableId`; `tableName`: `string`; `to`: `string`; \\}\n\nThe statement that ran: a read, or the table (and for a type change, the\ncolumn) it wrote.\n\n## Union Members\n\n### Type Literal\n\n\\{ `databaseId`: `DatabaseId`; `kind`: `\"schema\"`; `summary`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `databaseId` | `DatabaseId` | Owning database. |\n| `kind` | `\"schema\"` | - |\n| `summary` | `string` | What changed and how to read the resulting schema. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"select\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"`; `tableId`: `TableId`; `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` | - |\n| `tableId` | `TableId` | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"update\"`; `tableId`: `TableId`; `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"update\"` | - |\n| `tableId` | `TableId` | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; `tableId`: `TableId`; `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"delete\"` | - |\n| `tableId` | `TableId` | The table written. |\n| `tableName` | `string` | Its name. |\n\n***\n\n### Type Literal\n\n\\{ `columnId`: `ColumnId`; `columnName`: `string`; `kind`: `\"alterColumnType\"`; `tableId`: `TableId`; `tableName`: `string`; `to`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columnId` | `ColumnId` | The column placement; its id survives the change. |\n| `columnName` | `string` | The column's name. |\n| `kind` | `\"alterColumnType\"` | - |\n| `tableId` | `TableId` | The table. |\n| `tableName` | `string` | Its name. |\n| `to` | `string` | The type it became, as SQL spells it, e.g. `select[]`. |",+ "StorageRow": "# Type Alias: StorageRow\n\n> **StorageRow** = \\{ `cells`: \\{\\[`key`: `string`\\]: `storage.PropertyValue`; \\}; `rowId`: `RowId`; \\}\n\nOne storage row, with cells keyed by column placement.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | \\{\\[`key`: `string`\\]: `storage.PropertyValue`; \\} | Populated cells. |\n| <a id=\"property-rowid\"></a> `rowId` | `RowId` | Row identity, independent of any referenced entity. |",+ "StoredGithubPullRequest": "# Type Alias: StoredGithubPullRequest\n\n> **StoredGithubPullRequest** = \\{ `additions?`: `number` \\| `null`; `assignees`: `GithubPullRequestUser`[]; `authorGithubUserId?`: `string` \\| `null`; `authorLogin?`: `string` \\| `null`; `base?`: `null` \\| `storage.GitRefDto`; `checks`: `GithubPullRequestCheckRun`[]; `comments`: `GithubPullRequestComment`[]; `deletions?`: `number` \\| `null`; `description?`: `string` \\| `null`; `draft`: `boolean`; `githubKey`: `string`; `githubUpdatedAt?`: `string` \\| `null`; `head?`: `null` \\| `storage.GitRefDto`; `id`: `string`; `labels`: `GithubPullRequestLabel`[]; `number`: `number`; `owner`: `string`; `repo`: `string`; `requestedReviewerGithubUserIds`: `string`[]; `reviewDecision?`: `null` \\| `GithubPullRequestReviewDecision`; `reviews`: `GithubPullRequestReview`[]; `status?`: `null` \\| `\"open\"` \\| `\"closed\"` \\| `\"merged\"`; `title?`: `string` \\| `null`; `url`: `string`; \\}\n\nA GitHub pull request as Macro stores it, read through one of the caller's records.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-additions\"></a> `additions?` | `number` \\| `null` | Lines added across the pull request's changes. |\n| <a id=\"property-assignees\"></a> `assignees` | `GithubPullRequestUser`[] | The users assigned to the pull request. |\n| <a id=\"property-authorgithubuserid\"></a> `authorGithubUserId?` | `string` \\| `null` | Stable numeric GitHub user id of the author. |\n| <a id=\"property-authorlogin\"></a> `authorLogin?` | `string` \\| `null` | The author's GitHub login when the pull request was last synced. |\n| <a id=\"property-base\"></a> `base?` | `null` \\| `storage.GitRefDto` | - |\n| <a id=\"property-checks\"></a> `checks` | `GithubPullRequestCheckRun`[] | The latest check runs on the pull request's head commit. |\n| <a id=\"property-comments\"></a> `comments` | `GithubPullRequestComment`[] | Comments from the pull request's conversation, reviews, and review threads. Comment `authorId` intentionally retains the shared numeric GitHub comment contract; convert it to a decimal string before comparing it with `authorGithubUserId`. |\n| <a id=\"property-deletions\"></a> `deletions?` | `number` \\| `null` | Lines deleted across the pull request's changes. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | The pull request body, as GitHub markdown. |\n| <a id=\"property-draft\"></a> `draft` | `boolean` | Whether the pull request is a draft. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The pull request's `owner/repo/pull/number` key. |\n| <a id=\"property-githubupdatedat\"></a> `githubUpdatedAt?` | `string` \\| `null` | When GitHub last updated the pull request. |\n| <a id=\"property-head\"></a> `head?` | `null` \\| `storage.GitRefDto` | - |\n| <a id=\"property-id\"></a> `id` | `string` | The caller's record for the pull request. |\n| <a id=\"property-labels\"></a> `labels` | `GithubPullRequestLabel`[] | The pull request's labels. |\n| <a id=\"property-number\"></a> `number` | `number` | The pull request number within its repository. |\n| <a id=\"property-owner\"></a> `owner` | `string` | The repository owner the pull request was last synced under. |\n| <a id=\"property-repo\"></a> `repo` | `string` | The repository name the pull request was last synced under. |\n| <a id=\"property-requestedreviewergithubuserids\"></a> `requestedReviewerGithubUserIds` | `string`[] | Stable numeric GitHub user ids of the users asked to review. |\n| <a id=\"property-reviewdecision\"></a> `reviewDecision?` | `null` \\| `GithubPullRequestReviewDecision` | - |\n| <a id=\"property-reviews\"></a> `reviews` | `GithubPullRequestReview`[] | Each reviewer's latest submitted review. |\n| <a id=\"property-status\"></a> `status?` | `null` \\| `\"open\"` \\| `\"closed\"` \\| `\"merged\"` | The normalized pull request status. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | The pull request title. |\n| <a id=\"property-url\"></a> `url` | `string` | The pull request's page on GitHub. |",+ "String": "# Type Alias: String\n\n> **String** = `string`",+ "Table": "# Type Alias: Table\n\n> **Table** = \\{ `database_id`: `string`; `id`: `string`; `name`: `string`; `position`: `string`; `version`: `TableVersion`; \\}\n\nOne table (tab) of a database.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-database_id\"></a> `database_id` | `string` | Owning database. |\n| <a id=\"property-id\"></a> `id` | `string` | Identifier. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name; also the basis of the table's SQL name. |\n| <a id=\"property-position\"></a> `position` | `string` | Fractional index for tab ordering. |\n| <a id=\"property-version\"></a> `version` | `TableVersion` | Current version. |",+ "TableChange": "# Type Alias: TableChange\n\n> **TableChange** = \\{ `kind`: `\"create\"`; `name`: `string`; \\} \\| \\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\} \\| \\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\nA change to a table itself.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `name`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `name` | `string` | Its name, unique within the database ignoring case. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"rename\"`; `name`: `string`; `previousName?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"rename\"` | - |\n| `name` | `string` | Its new name, unique within the database ignoring case. |\n| `previousName?` | `string` | The name the caller saw. Given, the rename is refused if the table goes by another one now, so a concurrent rename is not overwritten. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_columns\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_columns\"` | - |\n| `order` | `string`[] | Its columns, in their new order. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"reorder_views\"`; `order`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"reorder_views\"` | - |\n| `order` | `string`[] | Its views, in their new order. |",+ "TableDetail": "# Type Alias: TableDetail\n\n> **TableDetail** = \\{ `columns`: `ColumnDetail`[]; `sql_name`: `string`; `table`: `Table`; `views`: `storage.DatabaseView`[]; \\}\n\nOne table with its columns and SQL name.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | `ColumnDetail`[] | Columns in display order. |\n| <a id=\"property-sql_name\"></a> `sql_name` | `string` | The name SQL refers to the table by: its display name quoted and qualified by the database's (`FROM \"Plans\".\"Table 1\"`). |\n| <a id=\"property-table\"></a> `table` | `Table` | The table. |\n| <a id=\"property-views\"></a> `views` | `storage.DatabaseView`[] | The table's views, in their order. |",+ "TableId": "# Type Alias: TableId\n\n> **TableId** = `string`\n\nIdentifier of one table (tab) within a database.",+ "TableResult": "# Type Alias: TableResult\n\n> **TableResult** = \\{ `kind`: `\"created\"`; \\} \\| \\{ `kind`: `\"renamed\"`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"columns_reordered\"`; \\} \\| \\{ `kind`: `\"views_reordered\"`; `positions`: `ViewPosition`[]; \\}\n\nWhat happened to a table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"renamed\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"columns_reordered\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"views_reordered\"`; `positions`: `ViewPosition`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"views_reordered\"` | - |\n| `positions` | `ViewPosition`[] | Every view's key, in their new order. |",+ "TableVersion": "# Type Alias: TableVersion\n\n> **TableVersion** = `number`\n\nMonotonic per-table version, bumped once by every committed change to a\ntable's schema or rows. Schema edits name the version they were made\nagainst, and change events carry the new one.",+ "TakenId": "# Type Alias: TakenId\n\n> **TakenId** = \\{ `id`: `string`; `kind`: `\"table\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"column\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"option\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"view\"`; \\}\n\nAn id a request minted for something new that already names something,\nwhich refuses the request: a retried request whose first attempt\ncommitted, or an id minted twice.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A table's. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"column\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A column's. |\n| `kind` | `\"column\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"option\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option's. |\n| `kind` | `\"option\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"view\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | A view's. |\n| `kind` | `\"view\"` | - |",+ "TeamCalendarCoverage": "# Type Alias: TeamCalendarCoverage\n\n> **TeamCalendarCoverage** = `\"ready\"` \\| `\"unavailable\"` \\| `\"hidden\"`\n\nWhether a member's calendar projection can establish availability.",+ "storage.TeamCalendarDetails": "# Type Alias: TeamCalendarDetails\n\n> **TeamCalendarDetails** = \\{ `attendees`: `storage.CalendarAttendee`[]; `calendarName`: `string`; `conferenceUrl?`: `string` \\| `null`; `description?`: `string` \\| `null`; `location?`: `string` \\| `null`; `organizerEmail?`: `string` \\| `null`; `organizerName?`: `string` \\| `null`; `title`: `string`; \\}\n\nSafe details from a single authorized source.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `storage.CalendarAttendee`[] | Attendees; self flags are relative to the requesting viewer. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` | Source calendar name, shown only with details. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl?` | `string` \\| `null` | Join URL, if supplied by this source. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Body, if supplied by this source. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Location, if supplied by this source. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail?` | `string` \\| `null` | Organizer address from this source. |\n| <a id=\"property-organizername\"></a> `organizerName?` | `string` \\| `null` | Organizer name from this source. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |",+ "storage.TeamCalendarSharing": "# Type Alias: TeamCalendarSharing\n\n> **TeamCalendarSharing** = `\"all\"` \\| `\"busy_only\"` \\| `\"none\"`\n\nWhat a user exposes through their team membership.",+ "storage.TeamRole": "# Type Alias: TeamRole\n\n> **TeamRole** = `\"member\"` \\| `\"admin\"` \\| `\"owner\"`\n\nThe role a user has within a team.\n\nOrdered least to most privileged so comparisons reflect access strength.",+ "TextOperator": "# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.",+ "ThreadAnchor": "# 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`. |",+ "ThreadState": "# Type Alias: ThreadState\n\n> **ThreadState** = \\{ `anchor?`: `null` \\| `ThreadAnchor`; `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` | - |\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. |",+ "UnlockedBooking": "# Type Alias: UnlockedBooking\n\n> **UnlockedBooking** = \\{ `description`: `string`; `section`: `string`; `target`: `BookingTarget`; `title`: `string`; \\}\n\nA booking step a passing response has unlocked, with its destination.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read before choosing a time. |\n| <a id=\"property-section\"></a> `section` | `string` | The booking section. |\n| <a id=\"property-target\"></a> `target` | `BookingTarget` | The native booking event to open. |\n| <a id=\"property-title\"></a> `title` | `string` | Its title. |",+ "UpdateChannelSharePermission": "# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| `storage.AccessLevel`; `channelId`: `string`; `operation`: `UpdateOperation`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| `storage.AccessLevel` | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | `UpdateOperation` | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |",+ "UpdateCrmTeamSettingsRequest": "# Type Alias: UpdateCrmTeamSettingsRequest\n\n> **UpdateCrmTeamSettingsRequest** = \\{ `closed_stage_ids?`: `string`[] \\| `null`; `default_team_view_id?`: `string` \\| `null`; `delete_records_role?`: `null` \\| `CrmPermissionRole`; `edit_stages_role?`: `null` \\| `CrmPermissionRole`; `move_closed_deals_role?`: `null` \\| `CrmPermissionRole`; `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` | - |\n| <a id=\"property-edit_stages_role\"></a> `edit_stages_role?` | `null` \\| `CrmPermissionRole` | - |\n| <a id=\"property-move_closed_deals_role\"></a> `move_closed_deals_role?` | `null` \\| `CrmPermissionRole` | - |\n| <a id=\"property-team_views\"></a> `team_views?` | `unknown` | Replacement team-views array (whole-blob, last write wins). |",+ "UpdateForm": "# Type Alias: UpdateForm\n\n> **UpdateForm** = \\{ `audience?`: `Audience`; `closesAt?`: `string` \\| `null`; `confirmationMessage?`: `string`; `description?`: `string`; `status?`: `FormStatus`; `tallyVisible?`: `boolean`; \\}\n\nA change to a form's facts; what is left out stays. The description and\nconfirmation message take edit, the rest owner. A form is renamed\nthrough the entity mutation router.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience?` | `Audience` | Who may respond from now on. |\n| <a id=\"property-closesat\"></a> `closesAt?` | `string` \\| `null` | When it stops taking responses, or `null` for never. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage?` | `string` | Its new confirmation message. |\n| <a id=\"property-description\"></a> `description?` | `string` | Its new description. |\n| <a id=\"property-status\"></a> `status?` | `FormStatus` | Open or close it. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible?` | `boolean` | Whether respondents may read option tallies. |",+ "UpdateMeetingRequest": "# Type Alias: UpdateMeetingRequest\n\n> **UpdateMeetingRequest** = \\{ `clearSchedule?`: `boolean`; `scheduledEnd?`: `string` \\| `null`; `scheduledStart?`: `string` \\| `null`; `title?`: `string` \\| `null`; \\}\n\nChanges to a meeting's title or scheduled time; omitted values stay unchanged.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-clearschedule\"></a> `clearSchedule?` | `boolean` | Remove timed scheduling, for example when the calendar event becomes all-day. |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd?` | `string` \\| `null` | Replacement scheduled end; requires a matching start. |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart?` | `string` \\| `null` | Replacement scheduled start; requires a matching end. |\n| <a id=\"property-title\"></a> `title?` | `string` \\| `null` | Replacement title, when supplied. |",+ "UpdateOperation": "# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`",+ "UpdateSharePermissionRequestV2": "# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: `UpdateChannelSharePermission`[] \\| `null`; `linkShare?`: `null` \\| `storage.LinkShare`; `linkShareAccessLevel?`: `null` \\| `storage.AccessLevel`; `teamShareAccessLevel?`: `null` \\| `storage.AccessLevel`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | `UpdateChannelSharePermission`[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| `storage.LinkShare` | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| `storage.AccessLevel` | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| `storage.AccessLevel` | - |",+ "UserApiKeyId": "# Type Alias: UserApiKeyId\n\n> **UserApiKeyId** = `string`\n\nOpaque identifier for a stored user API key.",+ "UserApiKeyInfo": "# Type Alias: UserApiKeyInfo\n\n> **UserApiKeyInfo** = \\{ `createdAt`: `string`; `id`: `UserApiKeyId`; `name`: `string`; \\}\n\nSafe metadata for a stored key. Never contains the secret or its hash.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the key was created. |\n| <a id=\"property-id\"></a> `id` | `UserApiKeyId` | Opaque identifier used to address the key after create. |\n| <a id=\"property-name\"></a> `name` | `string` | User-facing name. |",+ "ValidateWebhookResponse": "# Type Alias: ValidateWebhookResponse\n\n> **ValidateWebhookResponse** = \\{ `is_valid`: `boolean`; `message?`: `string` \\| `null`; `response_status?`: `number` \\| `null`; `webhook_id`: `String`; \\}\n\nSanitized result of validating a webhook endpoint.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-is_valid\"></a> `is_valid` | `boolean` | Whether the endpoint accepted the signed validation delivery. |\n| <a id=\"property-message\"></a> `message?` | `string` \\| `null` | Sanitized message explaining validation failure. |\n| <a id=\"property-response_status\"></a> `response_status?` | `number` \\| `null` | HTTP response status returned by the webhook endpoint, when available. |\n| <a id=\"property-webhook_id\"></a> `webhook_id` | `String` | Webhook id that was validated. |",+ "storage.Vec": "# Type Alias: Vec\n\n> **Vec** = \\{ `events`: `string`[]; `ids?`: `string`[] \\| `null`; \\}[]\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `events` | `string`[] | Event names matched by this filter. |\n| `ids?` | `string`[] \\| `null` | Entity ids matched by this filter. When absent, the filter matches all entity ids. |",+ "VersionedTable": "# Type Alias: VersionedTable\n\n> **VersionedTable** = \\{ `table`: `string`; `version`: `TableVersion`; \\}\n\nA table and its version.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | `string` | The table. |\n| <a id=\"property-version\"></a> `version` | `TableVersion` | Its version. |",+ "ViewChange": "# Type Alias: ViewChange\n\n> **ViewChange** = \\{ `kind`: `\"create\"`; `view`: `NewView`; \\} \\| \\{ `kind`: `\"update\"`; `layout?`: `RequestedLayout`; `name?`: `string`; `query?`: `ViewQuery`; \\} \\| \\{ `kind`: `\"delete\"`; \\} \\| \\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: `LaneKey`; `row`: `string`; \\}\n\nA change to one view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"create\"`; `view`: `NewView`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"create\"` | - |\n| `view` | `NewView` | What it shows and how. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"update\"`; `layout?`: `RequestedLayout`; `name?`: `string`; `query?`: `ViewQuery`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"update\"` | - |\n| `layout?` | `RequestedLayout` | Its new layout. A board grouped by another column forgets where its cards were; a board left without a card title keeps the one it has, or takes the table's first column. |\n| `name?` | `string` | Its new name. |\n| `query?` | `ViewQuery` | Its new query. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"delete\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `after?`: `string` \\| `null`; `before?`: `string` \\| `null`; `kind`: `\"move_card\"`; `lane`: `LaneKey`; `row`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `string` \\| `null` | The card that ends up just after it, if any. Given with `before`, it must be the card right after `before`; with neither, the card goes to the end of the lane. |\n| `before?` | `string` \\| `null` | The card that ends up just before it (it lands right after this one), if any. |\n| `kind` | `\"move_card\"` | - |\n| `lane` | `LaneKey` | The lane it goes to: an option of a select board's column, a person for a board grouped by people, or the lane of empty cells. |\n| `row` | `string` | The card's row. |",+ "ViewColumn": "# Type Alias: ViewColumn\n\n> **ViewColumn** = \\{ `column`: `string`; `width`: `number` \\| `null`; \\}\n\nHow one column shows in a table layout.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column. |\n| <a id=\"property-width\"></a> `width` | `number` \\| `null` | Its width in pixels; the default when unset. |",+ "ViewLayout": "# Type Alias: ViewLayout\n\n> **ViewLayout** = \\{ `columns`: `ViewColumn`[]; `kind`: `\"table\"`; \\} \\| \\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: `Lane`[]; `title`: `string`; \\}\n\nHow a view draws its rows.\n\n## Union Members\n\n### Type Literal\n\n\\{ `columns`: `ViewColumn`[]; `kind`: `\"table\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `columns` | `ViewColumn`[] | How columns show, in display order. A column left out shows after the listed ones, in the table's order. |\n| `kind` | `\"table\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `cardFields`: `string`[]; `groupBy`: `string`; `hideEmptyLanes`: `boolean`; `kind`: `\"board\"`; `lanes`: `Lane`[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `cardFields` | `string`[] | The columns a card shows under its title, in order. |\n| `groupBy` | `string` | The single-select or single-person column whose values are the lanes; moving a card to another lane sets this column. |\n| `hideEmptyLanes` | `boolean` | Whether a lane with no cards is hidden. |\n| `kind` | `\"board\"` | - |\n| `lanes` | `Lane`[] | How lanes show, in display order. A lane left out shows after the listed ones: the lane of empty cells first, then options in the column's order, or people by id. |\n| `title` | `string` | The column a card is titled by, of any type. Removing it titles the cards by the table's first remaining column. |",+ "ViewPosition": "# Type Alias: ViewPosition\n\n> **ViewPosition** = \\{ `position`: `string`; `view`: `string`; \\}\n\nA view's place among its table's views.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-position\"></a> `position` | `string` | Its key. |\n| <a id=\"property-view\"></a> `view` | `string` | The view. |",+ "ViewQuery": "# Type Alias: ViewQuery\n\n> **ViewQuery** = \\{ `filter`: `null` \\| `FilterGroup`; `sort?`: `SortKey`[]; \\}\n\nWhich rows of the table a view shows, and in what order: a filter and a\nsort, nothing that joins, groups or reshapes rows.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filter\"></a> `filter` | `null` \\| `FilterGroup` | - |\n| <a id=\"property-sort\"></a> `sort?` | `SortKey`[] | The sort keys, first key first. Rows the keys leave tied keep the table's own order; with no keys, the table's order is the view's. |",+ "ViewResult": "# Type Alias: ViewResult\n\n> **ViewResult** = \\{ `kind`: `\"created\"`; `view`: `storage.DatabaseView`; \\} \\| \\{ `kind`: `\"updated\"`; `view`: `storage.DatabaseView`; \\} \\| \\{ `kind`: `\"deleted\"`; \\} \\| \\{ `kind`: `\"card_moved\"`; `positions`: `CardPosition`[]; \\}\n\nWhat happened to a view.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"created\"`; `view`: `storage.DatabaseView`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"created\"` | - |\n| `view` | `storage.DatabaseView` | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"updated\"`; `view`: `storage.DatabaseView`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"updated\"` | - |\n| `view` | `storage.DatabaseView` | The view as stored. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"deleted\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"card_moved\"`; `positions`: `CardPosition`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"card_moved\"` | - |\n| `positions` | `CardPosition`[] | The positions written, the moved card's last. |",+ "storage.Webhook": "# Type Alias: Webhook\n\n> **Webhook** = \\{ `created_at`: `string`; `created_by_user_id`: `string`; `deleted_at?`: `string` \\| `null`; `endpoint_url`: `string`; `filters`: `storage.Vec`; `headers`: `BTreeMap`; `id`: `String`; `is_valid`: `boolean`; `name`: `string`; `namespace`: `string`; `status`: `WebhookStatus`; `updated_at`: `string`; `workspace_id`: `string`; \\}\n\nWebhook row returned by application APIs.\n\nClients deserialize this, so both derives are used.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | Creation timestamp. |\n| <a id=\"property-created_by_user_id\"></a> `created_by_user_id` | `string` | User that created the webhook. |\n| <a id=\"property-deleted_at\"></a> `deleted_at?` | `string` \\| `null` | Soft-delete timestamp. |\n| <a id=\"property-endpoint_url\"></a> `endpoint_url` | `string` | Endpoint URL. HTTPS is required outside local environments. |\n| <a id=\"property-filters\"></a> `filters` | `storage.Vec` | Typed filters used to match events and optional entity ids. |\n| <a id=\"property-headers\"></a> `headers` | `BTreeMap` | Custom delivery headers, after decryption by the repository. |\n| <a id=\"property-id\"></a> `id` | `String` | Webhook id. |\n| <a id=\"property-is_valid\"></a> `is_valid` | `boolean` | Whether the current endpoint configuration has passed validation. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-namespace\"></a> `namespace` | `string` | Caller-chosen namespace, unique among the owning workspace's webhooks. Set at creation time only; it cannot be changed afterwards. |\n| <a id=\"property-status\"></a> `status` | `WebhookStatus` | Webhook lifecycle status. |\n| <a id=\"property-updated_at\"></a> `updated_at` | `string` | Update timestamp. |\n| <a id=\"property-workspace_id\"></a> `workspace_id` | `string` | Owning workspace id. |",+ "WebhookFilter": "# Type Alias: WebhookFilter\n\n> **WebhookFilter** = \\{ `events`: `string`[]; `ids?`: `string`[] \\| `null`; \\}\n\nEvent and optional entity-id constraints used to match webhook deliveries.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-events\"></a> `events` | `string`[] | Event names matched by this filter. |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | Entity ids matched by this filter. When absent, the filter matches all entity ids. |",+ "WebhookScope": "# Type Alias: WebhookScope\n\n> **WebhookScope** = `\"user\"` \\| `\"team\"`\n\nScope that owns a newly-created webhook.\n\nClients serialize this, so both derives are used. `Display`/`FromStr`\nspell the same names as serde, for query strings and config values.",+ "WebhookStatus": "# Type Alias: WebhookStatus\n\n> **WebhookStatus** = `\"active\"` \\| `\"paused\"` \\| `\"disabled\"`\n\nWebhook lifecycle status.",+ "WhatsAppCall": "# Type Alias: WhatsAppCall\n\n> **WhatsAppCall** = \\{ `durationSeconds?`: `number` \\| `null`; `outcome`: `WhatsAppCallOutcome`; `video`: `boolean`; \\}\n\nA call in the group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-durationseconds\"></a> `durationSeconds?` | `number` \\| `null` | Length, when it connected. |\n| <a id=\"property-outcome\"></a> `outcome` | `WhatsAppCallOutcome` | How it went for the account that saw it. |\n| <a id=\"property-video\"></a> `video` | `boolean` | Video rather than voice. |",+ "WhatsAppCallOutcome": "# Type Alias: WhatsAppCallOutcome\n\n> **WhatsAppCallOutcome** = `\"answered\"` \\| `\"missed\"` \\| `\"rejected\"` \\| `\"other\"`\n\nHow a call went.",+ "WhatsAppContactCard": "# Type Alias: WhatsAppContactCard\n\n> **WhatsAppContactCard** = \\{ `name`: `string`; `phones`: `string`[]; \\}\n\nOne contact card, from its vCard.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-phones\"></a> `phones` | `string`[] | Phone numbers as written on the card. |",+ "WhatsAppContacts": "# Type Alias: WhatsAppContacts\n\n> **WhatsAppContacts** = \\{ `contacts`: `WhatsAppContactCard`[]; \\}\n\nContact cards.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contacts\"></a> `contacts` | `WhatsAppContactCard`[] | The cards, in order. |",+ "WhatsAppEvent": "# Type Alias: WhatsAppEvent\n\n> **WhatsAppEvent** = \\{ `canceled?`: `boolean`; `description?`: `string` \\| `null`; `endAt?`: `string` \\| `null`; `joinLink?`: `string` \\| `null`; `location?`: `string` \\| `null`; `name`: `string`; `startAt?`: `string` \\| `null`; \\}\n\nA WhatsApp event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-canceled\"></a> `canceled?` | `boolean` | Canceled by its organizer. |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | Description. |\n| <a id=\"property-endat\"></a> `endAt?` | `string` \\| `null` | End. |\n| <a id=\"property-joinlink\"></a> `joinLink?` | `string` \\| `null` | Call link for an online event. |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` | Place name or address. |\n| <a id=\"property-name\"></a> `name` | `string` | Title. |\n| <a id=\"property-startat\"></a> `startAt?` | `string` \\| `null` | Start. |",+ "WhatsAppGroupDetail": "# Type Alias: WhatsAppGroupDetail\n\n> **WhatsAppGroupDetail** = `WhatsAppGroupSummary` & \\{ `accessLevel`: `storage.AccessLevel`; `disappearingSeconds?`: `number` \\| `null`; `limits`: `LinkedCapabilities`; `roster?`: `null` \\| `WhatsAppRoster`; `sendingIdentity?`: `string` \\| `null`; `sharePermission`: `storage.SharePermissionV2`; \\}\n\nFull group detail and current viewer capabilities.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `accessLevel` | `storage.AccessLevel` | Caller's effective permission. |\n| `disappearingSeconds?` | `number` \\| `null` | WhatsApp's disappearing-messages timer in seconds while it is on; Macro keeps the messages anyway. `null` when off or unknown. |\n| `limits` | `LinkedCapabilities` | Size and mutation limits. |\n| `roster?` | `null` \\| `WhatsAppRoster` | - |\n| `sendingIdentity?` | `string` \\| `null` | Caller's own phone identity, never another account's identity. |\n| `sharePermission` | `storage.SharePermissionV2` | Owner-controlled standard sharing configuration. |",+ "WhatsAppGroupMessage": "# Type Alias: WhatsAppGroupMessage\n\n> **WhatsAppGroupMessage** = \\{ `attachments`: `LinkedAttachment`[]; `body`: `string`; `deleted`: `boolean`; `deliveryState?`: `null` \\| `LinkedDeliveryState`; `editedAt?`: `string` \\| `null`; `forwarded`: `boolean`; `id`: `string`; `kind`: `WhatsAppMessageKind`; `mentions`: `WhatsAppMention`[]; `reactions`: `WhatsAppGroupReaction`[]; `receivedAt`: `string`; `replyTo?`: `string` \\| `null`; `rich?`: `null` \\| `WhatsAppRichContent`; `sender`: `WhatsAppGroupSender`; `sentAt`: `string`; `viewOnce`: `boolean`; \\}\n\nOne message in an adopted group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `LinkedAttachment`[] | Imported or pending attachments. |\n| <a id=\"property-body\"></a> `body` | `string` | Plain WhatsApp text. |\n| <a id=\"property-deleted\"></a> `deleted` | `boolean` | Deleted for everyone. |\n| <a id=\"property-deliverystate\"></a> `deliveryState?` | `null` \\| `LinkedDeliveryState` | - |\n| <a id=\"property-editedat\"></a> `editedAt?` | `string` \\| `null` | Last edit timestamp. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `boolean` | Forwarded from another chat. |\n| <a id=\"property-id\"></a> `id` | `string` | Stable message id. |\n| <a id=\"property-kind\"></a> `kind` | `WhatsAppMessageKind` | A message, or a system line. |\n| <a id=\"property-mentions\"></a> `mentions` | `WhatsAppMention`[] | People the body @-mentions. |\n| <a id=\"property-reactions\"></a> `reactions` | `WhatsAppGroupReaction`[] | Reactions grouped by emoji. |\n| <a id=\"property-receivedat\"></a> `receivedAt` | `string` | Timestamp first received by Macro. |\n| <a id=\"property-replyto\"></a> `replyTo?` | `string` \\| `null` | Message quoted by this one. |\n| <a id=\"property-rich\"></a> `rich?` | `null` \\| `WhatsAppRichContent` | - |\n| <a id=\"property-sender\"></a> `sender` | `WhatsAppGroupSender` | Sender. |\n| <a id=\"property-sentat\"></a> `sentAt` | `string` | Timestamp assigned by WhatsApp. |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `boolean` | Sent as view-once in WhatsApp; Macro shows it like any media. |",+ "WhatsAppGroupReaction": "# Type Alias: WhatsAppGroupReaction\n\n> **WhatsAppGroupReaction** = \\{ `count`: `number`; `emoji`: `string`; `mine`: `boolean`; \\}\n\nGrouped reactions.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-count\"></a> `count` | `number` | Number of reacting people. |\n| <a id=\"property-emoji\"></a> `emoji` | `string` | Emoji. |\n| <a id=\"property-mine\"></a> `mine` | `boolean` | Caller has this reaction. |",+ "WhatsAppGroupSender": "# Type Alias: WhatsAppGroupSender\n\n> **WhatsAppGroupSender** = \\{ `name`: `string`; `personId`: `string`; `userId?`: `string` \\| `null`; \\}\n\nMessage sender from protocol-verified identity evidence.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, never authentication evidence. |\n| <a id=\"property-personid\"></a> `personId` | `string` | External person identity. |\n| <a id=\"property-userid\"></a> `userId?` | `string` \\| `null` | Verified Macro user association, if present. |",+ "WhatsAppGroupSummary": "# Type Alias: WhatsAppGroupSummary\n\n> **WhatsAppGroupSummary** = \\{ `backfill?`: `null` \\| `LinkedBackfill`; `canSend`: `boolean`; `community?`: `null` \\| `LinkedCommunityReference`; `id`: `string`; `kind`: `LinkedChatKind`; `lastMessageAt?`: `string` \\| `null`; `name`: `string`; `sendReason?`: `null` \\| `LinkedReplyBlock`; `unreadCount`: `number`; `userId`: `string`; \\}\n\nAdopted group visible through ordinary entity sharing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill?` | `null` \\| `LinkedBackfill` | - |\n| <a id=\"property-cansend\"></a> `canSend` | `boolean` | Caller may currently send from their own account. |\n| <a id=\"property-community\"></a> `community?` | `null` \\| `LinkedCommunityReference` | - |\n| <a id=\"property-id\"></a> `id` | `string` | Entity identifier. |\n| <a id=\"property-kind\"></a> `kind` | `LinkedChatKind` | A group, or a direct chat with one person (only its owner sends). |\n| <a id=\"property-lastmessageat\"></a> `lastMessageAt?` | `string` \\| `null` | Latest message timestamp. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name: the group's, or a direct chat's other person. |\n| <a id=\"property-sendreason\"></a> `sendReason?` | `null` \\| `LinkedReplyBlock` | - |\n| <a id=\"property-unreadcount\"></a> `unreadCount` | `number` | Unread live messages for this viewer, counted up to [`UNREAD_COUNT_CAP`]. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Actual entity owner. |",+ "WhatsAppLocation": "# Type Alias: WhatsAppLocation\n\n> **WhatsAppLocation** = \\{ `address?`: `string` \\| `null`; `comment?`: `string` \\| `null`; `latitude`: `number`; `live?`: `boolean`; `longitude`: `number`; `name?`: `string` \\| `null`; `url?`: `string` \\| `null`; \\}\n\nA shared place.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-address\"></a> `address?` | `string` \\| `null` | Street address. |\n| <a id=\"property-comment\"></a> `comment?` | `string` \\| `null` | Caption or comment. |\n| <a id=\"property-latitude\"></a> `latitude` | `number` | Degrees. |\n| <a id=\"property-live\"></a> `live?` | `boolean` | Shared as a live location (this is where it started). |\n| <a id=\"property-longitude\"></a> `longitude` | `number` | Degrees. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | Place name. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | Link the sender attached. |",+ "WhatsAppMention": "# Type Alias: WhatsAppMention\n\n> **WhatsAppMention** = `WhatsAppPersonRef` & \\{ `token`: `string`; \\}\n\nAn @-mention in a message body.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `token` | `string` | What follows the `@` in the body (the digits of the person's WhatsApp id); replace `@<token>` with the name. |",+ "WhatsAppMessageKind": "# Type Alias: WhatsAppMessageKind\n\n> **WhatsAppMessageKind** = `\"message\"` \\| `\"system\"`\n\nWhat a timeline entry is.",+ "storage.WhatsAppParticipant": "# Type Alias: WhatsAppParticipant\n\n> **WhatsAppParticipant** = \\{ `admin`: `boolean`; `alternateJid?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `jid`: `string`; \\}\n\nSomeone in a WhatsApp chat; Macro access is a separate grant.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-admin\"></a> `admin` | `boolean` | Group admin. |\n| <a id=\"property-alternatejid\"></a> `alternateJid?` | `string` \\| `null` | The other address WhatsApp verified for them. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Their WhatsApp name, untrusted. |\n| <a id=\"property-jid\"></a> `jid` | `string` | Phone-number or LID JID. |",+ "WhatsAppPersonRef": "# Type Alias: WhatsAppPersonRef\n\n> **WhatsAppPersonRef** = \\{ `name`: `string`; `userId?`: `string` \\| `null`; \\}\n\nA person named in a message: a Macro user when verified, else their\nWhatsApp name, else their phone number.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, never authentication evidence. |\n| <a id=\"property-userid\"></a> `userId?` | `string` \\| `null` | Verified Macro user, if any. |",+ "WhatsAppPoll": "# Type Alias: WhatsAppPoll\n\n> **WhatsAppPoll** = \\{ `options`: `WhatsAppPollOption`[]; `question`: `string`; `selectableCount`: `number`; `voters`: `number`; \\}\n\nA poll, read-only in Macro.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-options\"></a> `options` | `WhatsAppPollOption`[] | Options in order, with tallies. |\n| <a id=\"property-question\"></a> `question` | `string` | The question. |\n| <a id=\"property-selectablecount\"></a> `selectableCount` | `number` | How many options one person may choose; 0 means any number. |\n| <a id=\"property-voters\"></a> `voters` | `number` | People who voted for anything. |",+ "WhatsAppPollOption": "# Type Alias: WhatsAppPollOption\n\n> **WhatsAppPollOption** = \\{ `mine`: `boolean`; `name`: `string`; `voters`: `WhatsAppPersonRef`[]; `votes`: `number`; \\}\n\nOne option of a poll with its votes.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mine\"></a> `mine` | `boolean` | The caller chose it. |\n| <a id=\"property-name\"></a> `name` | `string` | Option text. |\n| <a id=\"property-voters\"></a> `voters` | `WhatsAppPersonRef`[] | Who chose it. |\n| <a id=\"property-votes\"></a> `votes` | `number` | People who chose it. |",+ "WhatsAppRichContent": "# Type Alias: WhatsAppRichContent\n\n> **WhatsAppRichContent** = `WhatsAppPoll` & \\{ `type`: `\"poll\"`; \\} \\| `WhatsAppLocation` & \\{ `type`: `\"location\"`; \\} \\| `WhatsAppContacts` & \\{ `type`: `\"contacts\"`; \\} \\| `WhatsAppEvent` & \\{ `type`: `\"event\"`; \\} \\| `WhatsAppSystemLine` & \\{ `type`: `\"system\"`; \\}\n\nStructured content of a message besides its body.",+ "WhatsAppRoster": "# Type Alias: WhatsAppRoster\n\n> **WhatsAppRoster** = \\{ `announce`: `boolean`; `name`: `string`; `observedAt`: `string`; `participants`: `storage.WhatsAppParticipant`[]; \\}\n\nA chat's WhatsApp metadata as the caller's account last read it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announce\"></a> `announce` | `boolean` | Only admins may post. |\n| <a id=\"property-name\"></a> `name` | `string` | WhatsApp subject. |\n| <a id=\"property-observedat\"></a> `observedAt` | `string` | When this was read from WhatsApp. |\n| <a id=\"property-participants\"></a> `participants` | `storage.WhatsAppParticipant`[] | Everyone in the chat. |",+ "WhatsAppSystemAction": "# Type Alias: WhatsAppSystemAction\n\n> **WhatsAppSystemAction** = `\"group_created\"` \\| `\"participants_added\"` \\| `\"participants_removed\"` \\| `\"participants_left\"` \\| `\"participants_joined\"` \\| `\"participants_promoted\"` \\| `\"participants_demoted\"` \\| `\"subject_changed\"` \\| `\"icon_changed\"` \\| `\"description_changed\"` \\| `\"disappearing_changed\"` \\| `\"message_pinned\"` \\| `\"message_unpinned\"` \\| `\"call\"`\n\nKinds of system lines.",+ "WhatsAppSystemLine": "# Type Alias: WhatsAppSystemLine\n\n> **WhatsAppSystemLine** = \\{ `action`: `WhatsAppSystemAction`; `actor?`: `null` \\| `WhatsAppPersonRef`; `call?`: `null` \\| `WhatsAppCall`; `participants`: `WhatsAppPersonRef`[]; `value?`: `string` \\| `null`; \\}\n\nSomething that happened in the group.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-action\"></a> `action` | `WhatsAppSystemAction` | What happened. |\n| <a id=\"property-actor\"></a> `actor?` | `null` \\| `WhatsAppPersonRef` | - |\n| <a id=\"property-call\"></a> `call?` | `null` \\| `WhatsAppCall` | - |\n| <a id=\"property-participants\"></a> `participants` | `WhatsAppPersonRef`[] | Who it happened to (added, removed, promoted, …). |\n| <a id=\"property-value\"></a> `value?` | `string` \\| `null` | New subject or description; disappearing-messages timer in seconds (`\"0\"` is off). |",+ "Widget": "# Type Alias: Widget\n\n> **Widget** = `\"short\"` \\| `\"paragraph\"` \\| `\"datetime\"` \\| `\"date\"` \\| `\"url\"` \\| `\"file\"` \\| `\"choice\"` \\| `\"dropdown\"` \\| `\"checkboxes\"`\n\nHow a question is asked. Each column kind takes a few, the first its\ndefault; kinds asked one way only (numbers, checkboxes, entity and row\npickers) take none.",+ "GetUnfurlBulkResponse": "# Type Alias: GetUnfurlBulkResponse\n\n> **GetUnfurlBulkResponse** = \\{ `responses`: `unfurl.Vec`; \\}\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-responses\"></a> `responses` | `unfurl.Vec` |",+ "GetUnfurlResponse": "# Type Alias: GetUnfurlResponse\n\n> **GetUnfurlResponse** = \\{ `description?`: `string` \\| `null`; `embed_type?`: `UnfurlEmbedType`; `embed_url?`: `string` \\| `null`; `favicon_url?`: `string` \\| `null`; `image_url?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\}\n\nUnfurl response for a single URL: the URL itself plus any metadata that\nwas extracted from the page's `<head>` (title, description, image,\nfavicon).\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` | The page description (from `og:description`), if any. |\n| <a id=\"property-embed_type\"></a> `embed_type?` | `UnfurlEmbedType` | The type of embeddable content, if the URL supports iframe embedding. |\n| <a id=\"property-embed_url\"></a> `embed_url?` | `string` \\| `null` | The iframe-embeddable URL for services like Loom or Supercut. |\n| <a id=\"property-favicon_url\"></a> `favicon_url?` | `string` \\| `null` | The page's favicon URL, if any. |\n| <a id=\"property-image_url\"></a> `image_url?` | `string` \\| `null` | The page's preview image URL (from `og:image`), if any. |\n| <a id=\"property-title\"></a> `title` | `string` | The page title (from custom URL parser, Open Graph, or `<title>`). |\n| <a id=\"property-url\"></a> `url` | `string` | The URL that was unfurled. |",+ "UnfurlEmbedType": "# Type Alias: UnfurlEmbedType\n\n> **UnfurlEmbedType** = `\"None\"` \\| `\"Video\"`\n\nThe type of embeddable content for services that support iframe embedding.",+ "unfurl.Vec": "# Type Alias: Vec\n\n> **Vec** = (`null` \\| \\{ `description?`: `string` \\| `null`; `embed_type?`: `UnfurlEmbedType`; `embed_url?`: `string` \\| `null`; `favicon_url?`: `string` \\| `null`; `image_url?`: `string` \\| `null`; `title`: `string`; `url`: `string`; \\})[]",+ "MacroOpts": "# Interface: MacroOpts\n\nOptions passed to `new Macro(opts)` and stored on `MacroClient`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-auth\"></a> `auth?` | `MacroAuth` | How to authenticate. Takes precedence over `token`. Falls back to `MACRO_API_KEY` (a user API key or bearer token) or `MACRO_BOT_TOKEN` (bot). |\n| <a id=\"property-env\"></a> `env?` | `Env` | Which Macro environment to talk to. Falls back to the MACRO_ENV env var, then `'prod'`. |\n| <a id=\"property-hosts\"></a> `hosts?` | `Partial`\\<`Record`\\<`ServiceName`, `string`\\>\\> | Override individual service hosts (e.g. point one at localhost). |\n| <a id=\"property-onrequest\"></a> `onRequest?` | (`event`) => `void` | Optional generated API operation events; excludes arguments, URLs and response data. |\n| <a id=\"property-requestedas\"></a> `requestedAs?` | `string` | User id the bot acts for, sent as `x-macro-bot-for-macro-user-id` on every request. Bot auth only. Set via `macro.requestedAs(user)` rather than directly. |\n| <a id=\"property-token\"></a> `token?` | `TokenSource` | Shorthand for `auth: { type: 'user', token }`. Accepts a Settings API key (`mak_…`) or a bearer token. |\n| <a id=\"property-webappurl\"></a> `webAppUrl?` | `string` | Override the web app base URL (e.g. for local frontend dev). Also reads MACRO_WEB_URL. |\n| <a id=\"property-webhooksecret\"></a> `webhookSecret?` | `string` | Signing secret for verifying incoming persisted-webhook deliveries. Required only for `macro.events.webhook()` / `macro.events.handle()`. SSE via `macro.events.listen()` uses the API token and does not need this. Falls back to MACRO_WEBHOOK_SECRET. |\n| <a id=\"property-wsverify\"></a> `wsVerify?` | `string` | - |",+ "BotScope": "# Type Alias: BotScope\n\n> **BotScope** = `\"user\"` \\| `\"team\"`\n\nAccess scope for bot-authenticated requests. `user` acts with the\nrequested-as user's access (requires `requestedAs`); `team` acts with the\nbot's owning team's access (team-owned bots only).",+ "Env": "# Type Alias: Env\n\n> **Env** = `\"dev\"` \\| `\"prod\"` \\| `\"local\"`",+ "MacroAuth": "# Type Alias: MacroAuth\n\n> **MacroAuth** = \\{ `apiKey?`: `never`; `token`: `TokenSource`; `type`: `\"user\"`; \\} \\| \\{ `apiKey`: `string`; `token?`: `never`; `type`: `\"user\"`; \\} \\| \\{ `scope?`: `BotScope`; `token`: `TokenSource`; `type`: `\"bot\"`; \\}\n\nHow the SDK authenticates with Macro.\n\nA user has exactly one of two credential fields.\n\n- `token`: a bearer token, or a `mak_` API key. The SDK picks the header\n from the prefix at send time.\n- `apiKey`: a Settings → API Keys key, always sent as\n `x-macro-user-api-key`. Not prefix-checked, so keys that predate the\n `mak_` prefix work here.\n\nA bot uses an `mbot_` token as `x-macro-bot-token` plus\n`x-macro-bot-scope`, defaulting to `user` when `requestedAs` is set and\n`team` otherwise.",+ "ServiceName": "# Type Alias: ServiceName\n\n> **ServiceName** = `\"agent-harness\"` \\| `\"storage\"` \\| `\"auth\"` \\| `\"email\"` \\| `\"calendar\"` \\| `\"cognition\"` \\| `\"notification\"` \\| `\"properties\"` \\| `\"search\"` \\| `\"scheduled-action\"` \\| `\"static-files\"` \\| `\"connection\"` \\| `\"contacts\"` \\| `\"unfurl\"`\n\nThe backend services the SDK talks to. Note `search` and `properties` are\nserved on the storage host, so they point there.",+ "TokenSource": "# Type Alias: TokenSource\n\n> **TokenSource** = `string` \\| (() => `string` \\| `Promise`\\<`string`\\>)\n\nA credential string, or a (possibly async) function that returns one.",+ "HOSTS": "# Variable: HOSTS\n\n> `const` **HOSTS**: `Record`\\<`Env`, `Record`\\<`ServiceName`, `string`\\>\\>",+ "WEB_APP_URLS": "# Variable: WEB\\_APP\\_URLS\n\n> `const` **WEB\\_APP\\_URLS**: `Record`\\<`Env`, `string`\\>",+ "AgentSession": "# Class: AgentSession\n\nA managed or externally hosted coding-agent session.\n\n## Extends\n\n- `MacroEntity`\\<`AgentSessionResponse`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | Access requests and direct user grants. | - |\n| <a id=\"property-codeexecutions\"></a> `codeExecutions` | `readonly` | \\{ `byId`: (`id`) => `CodeExecution`; \\} | Saved code executions scoped to this session. Handle construction makes no request. | - |\n| `codeExecutions.byId` | `public` | (`id`) => `CodeExecution` | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the session was created. | - |\n| <a id=\"property-harness\"></a> `harness` | `readonly` | () => `Promise`\\<`string`\\> | The agent harness implementation serving the session. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-instructions\"></a> `instructions` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Instructions the session's runtime works under, when any were stated at creation. Fixed for the session's life. | - |\n| <a id=\"property-isarchived\"></a> `isArchived` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the session is archived and read-only. | - |\n| <a id=\"property-model\"></a> `model` | `readonly` | () => `Promise`\\<`string`\\> | The model currently configured for the session. | - |\n| <a id=\"property-modifiedat\"></a> `modifiedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the session was last modified. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The session's user-facing display name. | - |\n| <a id=\"property-repourl\"></a> `repoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The repository the agent works with, when one was supplied. | - |\n| <a id=\"property-reviews\"></a> `reviews` | `readonly` | \\{ `byId`: (`id`) => `SessionReview`; `create`: (`input`) => `Promise`\\<`SessionReview`\\>; \\} | Persisted reviews scoped to this session, with or without a code execution. | - |\n| `reviews.byId` | `public` | (`id`) => `SessionReview` | - | - |\n| `reviews.create` | `public` | (`input`) => `Promise`\\<`SessionReview`\\> | - | - |\n| <a id=\"property-sandboxsize\"></a> `sandboxSize` | `readonly` | () => `Promise`\\<`SandboxSize`\\> | Compute tier of the managed sandbox. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`SessionStatusDto`\\> | The session's latest runtime status. | - |",+ "AgentSession.archive": "### archive()\n\n> **archive**(): `Promise`\\<`void`\\>\n\nArchive this session, making it read-only until unarchived.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.changes": "### changes()\n\n> **changes**(): `Promise`\\<`AgentSessionChangesResponse`\\>\n\nRead the latest captured GitHub pull request changes and capture status.\n\n#### Returns\n\n`Promise`\\<`AgentSessionChangesResponse`\\>",+ "AgentSession.changesPatch": "### changesPatch()\n\n> **changesPatch**(): `Promise`\\<`string`\\>\n\nRead the unified diff of the latest captured changeset.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "AgentSession.control": "### control()\n\n> **control**(`action`): `Promise`\\<`ControlResponse`\\>\n\nSend a prompt or lifecycle operation to the live agent session.\n\nThe returned `actionId` matches `requestId` on the folded message the\naction derives once it dispatches. A `queued` status means a turn was\nrunning: the action waits in the session's queue ([queue](#queue)) and\ndispatches when that turn ends.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `action` | `AgentAction` |\n\n#### Returns\n\n`Promise`\\<`ControlResponse`\\>",+ "AgentSession.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this session and any live resources it owns.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.foldedLog": "### foldedLog()\n\n> **foldedLog**(): `Promise`\\<`FoldedAgentSessionLog`\\>\n\nRead this session's whole history as the conversation the app renders:\neach user prompt and agent reply, oldest first, with tool calls and their\nresults, plans, permission requests and how each turn ended. Works on any\nsession the caller can view, live or finished, so it is the way to read\nwhat another agent session did. Prefer it to [log](#log), which returns\nraw protocol frames.\n\n#### Returns\n\n`Promise`\\<`FoldedAgentSessionLog`\\>",+ "AgentSession.linkPullRequest": "### linkPullRequest()\n\n> **linkPullRequest**(`url`): `Promise`\\<`void`\\>\n\nLink the GitHub pull request at `url` to this session. Linking one that\nis already linked changes nothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.log": "### log()\n\n> **log**(): `Promise`\\<`AgentSessionLogResponse`\\>\n\nRead the complete raw protocol log for this session.\n\n#### Returns\n\n`Promise`\\<`AgentSessionLogResponse`\\>",+ "AgentSession.prompt": "### prompt()\n\n> **prompt**(`text`, `attachments?`): `Promise`\\<`ControlResponse`\\>\n\nSend a prompt to the session — sugar over [control](#control).\n\n`attachments` are files the prompt refers to, each by a URL the agent\ncan fetch (a static file service URL in practice); they reach the agent\nas ACP `resource_link` blocks after the text.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `text` | `string` |\n| `attachments?` | `PromptAttachment`[] |\n\n#### Returns\n\n`Promise`\\<`ControlResponse`\\>",+ "AgentSession.pullRequests": "### pullRequests()\n\n> **pullRequests**(): `Promise`\\<`SessionPullRequest`[]\\>\n\nThe GitHub pull requests linked to this session: the one its agent\nopened and any a person linked, oldest first.\n\n#### Returns\n\n`Promise`\\<`SessionPullRequest`[]\\>",+ "AgentSession.queue": "### queue()\n\n> **queue**(): `Promise`\\<`QueuedAction`[]\\>\n\nThe actions waiting to dispatch in this session, oldest first. Each can\nbe edited or removed until it dispatches.\n\n#### Returns\n\n`Promise`\\<`QueuedAction`[]\\>",+ "AgentSession.refreshChanges": "### refreshChanges()\n\n> **refreshChanges**(): `Promise`\\<`AgentSessionChangesResponse`\\>\n\nRequest a fresh capture and return the current state while it runs.\n\n#### Returns\n\n`Promise`\\<`AgentSessionChangesResponse`\\>",+ "AgentSession.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename this session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.setSandboxSize": "### setSandboxSize()\n\n> **setSandboxSize**(`size`): `Promise`\\<`SandboxSize`\\>\n\nResize this session's sandbox and remember the size as the owner's default.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `size` | `SandboxSize` |\n\n#### Returns\n\n`Promise`\\<`SandboxSize`\\>",+ "AgentSession.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`agent-harness.SharePermissionV2`\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<`agent-harness.SharePermissionV2`\\>",+ "AgentSession.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `AgentSessionResponse`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `AgentSessionResponse`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `AgentSessionResponse` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "AgentSession.toolApprovalById": "### toolApprovalById()\n\n> **toolApprovalById**(`id`): `ToolApproval`\n\nConstruct an approval handle scoped to this session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`ToolApproval`",+ "AgentSession.unarchive": "### unarchive()\n\n> **unarchive**(): `Promise`\\<`void`\\>\n\nRestore an archived session so it can be edited and prompted again.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.unlinkPullRequest": "### unlinkPullRequest()\n\n> **unlinkPullRequest**(`url`): `Promise`\\<`void`\\>\n\nUnlink a GitHub pull request a person linked to this session. The pull\nrequest the session's agent opened stays linked.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentSession.updateSharePermissions": "### updateSharePermissions()\n\n> **updateSharePermissions**(`options`): `Promise`\\<`agent-harness.SharePermissionV2`\\>\n\nReplace sharing grants.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `SharePermissionOptions` |\n\n#### Returns\n\n`Promise`\\<`agent-harness.SharePermissionV2`\\>",+ "AgentSession.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `AgentSession`\n\nA handle to an agent session 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`AgentSession`",+ "AgentSession.codingPreferences": "### codingPreferences()\n\n> `static` **codingPreferences**(`client`): `Promise`\\<`CodingPreferencesBody`\\>\n\nWhat the caller's new coding sessions are told to do beyond their assignment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`CodingPreferencesBody`\\>",+ "AgentSession.createManaged": "### createManaged()\n\n> `static` **createManaged**(`client`, `opts?`): `Promise`\\<`AgentSession`\\>\n\nCreate a managed session, optionally delivering its first prompt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | `CreateManagedSessionOptions` |\n\n#### Returns\n\n`Promise`\\<`AgentSession`\\>",+ "AgentSession.defaultSandboxSize": "### defaultSandboxSize()\n\n> `static` **defaultSandboxSize**(`client`): `Promise`\\<`SandboxSize`\\>\n\nThe caller's default sandbox size for new `@coder` sessions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`SandboxSize`\\>",+ "AgentSession.forPullRequest": "### forPullRequest()\n\n> `static` **forPullRequest**(`client`, `url`): `Promise`\\<`AgentSession`[]\\>\n\nThe sessions linked to the GitHub pull request at `url` that the caller\ncan view, oldest link first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`AgentSession`[]\\>",+ "AgentSession.repositories": "### repositories()\n\n> `static` **repositories**(`client`): `Promise`\\<`SelectableRepository`[]\\>\n\nThe GitHub repositories the caller can hand a managed session: every\nrepository under an installation of Macro's GitHub App they or their\nteams made, sorted by `owner/name`. Empty when the App is installed\nnowhere they reach.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`SelectableRepository`[]\\>",+ "AgentSession.repositoryBranches": "### repositoryBranches()\n\n> `static` **repositoryBranches**(`client`, `repoUrl`): `Promise`\\<`string`[]\\>\n\nBranch names on one repository the caller can start a managed session\nfrom, in the order GitHub listed them. Empty when the repository has\nno commits yet. `repoUrl` is one of the URLs [AgentSession.repositories](#repositories)\nlists.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `repoUrl` | `string` |\n\n#### Returns\n\n`Promise`\\<`string`[]\\>",+ "AgentSession.setCodingPreferences": "### setCodingPreferences()\n\n> `static` **setCodingPreferences**(`client`, `preferences`): `Promise`\\<`CodingPreferencesBody`\\>\n\nReplace the caller's coding preferences.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `preferences` | `CodingPreferencesBody` |\n\n#### Returns\n\n`Promise`\\<`CodingPreferencesBody`\\>",+ "AgentSession.setDefaultSandboxSize": "### setDefaultSandboxSize()\n\n> `static` **setDefaultSandboxSize**(`client`, `size`): `Promise`\\<`SandboxSize`\\>\n\nSet the caller's default sandbox size for the next `@coder` mention.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `size` | `SandboxSize` |\n\n#### Returns\n\n`Promise`\\<`SandboxSize`\\>",+ "CreateManagedSessionOptions": "# Type Alias: CreateManagedSessionOptions\n\n> **CreateManagedSessionOptions** = \\{ `instructions?`: `string`; `model?`: `string`; `prompt?`: `string`; `repoBranch?`: `string`; `repoUrl?`: `string`; \\}\n\nWhat a managed session is created with.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` | Instructions the session's runtime works under, fixed for its life. |\n| <a id=\"property-model\"></a> `model?` | `string` | The model the session runs on, instead of its persona's. The session's model from creation, read back as `AgentSession.model`. |\n| <a id=\"property-prompt\"></a> `prompt?` | `string` | First prompt to deliver once the session is running. |\n| <a id=\"property-repobranch\"></a> `repoBranch?` | `string` | The branch the session starts on; needs `repoUrl`. Omitted, the repository's default branch. |\n| <a id=\"property-repourl\"></a> `repoUrl?` | `string` | The repository the session works on, as one of the URLs `AgentSession.repositories` lists for the caller. Omitted, the runtime chooses from the prompt. Honored for Cursor sessions. |",+ "FoldedAgentSessionLog": "# Type Alias: FoldedAgentSessionLog\n\n> **FoldedAgentSessionLog** = \\{ `bot`: `SessionBot`; `messages`: `FoldedMessage`[]; \\}\n\nA session's history folded into readable messages, oldest first.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bot\"></a> `bot` | `SessionBot` | The agent that sent every agent message. |\n| <a id=\"property-messages\"></a> `messages` | `FoldedMessage`[] | Prompts and replies with their tool calls, results, plans, permission requests and how each turn ended. |",+ "SelectableRepository": "# Type Alias: SelectableRepository\n\n> **SelectableRepository** = \\{ `defaultBranch?`: `string`; `url`: `string`; \\}\n\nA GitHub repository the caller can point a managed session at.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-defaultbranch\"></a> `defaultBranch?` | `string` | The branch its clones check out, and where a session starts unless `createManaged` names another. Absent for a repository with no commits. |\n| <a id=\"property-url\"></a> `url` | `string` | The canonical `https://github.com/owner/name` URL, as `createManaged` takes it. |",+ "SessionPullRequest": "# Type Alias: SessionPullRequest\n\n> **SessionPullRequest** = \\{ `createdAt`: `string`; `githubKey`: `string`; `linkedBy?`: `User`; `source`: `PullRequestLinkSource`; `url`: `string`; \\}\n\nA GitHub pull request linked to a session.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was linked. |\n| <a id=\"property-githubkey\"></a> `githubKey` | `string` | The pull request's `owner/repo/pull/number` key. |\n| <a id=\"property-linkedby\"></a> `linkedBy?` | `User` | Who linked it, for pull requests a person linked. |\n| <a id=\"property-source\"></a> `source` | `PullRequestLinkSource` | Whether the session's agent opened it or a person linked it. |\n| <a id=\"property-url\"></a> `url` | `string` | The pull request's GitHub URL. |",+ "CodeExecution": "# Class: CodeExecution\n\nA saved code execution belonging to one agent session.\n\n## Extends\n\n- `MacroEntity`\\<`ExecutionRecord`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-calls\"></a> `calls` | `readonly` | () => `Promise`\\<`RecordedToolCall`[]\\> | Legacy bridge calls; direct HTTP executions leave this empty. | - |\n| <a id=\"property-error\"></a> `error` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Execution failure text, when present. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-reviews\"></a> `reviews` | `readonly` | \\{ `create`: (`input`) => `Promise`\\<`SessionReview`\\>; `list`: () => `Promise`\\<`SessionReview`[]\\>; \\} | Persistent UI blocks, independent of the execution lifetime. | - |\n| `reviews.create` | `public` | (`input`) => `Promise`\\<`SessionReview`\\> | - | - |\n| `reviews.list` | `public` | () => `Promise`\\<`SessionReview`[]\\> | - | - |\n| <a id=\"property-source\"></a> `source` | `readonly` | () => `Promise`\\<`string`\\> | The submitted JavaScript module source. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`ExecutionStatus`\\> | Saved execution state. Call refresh to observe subsequent changes. | - |",+ "CodeExecution.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`CodeExecution`\\>\n\nReload the saved state, for example after a running execution completes.\n\n#### Returns\n\n`Promise`\\<`CodeExecution`\\>",+ "CodeExecution.result": "### result()\n\n> **result**(): `Promise`\\<`unknown`\\>\n\nThe program's returned JSON; preserves an explicit null result.\n\n#### Returns\n\n`Promise`\\<`unknown`\\>",+ "CodeExecution.session": "### session()\n\n> **session**(): `AgentSession`\n\nThe session this execution belongs to.\n\n#### Returns\n\n`AgentSession`",+ "CodeExecution.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ExecutionRecord`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ExecutionRecord`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ExecutionRecord` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CodeExecution.byId": "### byId()\n\n> `static` **byId**(`client`, `session`, `id`): `CodeExecution`\n\nConstruct a lazy execution handle within its owning session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `id` | `string` |\n\n#### Returns\n\n`CodeExecution`",+ "CodeResult": "# Type Alias: CodeResult\n\n> **CodeResult** = \\{ `data`: `JsonValue`; `reviews`: \\{ `id`: `string`; `kind`: `\"email\"` \\| `\"calendar\"`; \\}[]; \\}\n\nJSON data returned to the model, plus references to independently saved UI.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-data\"></a> `data` | `JsonValue` |\n| <a id=\"property-reviews\"></a> `reviews` | \\{ `id`: `string`; `kind`: `\"email\"` \\| `\"calendar\"`; \\}[] |",+ "JsonValue": "# Type Alias: JsonValue\n\n> **JsonValue** = `null` \\| `boolean` \\| `number` \\| `string` \\| `JsonValue`[] \\| \\{\\[`key`: `string`\\]: `JsonValue`; \\}",+ "AgentConversation": "# Class: AgentConversation\n\nAn agent's conversation in one channel.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | `Channel` | Parent channel. |",+ "AgentConversation.agent": "### agent()\n\n> **agent**(): `Agent`\n\nThe agent taking part.\n\n#### Returns\n\n`Agent`",+ "AgentConversation.sessions": "### sessions()\n\n> **sessions**(): \\{ `createdAt`: `string`; `isCurrent`: `boolean`; `session`: `AgentSession`; \\}[]\n\nConversation sessions with their current flag.\n\n#### Returns\n\n\\{ `createdAt`: `string`; `isCurrent`: `boolean`; `session`: `AgentSession`; \\}[]",+ "AgentConversation.startFresh": "### startFresh()\n\n> **startFresh**(`session`): `Promise`\\<`void`\\>\n\nStart a fresh conversation from one of its sessions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `session` | `AgentSession` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AgentConversation.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `agentId`: `string`; `channelId`: `string`; \\}\n\nSerialize scoped identity.\n\n#### Returns\n\n\\{ `agentId`: `string`; `channelId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `agentId` | `string` |\n| `channelId` | `string` |",+ "AgentConversation.turns": "### turns()\n\n> **turns**(): `ConversationTurn`[]\n\nRecorded conversation turns.\n\n#### Returns\n\n`ConversationTurn`[]",+ "ConversationTurn": "# Class: ConversationTurn\n\nOne agent conversation turn, identified by its source message.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-conversation\"></a> `conversation` | `readonly` | `AgentConversation` | Parent conversation. |",+ "ConversationTurn.retry": "### retry()\n\n> **retry**(`actionId`): `Promise`\\<`void`\\>\n\nRetry with a caller persisted action nonce. Never retries automatically.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `actionId` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ConversationTurn.session": "### session()\n\n> **session**(): `AgentSession`\n\nSession that handled this turn.\n\n#### Returns\n\n`AgentSession`",+ "ConversationTurn.source": "### source()\n\n> **source**(): `Message`\n\nOriginating message.\n\n#### Returns\n\n`Message`",+ "ConversationTurn.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `channelId`: `string`; `sourceMessageId`: `string`; \\}\n\nSerialize scoped identity.\n\n#### Returns\n\n\\{ `channelId`: `string`; `sourceMessageId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `channelId` | `string` |\n| `sourceMessageId` | `string` |",+ "AgentSessionNamespace": "# Class: AgentSessionNamespace\n\nEntry point for coding-agent sessions.",+ "AgentSessionNamespace.byId": "### byId()\n\n> **byId**(`id`): `AgentSession`\n\nA handle to an agent session by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`AgentSession`",+ "AgentSessionNamespace.codingPreferences": "### codingPreferences()\n\n> **codingPreferences**(): `Promise`\\<`CodingPreferencesBody`\\>\n\nWhat the caller's new coding sessions are told to do beyond their assignment.\n\n#### Returns\n\n`Promise`\\<`CodingPreferencesBody`\\>",+ "AgentSessionNamespace.createManaged": "### createManaged()\n\n> **createManaged**(`opts?`): `Promise`\\<`AgentSession`\\>\n\nCreate a managed agent session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | `CreateManagedSessionOptions` |\n\n#### Returns\n\n`Promise`\\<`AgentSession`\\>",+ "AgentSessionNamespace.defaultSandboxSize": "### defaultSandboxSize()\n\n> **defaultSandboxSize**(): `Promise`\\<`SandboxSize`\\>\n\nThe caller's default sandbox size for new `@coder` sessions.\n\n#### Returns\n\n`Promise`\\<`SandboxSize`\\>",+ "AgentSessionNamespace.forPullRequest": "### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<`AgentSession`[]\\>\n\nThe sessions linked to the GitHub pull request at `url` that the caller\ncan view.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`AgentSession`[]\\>",+ "AgentSessionNamespace.repositories": "### repositories()\n\n> **repositories**(): `Promise`\\<`SelectableRepository`[]\\>\n\nThe GitHub repositories the caller can hand a managed session, with the\nbranch each one's sessions start on by default.\n\n#### Returns\n\n`Promise`\\<`SelectableRepository`[]\\>",+ "AgentSessionNamespace.repositoryBranches": "### repositoryBranches()\n\n> **repositoryBranches**(`repoUrl`): `Promise`\\<`string`[]\\>\n\nBranch names on one repository the caller can start a managed session\nfrom. `repoUrl` is one of the URLs [AgentSessionNamespace.repositories](#repositories)\nlists.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `repoUrl` | `string` |\n\n#### Returns\n\n`Promise`\\<`string`[]\\>",+ "AgentSessionNamespace.setCodingPreferences": "### setCodingPreferences()\n\n> **setCodingPreferences**(`preferences`): `Promise`\\<`CodingPreferencesBody`\\>\n\nReplace the caller's coding preferences.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `preferences` | `CodingPreferencesBody` |\n\n#### Returns\n\n`Promise`\\<`CodingPreferencesBody`\\>",+ "AgentSessionNamespace.setDefaultSandboxSize": "### setDefaultSandboxSize()\n\n> **setDefaultSandboxSize**(`size`): `Promise`\\<`SandboxSize`\\>\n\nSet the caller's default sandbox size for the next `@coder` mention.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `size` | `SandboxSize` |\n\n#### Returns\n\n`Promise`\\<`SandboxSize`\\>",+ "QueuedAction": "# Class: QueuedAction\n\nOne action waiting in an agent session's server-side queue: a prompt or a\ncompact accepted while a turn was running, dispatching when that turn\nends. Until then it can be edited (prompts only), steered, or removed; once\nit has dispatched, these actions answer 404 — there is no un-sending.\n\nList-sourced only - there is no per-action GET, only the queue snapshot -\nso this wraps whatever DTO the caller already has, the same shape\n`CrmComment` wraps a list-sourced record, rather than `MacroEntity`'s\nlazy-fetch-by-id.\n\n## Accessors\n\n### actionId\n\n#### Get Signature\n\n> **get** **actionId**(): `string`\n\nThe id the action was accepted under. Once it dispatches, this equals\n`requestId` on the folded message the action derives.\n\n##### Returns\n\n`string`\n\n***\n\n### actorUserId\n\n#### Get Signature\n\n> **get** **actorUserId**(): `string` \\| `undefined`\n\nThe user who queued it, absent when a bot acted on nobody's behalf.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### attachments\n\n#### Get Signature\n\n> **get** **attachments**(): `PromptAttachment`[]\n\nFiles the prompt refers to; empty for a compact. Kept through an edit.\n\n##### Returns\n\n`PromptAttachment`[]\n\n***\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen the action was accepted, as an RFC 3339 timestamp.\n\n##### Returns\n\n`string`\n\n***\n\n### kind\n\n#### Get Signature\n\n> **get** **kind**(): `string`\n\n`prompt` or `compact`; only turn-occupying actions are ever queued.\n\n##### Returns\n\n`string`\n\n***\n\n### prompt\n\n#### Get Signature\n\n> **get** **prompt**(): `string` \\| `undefined`\n\nThe prompt's raw text, present for prompts only. What an edit replaces.\n\n##### Returns\n\n`string` \\| `undefined`",+ "QueuedAction.edit": "### edit()\n\n> **edit**(`prompt`): `Promise`\\<`QueuedAction`\\>\n\nReplace this queued prompt's text before it dispatches. Returns this\nhandle for chaining; the edit endpoint answers 204, so `prompt` is\napplied locally rather than reread from a response body.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `prompt` | `string` |\n\n#### Returns\n\n`Promise`\\<`QueuedAction`\\>",+ "QueuedAction.remove": "### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this action from the queue before it dispatches.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "QueuedAction.steer": "### steer()\n\n> **steer**(): `Promise`\\<`void`\\>\n\nMove this action to the front and interrupt the current turn to run it next.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "QueuedAction.from": "### from()\n\n> `static` **from**(`client`, `sessionId`, `dto`): `QueuedAction`\n\nWrap a queue entry already in hand (e.g. from `AgentSession.queue()`).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `sessionId` | `string` |\n| `dto` | `QueuedActionDto` |\n\n#### Returns\n\n`QueuedAction`",+ "ReviewItem": "# Class: ReviewItem\n\nAn item handle scopes edits and decisions to its persisted review.\n\n## Accessors\n\n### draft\n\n#### Get Signature\n\n> **get** **draft**(): `unknown`\n\n##### Returns\n\n`unknown`\n\n***\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\n##### Returns\n\n`string`\n\n***\n\n### result\n\n#### Get Signature\n\n> **get** **result**(): `unknown`\n\n##### Returns\n\n`unknown`\n\n***\n\n### status\n\n#### Get Signature\n\n> **get** **status**(): `ReviewItemStatus`\n\n##### Returns\n\n`ReviewItemStatus`",+ "ReviewItem.dismiss": "### dismiss()\n\n> **dismiss**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ReviewItem.edit": "### edit()\n\n> **edit**(`draft`): `Promise`\\<`void`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `draft` | `unknown` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ReviewItem.submit": "### submit()\n\n> **submit**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "SessionReview": "# Class: SessionReview\n\nA persistent review remains actionable after the code execution ends.\n\n## Extends\n\n- `MacroEntity`\\<`ReviewRecord`\\>\n\n## Properties\n\n| Property | Modifier | Type | Inherited from |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`ReviewKind`\\> | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | - |",+ "SessionReview.dismissAll": "### dismissAll()\n\n> **dismissAll**(): `Promise`\\<`void`\\>\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "SessionReview.items": "### items()\n\n> **items**(): `Promise`\\<`ReviewItem`[]\\>\n\n#### Returns\n\n`Promise`\\<`ReviewItem`[]\\>",+ "SessionReview.reference": "### reference()\n\n> **reference**(): `Promise`\\<\\{ `id`: `string`; `kind`: `ReviewKind`; \\}\\>\n\nCompact reference for main()'s returned reviews array.\n\n#### Returns\n\n`Promise`\\<\\{ `id`: `string`; `kind`: `ReviewKind`; \\}\\>",+ "SessionReview.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`SessionReview`\\>\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>",+ "SessionReview.session": "### session()\n\n> **session**(): `AgentSession`\n\n#### Returns\n\n`AgentSession`",+ "SessionReview.submitAll": "### submitAll()\n\n> **submitAll**(): `Promise`\\<`void`\\>\n\nSubmit the saved pending drafts. Never retries a conflict or ambiguous send.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "SessionReview.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ReviewRecord`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ReviewRecord`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ReviewRecord` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "SessionReview.byId": "### byId()\n\n> `static` **byId**(`client`, `session`, `id`): `SessionReview`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `id` | `string` |\n\n#### Returns\n\n`SessionReview`",+ "SessionReview.create": "### create()\n\n> `static` **create**(`client`, `execution`, `input`): `Promise`\\<`SessionReview`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `execution` | `CodeExecution` |\n| `input` | `CreateReviewOptions` |\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>",+ "SessionReview.createForSession": "### createForSession()\n\n> `static` **createForSession**(`client`, `session`, `input`, `execution?`): `Promise`\\<`SessionReview`\\>\n\nPresent a review in a session without requiring a code execution.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `input` | `CreateReviewOptions` |\n| `execution?` | `CodeExecution` |\n\n#### Returns\n\n`Promise`\\<`SessionReview`\\>",+ "SessionReview.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `session`, `record`): `SessionReview`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `record` | `ReviewRecord` |\n\n#### Returns\n\n`SessionReview`",+ "SessionReview.list": "### list()\n\n> `static` **list**(`client`, `execution`): `Promise`\\<`SessionReview`[]\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `execution` | `CodeExecution` |\n\n#### Returns\n\n`Promise`\\<`SessionReview`[]\\>",+ "CreateReviewOptions": "# Type Alias: CreateReviewOptions\n\n> **CreateReviewOptions** = \\{ `drafts`: `ReviewEmailDraft`[]; `kind`: `\"email\"`; `title`: `string`; \\} \\| \\{ `drafts`: `ReviewCalendarDraft`[]; `kind`: `\"calendar\"`; `title`: `string`; \\}",+ "ReviewCalendarDraft": "# Type Alias: ReviewCalendarDraft\n\n> **ReviewCalendarDraft** = \\{ `addGoogleMeet?`: `boolean`; `addMacroCall?`: `boolean`; `attendees?`: \\{ `email`: `string`; `isOptional?`: `boolean`; \\}[]; `calendarId?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `\"default\"` \\| `\"out_of_office\"`; `location?`: `string` \\| `null`; `outOfOffice?`: \\{ `autoDeclineMode?`: `\"decline_none\"` \\| `\"decline_all\"` \\| `\"decline_new_only\"`; `declineMessage?`: `string` \\| `null`; \\} \\| `null`; `recurrenceLines?`: `string`[]; `reminders?`: \\{ `overrides?`: \\{ `method`: `string`; `minutes`: `number`; \\}[]; `useDefault`: `boolean`; \\} \\| `null`; `time`: `calendar.EventTime`; `title`: `string`; \\}\n\nCalendar drafts use the existing calendar composer and creation action.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-addgooglemeet\"></a> `addGoogleMeet?` | `boolean` |\n| <a id=\"property-addmacrocall\"></a> `addMacroCall?` | `boolean` |\n| <a id=\"property-attendees\"></a> `attendees?` | \\{ `email`: `string`; `isOptional?`: `boolean`; \\}[] |\n| <a id=\"property-calendarid\"></a> `calendarId?` | `string` \\| `null` |\n| <a id=\"property-description\"></a> `description?` | `string` \\| `null` |\n| <a id=\"property-eventtype\"></a> `eventType?` | `\"default\"` \\| `\"out_of_office\"` |\n| <a id=\"property-location\"></a> `location?` | `string` \\| `null` |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | \\{ `autoDeclineMode?`: `\"decline_none\"` \\| `\"decline_all\"` \\| `\"decline_new_only\"`; `declineMessage?`: `string` \\| `null`; \\} \\| `null` |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] |\n| <a id=\"property-reminders\"></a> `reminders?` | \\{ `overrides?`: \\{ `method`: `string`; `minutes`: `number`; \\}[]; `useDefault`: `boolean`; \\} \\| `null` |\n| <a id=\"property-time\"></a> `time` | `calendar.EventTime` |\n| <a id=\"property-title\"></a> `title` | `string` |",+ "ReviewEmailDraft": "# Type Alias: ReviewEmailDraft\n\n> **ReviewEmailDraft** = \\{ `attachments?`: \\{ `documentId`: `string`; \\}[]; `bcc?`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; `body`: `string`; `cc?`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; `includeSignature?`: `boolean` \\| `null`; `replyingToId?`: `string` \\| `null`; `subject`: `string`; `to`: \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[]; \\}\n\nMarkdown is rendered by the ordinary email action; the UI can edit each draft.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments?` | \\{ `documentId`: `string`; \\}[] |\n| <a id=\"property-bcc\"></a> `bcc?` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |\n| <a id=\"property-body\"></a> `body` | `string` |\n| <a id=\"property-cc\"></a> `cc?` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |\n| <a id=\"property-includesignature\"></a> `includeSignature?` | `boolean` \\| `null` |\n| <a id=\"property-replyingtoid\"></a> `replyingToId?` | `string` \\| `null` |\n| <a id=\"property-subject\"></a> `subject` | `string` |\n| <a id=\"property-to\"></a> `to` | \\{ `email`: `string`; `name?`: `string` \\| `null`; \\}[] |",+ "ToolApproval": "# Class: ToolApproval\n\nA permission request scoped to its originating agent session.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Approval identity. |\n| <a id=\"property-session\"></a> `session` | `readonly` | `AgentSession` | Owning session. |",+ "ToolApproval.answer": "### answer()\n\n> **answer**(`answer`): `Promise`\\<`AnswerToolApprovalResponse`\\>\n\nAnswer the approval using the generated discriminated answer contract.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answer` | `ToolApprovalAnswerDto` |\n\n#### Returns\n\n`Promise`\\<`AnswerToolApprovalResponse`\\>",+ "ToolApproval.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `sessionId`: `string`; \\}\n\nSerialize scoped identity only.\n\n#### Returns\n\n\\{ `id`: `string`; `sessionId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `sessionId` | `string` |",+ "ToolApproval.byId": "### byId()\n\n> `static` **byId**(`client`, `session`, `id`): `ToolApproval`\n\nConstruct a scoped approval handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `id` | `string` |\n\n#### Returns\n\n`ToolApproval`",+ "Agent": "# Class: Agent\n\nA configurable agent backed by a bot identity.\n\n## Extends\n\n- `MacroEntity`\\<`storage.Agent`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-channels\"></a> `channels` | `readonly` | () => `Promise`\\<`Channel`[]\\> | Visible channels. | - |\n| <a id=\"property-defaultmodel\"></a> `defaultModel` | `readonly` | () => `Promise`\\<`string`\\> | Default model. | - |\n| <a id=\"property-host\"></a> `host` | `readonly` | () => `Promise`\\<`Harness` \\| `undefined`\\> | Host running this agent. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-instructions\"></a> `instructions` | `readonly` | () => `Promise`\\<`string`\\> | Agent instructions. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |",+ "Agent.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Agent`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Agent`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Agent` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Agent.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace agent settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `AgentOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Agent.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Agent`\n\nConstruct a lazy agent handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Agent`",+ "Agent.from": "### from()\n\n> `static` **from**(`client`, `record`): `Agent`\n\nSeed from a listed or created agent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `storage.Agent` |\n\n#### Returns\n\n`Agent`",+ "agentBody": "# Function: agentBody()\n\n> **agentBody**(`options`): `CreateAgentRequest`\n\nConvert entity references into the generated agent request.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `AgentOptions` |\n\n## Returns\n\n`CreateAgentRequest`",+ "AgentOptions": "# Type Alias: AgentOptions\n\n> **AgentOptions** = `Omit`\\<`CreateAgentRequest`, `\"channel_ids\"` \\| `\"team_id\"` \\| `\"harness_id\"` \\| `\"auto_accept_permissions\"` \\| `\"avatar_url\"` \\| `\"channel_scope\"` \\| `\"default_model\"` \\| `\"is_coding\"`\\> & \\{ `autoAcceptPermissions?`: `boolean`; `avatarUrl?`: `string`; `channels?`: `Channel`[]; `channelScope`: `CreateAgentRequest`\\[`\"channel_scope\"`\\]; `defaultModel`: `string`; `host?`: `Harness`; `isCoding`: `boolean`; `team?`: `Team`; \\}\n\nAgent creation and replacement settings.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `autoAcceptPermissions?` | `boolean` | Whether tool permissions are automatically accepted. |\n| `avatarUrl?` | `string` | Avatar URL. |\n| `channels?` | `Channel`[] | Channels the agent can access. |\n| `channelScope` | `CreateAgentRequest`\\[`\"channel_scope\"`\\] | Channel visibility policy. |\n| `defaultModel` | `string` | Default model. |\n| `host?` | `Harness` | Host running the agent. |\n| `isCoding` | `boolean` | Whether this is a coding agent. |\n| `team?` | `Team` | Owning team. |",+ "AgentNamespace": "# Class: AgentNamespace\n\nConfigurable agents.",+ "AgentNamespace.byId": "### byId()\n\n> **byId**(`id`): `Agent`\n\nConstruct a lazy agent handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Agent`",+ "AgentNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Agent`\\>\n\nCreate an agent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `AgentOptions` |\n\n#### Returns\n\n`Promise`\\<`Agent`\\>",+ "AgentNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Agent`[]\\>\n\nAll accessible agents.\n\n#### Returns\n\n`Promise`\\<`Agent`[]\\>",+ "AiNamespace": "# Class: AiNamespace\n\nShared cognition endpoints, charged to the authenticated acting user.",+ "AiNamespace.decide": "### decide()\n\n> **decide**(`request`): `Promise`\\<`DecisionResponse`\\>\n\nAsk named yes/no questions about JSON input. Each probability estimates\nyes, from 0 to 1. This classifies supplied data without running tools.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `DecisionRequest` |\n\n#### Returns\n\n`Promise`\\<`DecisionResponse`\\>",+ "AiNamespace.structuredCompletion": "### structuredCompletion()\n\n> **structuredCompletion**(`request`): `Promise`\\<`StructuredCompletionResponse`\\>\n\nGenerate an answer matching a JSON Schema. Set toolset to { type: 'none' }\nto use only supplied context. Other toolsets can perform the requested\nactions; always inspect outcome and toolActivity, including interruptions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `StructuredCompletionRequest` |\n\n#### Returns\n\n`Promise`\\<`StructuredCompletionResponse`\\>",+ "AiNamespace.usage": "### usage()\n\n> **usage**(`options?`): `Promise`\\<`UsageSummary`\\>\n\nRead AI usage over a time range, optionally restricting it to users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<`UsageRequest`, `\"include_users\"`\\> & \\{ `users?`: `User`[]; \\} |\n\n#### Returns\n\n`Promise`\\<`UsageSummary`\\>",+ "UserApiKey": "# Class: UserApiKey\n\nA user API key's metadata. Secrets are returned only at creation.\n\n## Extends\n\n- `MacroEntity`\\<`UserApiKeyInfo`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | Creation time. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Human readable label. | - |",+ "UserApiKey.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRevoke this key.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "UserApiKey.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `UserApiKeyInfo`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `UserApiKeyInfo`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `UserApiKeyInfo` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "UserApiKey.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `UserApiKey`\n\nConstruct a lazy key handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`UserApiKey`",+ "UserApiKey.from": "### from()\n\n> `static` **from**(`client`, `record`): `UserApiKey`\n\nSeed from metadata, deliberately excluding the secret.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `UserApiKeyInfo` |\n\n#### Returns\n\n`UserApiKey`",+ "ApiKeyNamespace": "# Class: ApiKeyNamespace\n\nUser API key management.",+ "ApiKeyNamespace.byId": "### byId()\n\n> **byId**(`id`): `UserApiKey`\n\nConstruct a lazy key handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`UserApiKey`",+ "ApiKeyNamespace.create": "### create()\n\n> **create**(`name`): `Promise`\\<\\{ `key`: `UserApiKey`; `secret`: `string`; \\}\\>\n\nCreate a key. Save the secret now; it cannot be retrieved later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `key`: `UserApiKey`; `secret`: `string`; \\}\\>",+ "ApiKeyNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`UserApiKey`[]\\>\n\nList metadata for the caller's API keys.\n\n#### Returns\n\n`Promise`\\<`UserApiKey`[]\\>",+ "ApiKeyNamespace.tokenForEmail": "### tokenForEmail()\n\n> **tokenForEmail**(`email`): `Promise`\\<`MacroApiTokenResponse`\\>\n\nExchange an email address for a Macro API token, subject to server authorization.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`MacroApiTokenResponse`\\>",+ "BotsNamespace": "# Class: BotsNamespace\n\nThe authenticated bot's identity. Only meaningful with bot auth\n(`auth: { type: 'bot', token }`).",+ "BotsNamespace.channels": "### channels()\n\n> **channels**(): `Promise`\\<`BotChannel`[]\\>\n\nChannels containing the authenticated bot. Requires bot auth.\n\n#### Returns\n\n`Promise`\\<`BotChannel`[]\\>",+ "BotsNamespace.me": "### me()\n\n> **me**(): `Promise`\\<`Bot`\\>\n\nThe authenticated bot's own record. Requires bot auth; with a user API\nkey this throws (a user token has no bot identity).\n\n#### Returns\n\n`Promise`\\<`Bot`\\>",+ "BotsNamespace.myPrincipalId": "### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated bot's canonical principal id (`bot|<uuid>`) — the form\nused for bot mentions, senders, and webhook `ids` filters. Cached on the\nclient; see MacroClient.myPrincipalId.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Calendar": "# Class: Calendar\n\nA calendar visible to the requester across their connected inboxes: a\nfree-to-construct handle whose detail resolves from the caller's calendar\nlist. There is no fetch-by-id endpoint, so a bare [Calendar.byId](#byid)\nhandle loads its detail by listing the caller's calendars and matching on id.\n\n## Extends\n\n- `MacroEntity`\\<`VisibleCalendar`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Provider color, when set. | - |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | Connected inbox address that syncs this calendar. | - |\n| <a id=\"property-emaillink\"></a> `emailLink` | `readonly` | () => `Promise`\\<`Link`\\> | The connected inbox (email link) that syncs this calendar. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is its account's primary calendar. | - |\n| <a id=\"property-issubscription\"></a> `isSubscription` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is a subscribed system calendar (holidays, birthdays). | - |\n| <a id=\"property-iswritable\"></a> `isWritable` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the grant can create and modify events on this calendar. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Provider display name. | - |\n| <a id=\"property-syncerror\"></a> `syncError` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A persistent per-calendar sync failure, surfaced for settings badges. | - |",+ "Calendar.setContributesToAvailability": "### setContributesToAvailability()\n\n> **setContributesToAvailability**(`contributesToAvailability`): `Promise`\\<`void`\\>\n\nSet whether this calendar contributes to the caller's availability.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `contributesToAvailability` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Calendar.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `VisibleCalendar`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `VisibleCalendar`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `VisibleCalendar` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Calendar.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Calendar`\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Calendar`",+ "Calendar.list": "### list()\n\n> `static` **list**(`client`): `Promise`\\<`Calendar`[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Calendar`[]\\>",+ "CalendarEvent": "# Class: CalendarEvent\n\nA Macro calendar event: a handle exposing the event's synced fields and the\nmutations that act on it ([CalendarEvent.update](#update),\n[CalendarEvent.delete](#delete), [CalendarEvent.rsvp](#rsvp)).\n\nThe calendar service has no fetch-by-id endpoint, so a handle reads its\nfields only when seeded with a record — as returned by\n[CalendarEvent.update](#update), [CalendarEvent.rsvp](#rsvp), or\n`calendar.createEvent`. A bare [CalendarEvent.byId](#byid) handle can drive\nmutations, but reading a field on it throws.\n\n## Extends\n\n- `MacroEntity`\\<`calendar.CalendarEvent`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees` | `readonly` | () => `Promise`\\<`calendar.CalendarAttendee`[]\\> | Attendees on the canonical copy. | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | () => `Promise`\\<`Calendar` \\| `undefined`\\> | The calendar the canonical source belongs to, when known. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional event body. | - |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `readonly` | () => `Promise`\\<`calendar.GuestPolicy`\\> | What the organizer lets guests do: modify, invite others, see the guest list. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the canonical source's calendar prohibits editing. | - |\n| <a id=\"property-location\"></a> `location` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Optional physical or virtual location label. | - |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `readonly` | () => `Promise`\\<`string`[]\\> | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`calendar.EventStatus`\\> | Event status. | - |\n| <a id=\"property-time\"></a> `time` | `readonly` | () => `Promise`\\<`calendar.EventTime`\\> | Timed or all-day shape. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |\n| <a id=\"property-transparency\"></a> `transparency` | `readonly` | () => `Promise`\\<`calendar.EventTransparency`\\> | Availability behavior. | - |\n| <a id=\"property-viewercan\"></a> `viewerCan` | `readonly` | () => `Promise`\\<`calendar.ViewerCapabilities`\\> | What the connected account may do with this event under its guest policy. | - |",+ "CalendarEvent.addToCalendar": "### addToCalendar()\n\n> **addToCalendar**(`options?`): `Promise`\\<`CalendarEvent`\\>\n\nAdd a snapshot of an event shared with one of the requester's\nchannels to one of their Google calendars, and return a handle to the\nsynced snapshot. The snapshot keeps the meeting's iCalendar UID and\norganizer, lists only the requester as a guest, and carries no join link;\nnobody is notified, and answers or guests on it never reach the meeting.\nRefused with `already_on_calendar` when the meeting is already on one of\ntheir calendars, whichever calendar is named, so it cannot be added to\nanother of their calendars either; with `join_request_open` while their\nrequest to join it is pending or accepted (the meeting then arrives as an\ninvitation); and with `copy_refused` when Google will not import it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: `Calendar`; \\} |\n| `options.calendar?` | `Calendar` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "CalendarEvent.delete": "### delete()\n\n> **delete**(`options?`): `Promise`\\<`void`\\>\n\nDelete the event (or a scoped part of a recurring series) at its provider.\n\nA meeting on more than one of the user's inboxes is one event per inbox.\nBefore deleting any of them, ask the user which inbox's copy to delete,\nthen pass that copy's `inbox`. Never choose between the user's inboxes\nyourself, whatever they look like: a test, secondary or unfamiliar address\nis still the user's own inbox. Skip the question only when the user\nalready named the inbox, or when only one copy can be deleted; then delete\nthat copy and say why. Without `inbox` the call is refused with\n`copy_choice_required`, listing each copy and the question to ask.\n\nDeleting the copy the user organizes cancels the meeting for every guest.\nDeleting a copy where they are a guest takes the meeting off that inbox's\ncalendar: on Google it also declines the invitation and tells the\norganizer, while on Outlook the organizer is not told and still sees the\ninvitation unanswered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `DeleteEventOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CalendarEvent.ics": "### ics()\n\n> **ics**(): `Promise`\\<`string`\\>\n\nThe event as an iCalendar (`.ics`) document: its series, title,\ndescription, location and organizer, never its guests or join link.\nAvailable for the requester's own events and ones shared with a channel\nthey belong to.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "CalendarEvent.inviteGuests": "### inviteGuests()\n\n> **inviteGuests**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nAdd guests without touching anyone already invited, and return a handle\nto the synced record.\n\nWhen the meeting is on more than one of the user's inboxes, add from the\ncopy the user organizes when there is one (it invites directly, while a\nguest's copy invites only as far as the organizer allows) and say why;\notherwise ask the user which inbox's copy to add them from. Never choose\nbetween the user's inboxes any other way, whatever they look like. Pass\nthat copy's `inbox`; without it the call is refused with\n`copy_choice_required`, listing each copy and the question to ask.\n\nThe organizer may add guests, and so may a guest the organizer lets\ninvite others (see [CalendarEvent.viewerCan](#property-viewercan)); Google emails the\nnew guests.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `InviteGuestsOptions` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "CalendarEvent.linkNote": "### linkNote()\n\n> **linkNote**(`document`, `occurrence`, `options?`): `Promise`\\<`CalendarNote`\\>\n\nLink a markdown document you own. Meeting-detail viewers gain read access;\nan optional team gains read access too. Editing and other sharing are preserved.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `document` | `Document` |\n| `occurrence` | `storage.CalendarOccurrence` |\n| `options?` | \\{ `team?`: `Team`; \\} |\n| `options.team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<`CalendarNote`\\>",+ "CalendarEvent.notes": "### notes()\n\n> **notes**(`occurrence`): `Promise`\\<`CalendarNote`[]\\>\n\nNotes linked to a specific occurrence returned by `calendar.occurrences()`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `occurrence` | `storage.CalendarOccurrence` |\n\n#### Returns\n\n`Promise`\\<`CalendarNote`[]\\>",+ "CalendarEvent.prepareReplacement": "### prepareReplacement()\n\n> **prepareReplacement**(`options`): `Promise`\\<`CalendarReplacement`\\>\n\nPreview an organizer replacement without cancelling or sending invitations.\nReview replacement.status() before explicitly calling replacement.confirm().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `calendar?`: `Calendar`; `recurrenceId?`: `string`; `removeConference`: `boolean`; \\} |\n| `options.calendar?` | `Calendar` |\n| `options.recurrenceId?` | `string` |\n| `options.removeConference` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`CalendarReplacement`\\>",+ "CalendarEvent.providerUrl": "### providerUrl()\n\n> **providerUrl**(`options?`): `Promise`\\<`string` \\| `undefined`\\>\n\nOpen this calendar copy in its provider for actions unavailable through its API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `calendar?`: `Calendar`; `recurrenceId?`: `string`; \\} |\n| `options.calendar?` | `Calendar` |\n| `options.recurrenceId?` | `string` |\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>",+ "CalendarEvent.record": "### record()\n\n> **record**(): `Promise`\\<`calendar.CalendarEvent`\\>\n\nThe full synced event record. Available on a seeded handle (from create /\nupdate / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint).\n\n#### Returns\n\n`Promise`\\<`calendar.CalendarEvent`\\>",+ "CalendarEvent.rsvp": "### rsvp()\n\n> **rsvp**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nRecord the requester's RSVP and return a handle to the synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RsvpEventOptions` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "CalendarEvent.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `calendar.CalendarEvent`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `calendar.CalendarEvent`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `calendar.CalendarEvent` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CalendarEvent.update": "### update()\n\n> **update**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nUpdate the event and return a handle to its synced record.\n\nA meeting on more than one of the user's inboxes is one event per inbox,\neach with its own id (see the occurrence listing's `inbox` and `role`).\nBefore changing its details, guests or guest permissions, ask the user\nwhich inbox's copy to change, then pass that copy's `inbox`. Never choose\nbetween the user's inboxes yourself, whatever they look like: a test,\nsecondary or unfamiliar address is still the user's own inbox. Skip the\nquestion only when the user already named the inbox, when only one copy's\n`viewerCan` allows the change (use it and say why), or when adding guests\nto a meeting the user organizes from one of the inboxes (add them from\nthat copy and say why). Reminders belong to one copy, so set them on one\ncopy and say which inbox you used. Without `inbox` the call is refused\nwith `copy_choice_required`, listing each copy and the question to ask.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `UpdateEventOptions` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "CalendarEvent.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `CalendarEvent`\n\nA handle to a calendar event by id, for driving mutations. Reading a\nfield on it throws (there is no fetch-by-id endpoint).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarEvent`",+ "CalendarEvent.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `CalendarEvent`\n\nA handle seeded with a synced event record; reads resolve without a fetch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `calendar.CalendarEvent` |\n\n#### Returns\n\n`CalendarEvent`",+ "DeleteEventOptions": "# Interface: DeleteEventOptions\n\nHow a deletion is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | `Calendar` | Calendar whose copy of the event is deleted, for a multi-calendar event. Omit to delete the canonical copy. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call deletes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence a scoped deletion targets. |\n| <a id=\"property-scope\"></a> `scope?` | `CalendarDeletionScopeParam` | Deletion scope; defaults to the entire event or series. |",+ "InviteGuestsOptions": "# Interface: InviteGuestsOptions\n\nGuests to add and how much of a recurring series gains them.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | `Calendar` | Calendar whose copy of the event is written, for a multi-calendar event. Omit to write the canonical copy. |\n| <a id=\"property-guests\"></a> `guests` | `CalendarGuestInputBody`[] | Guests to add; anyone already on the event is skipped. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call changes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the guests are added to. |\n| <a id=\"property-scope\"></a> `scope?` | `CalendarUpdateScopeParam` | How much of a recurring series gains the guests. Omit to let `recurrenceId` decide. |",+ "RsvpEventOptions": "# Interface: RsvpEventOptions\n\nThe RSVP to record and how it is scoped across a recurring series.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-calendar\"></a> `calendar?` | `Calendar` | Calendar whose copy of the event is answered, for a multi-calendar event. Omit to answer on the canonical copy. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the response targets. |\n| <a id=\"property-response\"></a> `response` | `calendar.AttendeeResponseStatus` | The response to record for the connected account. |\n| <a id=\"property-scope\"></a> `scope?` | `CalendarRsvpScopeParam` | How much of a recurring series the response covers. Omit to let `recurrenceId` decide. |",+ "UpdateEventOptions": "# Interface: UpdateEventOptions\n\nFields to change on an event; omitted fields are left untouched.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | `CalendarAttendeeInputBody`[] | Replacement attendee list. |\n| <a id=\"property-calendar\"></a> `calendar?` | `Calendar` | Calendar whose copy of the event is patched, for a multi-calendar event. Omit to patch the canonical copy. |\n| <a id=\"property-conference\"></a> `conference?` | `ConferenceChange` | Provider conference change; omit to retain it. Outlook removal requires a separately confirmed replacement via prepareReplacement(). |\n| <a id=\"property-description\"></a> `description?` | `string` | Replacement description; an empty string clears it. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | `calendar.GuestPolicy` | Replacement guest policy; only the organizer of a Google event may change it (`viewerCan.setGuestPolicy`). It applies to the whole series, so an update scoped to one occurrence (`scope: 'this_event'`, or a `recurrenceId`) that changes it is rejected; use scope `'all'`. |\n| <a id=\"property-inbox\"></a> `inbox?` | `string` | Address of the inbox holding the copy this call changes (an occurrence listing's `inbox`). When the meeting is on more than one of the user's inboxes, an agent must name it: the call is refused with `copy_choice_required`, listing each copy's inbox, role and event, until it does. It must be the inbox holding this copy. |\n| <a id=\"property-location\"></a> `location?` | `string` | Replacement location; an empty string clears it. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | `OutOfOfficeProperties` | Replacement out-of-office properties, applied only to an event that is already out-of-office. |\n| <a id=\"property-recurrenceid\"></a> `recurrenceId?` | `string` | Original-start key of the occurrence the update targets. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Replacement recurrence properties; an empty list clears them. |\n| <a id=\"property-reminders\"></a> `reminders?` | `calendar.EventReminders` | Replacement reminder configuration. |\n| <a id=\"property-scope\"></a> `scope?` | `CalendarUpdateScopeParam` | How much of a recurring series the update covers. Omit to let `recurrenceId` decide. |\n| <a id=\"property-time\"></a> `time?` | `calendar.EventTime` | Replacement time. |\n| <a id=\"property-title\"></a> `title?` | `string` | Replacement title; an empty string clears it. |\n| <a id=\"property-transparency\"></a> `transparency?` | `calendar.EventTransparency` | Replacement availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | `calendar.EventVisibility` | Replacement visibility. |",+ "CalendarNamespace": "# Class: CalendarNamespace\n\nThe calendar surface: the caller's visible calendars, event creation, and\nhandles to individual events and calendars. Backed by calendar_service (the\nSDK reaches it on the gateway's `/calendar` route).\n\nA meeting on more than one of the user's inboxes is one event per inbox;\n[CalendarNamespace.occurrences](#occurrences) lists each copy with its `inbox` and\n`role`. Before changing such a meeting's details, guests or guest\npermissions, or deleting it, ask the user which inbox's copy to change, then\npass that copy's `inbox` to `CalendarEvent.update`,\n`CalendarEvent.inviteGuests` or `CalendarEvent.delete`. Never\nchoose between the user's inboxes yourself, whatever they look like: a\ntest, secondary or unfamiliar address is still the user's own inbox. Skip\nthe question only when the user already named the inbox, when only one copy\ncan make the change, or when adding guests from the copy the user\norganizes, and say why. Reminders may go to one copy; name its inbox. Read\nthose three methods' documentation before changing a meeting held through\nseveral inboxes: it says what each change does from each copy.\n\n`CalendarEvent.addToCalendar` adds a shared meeting only while none\nof the user's calendars holds it. Refused with `already_on_calendar`, it is\nrefused on every calendar, so tell the user the meeting is already on their\ncalendar and never offer to add it to another one.",+ "CalendarNamespace.availabilityCalendars": "### availabilityCalendars()\n\n> **availabilityCalendars**(): `Promise`\\<\\{ `calendar`: `Calendar`; `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>\n\nCalendar availability settings, each referring to a typed calendar.\n\n#### Returns\n\n`Promise`\\<\\{ `calendar`: `Calendar`; `contributesToAvailability`: `boolean`; `isPrimary`: `boolean`; `name`: `string`; \\}[]\\>",+ "CalendarNamespace.calendar": "### calendar()\n\n> **calendar**(`id`): `Calendar`\n\nA handle to a calendar by id. Detail loads on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Calendar`",+ "CalendarNamespace.calendars": "### calendars()\n\n> **calendars**(): `Promise`\\<`Calendar`[]\\>\n\nThe caller's visible calendars, primaries and writable first.\n\n#### Returns\n\n`Promise`\\<`Calendar`[]\\>",+ "CalendarNamespace.createEvent": "### createEvent()\n\n> **createEvent**(`options`): `Promise`\\<`CalendarEvent`\\>\n\nCreate a calendar event and return a handle to its synced record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `CreateEventOptions` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "CalendarNamespace.event": "### event()\n\n> **event**(`id`): `CalendarEvent`\n\nA handle to a calendar event by id, for driving mutations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`CalendarEvent`",+ "CalendarNamespace.noteDocuments": "### noteDocuments()\n\n> **noteDocuments**(`query?`): `Promise`\\<\\{ `documents`: \\{ `document`: `Document`; `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: `Team`; \\}[]; \\}\\>\n\nFind up to 30 owned markdown documents for meeting notes, plus available extra team audiences.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `query?` | `string` | `''` |\n\n#### Returns\n\n`Promise`\\<\\{ `documents`: \\{ `document`: `Document`; `name`: `string`; \\}[]; `teams`: \\{ `name`: `string`; `team`: `Team`; \\}[]; \\}\\>",+ "CalendarNamespace.occurrences": "### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `event`: `CalendarEvent`; `inbox`: `string` \\| `undefined`; `occurrence`: `storage.CalendarOccurrence`; `role`: `CalendarEventRole` \\| `undefined`; \\}, `any`, `any`\\>\n\nCalendar occurrences in a viewport, automatically paginated. Each names\nthe address of the connected inbox holding that copy of the event\n(`inbox`) and whether the user organizes it or is a guest there (`role`,\nabsent when neither). A meeting on several of the user's inboxes appears\nonce per inbox, each with its own event; describe them by inbox and role,\nnever by id.\n\nBefore changing or deleting such a meeting, ask the user which inbox's\ncopy to change, unless they named it, only one copy can make the change,\nor you add guests from the copy they organize. Never choose between the\nuser's inboxes yourself, whatever they look like. Pass the chosen copy's\n`inbox` to its `update`, `inviteGuests` or `delete`; without it the call\nis refused with `copy_choice_required`, which names each copy's inbox and\nevent and gives the question to ask. An occurrence whose calendar is no\nlonger listed has no `inbox`; take it from that refusal.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<`ListOccurrencesData`\\[`\"query\"`\\], `\"cursor\"`\\> |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `event`: `CalendarEvent`; `inbox`: `string` \\| `undefined`; `occurrence`: `storage.CalendarOccurrence`; `role`: `CalendarEventRole` \\| `undefined`; \\}, `any`, `any`\\>",+ "CalendarNamespace.replacement": "### replacement()\n\n> **replacement**(`operationId`): `CalendarReplacement`\n\nRecover a saved replacement, including after its original event was retired.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`CalendarReplacement`",+ "CalendarNamespace.setTeamSharing": "### setTeamSharing()\n\n> **setTeamSharing**(`sharing`): `Promise`\\<`calendar.TeamCalendarSharing`\\>\n\nReplace the team calendar sharing preference.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | `calendar.TeamCalendarSharing` |\n\n#### Returns\n\n`Promise`\\<`calendar.TeamCalendarSharing`\\>",+ "CalendarNamespace.teamOutOfOffice": "### teamOutOfOffice()\n\n> **teamOutOfOffice**(`options`): `Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: `CalendarEvent`; `occurrenceKey`: `string`; `owner`: `User`; `time`: `storage.EventTime`; `title`: `string` \\| `undefined`; \\}[]; \\}\\>\n\nTeammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `end`: `string`; `endDate?`: `string`; `limit?`: `number`; `start`: `string`; `startDate?`: `string`; \\} | - |\n| `options.end` | `string` | Exclusive UTC viewport end. |\n| `options.endDate?` | `string` | Exclusive local date boundary for all-day events. |\n| `options.limit?` | `number` | Maximum number of occurrences, from 1 through 2,000. |\n| `options.start` | `string` | Inclusive UTC viewport start. |\n| `options.startDate?` | `string` | Inclusive local date boundary for all-day events. |\n\n#### Returns\n\n`Promise`\\<\\{ `hasMore`: `boolean`; `items`: \\{ `event`: `CalendarEvent`; `occurrenceKey`: `string`; `owner`: `User`; `time`: `storage.EventTime`; `title`: `string` \\| `undefined`; \\}[]; \\}\\>",+ "CalendarNamespace.teamPage": "### teamPage()\n\n> **teamPage**(`options`): `Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: `User`; `time`: `storage.EventTime`; \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: `storage.TeamCalendarDetails`; `id`: `string`; `kind`: `\"details\"`; `owner`: `User`; `time`: `storage.EventTime`; \\})[]; `members`: \\{ `coverage`: `TeamCalendarCoverage`; `sharing`: `storage.TeamCalendarSharing`; `user`: `User`; \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>\n\nA page of team availability, including its roster and continuation cursor.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `cursor?`: `string` \\| `null`; `end`: `string`; `limit?`: `number` \\| `null`; `start`: `string`; \\} | - |\n| `options.cursor?` | `string` \\| `null` | Continuation returned by the preceding page. |\n| `options.end` | `string` | Exclusive instant. |\n| `options.limit?` | `number` \\| `null` | Maximum source occurrences, at most 2,000. Zero returns the roster only. |\n| `options.start` | `string` | Inclusive instant. |\n\n#### Returns\n\n`Promise`\\<\\{ `items`: (\\{ `contributesToAvailability`: `boolean`; `id`: `string`; `kind`: `\"busy\"`; `owner`: `User`; `time`: `storage.EventTime`; \\} \\| \\{ `contributesToAvailability`: `boolean`; `details`: `storage.TeamCalendarDetails`; `id`: `string`; `kind`: `\"details\"`; `owner`: `User`; `time`: `storage.EventTime`; \\})[]; `members`: \\{ `coverage`: `TeamCalendarCoverage`; `sharing`: `storage.TeamCalendarSharing`; `user`: `User`; \\}[]; `nextCursor`: `string` \\| `undefined`; \\}\\>",+ "CalendarNamespace.teamSharing": "### teamSharing()\n\n> **teamSharing**(): `Promise`\\<`calendar.TeamCalendarSharing`\\>\n\nCurrent sharing preference for the team calendar.\n\n#### Returns\n\n`Promise`\\<`calendar.TeamCalendarSharing`\\>",+ "CreateEventOptions": "# Interface: CreateEventOptions\n\nFields for a new calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendees\"></a> `attendees?` | `CalendarAttendeeInputBody`[] | Invited attendees. |\n| <a id=\"property-calendar\"></a> `calendar?` | `Calendar` | Exact calendar to create the event on; takes precedence over the inbox default. |\n| <a id=\"property-conference\"></a> `conference?` | `ConferenceChange` | Conference to attach; omit to create the event without one. |\n| <a id=\"property-description\"></a> `description?` | `string` | Optional event body. |\n| <a id=\"property-emaillink\"></a> `emailLink?` | `Link` | Connected inbox whose primary calendar receives the event; defaults to the requester's primary inbox. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy?` | `calendar.GuestPolicy` | What guests may do; omit for Google's defaults. Google calendars only. |\n| <a id=\"property-location\"></a> `location?` | `string` | Optional location label. |\n| <a id=\"property-macrocall\"></a> `macroCall?` | `boolean` | Mint a Macro call with the event; its join link lands in the description and location. Cannot be combined with `conference`. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice?` | `OutOfOfficeProperties` | Out-of-office properties; present to create an out-of-office event. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines?` | `string`[] | Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`). |\n| <a id=\"property-reminders\"></a> `reminders?` | `calendar.EventReminders` | Reminder configuration; omit to keep the calendar defaults. |\n| <a id=\"property-time\"></a> `time` | `calendar.EventTime` | Timed or all-day shape. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |\n| <a id=\"property-transparency\"></a> `transparency?` | `calendar.EventTransparency` | Availability behavior. |\n| <a id=\"property-visibility\"></a> `visibility?` | `calendar.EventVisibility` | Event visibility. |",+ "CalendarEventRole": "# Type Alias: CalendarEventRole\n\n> **CalendarEventRole** = `\"organizer\"` \\| `\"guest\"`\n\nWhat the user is on one copy of an event, through the inbox holding it:\nits organizer (or the owner of an event without guests), or a guest.",+ "CalendarNote": "# Class: CalendarNote\n\nA markdown document linked to one meeting occurrence, with view-only access.\n\n## Extends\n\n- `MacroEntity`\\<`MeetingNote`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-canmanage\"></a> `canManage` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the caller may change this link's sharing. | - |\n| <a id=\"property-document\"></a> `document` | `readonly` | () => `Promise`\\<`Document`\\> | The original markdown document; unlinking never deletes it. | - |\n| <a id=\"property-event\"></a> `event` | `readonly` | `CalendarEvent` | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Current document name. | - |\n| <a id=\"property-occurrence\"></a> `occurrence` | `readonly` | `Pick`\\<`storage.CalendarOccurrence`, `\"eventId\"` \\| `\"occurrenceKey\"`\\> | - | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<`Team` \\| `undefined`\\> | Optional extra team audience. Meeting-detail viewers already have view access. | - |",+ "CalendarNote.setTeam": "### setTeam()\n\n> **setTeam**(`team?`): `Promise`\\<`void`\\>\n\nChange the extra team view grant; omit the team to remove it. Requires document ownership.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CalendarNote.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `MeetingNote`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `MeetingNote`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `MeetingNote` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CalendarNote.unlink": "### unlink()\n\n> **unlink**(): `Promise`\\<`void`\\>\n\nRemove this occurrence's link and view grants, preserving the document and other sharing.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CalendarNote.forDocument": "### forDocument()\n\n> `static` **forDocument**(`client`, `event`, `occurrence`, `document`): `CalendarNote`\n\nConstruct a handle for a document already linked to this occurrence.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `event` | `CalendarEvent` |\n| `occurrence` | `storage.CalendarOccurrence` |\n| `document` | `Document` |\n\n#### Returns\n\n`CalendarNote`",+ "CalendarNote.fromDocumentLink": "### fromDocumentLink()\n\n> `static` **fromDocumentLink**(`client`, `document`, `link`): `CalendarNote`\n\nSeed an owner-visible link that can be revoked even if the meeting is unavailable.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | `Document` |\n| `link` | `DocumentNoteLink` |\n\n#### Returns\n\n`CalendarNote`",+ "CalendarNote.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `event`, `occurrence`, `record`): `CalendarNote`\n\nSeed a handle with a record returned by the meeting-note API.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `event` | `CalendarEvent` |\n| `occurrence` | `storage.CalendarOccurrence` |\n| `record` | `MeetingNote` |\n\n#### Returns\n\n`CalendarNote`",+ "CalendarReplacement": "# Class: CalendarReplacement\n\nDurable organizer replacement, recoverable even after the original event is retired.\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |",+ "CalendarReplacement.confirm": "### confirm()\n\n> **confirm**(): `Promise`\\<`CalendarReplacementView`\\>\n\nConfirm the reviewed cancellation and reinvitation, or resume that same operation.\nPresent the preview and obtain the organizer's confirmation before the first call.\n\n#### Returns\n\n`Promise`\\<`CalendarReplacementView`\\>",+ "CalendarReplacement.discard": "### discard()\n\n> **discard**(): `Promise`\\<`void`\\>\n\nDiscard an unconfirmed preview. Confirmed operations must be recovered, not discarded.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CalendarReplacement.status": "### status()\n\n> **status**(): `Promise`\\<`CalendarReplacementView`\\>\n\nRead progress without initiating provider writes.\n\n#### Returns\n\n`Promise`\\<`CalendarReplacementView`\\>",+ "CallRecord": "# Class: CallRecord\n\nA Macro call record (an archived or still active call).\n\n## Extends\n\n- `FavoritableEntity`\\<`CallRecordDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | () => `Promise`\\<`Channel` \\| `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`\\> | `...` | 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.entityType` | - |\n| <a id=\"property-guests\"></a> `guests` | `readonly` | () => `Promise`\\<`CallRecordGuest`[]\\> | `...` | Current and past guests; each id matches its transcript speaker id. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `FavoritableEntity.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`[]\\> | `...` | 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` \\| `undefined`\\> | `...` | 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`[]\\> | `...` | 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. | - | - |",+ "CallRecord.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the call record.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CallRecord.editTranscript": "### editTranscript()\n\n> **editTranscript**(`assignments`): `Promise`\\<`void`\\>\n\nUpdate custom speaker assignments in the transcript.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignments` | `CustomSpeakerAssignment`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CallRecord.favorite": "### 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.favorite`",+ "CallRecord.meeting": "### meeting()\n\n> **meeting**(): `Promise`\\<`Meeting`\\>\n\nGet or create a shareable meeting for this call.\n\n#### Returns\n\n`Promise`\\<`Meeting`\\>",+ "CallRecord.message": "### message()\n\n> **message**(`id`): `CallMessage`\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`",+ "CallRecord.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "CallRecord.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "CallRecord.rename": "### 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`\\>",+ "CallRecord.setTeamShare": "### 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`\\>",+ "CallRecord.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CallMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`CallMessage`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CallMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "CallRecord.toggleTeamShare": "### toggleTeamShare()\n\n> **toggleTeamShare**(): `Promise`\\<`boolean`\\>\n\nToggle the server's share-with-team setting and return its new value.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>",+ "CallRecord.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.CallRecord`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.CallRecord`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.CallRecord` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "CallRecord.unfavorite": "### 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.unfavorite`",+ "CallRecord.byId": "### 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`",+ "CallMessage": "# Class: CallMessage\n\nA message in a call's single persistent chat thread.\n\n## Extends\n\n- `MacroEntity`\\<`storage.Message`\\>\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.id` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the message was last updated. | - |",+ "CallMessage.author": "### author()\n\n> **author**(): `Promise`\\<`User`\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "CallMessage.call": "### call()\n\n> **call**(): `CallRecord`\n\nThe call whose chat contains this message.\n\n#### Returns\n\n`CallRecord`",+ "CallMessage.delete": "### 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`\\>",+ "CallMessage.edit": "### 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` |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>",+ "CallMessage.reply": "### 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` |\n\n#### Returns\n\n`Promise`\\<`CallMessage`\\>",+ "CallMessage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Message` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CallMessage.byId": "### 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`",+ "CallMessage.from": "### 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` | `storage.Message` |\n\n#### Returns\n\n`CallMessage`",+ "CallRecordNamespace": "# Class: CallRecordNamespace",+ "CallRecordNamespace.byId": "### byId()\n\n> **byId**(`id`): `CallRecord`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`CallRecord`",+ "CallRecordNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`CallRecord`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | `SearchOpts` |\n\n#### Returns\n\n`AsyncGenerator`\\<`CallRecord`\\>",+ "ChannelActivity": "# Class: ChannelActivity\n\nA user's channel activity marker.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | `Channel` | Related channel. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\nActivity identity.\n\n##### Returns\n\n`string`",+ "ChannelActivity.createdAt": "### createdAt()\n\n> **createdAt**(): `string`\n\nCreation time.\n\n#### Returns\n\n`string`",+ "ChannelActivity.recordInteraction": "### recordInteraction()\n\n> **recordInteraction**(`type`): `Promise`\\<`ChannelActivity`\\>\n\nRecord a view or interaction in this channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `ActivityType` |\n\n#### Returns\n\n`Promise`\\<`ChannelActivity`\\>",+ "ChannelActivity.toJSON": "### toJSON()\n\n> **toJSON**(): `ApiActivity`\n\nSerialize activity without credentials.\n\n#### Returns\n\n`ApiActivity`",+ "ChannelActivity.user": "### user()\n\n> **user**(): `User`\n\nUser who interacted.\n\n#### Returns\n\n`User`",+ "Channel": "# Class: Channel\n\nA channel.\n\n## Extends\n\n- `PropertiedEntity`\\<`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.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `PropertiedEntity.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`\\<`storage.ChannelType`\\> | `...` | 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. | - | - |",+ "Channel.addParticipants": "### addParticipants()\n\n> **addParticipants**(`users`): `Promise`\\<`void`\\>\n\nAdd users to the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | `User`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.agentConversations": "### agentConversations()\n\n> **agentConversations**(): `Promise`\\<`AgentConversation`[]\\>\n\nConversations maintained by agents in this channel.\n\n#### Returns\n\n`Promise`\\<`AgentConversation`[]\\>",+ "Channel.attachments": "### attachments()\n\n> **attachments**(`opts?`): `AsyncGenerator`\\<`ApiChannelAttachment`\\>\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`\\>",+ "Channel.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the channel. This is not reversible.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "Channel.favorite": "### 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.favorite`",+ "Channel.join": "### join()\n\n> **join**(): `Promise`\\<`void`\\>\n\nJoin the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.joinCode": "### joinCode()\n\n> **joinCode**(): `Promise`\\<`string`\\>\n\nA reusable code that lets a user join this channel.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Channel.leave": "### leave()\n\n> **leave**(): `Promise`\\<`void`\\>\n\nLeave the channel as the current user.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.message": "### message()\n\n> **message**(`id`): `Message`\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`",+ "Channel.messages": "### messages()\n\n> **messages**(`opts?`): `AsyncGenerator`\\<`Message`\\>\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`\\>",+ "Channel.messagesAfter": "### messagesAfter()\n\n> **messagesAfter**(`after`, `opts?`): `AsyncGenerator`\\<`Message`\\>\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`\\>",+ "Channel.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "Channel.participants": "### participants()\n\n> **participants**(): `Promise`\\<`ApiChannelParticipant`[]\\>\n\nThe channel's members, with their roles and join times.\n\n#### Returns\n\n`Promise`\\<`ApiChannelParticipant`[]\\>",+ "Channel.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "Channel.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "Channel.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "Channel.recordActivity": "### recordActivity()\n\n> **recordActivity**(`type`): `Promise`\\<`ChannelActivity`\\>\n\nRecord a view or interaction in this channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `ActivityType` |\n\n#### Returns\n\n`Promise`\\<`ChannelActivity`\\>",+ "Channel.removeParticipants": "### removeParticipants()\n\n> **removeParticipants**(`users`): `Promise`\\<`void`\\>\n\nRemove users from the channel.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | `User`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.rename": "### 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`\\>",+ "Channel.send": "### send()\n\n> **send**(`body`, `opts?`): `Promise`\\<`Message`\\>\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` for which endpoint that picks and what it costs.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| `RichMessage` |\n| `opts?` | \\{ `thread?`: `Thread`; \\} |\n| `opts.thread?` | `Thread` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>",+ "Channel.setPicture": "### setPicture()\n\n> **setPicture**(`picture?`): `Promise`\\<`void`\\>\n\nSet an uploaded profile picture, or clear it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `picture?` | `ChannelPicture` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "Channel.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Message`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`Message`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Message`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "Channel.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ApiChannelDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ApiChannelDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiChannelDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "Channel.typing": "### 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`; \\} |\n| `opts.thread?` | `Thread` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Channel.unfavorite": "### 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.unfavorite`",+ "Channel.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "Channel.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe channel's URL in the Macro web app.\n\n#### Returns\n\n`string`",+ "Channel.byId": "### 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`",+ "Channel.create": "### 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`[]; `team?`: `Team`; `type`: `storage.ChannelType`; \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | `User`[] | Participants to add, excluding the owner. |\n| `opts.team?` | `Team` | Team, for team channels. |\n| `opts.type` | `storage.ChannelType` | - |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "Channel.dm": "### 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` |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "Channel.private": "### 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`[] |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "ChannelAttachment": "# Type Alias: ChannelAttachment\n\n> **ChannelAttachment** = `GetChannelAttachmentsResponses`\\[`200`\\]\\[`\"items\"`\\]\\[`number`\\]\n\nA file or entity attached to a message in a channel.",+ "ChannelParticipant": "# Type Alias: ChannelParticipant\n\n> **ChannelParticipant** = `GetChannelParticipantsResponses`\\[`200`\\]\\[`number`\\]\n\nA member of a channel, with their role and join time.",+ "ChannelLabelsNamespace": "# 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.",+ "ChannelLabelsNamespace.create": "### create()\n\n> **create**(`name`, `channels?`): `Promise`\\<`ChannelLabel`\\>\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`[] | `[]` |\n\n#### Returns\n\n`Promise`\\<`ChannelLabel`\\>",+ "ChannelLabelsNamespace.createSmartTag": "### createSmartTag()\n\n> **createSmartTag**(`name`, `rule`): `Promise`\\<`ChannelLabel`\\>\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` |\n\n#### Returns\n\n`Promise`\\<`ChannelLabel`\\>",+ "ChannelLabelsNamespace.delete": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ChannelLabelsNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`ChannelLabel`[]\\>\n\nEvery label in the authenticated user's shared or private scope.\n\n#### Returns\n\n`Promise`\\<`ChannelLabel`[]\\>",+ "ChannelLabelsNamespace.previewSmartTag": "### previewSmartTag()\n\n> **previewSmartTag**(`rule`): `Promise`\\<`SmartTagPreview`\\>\n\nPreview the first matches and total visible count without creating a tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `rule` | `ChannelLabelRule` |\n\n#### Returns\n\n`Promise`\\<`SmartTagPreview`\\>",+ "ChannelLabelsNamespace.rename": "### rename()\n\n> **rename**(`label`, `name`): `Promise`\\<`ChannelLabel`\\>\n\nRename a label for the whole team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `ChannelLabel` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`ChannelLabel`\\>",+ "ChannelLabelsNamespace.setLabel": "### 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` |\n| `label` | `ChannelLabel` \\| `undefined` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ChannelLabelsNamespace.updateSmartTag": "### updateSmartTag()\n\n> **updateSmartTag**(`label`, `name`, `rule`): `Promise`\\<`ChannelLabel`\\>\n\nUpdate the name and matching rule of an existing smart tag.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `ChannelLabel` |\n| `name` | `string` |\n| `rule` | `ChannelLabelRule` |\n\n#### Returns\n\n`Promise`\\<`ChannelLabel`\\>",+ "Message": "# 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`\\<`storage.Message`\\>\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.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `FavoritableEntity.id` |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | `SimpleMention`[] | `[]` | 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. | - | - |",+ "Message.author": "### author()\n\n> **author**(): `Promise`\\<`User`\\>\n\nThe user who sent this message.\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "Message.channel": "### channel()\n\n> **channel**(): `Channel`\n\nThe channel this message is in.\n\n#### Returns\n\n`Channel`",+ "Message.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this message.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Message.edit": "### 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` | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Message`\\>",+ "Message.favorite": "### 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.favorite`",+ "Message.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "Message.react": "### 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`\\>",+ "Message.reply": "### 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` |\n\n#### Returns\n\n`Promise`\\<`Message`\\>",+ "Message.thread": "### thread()\n\n> **thread**(): `Thread`\n\nThe thread rooted at this message.\n\n#### Returns\n\n`Thread`",+ "Message.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Message` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "Message.unfavorite": "### 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.unfavorite`",+ "Message.unreact": "### 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`\\>",+ "Message.byId": "### 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`[] | `[]` |\n\n#### Returns\n\n`Message`",+ "Message.from": "### 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` | `storage.Message` |\n\n#### Returns\n\n`Message`",+ "MessageData": "# Type Alias: MessageData\n\n> **MessageData** = `storage.Message`\n\nThe API's representation of a message; the same record the document comment API returns.",+ "ChannelNamespace": "# Class: ChannelNamespace\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | `ChannelLabelsNamespace` | Team-shared labels that group channels in the Chat sidebar. |",+ "ChannelNamespace.activity": "### activity()\n\n> **activity**(): `Promise`\\<`ChannelActivity`[]\\>\n\nRecent channel activity, with channel and user handles.\n\n#### Returns\n\n`Promise`\\<`ChannelActivity`[]\\>",+ "ChannelNamespace.byId": "### byId()\n\n> **byId**(`id`): `Channel`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Channel`",+ "ChannelNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`Channel`\\>\n\nCreate a channel. The caller becomes the owner.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `name?`: `string`; `participants?`: `User`[]; `team?`: `Team`; `type`: `storage.ChannelType`; \\} | - |\n| `opts.name?` | `string` | - |\n| `opts.participants?` | `User`[] | Participants to add, excluding the owner. |\n| `opts.team?` | `Team` | Team, for team channels. |\n| `opts.type` | `storage.ChannelType` | - |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "ChannelNamespace.dm": "### dm()\n\n> **dm**(`recipient`): `Promise`\\<`Channel`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `recipient` | `User` |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "ChannelNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Channel`[]\\>\n\nAll channels the authenticated user is a member of.\n\n#### Returns\n\n`Promise`\\<`Channel`[]\\>",+ "ChannelNamespace.private": "### private()\n\n> **private**(`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| `recipients` | `User`[] |\n\n#### Returns\n\n`Promise`\\<`Channel`\\>",+ "ChannelNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`Channel`\\>\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` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Channel`\\>",+ "ChannelPicture": "# Class: ChannelPicture\n\nAn uploaded channel profile picture in static file storage.\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |",+ "ChannelPicture.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize the uploaded picture reference.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |",+ "ChannelPicture.byId": "### byId()\n\n> `static` **byId**(`id`): `ChannelPicture`\n\nConstruct a reference from the upload receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`ChannelPicture`",+ "postToChannel": "# 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` \\| `Thread` |\n| `body` | `RichMessage` |\n\n## Returns\n\n`Promise`\\<`string`\\>",+ "Thread": "# Class: Thread\n\nA thread within a channel, rooted at a top-level message. Replies and\nthread-scoped posting live here.\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. |",+ "Thread.channel": "### channel()\n\n> **channel**(): `Channel`\n\nThe channel this thread is in.\n\n#### Returns\n\n`Channel`",+ "Thread.replies": "### replies()\n\n> **replies**(): `Promise`\\<`Message`[]\\>\n\nList the replies in this thread, oldest first.\n\n#### Returns\n\n`Promise`\\<`Message`[]\\>",+ "Thread.reply": "### reply()\n\n> **reply**(`body`): `Promise`\\<`Message`\\>\n\nPost a reply in this thread.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `body` | `string` \\| `RichMessage` | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Message`\\>\n\nThe created reply.",+ "Thread.root": "### root()\n\n> **root**(): `Message`\n\nThe message this thread hangs off.\n\n#### Returns\n\n`Message`",+ "Thread.toJSON": "### 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` |",+ "CrmComment": "# 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`\\<`storage.Message`\\>\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.id` |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | `CrmCommentParent` | 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. | - |",+ "CrmComment.author": "### author()\n\n> **author**(): `Promise`\\<`User`\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "CrmComment.delete": "### 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`\\>",+ "CrmComment.edit": "### 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` | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>",+ "CrmComment.reply": "### 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` |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>",+ "CrmComment.threadId": "### 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`\\>",+ "CrmComment.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Message` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CrmComment.byId": "### 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` |\n| `id` | `string` |\n\n#### Returns\n\n`CrmComment`",+ "CrmComment.from": "### 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` |\n| `record` | `storage.Message` |\n\n#### Returns\n\n`CrmComment`",+ "listCrmCommentThreads": "# Function: listCrmCommentThreads()\n\n> **listCrmCommentThreads**(`client`, `parent`): `Promise`\\<`CrmCommentThread`[]\\>\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` |\n\n## Returns\n\n`Promise`\\<`CrmCommentThread`[]\\>",+ "postCrmComment": "# Function: postCrmComment()\n\n> **postCrmComment**(`client`, `parent`, `body`, `opts?`): `Promise`\\<`CrmComment`\\>\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` |\n| `body` | `string` \\| `RichMessage` |\n| `opts?` | \\{ `threadId?`: `string`; \\} |\n| `opts.threadId?` | `string` |\n\n## Returns\n\n`Promise`\\<`CrmComment`\\>",+ "CrmCommentParent": "# 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\"` |",+ "CrmCommentThread": "# 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`[] | The thread's comments, root first, then replies oldest first. |\n| <a id=\"property-thread\"></a> `thread` | `ThreadState` | The thread state: root id, resolved flag, owner, timestamps. |",+ "Company": "# Class: Company\n\nA CRM company: an organization the team has interacted with.\n\n## Extends\n\n- `PropertiedEntity`\\<`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.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.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`\\> | `...` | 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. | - | - |",+ "Company.comment": "### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<`CrmComment`\\>\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` | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>",+ "Company.commentById": "### commentById()\n\n> **commentById**(`id`): `CrmComment`\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`",+ "Company.comments": "### comments()\n\n> **comments**(): `Promise`\\<`CrmCommentThread`[]\\>\n\nThe comment threads on this company, newest thread first.\n\n#### Returns\n\n`Promise`\\<`CrmCommentThread`[]\\>",+ "Company.contacts": "### contacts()\n\n> **contacts**(): `Promise`\\<`Contact`[]\\>\n\nThe contacts attached to this company (hidden ones filtered for non-admins).\n\n#### Returns\n\n`Promise`\\<`Contact`[]\\>",+ "Company.createContact": "### createContact()\n\n> **createContact**(`opts`): `Promise`\\<`Contact`\\>\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`\\>",+ "Company.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "Company.domain": "### 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`\\>",+ "Company.domains": "### domains()\n\n> **domains**(): `Promise`\\<`string`[]\\>\n\nAll domains associated with the company, primary first.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>",+ "Company.favorite": "### 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.favorite`",+ "Company.hide": "### 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`\\>",+ "Company.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "Company.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "Company.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "Company.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "Company.rename": "### 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`\\>",+ "Company.setEmailSync": "### 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`\\>",+ "Company.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "Company.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CrmComment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`CrmComment`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CrmComment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "Company.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `CrmCompanyResponse`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `CrmCompanyResponse`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `CrmCompanyResponse` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "Company.unfavorite": "### 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.unfavorite`",+ "Company.unhide": "### 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`\\>",+ "Company.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "Company.byId": "### 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`",+ "Company.from": "### 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` |\n\n#### Returns\n\n`Company`",+ "Contact": "# Class: Contact\n\nA CRM contact: a person observed interacting with the team.\n\n## Extends\n\n- `FavoritableEntity`\\<`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`\\> | `...` | 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.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.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. | - | - |",+ "Contact.comment": "### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<`CrmComment`\\>\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` | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<`CrmComment`\\>",+ "Contact.commentById": "### commentById()\n\n> **commentById**(`id`): `CrmComment`\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`",+ "Contact.comments": "### comments()\n\n> **comments**(): `Promise`\\<`CrmCommentThread`[]\\>\n\nThe comment threads on this contact, newest thread first.\n\n#### Returns\n\n`Promise`\\<`CrmCommentThread`[]\\>",+ "Contact.favorite": "### 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.favorite`",+ "Contact.hide": "### 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`\\>",+ "Contact.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "Contact.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "Contact.rename": "### 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`\\>",+ "Contact.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CrmComment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`CrmComment`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `CrmComment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "Contact.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `CrmContactResponse`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `CrmContactResponse`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `CrmContactResponse` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "Contact.unfavorite": "### 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.unfavorite`",+ "Contact.unhide": "### unhide()\n\n> **unhide**(): `Promise`\\<`void`\\>\n\nUn-hide the contact, restoring it to CRM listings.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Contact.byId": "### 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`",+ "Contact.from": "### 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` |\n\n#### Returns\n\n`Contact`",+ "CrmNamespace": "# Class: CrmNamespace\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-pipelines\"></a> `pipelines` | `readonly` | `PipelineNamespace` | Pipelines, their records and sharing settings. |",+ "CrmNamespace.companyById": "### companyById()\n\n> **companyById**(`id`): `Company`\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`",+ "CrmNamespace.contactByEmail": "### contactByEmail()\n\n> **contactByEmail**(`email`): `Promise`\\<`Contact` \\| `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` \\| `undefined`\\>",+ "CrmNamespace.contactById": "### contactById()\n\n> **contactById**(`id`): `Contact`\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`",+ "CrmNamespace.createCompany": "### createCompany()\n\n> **createCompany**(`opts`): `Promise`\\<`Company`\\>\n\nCreate a CRM company for the caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `CreateCrmCompanyRequest` |\n\n#### Returns\n\n`Promise`\\<`Company`\\>",+ "CrmNamespace.resetStages": "### 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`\\>",+ "CrmNamespace.searchCompanies": "### searchCompanies()\n\n> **searchCompanies**(`query`): `AsyncGenerator`\\<`Company`\\>\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`\\>",+ "CrmNamespace.searchContacts": "### searchContacts()\n\n> **searchContacts**(`query`, `opts?`): `Promise`\\<`Contact`[]\\>\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`[]\\>",+ "CrmNamespace.setStages": "### setStages()\n\n> **setStages**(`stages`): `Promise`\\<`CrmStagesResponse`\\>\n\nReplace the caller's current team's deal stages, in pipeline order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `stages` | `ReplaceCrmStagesRequest` |\n\n#### Returns\n\n`Promise`\\<`CrmStagesResponse`\\>",+ "CrmNamespace.settings": "### settings()\n\n> **settings**(): `Promise`\\<`CrmTeamSettingsResponse`\\>\n\nThe caller's current team's CRM settings.\n\n#### Returns\n\n`Promise`\\<`CrmTeamSettingsResponse`\\>",+ "CrmNamespace.updateSettings": "### updateSettings()\n\n> **updateSettings**(`settings`): `Promise`\\<`CrmTeamSettingsResponse`\\>\n\nPartially update the caller's current team's CRM settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `settings` | `UpdateCrmTeamSettingsRequest` |\n\n#### Returns\n\n`Promise`\\<`CrmTeamSettingsResponse`\\>",+ "CrmPipeline": "# Class: CrmPipeline\n\nA CRM pipeline with its own sharing boundary and backing table.\n\n## Extends\n\n- `MacroEntity`\\<`AccessiblePipeline`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<`storage.AccessLevel`\\> | Current caller's access level. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | Owner. | - |\n| <a id=\"property-recordtype\"></a> `recordType` | `readonly` | () => `Promise`\\<`PipelineRecordType`\\> | CRM record type. | - |\n| <a id=\"property-sharing\"></a> `sharing` | `readonly` | () => `Promise`\\<`PipelineSharing`\\> | Sharing scope. | - |\n| <a id=\"property-team\"></a> `team` | `readonly` | () => `Promise`\\<`Team`\\> | Owning team. | - |",+ "CrmPipeline.applyOps": "### applyOps()\n\n> **applyOps**(`ops`, `options?`): `Promise`\\<`AppliedOps`\\>\n\nApply an atomic generated database operation batch through this pipeline.\nAs with Database.applyOps, batch-local UUIDs may name resources minted earlier in the batch.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ops` | `DatabaseOp`[] |\n| `options?` | \\{ `baseVersions?`: \\{ `table`: `PipelineTable`; `version`: `number`; \\}[]; \\} |\n| `options.baseVersions?` | \\{ `table`: `PipelineTable`; `version`: `number`; \\}[] |\n\n#### Returns\n\n`Promise`\\<`AppliedOps`\\>",+ "CrmPipeline.queryRows": "### queryRows()\n\n> **queryRows**(`options?`): `AsyncGenerator`\\<`PipelineRow`\\>\n\nQuery pipeline rows, optionally restricting the query to typed row handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `query?`: `ViewQuery`; `rows?`: `PipelineRow`[]; \\} |\n| `options.query?` | `ViewQuery` |\n| `options.rows?` | `PipelineRow`[] |\n\n#### Returns\n\n`AsyncGenerator`\\<`PipelineRow`\\>",+ "CrmPipeline.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename this pipeline.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CrmPipeline.rows": "### rows()\n\n> **rows**(): `AsyncGenerator`\\<`PipelineRow`\\>\n\nRows in pipeline order, automatically paginated.\n\n#### Returns\n\n`AsyncGenerator`\\<`PipelineRow`\\>",+ "CrmPipeline.setSharing": "### setSharing()\n\n> **setSharing**(`sharing`): `Promise`\\<`void`\\>\n\nChange its sharing scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sharing` | `PipelineSharing` \\| `undefined` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CrmPipeline.setTrashed": "### setTrashed()\n\n> **setTrashed**(`trashed`): `Promise`\\<`void`\\>\n\nTrash or restore the pipeline.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `trashed` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "CrmPipeline.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead sharing grants.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "CrmPipeline.table": "### table()\n\n> **table**(): `Promise`\\<`PipelineTable`\\>\n\nRead the backing table through the pipeline's authorization boundary.\n\n#### Returns\n\n`Promise`\\<`PipelineTable`\\>",+ "CrmPipeline.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `AccessiblePipeline`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `AccessiblePipeline`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `AccessiblePipeline` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "CrmPipeline.updateSharePermissions": "### updateSharePermissions()\n\n> **updateSharePermissions**(`options`): `Promise`\\<`storage.SharePermissionV2`\\>\n\nUpdate sharing grants.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `SharePermissionOptions` |\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "CrmPipeline.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `CrmPipeline`\n\nConstruct a lazy pipeline handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`CrmPipeline`",+ "CrmPipeline.from": "### from()\n\n> `static` **from**(`client`, `record`): `CrmPipeline`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `AccessiblePipeline` |\n\n#### Returns\n\n`CrmPipeline`",+ "PipelineColumn": "# Class: PipelineColumn\n\nA column belonging to a pipeline table.\n\n## Extends\n\n- `MacroEntity`\\<`ColumnDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-table\"></a> `table` | `readonly` | `PipelineTable` | Parent table. | - |",+ "PipelineColumn.name": "### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nCurrent column label.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "PipelineColumn.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ColumnDetail`; `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: `ColumnDetail`; `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ColumnDetail` |\n| `id` | `string` |\n| `pipelineId` | `string` |\n| `tableId` | `string` |\n\n#### Overrides\n\n`MacroEntity.toJSON`",+ "PipelineColumn.writable": "### writable()\n\n> **writable**(): `Promise`\\<`boolean`\\>\n\nWhether the caller can write this column.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>",+ "PipelineColumn.from": "### from()\n\n> `static` **from**(`client`, `table`, `record`): `PipelineColumn`\n\nSeed a column handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `table` | `PipelineTable` |\n| `record` | `ColumnDetail` |\n\n#### Returns\n\n`PipelineColumn`",+ "PipelineRow": "# Class: PipelineRow\n\nOne pipeline row.\n\n## Extends\n\n- `MacroEntity`\\<`StorageRow`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-cells\"></a> `cells` | `readonly` | () => `Promise`\\<\\{\\[`key`: `string`\\]: `storage.PropertyValue`; \\}\\> | Values keyed by property definition. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-pipeline\"></a> `pipeline` | `readonly` | `CrmPipeline` | Parent pipeline. | - |",+ "PipelineRow.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`void`\\>\n\nReload this row after an operation batch.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PipelineRow.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `StorageRow`; `id`: `string`; `pipelineId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: `StorageRow`; `id`: `string`; `pipelineId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `StorageRow` |\n| `id` | `string` |\n| `pipelineId` | `string` |\n\n#### Overrides\n\n`MacroEntity.toJSON`",+ "PipelineRow.byId": "### byId()\n\n> `static` **byId**(`client`, `pipeline`, `id`): `PipelineRow`\n\nConstruct a scoped row handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | `CrmPipeline` |\n| `id` | `string` |\n\n#### Returns\n\n`PipelineRow`",+ "PipelineRow.from": "### from()\n\n> `static` **from**(`client`, `pipeline`, `record`): `PipelineRow`\n\nSeed a listed row.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | `CrmPipeline` |\n| `record` | `StorageRow` |\n\n#### Returns\n\n`PipelineRow`",+ "PipelineTable": "# Class: PipelineTable\n\nBacking table of a CRM pipeline.\n\n## Extends\n\n- `MacroEntity`\\<`TableDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-pipeline\"></a> `pipeline` | `readonly` | `CrmPipeline` | Parent pipeline. | - |",+ "PipelineTable.columns": "### columns()\n\n> **columns**(): `Promise`\\<`PipelineColumn`[]\\>\n\nColumns in this table.\n\n#### Returns\n\n`Promise`\\<`PipelineColumn`[]\\>",+ "PipelineTable.rowById": "### rowById()\n\n> **rowById**(`id`): `PipelineRow`\n\nA scoped row handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`PipelineRow`",+ "PipelineTable.rows": "### rows()\n\n> **rows**(): `AsyncGenerator`\\<`PipelineRow`\\>\n\nRows from the authorized pipeline surface.\n\n#### Returns\n\n`AsyncGenerator`\\<`PipelineRow`\\>",+ "PipelineTable.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `TableDetail`; `id`: `string`; `pipelineId`: `string`; \\}\n\nSerialize identity within its pipeline.\n\n#### Returns\n\n\\{ `detail?`: `TableDetail`; `id`: `string`; `pipelineId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `TableDetail` |\n| `id` | `string` |\n| `pipelineId` | `string` |\n\n#### Overrides\n\n`MacroEntity.toJSON`",+ "PipelineTable.version": "### version()\n\n> **version**(): `Promise`\\<`number`\\>\n\nTable version for optimistic operation batches.\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "PipelineTable.from": "### from()\n\n> `static` **from**(`client`, `pipeline`, `record`): `PipelineTable`\n\nSeed a table from a pipeline table response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `pipeline` | `CrmPipeline` |\n| `record` | `TableDetail` |\n\n#### Returns\n\n`PipelineTable`",+ "PipelineNamespace": "# Class: PipelineNamespace\n\nCRM pipelines in the caller's team.",+ "PipelineNamespace.byId": "### byId()\n\n> **byId**(`id`): `CrmPipeline`\n\nConstruct a lazy pipeline handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`CrmPipeline`",+ "PipelineNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`CrmPipeline`\\>\n\nCreate a pipeline and its backing storage.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `CreatePipeline` |\n\n#### Returns\n\n`Promise`\\<`CrmPipeline`\\>",+ "PipelineNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`CrmPipeline`[]\\>\n\nList accessible pipelines.\n\n#### Returns\n\n`Promise`\\<`CrmPipeline`[]\\>",+ "DatabaseColumn": "# Class: DatabaseColumn\n\nOne column of a `DatabaseTable`: the placement of a property\ndefinition on the table.\n\nA column is not an entity of its own — it has no permissions and no\nendpoint to read it directly. The handle resolves through the owning\ndatabase's schema, so a fresh read after a write sees the new value.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the column placement. |\n| <a id=\"property-table\"></a> `table` | `readonly` | `DatabaseTable` | The table this column belongs to. |",+ "DatabaseColumn.addOptions": "### addOptions()\n\n> **addOptions**(`labels`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd select options to the column. Labels it already has are skipped, so\nthe call is safe to repeat. Only select and tag columns accept options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `labels` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "DatabaseColumn.casts": "### casts()\n\n> **casts**(): `Promise`\\<`ColumnCast`[]\\>\n\nWhat changing this column to each type would do to its values: `safe`,\n`checked` (with how many would not convert, and a few of them), or\n`never` (with why). Changes nothing.\n\n#### Returns\n\n`Promise`\\<`ColumnCast`[]\\>",+ "DatabaseColumn.changeType": "### changeType()\n\n> **changeType**(`options`): `Promise`\\<`OpResultOf`\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\nChange this column's type. See Database.changeColumnType.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `ChangeColumnTypeOptions` |\n\n#### Returns\n\n`Promise`\\<`OpResultOf`\\<`\"column\"`, `\"type_changed\"`\\>\\>",+ "DatabaseColumn.config": "### config()\n\n> **config**(): `Promise`\\<`ColumnConfig` \\| `undefined`\\>\n\nColumn-kind configuration (a link), or `undefined` for a plain\nvalue column.\n\n#### Returns\n\n`Promise`\\<`ColumnConfig` \\| `undefined`\\>",+ "DatabaseColumn.convertIntoNewColumn": "### convertIntoNewColumn()\n\n> **convertIntoNewColumn**(`options`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd a column of another type right after this one, filled with the\nvalues that convert, leaving this one as it is. See\nDatabase.convertColumnIntoNewColumn.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `ConvertIntoNewColumnOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "DatabaseColumn.dataType": "### dataType()\n\n> **dataType**(): `Promise`\\<`storage.DataType`\\>\n\nThe value type the column holds.\n\n#### Returns\n\n`Promise`\\<`storage.DataType`\\>",+ "DatabaseColumn.definition": "### definition()\n\n> **definition**(): `Promise`\\<`PropertyDefinitionWithOptions`\\>\n\nThe bound property definition together with its select options — the\nsource of the column's name, type, and allowed values.\n\n#### Returns\n\n`Promise`\\<`PropertyDefinitionWithOptions`\\>",+ "DatabaseColumn.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this placement and its cells at the table version last read.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DatabaseColumn.detail": "### detail()\n\n> **detail**(): `Promise`\\<`ColumnDetail`\\>\n\nThe column's record as the API returns it: the placement and the bound\nproperty definition.\n\n#### Returns\n\n`Promise`\\<`ColumnDetail`\\>",+ "DatabaseColumn.inferType": "### inferType()\n\n> **inferType**(`options`): `Promise`\\<`DatabaseColumn`\\>\n\nSettle the type of an empty column created with inferType enabled.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `InferColumnTypeOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "DatabaseColumn.isMultiSelect": "### isMultiSelect()\n\n> **isMultiSelect**(): `Promise`\\<`boolean`\\>\n\nWhether the column holds multiple values.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>",+ "DatabaseColumn.name": "### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe placement's display name, falling back to its property definition.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseColumn.position": "### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe column's fractional index within the table's column order.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseColumn.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`DatabaseColumn`\\>\n\nRename this placement, only if its last-read name is still current,\nwithout changing its shared property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "DatabaseColumn.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |",+ "DatabaseColumn.byId": "### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseColumn`\n\nA handle to a column by id, within a table. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseColumn`",+ "Database": "# Class: Database\n\nA Macro database: a named collection of tables, owned and shared as one\nentity.\n\nA free-to-construct `(client, id)` handle like any other entity — the schema\nloads lazily on first field access and is dropped after any mutation.\n\n## Extends\n\n- `MacroEntity`\\<`DatabaseDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | Access requests and direct user grants. | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the database was created. | - |\n| <a id=\"property-grant\"></a> `grant` | `readonly` | () => `Promise`\\<`storage.AccessLevel`\\> | The caller's access on the database. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The database's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | The user who owns the database. | - |\n| <a id=\"property-tables\"></a> `tables` | `readonly` | () => `Promise`\\<`DatabaseTable`[]\\> | The database's tables, in tab order. | - |\n| <a id=\"property-trashedat\"></a> `trashedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the database was trashed, if it has been. | - |",+ "Database.addColumn": "### addColumn()\n\n> **addColumn**(`table`, `options`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd a column to one of the database's tables, under an id minted here,\neither creating a property definition for it or binding an existing one.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `options` | `AddColumnOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "Database.addColumnOptions": "### addColumnOptions()\n\n> **addColumnOptions**(`column`, `labels`): `Promise`\\<`OpResultOf`\\<`\"column\"`, `\"options_added\"`\\>\\>\n\nAdd select options to one of the database's columns, each under an id\nminted here. Labels the column already has are skipped, so the call is\nsafe to repeat; the result lists the options it did create. Only select\nand tag columns accept options.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `labels` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`OpResultOf`\\<`\"column\"`, `\"options_added\"`\\>\\>",+ "Database.applyOps": "### applyOps()\n\n> **applyOps**(`ops`, `options?`): `Promise`\\<`OpResult`[]\\>\n\nApply ops to the database in one transaction: create, rename, reorder,\nor delete tables and columns; change a column's type; add, edit, or\ndelete select options; insert, update, or delete rows; create, change,\nreorder, or delete views; move board cards. Later ops see what earlier\nones did, so a table or column created by one op (under an id the caller\nmints, as a UUIDv7) can be named by the next. A refused op leaves the\nwhole batch unwritten and throws `MacroOpRefusedError`. Returns one\nresult per op, in the order sent.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ops` | `DatabaseOp`[] |\n| `options?` | `ApplyOpsOptions` |\n\n#### Returns\n\n`Promise`\\<`OpResult`[]\\>",+ "Database.changeColumnType": "### changeColumnType()\n\n> **changeColumnType**(`column`, `options`): `Promise`\\<`OpResultOf`\\<`\"column\"`, `\"type_changed\"`\\>\\>\n\nChange a column's type at the table version last read. Every value must\nconvert: one that does not refuses the change, naming how many and a few\nof them, and nothing is written. To keep the original column, see\n[Database.convertColumnIntoNewColumn](#convertcolumnintonewcolumn).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `options` | `ChangeColumnTypeOptions` |\n\n#### Returns\n\n`Promise`\\<`OpResultOf`\\<`\"column\"`, `\"type_changed\"`\\>\\>",+ "Database.columnCasts": "### columnCasts()\n\n> **columnCasts**(`column`): `Promise`\\<`ColumnCast`[]\\>\n\nWhat changing a column to each type would do to its values. Changes\nnothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n\n#### Returns\n\n`Promise`\\<`ColumnCast`[]\\>",+ "Database.columnConversion": "### columnConversion()\n\n> **columnConversion**(`column`, `to`): `Promise`\\<`ColumnConversion`\\>\n\nWhat a column's values become under another type: the values that\nconvert, the option labels a new select or tag column of that type needs,\nand how many values do not convert. Changes nothing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `to` | `ColumnType` |\n\n#### Returns\n\n`Promise`\\<`ColumnConversion`\\>",+ "Database.convertColumnIntoNewColumn": "### convertColumnIntoNewColumn()\n\n> **convertColumnIntoNewColumn**(`column`, `options`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd a column of another type right after this one, filled with the\nvalues that convert, in one batch at the table version the conversion\nwas read at. The original column is left as it is; values that do not\nconvert stay only there.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `options` | `ConvertIntoNewColumnOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "Database.createTable": "### createTable()\n\n> **createTable**(`options`): `Promise`\\<`DatabaseTable`\\>\n\nCreate a table in the database, under an id minted here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>",+ "Database.createWebhook": "### createWebhook()\n\n> **createWebhook**(`table`): `Promise`\\<\\{ `token`: `string`; `webhook`: `DatabaseWebhook`; \\}\\>\n\nCreate a webhook that inserts rows into `table`, writing with the\ncaller's access. POST a JSON object (one row) or an array of objects to\n`/databases/webhooks/{token}` on the storage service; keys name columns.\nThe token is the whole credential and is answered only here.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n\n#### Returns\n\n`Promise`\\<\\{ `token`: `string`; `webhook`: `DatabaseWebhook`; \\}\\>",+ "Database.deleteColumn": "### deleteColumn()\n\n> **deleteColumn**(`column`): `Promise`\\<`number`\\>\n\nRemove a column and its cells at the table version last read. Returns\nthe table's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "Database.deleteTable": "### deleteTable()\n\n> **deleteTable**(`table`): `Promise`\\<`void`\\>\n\nDelete one of the database's tables with its columns, rows, and views.\nA database keeps at least one table, and a table another table's\nrelation column points at cannot be deleted.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Database.deleteWebhook": "### deleteWebhook()\n\n> **deleteWebhook**(`webhook`): `Promise`\\<`void`\\>\n\nDelete one of the database's webhooks; its URL stops working.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `webhook` | `DatabaseWebhook` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Database.importTable": "### importTable()\n\n> **importTable**(`request`): `Promise`\\<`DatabaseTable`\\>\n\nImport text rows atomically. Keep requestId unchanged when retrying.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `ImportTable` |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>",+ "Database.inferColumnType": "### inferColumnType()\n\n> **inferColumnType**(`column`, `options`): `Promise`\\<`InferColumnTypeOutcome`\\>\n\nAdopt a first-value type only while the owned column is empty and inferable.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `options` | `InferColumnTypeOptions` |\n\n#### Returns\n\n`Promise`\\<`InferColumnTypeOutcome`\\>",+ "Database.query": "### query()\n\n> **query**(`sql`, `options?`): `Promise`\\<`DatabaseQueryResult`\\>\n\nRun one SQL statement with this database as the default name scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sql` | `string` |\n| `options?` | `Omit`\\<`DatabaseQueryOptions`, `\"database\"`\\> |\n\n#### Returns\n\n`Promise`\\<`DatabaseQueryResult`\\>",+ "Database.renameColumn": "### renameColumn()\n\n> **renameColumn**(`column`, `name`): `Promise`\\<`number`\\>\n\nRename this column placement, only if its last-read name is still\ncurrent, without changing its shared property definition. Returns the\ntable's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `column` | `DatabaseColumn` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "Database.renameTable": "### renameTable()\n\n> **renameTable**(`table`, `name`): `Promise`\\<`number`\\>\n\nRename a table only if its last-read name is still current. Returns the\ntable's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "Database.reorderColumns": "### reorderColumns()\n\n> **reorderColumns**(`table`, `columns`): `Promise`\\<`number`\\>\n\nPersist a complete column order at the table version last read. Pass\nevery column of the table exactly once.\nReturns the table's new version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `columns` | `DatabaseColumn`[] |\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "Database.reorderTables": "### reorderTables()\n\n> **reorderTables**(`tables`): `Promise`\\<`DatabaseTable`[]\\>\n\nPersist a new tab order. Pass every table of the database exactly once.\nReturns the tables in their new order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `tables` | `DatabaseTable`[] |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`[]\\>",+ "Database.rowHistory": "### rowHistory()\n\n> **rowHistory**(`row`): `Promise`\\<`RowHistoryEntry`[]\\>\n\nA row's history: every committed change that touched it, newest first.\nSee `DatabaseRow.history`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `row` | `DatabaseRow` |\n\n#### Returns\n\n`Promise`\\<`RowHistoryEntry`[]\\>",+ "Database.schema": "### schema()\n\n> **schema**(): `Promise`\\<`DatabaseDetail`\\>\n\nThe full schema: the database record, the caller's access, and every\ntable with its columns and views. Cached until the next write.\n\n#### Returns\n\n`Promise`\\<`DatabaseDetail`\\>",+ "Database.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead direct recipients. Only the database owner can manage sharing.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Database.table": "### table()\n\n> **table**(`name`): `Promise`\\<`DatabaseTable` \\| `undefined`\\>\n\nThe table with the given display name, or `undefined` if there is none.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable` \\| `undefined`\\>",+ "Database.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `DatabaseDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `DatabaseDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DatabaseDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Database.updateSharePermissions": "### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<`storage.SharePermissionV2`\\>\n\nAdd, replace, or remove recipient grants without transferring ownership.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `UpdateSharePermissionRequestV2` |\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Database.viewPositions": "### viewPositions()\n\n> **viewPositions**(`view`): `Promise`\\<`CardPosition`[]\\>\n\nWhere a board view's cards sit: each placed card's lane and key.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `view` | `DatabaseView` |\n\n#### Returns\n\n`Promise`\\<`CardPosition`[]\\>",+ "Database.webhooks": "### webhooks()\n\n> **webhooks**(): `Promise`\\<`DatabaseWebhook`[]\\>\n\nThe database's webhooks, oldest first. Takes edit access.\n\n#### Returns\n\n`Promise`\\<`DatabaseWebhook`[]\\>",+ "Database.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Database`\n\nA handle to a database 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`Database`",+ "Database.create": "### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Database`\\>\n\nCreate a database owned by the caller.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Database`\\>",+ "Database.list": "### list()\n\n> `static` **list**(`client`): `Promise`\\<`Database`[]\\>\n\nThe databases the caller can see, each with the caller's access level.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Database`[]\\>",+ "MacroOpRefusedError": "# Class: MacroOpRefusedError\n\nA batch of ops was refused (HTTP 400): nothing in it was written. Names the\nop at fault and, when the batch minted an id that already names something\n(a retry of a batch that committed, or an id minted twice), that id.\n\n## Extends\n\n- `MacroApiError`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `readonly` | `string` \\| `null` | The column placement at fault, when one is. | - |\n| <a id=\"property-data\"></a> `data` | `readonly` | `unknown` | - | `MacroApiError.data` |\n| <a id=\"property-op\"></a> `op` | `readonly` | `number` | The refused op's index in the batch. | - |\n| <a id=\"property-row\"></a> `row` | `readonly` | `number` \\| `null` | The row's index within the op, when one row is at fault. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | `number` | - | `MacroApiError.status` |\n| <a id=\"property-taken\"></a> `taken` | `readonly` | `TakenId` \\| `null` | The minted id that is already taken, when that is the reason. | - |",+ "AddColumnOptions": "# Type Alias: AddColumnOptions\n\n> **AddColumnOptions** = \\{ `inferType?`: `boolean`; `name`: `string`; `options?`: `string`[]; `type`: `ColumnType`; \\} \\| \\{ `property`: `PropertyDefinition`; \\} & \\{ `after?`: `DatabaseColumn`; \\}\n\nOptions for `Database.addColumn`.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `after?` | `DatabaseColumn` | The column the new one goes right after; by default, the last one. |",+ "ApplyOpsOptions": "# Type Alias: ApplyOpsOptions\n\n> **ApplyOpsOptions** = \\{ `baseVersions?`: \\{ `table`: `DatabaseTable`; `version`: `TableVersion`; \\}[]; \\}\n\nOptions for `Database.applyOps`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversions\"></a> `baseVersions?` | \\{ `table`: `DatabaseTable`; `version`: `TableVersion`; \\}[] | The version each table must still be at, as the caller read it. A table that moved refuses the whole batch with a 409, so an edit made against what the caller saw does not overwrite another's. |",+ "ChangeColumnTypeOptions": "# Type Alias: ChangeColumnTypeOptions\n\n> **ChangeColumnTypeOptions** = \\{ `to`: `ColumnType`; \\}\n\nOptions for `Database.changeColumnType`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-to\"></a> `to` | `ColumnType` | The type to change the column to. |",+ "ColumnType": "# Type Alias: ColumnType\n\n> **ColumnType** = `Exclude`\\<`ColumnKind`, \\{ `type`: `\"relation\"`; \\}\\> \\| \\{ `table`: `DatabaseTable`; `type`: `\"relation\"`; \\}\n\nA type a column can have. A relation names the related table by handle;\nthe table may live in any database the caller can reach.",+ "ConvertIntoNewColumnOptions": "# Type Alias: ConvertIntoNewColumnOptions\n\n> **ConvertIntoNewColumnOptions** = \\{ `name?`: `string`; `to`: `ColumnType`; \\}\n\nOptions for `Database.convertColumnIntoNewColumn`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` | Display name of the new column; by default the original's name followed by the type, as in `Due (Date)`. |\n| <a id=\"property-to\"></a> `to` | `ColumnType` | The type of the new column. |",+ "InferColumnTypeOptions": "# Type Alias: InferColumnTypeOptions\n\n> **InferColumnTypeOptions** = \\{ `baseVersion`: `TableVersion`; `dataType`: `\"STRING\"` \\| `\"NUMBER\"` \\| `\"ENTITY\"`; `specificEntityType?`: `InferColumnTypeRequest`\\[`\"specificEntityType\"`\\]; \\}\n\nSettle an empty inferred column using the table version the caller read.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-baseversion\"></a> `baseVersion` | `TableVersion` |\n| <a id=\"property-datatype\"></a> `dataType` | `\"STRING\"` \\| `\"NUMBER\"` \\| `\"ENTITY\"` |\n| <a id=\"property-specificentitytype\"></a> `specificEntityType?` | `InferColumnTypeRequest`\\[`\"specificEntityType\"`\\] |",+ "OpResultOf": "# Type Alias: OpResultOf\\<Kind, Change\\>\n\n> **OpResultOf**\\<`Kind`, `Change`\\> = `Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\> & \\{ `change`: `Extract`\\<`Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\>\\[`\"change\"`\\], \\{ `kind`: `Change`; \\}\\>; \\}\n\nThe result of a `Kind` op whose change answered `Change`.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-kind\"></a> `Kind` *extends* keyof `ResultChanges` |\n| <a id=\"type-parameter-change\"></a> `Change` *extends* `ResultChanges`\\[`Kind`\\] |\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `change` | `Extract`\\<`Extract`\\<`ChangedResult`, \\{ `kind`: `Kind`; \\}\\>\\[`\"change\"`\\], \\{ `kind`: `Change`; \\}\\> |",+ "DatabaseNamespace": "# Class: DatabaseNamespace\n\nMacro databases: named collections of tables, owned and shared as one\nentity.",+ "DatabaseNamespace.byId": "### byId()\n\n> **byId**(`id`): `Database`\n\nA handle to a database by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Database`",+ "DatabaseNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Database`\\>\n\nCreate a database owned by the caller.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; \\} |\n| `options.name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Database`\\>",+ "DatabaseNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Database`[]\\>\n\nThe databases the caller can see.\n\n#### Returns\n\n`Promise`\\<`Database`[]\\>",+ "DatabaseNamespace.query": "### query()\n\n> **query**(`sql`, `options?`): `Promise`\\<`DatabaseQueryResult`\\>\n\nRun one SQL statement over the caller's visible databases. Writes execute once.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sql` | `string` |\n| `options?` | `DatabaseQueryOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseQueryResult`\\>",+ "DatabaseQueryOptions": "# Interface: DatabaseQueryOptions\n\nScope and optimistic concurrency for one SQL statement.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-baseversions\"></a> `baseVersions?` | `QueryTableVersion`[] | Refuse writes if these tables changed since they were read. |\n| <a id=\"property-database\"></a> `database?` | `Database` | Default database for unqualified table names; visible databases remain joinable. |",+ "DatabaseQueryResult": "# Interface: DatabaseQueryResult\n\nThe committed outcome of one statement; write calls are never automatically retried.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-changesapplied\"></a> `changesApplied` | `number` | Number of changes committed by the statement. |\n| <a id=\"property-insertedrows\"></a> `insertedRows` | `DatabaseRow`[] | Handles for newly inserted rows, in insertion order. |\n| <a id=\"property-newversions\"></a> `newVersions` | `QueryTableVersion`[] | Versions of tables after committed writes. |\n| <a id=\"property-readversions\"></a> `readVersions` | `QueryTableVersion`[] | Observed table versions, reusable as guards for a later write. |\n| <a id=\"property-result\"></a> `result?` | `QueryResultSet` | Returned result set, when the statement produces one. |\n| <a id=\"property-statement\"></a> `statement` | `QueryStatement` | Statement classification with typed handles for its targets. |\n| <a id=\"property-truncatedtables\"></a> `truncatedTables` | `string`[] | SQL table names whose input hit the server row cap; aggregates may be partial. |",+ "QueryResultSet": "# Interface: QueryResultSet\n\nSQL returns dynamically shaped, discriminated cells and optional source row handles.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-columns\"></a> `columns` | `QueryColumn`[] | Ordered metadata corresponding to each cell in a result row. |\n| <a id=\"property-rowhandles\"></a> `rowHandles` | `DatabaseRow`[] | Source row handles in result order; empty for aggregates and virtual tables. |\n| <a id=\"property-rows\"></a> `rows` | (`SqlCell` \\| `null`)[][] | Dynamic tagged cells in column order; empty cells are null. |\n| <a id=\"property-sourcetable\"></a> `sourceTable?` | `DatabaseTable` | Persisted source table when results correspond to individual rows. |",+ "QueryTableVersion": "# Interface: QueryTableVersion\n\nA version observed on a typed table handle, reusable as a write guard.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-table\"></a> `table` | `DatabaseTable` | Table whose version was observed. |\n| <a id=\"property-version\"></a> `version` | `number` | Opaque version to pass back as an optimistic write guard. |",+ "QueryColumn": "# Type Alias: QueryColumn\n\n> **QueryColumn** = `Omit`\\<`ResultColumn`, `\"relatedTable\"`\\> & \\{ `relatedTable?`: `DatabaseTable`; \\}\n\nResult column metadata, including a typed relation target when visible.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `relatedTable?` | `DatabaseTable` | Visible target table for a relation column. |",+ "QueryStatement": "# Type Alias: QueryStatement\n\n> **QueryStatement** = `Extract`\\<`SqlStatement`, \\{ `kind`: `\"select\"`; \\}\\> \\| \\{ `database`: `Database`; `kind`: `\"schema\"`; `summary`: `string`; \\} \\| \\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: `DatabaseTable`; `tableName`: `string`; \\} \\| \\{ `column`: `DatabaseColumn`; `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: `DatabaseTable`; `tableName`: `string`; `to`: `string`; \\}\n\nWhat ran, with typed handles for resources written by the statement.\n\n## Union Members\n\n`Extract`\\<`SqlStatement`, \\{ `kind`: `\"select\"`; \\}\\>\n\n***\n\n### Type Literal\n\n\\{ `database`: `Database`; `kind`: `\"schema\"`; `summary`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `Database` | Database whose schema changed. |\n| `kind` | `\"schema\"` | Schema change discriminator. |\n| `summary` | `string` | Human-readable description of the schema change. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"insert\"` \\| `\"update\"` \\| `\"delete\"`; `table`: `DatabaseTable`; `tableName`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"insert\"` \\| `\"update\"` \\| `\"delete\"` | Row mutation discriminator. |\n| `table` | `DatabaseTable` | Table targeted by the mutation, including zero-match writes. |\n| `tableName` | `string` | SQL name of the target table. |\n\n***\n\n### Type Literal\n\n\\{ `column`: `DatabaseColumn`; `columnName`: `string`; `kind`: `\"alterColumnType\"`; `table`: `DatabaseTable`; `tableName`: `string`; `to`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `DatabaseColumn` | Column whose type changed. |\n| `columnName` | `string` | SQL name of the changed column. |\n| `kind` | `\"alterColumnType\"` | Column type change discriminator. |\n| `table` | `DatabaseTable` | Table containing the changed column. |\n| `tableName` | `string` | SQL name of the target table. |\n| `to` | `string` | SQL type requested by the statement. |",+ "DatabaseRow": "# Class: DatabaseRow\n\nOne row of a `DatabaseTable`.\n\nA row is not an entity of its own — it is owned and shared as part of its\ndatabase. Its cells are written with ops; see Database.applyOps.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the row. |\n| <a id=\"property-table\"></a> `table` | `readonly` | `DatabaseTable` | The table this row belongs to. |",+ "DatabaseRow.history": "### history()\n\n> **history**(): `Promise`\\<`RowHistoryEntry`[]\\>\n\nEvery committed change that touched the row, newest first: who made it,\nwhen, how, and the values of the columns it touched before and after.\nA removed row's history still reads.\n\n#### Returns\n\n`Promise`\\<`RowHistoryEntry`[]\\>",+ "DatabaseRow.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |",+ "DatabaseRow.byId": "### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseRow`\n\nA handle to a row by id, within a table.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseRow`",+ "DatabaseTable": "# Class: DatabaseTable\n\nOne table (tab) of a `Database`.\n\nA table is not an entity of its own — it is owned and shared as part of its\ndatabase, and has no endpoint to read it directly. The handle resolves\nthrough `Database.schema`, so reads after a write see the new state.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-database\"></a> `database` | `readonly` | `Database` | The database this table belongs to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the table. |",+ "DatabaseTable.addColumn": "### addColumn()\n\n> **addColumn**(`options`): `Promise`\\<`DatabaseColumn`\\>\n\nAdd a column to this table. See `Database.addColumn`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `AddColumnOptions` |\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "DatabaseTable.columns": "### columns()\n\n> **columns**(): `Promise`\\<`DatabaseColumn`[]\\>\n\nThe table's columns, in display order.\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`[]\\>",+ "DatabaseTable.createWebhook": "### createWebhook()\n\n> **createWebhook**(): `Promise`\\<\\{ `token`: `string`; `webhook`: `DatabaseWebhook`; \\}\\>\n\nCreate a webhook that inserts rows here. See `Database.createWebhook`.\n\n#### Returns\n\n`Promise`\\<\\{ `token`: `string`; `webhook`: `DatabaseWebhook`; \\}\\>",+ "DatabaseTable.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this table. See `Database.deleteTable`.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DatabaseTable.detail": "### detail()\n\n> **detail**(): `Promise`\\<`TableDetail`\\>\n\nThe table's record as the API returns it: the table, its columns, and\nits views.\n\n#### Returns\n\n`Promise`\\<`TableDetail`\\>",+ "DatabaseTable.name": "### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe table's display name.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseTable.position": "### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe table's fractional index within the database's tab order.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseTable.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`DatabaseTable`\\>\n\nRename only if the last-read display name is still current.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>",+ "DatabaseTable.reorderColumns": "### reorderColumns()\n\n> **reorderColumns**(`columns`): `Promise`\\<`DatabaseTable`\\>\n\nPersist a new column order. See `Database.reorderColumns`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `columns` | `DatabaseColumn`[] |\n\n#### Returns\n\n`Promise`\\<`DatabaseTable`\\>",+ "DatabaseTable.row": "### row()\n\n> **row**(`id`): `DatabaseRow`\n\nA handle to one of the table's rows, by the id an insert answered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseRow`",+ "DatabaseTable.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `databaseId`: `string`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `databaseId`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `databaseId` | `string` |\n| `id` | `string` |",+ "DatabaseTable.version": "### version()\n\n> **version**(): `Promise`\\<`number`\\>\n\nThe table's current version, bumped by every committed change to its\nschema or rows. Schema edits such as [reorderColumns](#reordercolumns) send it as\nthe base version they were made against, so a table that moved since\nrefuses the edit with a 409.\n\n#### Returns\n\n`Promise`\\<`number`\\>",+ "DatabaseTable.views": "### views()\n\n> **views**(): `Promise`\\<`DatabaseView`[]\\>\n\nThe table's views, in their order.\n\n#### Returns\n\n`Promise`\\<`DatabaseView`[]\\>",+ "DatabaseTable.byId": "### byId()\n\n> `static` **byId**(`database`, `id`): `DatabaseTable`\n\nA handle to a table by id, within a database. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database` | `Database` |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseTable`",+ "DatabaseView": "# Class: DatabaseView\n\nOne view of a `DatabaseTable`: which of its rows to show, in what\norder, drawn as a table or a board.\n\nA view is not an entity of its own — it is owned and shared as part of its\ndatabase. The handle resolves through the database's schema, so a fresh\nread after a write sees the new value. Views are created, changed, and\nreordered with ops; see Database.applyOps.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the view. |\n| <a id=\"property-table\"></a> `table` | `readonly` | `DatabaseTable` | The table this view shows. |",+ "DatabaseView.detail": "### detail()\n\n> **detail**(): `Promise`\\<`storage.DatabaseView`\\>\n\nThe view's record as the API returns it.\n\n#### Returns\n\n`Promise`\\<`storage.DatabaseView`\\>",+ "DatabaseView.layout": "### layout()\n\n> **layout**(): `Promise`\\<`ViewLayout`\\>\n\nHow the view draws its rows: a table, or a board grouped by a column.\n\n#### Returns\n\n`Promise`\\<`ViewLayout`\\>",+ "DatabaseView.name": "### name()\n\n> **name**(): `Promise`\\<`string`\\>\n\nThe view's name, unique among its table's views ignoring case.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseView.position": "### position()\n\n> **position**(): `Promise`\\<`string`\\>\n\nThe view's fractional index within its table's views.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "DatabaseView.positions": "### positions()\n\n> **positions**(): `Promise`\\<`CardPosition`[]\\>\n\nWhere a board's cards sit: each placed card's lane and its key there.\nCards without a place show after the placed ones of their lane, oldest\nfirst.\n\n#### Returns\n\n`Promise`\\<`CardPosition`[]\\>",+ "DatabaseView.query": "### query()\n\n> **query**(): `Promise`\\<`ViewQuery`\\>\n\nWhich rows the view shows, and in what order.\n\n#### Returns\n\n`Promise`\\<`ViewQuery`\\>",+ "DatabaseView.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |",+ "DatabaseView.byId": "### byId()\n\n> `static` **byId**(`table`, `id`): `DatabaseView`\n\nA handle to a view by id, within a table. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `id` | `string` |\n\n#### Returns\n\n`DatabaseView`",+ "DatabaseWebhook": "# Class: DatabaseWebhook\n\nA webhook of a `DatabaseTable`: a secret URL that anyone holding it\ncan POST JSON to, each object becoming a row, written with the access of\nthe user who created it. Its token is shown only when it is created; see\nDatabase.createWebhook.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-createdby\"></a> `createdBy` | `readonly` | `User` | Who created it; its calls write with their access. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Identifier of the webhook. |\n| <a id=\"property-table\"></a> `table` | `readonly` | `DatabaseTable` | The table its calls insert rows into. |\n\n## Accessors\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen it was created.\n\n##### Returns\n\n`string`\n\n***\n\n### tokenPrefix\n\n#### Get Signature\n\n> **get** **tokenPrefix**(): `string`\n\nThe token's first characters, to tell webhooks apart without the secret.\n\n##### Returns\n\n`string`",+ "DatabaseWebhook.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the webhook; its URL stops working.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DatabaseWebhook.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\n#### Returns\n\n\\{ `id`: `string`; `tableId`: `string`; `tokenPrefix`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `tableId` | `string` |\n| `tokenPrefix` | `string` |",+ "DatabaseWebhook.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`table`, `createdBy`, `record`): `DatabaseWebhook`\n\nA handle from the record the API answered.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `DatabaseTable` |\n| `createdBy` | `User` |\n| `record` | `DatabaseWebhookResponse` |\n\n#### Returns\n\n`DatabaseWebhook`",+ "DocumentAnchor": "# Class: DocumentAnchor\n\nA PDF annotation scoped to its document.\n\n## Extends\n\n- `MacroEntity`\\<`Anchor`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-document\"></a> `document` | `readonly` | `Document` | Owning document. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`\"highlight\"` \\| `\"placeable\"`\\> | Annotation kind. | - |\n| <a id=\"property-page\"></a> `page` | `readonly` | () => `Promise`\\<`number`\\> | Page containing the annotation. | - |",+ "DocumentAnchor.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete a standalone highlight annotation.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DocumentAnchor.edit": "### edit()\n\n> **edit**(`options`): `Promise`\\<`void`\\>\n\nEdit a placeable comment's position and display settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<`EditPdfPlaceableCommentAnchorRequest`, `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DocumentAnchor.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `PdfAnchor`; `documentId`: `string`; `id`: `string`; \\}\n\nSerialize identity with its owning resource.\n\n#### Returns\n\n\\{ `detail?`: `PdfAnchor`; `documentId`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `PdfAnchor` |\n| `documentId` | `string` |\n| `id` | `string` |\n\n#### Overrides\n\n`MacroEntity.toJSON`",+ "DocumentAnchor.byId": "### byId()\n\n> `static` **byId**(`client`, `document`, `id`): `DocumentAnchor`\n\nConstruct a document scoped annotation handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | `Document` |\n| `id` | `string` |\n\n#### Returns\n\n`DocumentAnchor`",+ "DocumentAnchor.from": "### from()\n\n> `static` **from**(`client`, `document`, `record`): `DocumentAnchor`\n\nSeed an annotation from a document annotation listing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | `Document` |\n| `record` | `PdfAnchor` |\n\n#### Returns\n\n`DocumentAnchor`",+ "Comment": "# 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`\\<`storage.Message`\\>\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.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. | - |",+ "Comment.author": "### author()\n\n> **author**(): `Promise`\\<`User`\\>\n\nThe user who wrote this comment.\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "Comment.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this comment.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Comment.document": "### document()\n\n> **document**(): `Document`\n\nThe document this comment is on.\n\n#### Returns\n\n`Document`",+ "Comment.edit": "### 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` | Plain text, or a rich body composed with msg. |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>",+ "Comment.reply": "### 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` |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>",+ "Comment.threadId": "### 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`\\>",+ "Comment.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Message`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Message` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Comment.byId": "### 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`",+ "Comment.from": "### 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` | `storage.Message` |\n\n#### Returns\n\n`Comment`",+ "Document": "# 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`\\<`DocumentDetail`\\>\n\n## Extended by\n\n- `Task`\n\n## Implements\n\n- `Mentionable`\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | `...` | Access requests and direct user grants. | - | - |\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.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.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`\\> | `...` | The user who owns the document. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<`Project` \\| `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. | - | - |",+ "Document.anchors": "### anchors()\n\n> **anchors**(): `Promise`\\<`DocumentAnchor`[]\\>\n\nPDF annotations in this document.\n\n#### Returns\n\n`Promise`\\<`DocumentAnchor`[]\\>",+ "Document.branchName": "### branchName()\n\n> **branchName**(): `Promise`\\<`string`\\>\n\nThe git branch name derived for the document (task documents).\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Document.comment": "### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<`Comment`\\>\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` | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\nThe created comment.",+ "Document.comments": "### comments()\n\n> **comments**(): `Promise`\\<`CommentThread`[]\\>\n\nThe document's live comment threads, each with its comments, newest thread first.\n\n#### Returns\n\n`Promise`\\<`CommentThread`[]\\>",+ "Document.content": "### 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`\\>",+ "Document.copy": "### 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`\\>",+ "Document.createHighlight": "### createHighlight()\n\n> **createHighlight**(`options`): `Promise`\\<`DocumentAnchor`\\>\n\nCreate a standalone PDF highlight.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<`PdfHighlightAnchorRequest`, `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<`DocumentAnchor`\\>",+ "Document.delete": "### 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`\\>",+ "Document.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "Document.favorite": "### 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.favorite`",+ "Document.githubPullRequests": "### githubPullRequests()\n\n> **githubPullRequests**(): `Promise`\\<`storage.GithubPullRequest`[]\\>\n\nGitHub pull requests associated with the document.\n\n#### Returns\n\n`Promise`\\<`storage.GithubPullRequest`[]\\>",+ "Document.meetingNotes": "### meetingNotes()\n\n> **meetingNotes**(): `Promise`\\<\\{ `eventTitle`: `string`; `note`: `CalendarNote`; \\}[]\\>\n\nMeeting links visible to the reader. Owners also receive unavailable grants and may unlink them to revoke meeting/team access.\n\n#### Returns\n\n`Promise`\\<\\{ `eventTitle`: `string`; `note`: `CalendarNote`; \\}[]\\>",+ "Document.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "Document.move": "### 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` \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Document.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "Document.permissionsToken": "### permissionsToken()\n\n> **permissionsToken**(): `Promise`\\<`string`\\>\n\nMint a scoped permissions token.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Document.prepareSave": "### prepareSave()\n\n> **prepareSave**(`parts`): `Promise`\\<`PreSaveDocumentResponseData`\\>\n\nPrepare multipart content saving and return the service's upload instructions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `parts` | `SaveBomPart`[] |\n\n#### Returns\n\n`Promise`\\<`PreSaveDocumentResponseData`\\>",+ "Document.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "Document.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "Document.rename": "### 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`\\>",+ "Document.restore": "### restore()\n\n> **restore**(): `Promise`\\<`void`\\>\n\nRestore a soft-deleted document.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Document.save": "### save()\n\n> **save**(`options`): `Promise`\\<`SaveDocumentResponseData`\\>\n\nCommit uploaded content. Does not retry uncertain writes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `SaveDocumentRequest` |\n\n#### Returns\n\n`Promise`\\<`SaveDocumentResponseData`\\>",+ "Document.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "Document.setTeamShare": "### 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`\\>",+ "Document.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Document.shortId": "### 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`\\>",+ "Document.simpleSave": "### simpleSave()\n\n> **simpleSave**(): `Promise`\\<`SaveDocumentResponseData`\\>\n\nCommit a simple document save.\n\n#### Returns\n\n`Promise`\\<`SaveDocumentResponseData`\\>",+ "Document.teamShare": "### teamShare()\n\n> **teamShare**(): `Promise`\\<`DocumentTeamShareResponse`\\>\n\nWhether the document is shared with the owner's team, and which team.\n\n#### Returns\n\n`Promise`\\<`DocumentTeamShareResponse`\\>",+ "Document.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Comment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`Comment`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Comment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "Document.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DocumentMetadataWithContent` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "Document.toMention": "### toMention()\n\n> **toMention**(): `MentionPart`\n\n#### Returns\n\n`MentionPart`\n\n#### Implementation of\n\n`Mentionable.toMention`",+ "Document.unfavorite": "### 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.unfavorite`",+ "Document.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "Document.version": "### version()\n\n> **version**(`version`): `DocumentVersion`\n\nA handle to an immutable version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `version` | `number` |\n\n#### Returns\n\n`DocumentVersion`",+ "Document.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe document's URL in the Macro web app.\n\n#### Returns\n\n`string`",+ "Document.byId": "### 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`",+ "Document.create": "### 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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "Document.createSkill": "### 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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "Document.createSnippet": "### 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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "Document.recent": "### 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`\\>",+ "Document.recentlyDeleted": "### 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`[]\\>",+ "CommentThread": "# 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`[] | The root comment followed by its replies, in order. |\n| <a id=\"property-thread\"></a> `thread` | `ThreadState` | The thread state: root id, resolved flag, owner, anchor, timestamps. |",+ "DocumentNamespace": "# Class: DocumentNamespace",+ "DocumentNamespace.byId": "### byId()\n\n> **byId**(`id`): `Document`\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`",+ "DocumentNamespace.byTeamSlug": "### byTeamSlug()\n\n> **byTeamSlug**(`slug`): `Promise`\\<`Document`\\>\n\nResolve a team task reference such as ENG-42.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `slug` | `string` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "DocumentNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`Document`\\>\n\nCreate a markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: `Project`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "DocumentNamespace.createCanvas": "### createCanvas()\n\n> **createCanvas**(`opts`): `Promise`\\<`Document`\\>\n\nCreate a native Canvas with shared content ready for reading and editing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `project?`: `Project`; \\} |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "DocumentNamespace.createSkill": "### createSkill()\n\n> **createSkill**(`opts`): `Promise`\\<`Document`\\>\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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "DocumentNamespace.createSnippet": "### createSnippet()\n\n> **createSnippet**(`opts`): `Promise`\\<`Document`\\>\n\nCreate a snippet: a reusable markdown document.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: `Project`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "DocumentNamespace.createUpload": "### createUpload()\n\n> **createUpload**(`options`): `Promise`\\<\\{ `content`: `DocumentContent`; `contentType`: `string`; `document`: `Document`; `uploadUrl`: `string` \\| `undefined`; \\}\\>\n\nReserve a binary document and return upload instructions. Upload content before saving.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `attachment?`: `EmailAttachment`; `branchedFrom?`: `Document`; `fileType?`: `string`; `isTask?`: `boolean`; `mimeType?`: `string`; `name`: `string`; `project?`: `Project`; `sha`: `string`; `team?`: `Team`; \\} |\n| `options.attachment?` | `EmailAttachment` |\n| `options.branchedFrom?` | `Document` |\n| `options.fileType?` | `string` |\n| `options.isTask?` | `boolean` |\n| `options.mimeType?` | `string` |\n| `options.name` | `string` |\n| `options.project?` | `Project` |\n| `options.sha` | `string` |\n| `options.team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<\\{ `content`: `DocumentContent`; `contentType`: `string`; `document`: `Document`; `uploadUrl`: `string` \\| `undefined`; \\}\\>",+ "DocumentNamespace.recent": "### recent()\n\n> **recent**(`opts?`): `AsyncGenerator`\\<`Document`\\>\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`\\>",+ "DocumentNamespace.recentlyDeleted": "### recentlyDeleted()\n\n> **recentlyDeleted**(): `Promise`\\<`Document`[]\\>\n\nThe user's recently soft-deleted documents.\n\n#### Returns\n\n`Promise`\\<`Document`[]\\>",+ "DocumentNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`Document`\\>\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` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Document`\\>",+ "DocumentNamespace.systemSkills": "### systemSkills()\n\n> **systemSkills**(): `Promise`\\<`SystemSkill`[]\\>\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`[]\\>",+ "DocumentNamespace.validatePermissionsToken": "### validatePermissionsToken()\n\n> **validatePermissionsToken**(`token`): `Promise`\\<\\{ `accessLevel`: `storage.AccessLevel`; `document`: `Document`; `expiresAt`: `number`; `issuer`: `string`; `user`: `User` \\| `undefined`; \\}\\>\n\nValidate a permissions token, returning its document and optional user handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: `storage.AccessLevel`; `document`: `Document`; `expiresAt`: `number`; `issuer`: `string`; `user`: `User` \\| `undefined`; \\}\\>",+ "SystemSkill": "# 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. |",+ "SystemSkill.list": "### 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`[]\\>",+ "DocumentVersion": "# Class: DocumentVersion\n\nAn immutable document version, scoped to its document.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-document\"></a> `document` | `readonly` | `Document` | Parent document. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `number` | Version number. |",+ "DocumentVersion.read": "### read()\n\n> **read**(): `Promise`\\<`GetDocumentResponseData`\\>\n\nVersion metadata and the caller's access.\n\n#### Returns\n\n`Promise`\\<`GetDocumentResponseData`\\>",+ "DocumentVersion.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `documentId`: `string`; `id`: `number`; \\}\n\nSerialize only scoped identity.\n\n#### Returns\n\n\\{ `documentId`: `string`; `id`: `number`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `documentId` | `string` |\n| `id` | `number` |",+ "DocumentVersion.byId": "### byId()\n\n> `static` **byId**(`client`, `document`, `id`): `DocumentVersion`\n\nConstruct a version handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `document` | `Document` |\n| `id` | `number` |\n\n#### Returns\n\n`DocumentVersion`",+ "EmailAttachment": "# Class: EmailAttachment\n\nA file attached to an email message. A thin handle keyed by attachment id;\nthe record loads lazily on first field access.\n\n## Extends\n\n- `MacroEntity`\\<`EmailAttachmentData`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-contentid\"></a> `contentId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's Content-ID header value (for inline attachments). | - |\n| <a id=\"property-dataurl\"></a> `dataUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | A URL to the attachment's raw data, when available. | - |\n| <a id=\"property-filename\"></a> `filename` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's original filename. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-mimetype\"></a> `mimeType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's MIME type. | - |\n| <a id=\"property-sfsid\"></a> `sfsId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The attachment's static-file-service id, when it has been stored there. | - |\n| <a id=\"property-size\"></a> `size` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | The attachment's size in bytes. | - |",+ "EmailAttachment.toDocument": "### toDocument()\n\n> **toDocument**(): `Promise`\\<`Document`\\>\n\nThe Macro document holding this attachment's content. Get-or-create: the\nserver returns the existing document's id, or downloads the attachment\nfrom the provider and uploads it as a new document first (deduplicated\nbehind a server-side lock).\n\n#### Returns\n\n`Promise`\\<`Document`\\>",+ "EmailAttachment.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Attachment`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Attachment`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Attachment` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "EmailAttachment.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `EmailAttachment`\n\nA handle to an attachment by id. Fields load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailAttachment`",+ "EmailAttachment.from": "### from()\n\n> `static` **from**(`client`, `data`): `EmailAttachment`\n\nBuild an attachment from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | `Attachment` |\n\n#### Returns\n\n`EmailAttachment`",+ "EmailAttachmentData": "# Type Alias: EmailAttachmentData\n\n> **EmailAttachmentData** = `GetAttachmentResponses`\\[`200`\\]\\[`\"attachment\"`\\]\n\nThe API's representation of an email attachment (`Attachment`).",+ "DraftAttachment": "# Class: DraftAttachment\n\nAn uploaded or forwarded attachment belonging to a draft.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-draft\"></a> `draft` | `readonly` | `EmailDraft` | Parent draft. |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | `number` | Draft generation captured when the attachment was reserved. |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | `boolean` | Whether this attachment was forwarded. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Attachment identity. |",+ "DraftAttachment.complete": "### complete()\n\n> **complete**(): `Promise`\\<`void`\\>\n\nComplete verification after uploading the file.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DraftAttachment.remove": "### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nRemove this attachment from its draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "DraftAttachment.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\nSerialize identity without credentials.\n\n#### Returns\n\n\\{ `draftGeneration`: `number`; `draftId`: `string`; `forwarded`: `boolean`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `draftGeneration` | `number` |\n| `draftId` | `string` |\n| `forwarded` | `boolean` |\n| `id` | `string` |",+ "DraftAttachment.byId": "### byId()\n\n> `static` **byId**(`_client`, `draft`, `id`, `forwarded?`, `draftGeneration?`): `DraftAttachment`\n\nConstruct a draft scoped attachment handle.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `_client` | `MacroClient` | `undefined` |\n| `draft` | `EmailDraft` | `undefined` |\n| `id` | `string` | `undefined` |\n| `forwarded?` | `boolean` | `false` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`DraftAttachment`",+ "EmailDraft": "# Class: EmailDraft\n\nA draft email. Sending remains an explicit separate operation.\n\n## Extends\n\n- `EmailMessage`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The Bcc recipients. | `EmailMessage.bcc` |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | `EmailMessage.body` |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The Cc recipients. | `EmailMessage.cc` |\n| <a id=\"property-draftgeneration\"></a> `draftGeneration` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | Edit generation to capture with content before saving or transferring it. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<`ContactInfo` \\| `undefined`\\> | The sender. | `EmailMessage.from` |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `EmailMessage.id` |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<`LabelInfo`[]\\> | Labels on this message. | `EmailMessage.labels` |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<`Link`\\> | The inbox (email link) this message belongs to. | `EmailMessage.link` |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | `EmailMessage.sentAt` |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | `EmailMessage.subject` |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The To recipients. | `EmailMessage.to` |",+ "EmailDraft.addAttachment": "### addAttachment()\n\n> **addAttachment**(`options`): `Promise`\\<\\{ `attachment`: `DraftAttachment`; `contentType`: `string`; `uploadUrl`: `string`; \\}\\>\n\nReserve an attachment upload. Upload to the returned URL, then call complete().\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `fileName`: `string`; `sha`: `string`; `size`: `number`; `uploadId?`: `string`; \\} |\n| `options.fileName` | `string` |\n| `options.sha` | `string` |\n| `options.size` | `number` |\n| `options.uploadId?` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `attachment`: `DraftAttachment`; `contentType`: `string`; `uploadUrl`: `string`; \\}\\>",+ "EmailDraft.addLabel": "### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`EmailMessage.addLabel`",+ "EmailDraft.completeDraftAttachment": "### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`EmailMessage.completeDraftAttachment`",+ "EmailDraft.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the draft.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.forwardAttachment": "### forwardAttachment()\n\n> **forwardAttachment**(`attachment`): `Promise`\\<`DraftAttachment`\\>\n\nForward an existing attachment into this draft.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | `EmailAttachment` |\n\n#### Returns\n\n`Promise`\\<`DraftAttachment`\\>",+ "EmailDraft.operationStatus": "### operationStatus()\n\n> **operationStatus**(): `Promise`\\<`MessageOperationResponse`\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<`MessageOperationResponse`\\>\n\n#### Inherited from\n\n`EmailMessage.operationStatus`",+ "EmailDraft.removeAttachment": "### removeAttachment()\n\n> **removeAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nRemove a draft attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | `DraftAttachment` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.removeLabel": "### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`EmailMessage.removeLabel`",+ "EmailDraft.resolveOperation": "### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `ResolveMessageOperationRequest` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`EmailMessage.resolveOperation`",+ "EmailDraft.schedule": "### schedule()\n\n> **schedule**(`sendTime`, `options?`): `Promise`\\<`void`\\>\n\nSchedule this draft for sending.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sendTime` | `string` |\n| `options?` | \\{ `includeSignature?`: `boolean`; \\} |\n| `options.includeSignature?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.thread": "### thread()\n\n> **thread**(): `Promise`\\<`EmailThread`\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n`EmailMessage.thread`",+ "EmailDraft.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ParsedMessage`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ParsedMessage`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ParsedMessage` |\n| `id` | `string` |\n\n#### Inherited from\n\n`EmailMessage.toJSON`",+ "EmailDraft.transferDraft": "### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<`TransferDraftResponse`\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `TransferDraftRequest` |\n\n#### Returns\n\n`Promise`\\<`TransferDraftResponse`\\>\n\n#### Inherited from\n\n`EmailMessage.transferDraft`",+ "EmailDraft.unschedule": "### unschedule()\n\n> **unschedule**(): `Promise`\\<`void`\\>\n\nRemove a scheduled send.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace draft content without changing its identity or sending it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `DraftOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.verifyAttachment": "### verifyAttachment()\n\n> **verifyAttachment**(`attachment`): `Promise`\\<`void`\\>\n\nComplete verification of an uploaded attachment.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `attachment` | `DraftAttachment` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailDraft.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `EmailDraft`\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EmailDraft`\n\n#### Overrides\n\n`EmailMessage.byId`",+ "EmailDraft.from": "### from()\n\n> `static` **from**(`client`, `data`): `EmailMessage`\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | `ParsedMessage` |\n\n#### Returns\n\n`EmailMessage`\n\n#### Inherited from\n\n`EmailMessage.from`",+ "EmailDraft.send": "### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | `SendEmailOptions` |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>\n\n#### Inherited from\n\n`EmailMessage.send`",+ "draftBody": "# Function: draftBody()\n\n> **draftBody**(`options`): `ApiDraftInput`\n\nTranslate draft content to the generated contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `DraftOptions` |\n\n## Returns\n\n`ApiDraftInput`",+ "DraftOptions": "# Type Alias: DraftOptions\n\n> **DraftOptions** = `Omit`\\<`ApiDraftInput`, `\"db_id\"` \\| `\"provider_id\"` \\| `\"provider_thread_id\"` \\| `\"replying_to_id\"` \\| `\"thread_db_id\"` \\| `\"body_text\"` \\| `\"body_html\"` \\| `\"body_macro\"` \\| `\"headers_json\"` \\| `\"include_signature\"` \\| `\"draft_generation\"`\\> & \\{ `bodyHtml?`: `string`; `bodyMacro?`: `string`; `bodyText?`: `string`; `draftGeneration?`: `number`; `headers?`: `ApiDraftInput`\\[`\"headers_json\"`\\]; `includeSignature?`: `boolean`; `replyingTo?`: `EmailMessage`; `thread?`: `EmailThread`; \\}\n\nDraft content; relationships use message and thread handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `bodyHtml?` | `string` | HTML body. |\n| `bodyMacro?` | `string` | Macro body. |\n| `bodyText?` | `string` | Plain text body. |\n| `draftGeneration?` | `number` | Generation captured when editing began; defaults to the loaded draft. |\n| `headers?` | `ApiDraftInput`\\[`\"headers_json\"`\\] | Extra headers. |\n| `includeSignature?` | `boolean` | Include the inbox signature. |\n| `replyingTo?` | `EmailMessage` | Message being replied to. |\n| `thread?` | `EmailThread` | Thread receiving this draft. |",+ "EmailFilter": "# Class: EmailFilter\n\nAn importance filter matched by sender address or domain.\n\n## Extends\n\n- `MacroEntity`\\<`ApiEmailFilter`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched address. | - |\n| <a id=\"property-emaildomain\"></a> `emailDomain` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Matched domain. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-isimportant\"></a> `isImportant` | `readonly` | () => `Promise`\\<`boolean`\\> | Importance assigned by this filter. | - |",+ "EmailFilter.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this filter.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailFilter.setImportant": "### setImportant()\n\n> **setImportant**(`isImportant`): `Promise`\\<`void`\\>\n\nChange the importance for the same sender selector.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `isImportant` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailFilter.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ApiEmailFilter`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ApiEmailFilter`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiEmailFilter` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "EmailFilter.byId": "### byId()\n\n> `static` **byId**(`client`, `id`, `inbox?`): `EmailFilter`\n\nConstruct a lazy filter handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `inbox?` | `Link` |\n\n#### Returns\n\n`EmailFilter`",+ "EmailFilter.from": "### from()\n\n> `static` **from**(`client`, `record`, `inbox?`): `EmailFilter`\n\nSeed from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `ApiEmailFilter` |\n| `inbox?` | `Link` |\n\n#### Returns\n\n`EmailFilter`",+ "EmailFilterOptions": "# Interface: EmailFilterOptions\n\nSender importance rule.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress?` | `string` | Match an address. |\n| <a id=\"property-emaildomain\"></a> `emailDomain?` | `string` | Match a domain. |\n| <a id=\"property-isimportant\"></a> `isImportant` | `boolean` | Whether matches are important. |",+ "Label": "# Class: Label\n\nAn email label. A free-to-construct handle: there is no single-label GET,\nso the detail record loads lazily on first field access by listing all\nlabels and finding this one (mirroring Link).\n\n## Extends\n\n- `MacroEntity`\\<`ApiLabel`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the label was created. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-labellistvisibility\"></a> `labelListVisibility` | `readonly` | () => `Promise`\\<`ApiLabelListVisibility`\\> | Whether the label is shown in the label list. | - |\n| <a id=\"property-linkid\"></a> `linkId` | `readonly` | () => `Promise`\\<`string`\\> | The inbox (email link) this label belongs to. | - |\n| <a id=\"property-messagelistvisibility\"></a> `messageListVisibility` | `readonly` | () => `Promise`\\<`ApiMessageListVisibility`\\> | Whether the label is shown in the message list. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The label's display name. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<`ApiLabelType`\\> | Whether this is a system label or a user-created one. | - |",+ "Label.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this label.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Label.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ApiLabel`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ApiLabel`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiLabel` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Label.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Label`\n\nA handle to a label 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`Label`",+ "Label.create": "### create()\n\n> `static` **create**(`client`, `name`): `Promise`\\<`Label`\\>\n\nCreate a user label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Label`\\>",+ "Label.list": "### list()\n\n> `static` **list**(`client`): `Promise`\\<`Label`[]\\>\n\nAll labels across the user's inboxes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Label`[]\\>",+ "Link": "# Class: Link\n\nAn email link: a connected inbox (e.g. Gmail or Outlook) that threads and\nmessages sync through. A free-to-construct handle, resolved from the\ncaller's connected links.\n\n## Extends\n\n- `MacroEntity`\\<`email.Link`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | The inbox's email address. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-isprimary\"></a> `isPrimary` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether this is the user's primary inbox. | - |\n| <a id=\"property-issyncactive\"></a> `isSyncActive` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether syncing is currently active for this inbox. | - |\n| <a id=\"property-needsreauth\"></a> `needsReauth` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the inbox needs to be re-authenticated. | - |\n| <a id=\"property-photourl\"></a> `photoUrl` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The inbox's avatar URL, if any. | - |\n| <a id=\"property-provider\"></a> `provider` | `readonly` | () => `Promise`\\<`UserProvider`\\> | The email provider (e.g. `GMAIL` or `OUTLOOK`). | - |\n| <a id=\"property-syncstatus\"></a> `syncStatus` | `readonly` | () => `Promise`\\<`SyncStatus`\\> | The inbox's sync status. | - |",+ "Link.settingsOperations": "### settingsOperations()\n\n> **settingsOperations**(): `Promise`\\<`MailboxSettingsOperation`[]\\>\n\nRead category and sender-policy changes for this inbox.\n\n#### Returns\n\n`Promise`\\<`MailboxSettingsOperation`[]\\>",+ "Link.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `email.Link`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `email.Link`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `email.Link` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Link.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Link`\n\nA handle to an email link 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`Link`",+ "Link.list": "### list()\n\n> `static` **list**(`client`): `Promise`\\<`Link`[]\\>\n\nThe caller's connected email links.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Link`[]\\>",+ "EmailMessage": "# Class: EmailMessage\n\nA message in an email thread. A thin handle keyed by message id; the\nrecord loads lazily on first field access.\n\n## Extends\n\n- `MacroEntity`\\<`EmailMessageData`\\>\n\n## Extended by\n\n- `EmailDraft`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The Bcc recipients. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The parsed message body, as the API returns it. | - |\n| <a id=\"property-cc\"></a> `cc` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The Cc recipients. | - |\n| <a id=\"property-from\"></a> `from` | `readonly` | () => `Promise`\\<`ContactInfo` \\| `undefined`\\> | The sender. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-labels\"></a> `labels` | `readonly` | () => `Promise`\\<`LabelInfo`[]\\> | Labels on this message. | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<`Link`\\> | The inbox (email link) this message belongs to. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The provider-internal date of the message. | - |\n| <a id=\"property-subject\"></a> `subject` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The message's subject line. | - |\n| <a id=\"property-to\"></a> `to` | `readonly` | () => `Promise`\\<`ContactInfo`[]\\> | The To recipients. | - |",+ "EmailMessage.addLabel": "### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailMessage.completeDraftAttachment": "### completeDraftAttachment()\n\n> **completeDraftAttachment**(`attachmentId`, `draftGeneration?`): `Promise`\\<`void`\\>\n\nVerify an uploaded attachment using the draft generation captured when its upload began.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `attachmentId` | `string` | `undefined` |\n| `draftGeneration?` | `number` | `0` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailMessage.operationStatus": "### operationStatus()\n\n> **operationStatus**(): `Promise`\\<`MessageOperationResponse`\\>\n\nRead the draft's durable send, upload, or conflict status without retrying it.\n\n#### Returns\n\n`Promise`\\<`MessageOperationResponse`\\>",+ "EmailMessage.removeLabel": "### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from this message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailMessage.resolveOperation": "### resolveOperation()\n\n> **resolveOperation**(`request`): `Promise`\\<`void`\\>\n\nResolve the displayed operation revision after the user chooses an action.\nRetrying an uncertain send requires explicit duplicate-risk acceptance.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `ResolveMessageOperationRequest` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailMessage.thread": "### thread()\n\n> **thread**(): `Promise`\\<`EmailThread`\\>\n\nThe thread this message belongs to.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>",+ "EmailMessage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ParsedMessage`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ParsedMessage`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ParsedMessage` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "EmailMessage.transferDraft": "### transferDraft()\n\n> **transferDraft**(`request`): `Promise`\\<`TransferDraftResponse`\\>\n\nMove a draft to another inbox using a caller-persisted operation UUID.\nContinue editing the returned message_id; the original identity is retired.\nOn an interrupted response, use email.recoverDraftTransfer(operation_id).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `TransferDraftRequest` |\n\n#### Returns\n\n`Promise`\\<`TransferDraftResponse`\\>",+ "EmailMessage.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `EmailMessage`\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| `id` | `string` |\n\n#### Returns\n\n`EmailMessage`",+ "EmailMessage.from": "### from()\n\n> `static` **from**(`client`, `data`): `EmailMessage`\n\nBuild a message from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | `ParsedMessage` |\n\n#### Returns\n\n`EmailMessage`",+ "EmailMessage.send": "### send()\n\n> `static` **send**(`client`, `opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | `SendEmailOptions` |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>",+ "SendEmailOptions": "# Interface: SendEmailOptions\n\nOptions for sending a fresh email message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | `ApiDraftContactInfo`[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | `ApiDraftContactInfo`[] | Cc recipients. |\n| <a id=\"property-subject\"></a> `subject` | `string` | Subject line. |\n| <a id=\"property-to\"></a> `to` | `ApiDraftContactInfo`[] | Recipients. |",+ "EmailMessageData": "# Type Alias: EmailMessageData\n\n> **EmailMessageData** = `GetMessageResponses`\\[`200`\\]\n\nThe API's representation of an email message (`ParsedMessage`).",+ "EmailNamespace": "# Class: EmailNamespace",+ "EmailNamespace.archive": "### archive()\n\n> **archive**(`threads`, `archived?`): `Promise`\\<`EmailThread`[]\\>\n\nArchive many threads (or unarchive with `false`). Resolves to the threads\nwhose state could not change.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `threads` | `EmailThread`[] | `undefined` |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`EmailThread`[]\\>",+ "EmailNamespace.attachment": "### attachment()\n\n> **attachment**(`id`): `EmailAttachment`\n\nA handle to an email attachment by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`EmailAttachment`",+ "EmailNamespace.blockedSenders": "### blockedSenders()\n\n> **blockedSenders**(): `Promise`\\<`string`[]\\>\n\nThe email addresses currently blocked.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>",+ "EmailNamespace.blockSender": "### blockSender()\n\n> **blockSender**(`email`): `Promise`\\<`void`\\>\n\nBlock an email sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailNamespace.byId": "### byId()\n\n> **byId**(`id`): `EmailThread`\n\nA handle to an email thread by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`EmailThread`",+ "EmailNamespace.connectionProviders": "### connectionProviders()\n\n> **connectionProviders**(): `Promise`\\<`EmailConnectionProviders`\\>\n\nProviders the server currently permits this caller to connect.\n\n#### Returns\n\n`Promise`\\<`EmailConnectionProviders`\\>",+ "EmailNamespace.contacts": "### contacts()\n\n> **contacts**(): `Promise`\\<\\{\\[`key`: `string`\\]: `ContactInfoWithInteraction`[]; \\}\\>\n\nAddress book contacts grouped by the service's interaction buckets.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: `ContactInfoWithInteraction`[]; \\}\\>",+ "EmailNamespace.createDraft": "### createDraft()\n\n> **createDraft**(`options`, `inbox?`): `Promise`\\<`EmailDraft`\\>\n\nCreate a draft without sending it; the inbox defaults to the caller's primary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `DraftOptions` |\n| `inbox?` | `Link` |\n\n#### Returns\n\n`Promise`\\<`EmailDraft`\\>",+ "EmailNamespace.createLabel": "### createLabel()\n\n> **createLabel**(`name`): `Promise`\\<`Label`\\>\n\nCreate a user label. Returns the created label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`Label`\\>",+ "EmailNamespace.deleteLabel": "### deleteLabel()\n\n> **deleteLabel**(`label`): `Promise`\\<`void`\\>\n\nDelete a label.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailNamespace.draftById": "### draftById()\n\n> **draftById**(`id`): `EmailDraft`\n\nConstruct a lazy draft handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`EmailDraft`",+ "EmailNamespace.filters": "### filters()\n\n> **filters**(`inbox?`): `Promise`\\<`EmailFilter`[]\\>\n\nImportance filters.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `inbox?` | `Link` |\n\n#### Returns\n\n`Promise`\\<`EmailFilter`[]\\>",+ "EmailNamespace.inbox": "### inbox()\n\n> **inbox**(`opts?`): `AsyncGenerator`\\<`EmailThread`\\>\n\nThe threads in the inbox, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | `InboxOptions` |\n\n#### Returns\n\n`AsyncGenerator`\\<`EmailThread`\\>",+ "EmailNamespace.label": "### label()\n\n> **label**(`id`): `Label`\n\nA handle to a label by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Label`",+ "EmailNamespace.labels": "### labels()\n\n> **labels**(): `Promise`\\<`Label`[]\\>\n\nAll labels across the user's inboxes.\n\n#### Returns\n\n`Promise`\\<`Label`[]\\>",+ "EmailNamespace.link": "### link()\n\n> **link**(`id`): `Link`\n\nA handle to a connected inbox (email link) by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Link`",+ "EmailNamespace.links": "### links()\n\n> **links**(): `Promise`\\<`Link`[]\\>\n\nThe caller's connected inboxes (email links).\n\n#### Returns\n\n`Promise`\\<`Link`[]\\>",+ "EmailNamespace.message": "### message()\n\n> **message**(`id`): `EmailMessage`\n\nA handle to an email message by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`EmailMessage`",+ "EmailNamespace.recoverDraftTransfer": "### recoverDraftTransfer()\n\n> **recoverDraftTransfer**(`operationId`): `Promise`\\<`TransferRecoveryResponse`\\>\n\nRecover a draft move using its original operation UUID; never starts a new move.\nAn empty committed result fences the old move so it cannot commit later.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `operationId` | `string` |\n\n#### Returns\n\n`Promise`\\<`TransferRecoveryResponse`\\>",+ "EmailNamespace.reminders": "### reminders()\n\n> **reminders**(`options?`): `AsyncGenerator`\\<\\{ `followup`: `EmailFollowup`; `thread`: `EmailThread`; \\}, `any`, `any`\\>\n\nFollow-up reminders with thread handles, automatically paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | `Omit`\\<\\{ `attachments?`: `string`[] \\| `null`; `calendar?`: `boolean` \\| `null`; `cursor?`: `string` \\| `null`; `done?`: `boolean` \\| `null`; `inboxIds?`: `string`[] \\| `null`; `limit?`: `number` \\| `null`; `noInboxes?`: `boolean` \\| `null`; `read?`: `boolean` \\| `null`; `tags?`: `string`[] \\| `null`; \\}, `\"cursor\"` \\| `\"inboxIds\"`\\> & \\{ `inboxes?`: `Link`[]; \\} |\n\n#### Returns\n\n`AsyncGenerator`\\<\\{ `followup`: `EmailFollowup`; `thread`: `EmailThread`; \\}, `any`, `any`\\>",+ "EmailNamespace.scheduled": "### scheduled()\n\n> **scheduled**(`options?`): `AsyncGenerator`\\<`EmailDraft`\\>\n\nScheduled drafts, fetched lazily in bounded pages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `inbox?`: `Link`; `pageSize?`: `number`; \\} |\n| `options.inbox?` | `Link` |\n| `options.pageSize?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<`EmailDraft`\\>",+ "EmailNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`EmailThread`\\>\n\nSearch email threads by subject and content.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | `SearchOpts` |\n\n#### Returns\n\n`AsyncGenerator`\\<`EmailThread`\\>",+ "EmailNamespace.send": "### send()\n\n> **send**(`opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a new email message.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `SendEmailOptions` |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>",+ "EmailNamespace.unblockSender": "### unblockSender()\n\n> **unblockSender**(`email`): `Promise`\\<`void`\\>\n\nUnblock a previously blocked sender.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailNamespace.upsertFilter": "### upsertFilter()\n\n> **upsertFilter**(`options`, `inbox?`): `Promise`\\<`EmailFilter`\\>\n\nCreate or replace a filter matching an address or domain.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `EmailFilterOptions` |\n| `inbox?` | `Link` |\n\n#### Returns\n\n`Promise`\\<`EmailFilter`\\>",+ "InboxOptions": "# Interface: InboxOptions\n\nOptions for listing inbox threads.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` | Page size (default 20, max 500). |\n| <a id=\"property-sort\"></a> `sort?` | `ApiSortMethod` | Sort order. Defaults to `viewed_updated`. |",+ "EmailThread": "# Class: EmailThread\n\nAn email thread. A free-to-construct handle: the detail record (including\nup to the first 100 messages) loads lazily on first field access.\n\n## Extends\n\n- `PropertiedEntity`\\<`ThreadDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<`email.AccessLevel`\\> | `...` | The viewer's access level to this thread. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was created. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"email_thread\"` | `'email_thread'` | Favorites identify email threads as `email_thread`. | `PropertiedEntity.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `PropertiedEntity.id` |\n| <a id=\"property-inboxvisible\"></a> `inboxVisible` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread is visible in the inbox (i.e. not archived). | - | - |\n| <a id=\"property-isread\"></a> `isRead` | `readonly` | () => `Promise`\\<`boolean`\\> | `...` | Whether the thread has been read. | - | - |\n| <a id=\"property-latestinboundat\"></a> `latestInboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest inbound message, if any. | - | - |\n| <a id=\"property-latestnonspamat\"></a> `latestNonSpamAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest non-spam message, if any. | - | - |\n| <a id=\"property-latestoutboundat\"></a> `latestOutboundAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | Timestamp of the latest outbound message, if any. | - | - |\n| <a id=\"property-link\"></a> `link` | `readonly` | () => `Promise`\\<`Link`\\> | `...` | The inbox (email link) that owns this thread. | - | - |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<`Project` \\| `undefined`\\> | `...` | The project this thread is attached to, if any. | - | - |\n| <a id=\"property-providerid\"></a> `providerId` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The provider-internal thread id (e.g. Gmail/Outlook), if any. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the thread was last updated. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`EmailThread`\\> | `...` | Search email threads by subject and content, most relevant first, auto-paginated. | - | - |",+ "EmailThread.addEventToCalendar": "### addEventToCalendar()\n\n> **addEventToCalendar**(`message`, `invitation`, `options?`): `Promise`\\<`CalendarEvent`\\>\n\nAdd a shared event one of this thread's messages carries (a published\n`.ics`, such as one sent with Forward by email) to one of the\nrequester's Google calendars, and return a handle to the synced\nsnapshot. The event is read from the saved message, never from the\ncaller, and lands the way `CalendarEvent.addToCalendar` adds a\nchannel-shared one: the meeting's iCalendar UID and organizer, only the\nrequester as a guest, no join link, nobody notified. Refused with\n`invalid_input` for an invitation, which is answered from the calendar\ninstead, `already_on_calendar` when the meeting is already on one of\ntheir calendars, whichever calendar is named (it cannot be added to\nanother of theirs either), and `copy_refused` when Google will not\nimport it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | `EmailMessage` |\n| `invitation` | `CalendarInvitation` |\n| `options?` | \\{ `calendar?`: `Calendar`; \\} |\n| `options.calendar?` | `Calendar` |\n\n#### Returns\n\n`Promise`\\<`CalendarEvent`\\>",+ "EmailThread.addLabel": "### addLabel()\n\n> **addLabel**(`label`): `Promise`\\<`void`\\>\n\nAdd a label to every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.archive": "### archive()\n\n> **archive**(`archived?`): `Promise`\\<`void`\\>\n\nArchive the thread (or unarchive with `false`).\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.attachments": "### attachments()\n\n> **attachments**(): `Promise`\\<`EmailAttachment`[]\\>\n\nThe attachments across this thread's first 100 messages, pre-seeded from the thread detail.\n\n#### Returns\n\n`Promise`\\<`EmailAttachment`[]\\>",+ "EmailThread.calendarInvitations": "### calendarInvitations()\n\n> **calendarInvitations**(): `Promise`\\<\\{\\[`key`: `string`\\]: `InvitationResolution`; \\}\\>\n\nCalendar invitations resolved from this thread's messages.\n\n#### Returns\n\n`Promise`\\<\\{\\[`key`: `string`\\]: `InvitationResolution`; \\}\\>",+ "EmailThread.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "EmailThread.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`EmailThread`\\>\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`\\<`EmailThread`\\>\n\n#### Inherited from\n\n`PropertiedEntity.favorite`",+ "EmailThread.followup": "### followup()\n\n> **followup**(): `Promise`\\<`EmailFollowupResponse`\\>\n\nRead follow-up state for this thread.\n\n#### Returns\n\n`Promise`\\<`EmailFollowupResponse`\\>",+ "EmailThread.markSeen": "### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the thread as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.messages": "### messages()\n\n> **messages**(`opts?`): `Promise`\\<`EmailMessage`[]\\>\n\nThe messages in this thread, pre-seeded from the list endpoint.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `limit?`: `number`; `since?`: `string`; \\} |\n| `opts.limit?` | `number` |\n| `opts.since?` | `string` |\n\n#### Returns\n\n`Promise`\\<`EmailMessage`[]\\>",+ "EmailThread.moveToProject": "### moveToProject()\n\n> **moveToProject**(`project`): `Promise`\\<`void`\\>\n\nAttach the thread to a project, or clear the project with `null`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `project` | `Project` \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.operations": "### operations()\n\n> **operations**(): `Promise`\\<`MailboxOperation`[]\\>\n\nRead pending or failed mailbox changes without initiating a retry.\n\n#### Returns\n\n`Promise`\\<`MailboxOperation`[]\\>",+ "EmailThread.participants": "### participants()\n\n> **participants**(): `Promise`\\<`ApiContactInfo`[]\\>\n\nEveryone on the thread (senders and recipients), deduped by email.\nDerived from the thread's first 100 messages.\n\n#### Returns\n\n`Promise`\\<`ApiContactInfo`[]\\>",+ "EmailThread.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "EmailThread.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "EmailThread.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "EmailThread.removeLabel": "### removeLabel()\n\n> **removeLabel**(`label`): `Promise`\\<`void`\\>\n\nRemove a label from every message in the thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `label` | `Label` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.reply": "### reply()\n\n> **reply**(`opts`): `Promise`\\<`EmailMessage` \\| `undefined`\\>\n\nSend a reply within this thread. Returns a handle when the API reports the created message's id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `ReplyEmailOptions` |\n\n#### Returns\n\n`Promise`\\<`EmailMessage` \\| `undefined`\\>",+ "EmailThread.setFollowup": "### setFollowup()\n\n> **setFollowup**(`command`): `Promise`\\<`EmailFollowup`\\>\n\nSet or remove a follow-up using a persisted operation id and revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `command` | `EmailFollowupCommand` |\n\n#### Returns\n\n`Promise`\\<`EmailFollowup`\\>",+ "EmailThread.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "EmailThread.subject": "### subject()\n\n> **subject**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe thread's subject, from its first message with one.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>",+ "EmailThread.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ApiThread`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ApiThread`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiThread` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "EmailThread.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`EmailThread`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`EmailThread`\\>\n\n#### Inherited from\n\n`PropertiedEntity.unfavorite`",+ "EmailThread.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nChange project membership or share permissions for this thread.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `project?`: `Project` \\| `null`; `sharePermission?`: `SharePermissionOptions`; \\} |\n| `options.project?` | `Project` \\| `null` |\n| `options.sharePermission?` | `SharePermissionOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "EmailThread.updateState": "### updateState()\n\n> **updateState**(`request`): `Promise`\\<`void`\\>\n\nUpdate provider-neutral read, trash, spam, or star state.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `UpdateThreadStateRequest` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EmailThread.archiveMany": "### archiveMany()\n\n> `static` **archiveMany**(`client`, `threads`, `archived?`): `Promise`\\<`EmailThread`[]\\>\n\nArchive many threads (or unarchive with `false`), sending one request per\n100 threads. Resolves to the threads whose state could not change.\n\n#### Parameters\n\n| Parameter | Type | Default value |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | `undefined` |\n| `threads` | `EmailThread`[] | `undefined` |\n| `archived?` | `boolean` | `true` |\n\n#### Returns\n\n`Promise`\\<`EmailThread`[]\\>",+ "EmailThread.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `EmailThread`\n\nA handle to a thread 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`EmailThread`",+ "ReplyEmailOptions": "# Interface: ReplyEmailOptions\n\nOptions for replying within an email thread.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-bcc\"></a> `bcc?` | `ApiDraftContactInfo`[] | Bcc recipients. |\n| <a id=\"property-bodytext\"></a> `bodyText` | `string` | Plain-text body. |\n| <a id=\"property-cc\"></a> `cc?` | `ApiDraftContactInfo`[] | Cc recipients. |\n| <a id=\"property-replyingto\"></a> `replyingTo?` | `EmailMessage` | The message being replied to. |\n| <a id=\"property-subject\"></a> `subject?` | `string` | Subject line. Defaults to the subject of the thread's first message. |\n| <a id=\"property-to\"></a> `to` | `ApiDraftContactInfo`[] | Recipients. |",+ "EntityMention": "# Class: EntityMention\n\nA stored mention connecting two resources.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Mention identity. |",+ "EntityMention.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRemove this mention.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EntityMention.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize identity only.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |",+ "EntityMention.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `EntityMention`\n\nConstruct a mention handle for removal.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`EntityMention`",+ "EntityMentionNamespace": "# Class: EntityMentionNamespace\n\nStored entity mention relationships.",+ "EntityMentionNamespace.byId": "### byId()\n\n> **byId**(`id`): `EntityMention`\n\nConstruct a stored mention handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`EntityMention`",+ "EntityMentionNamespace.create": "### create()\n\n> **create**(`source`, `target`): `Promise`\\<`EntityMention`\\>\n\nCreate a mention from a source resource to a target resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | `EntityReference` |\n| `target` | `EntityReference` |\n\n#### Returns\n\n`Promise`\\<`EntityMention`\\>",+ "FavoritableEntity": "# Abstract Class: FavoritableEntity\\<Detail\\>\n\nAn entity the favorites API can address, and so can be (un)favorited.\n\n## Extends\n\n- `MacroEntity`\\<`Detail`\\>\n\n## Extended by\n\n- `CallRecord`\n- `Message`\n- `Contact`\n- `PropertiedEntity`\n- `ForeignEntity`\n- `WhatsAppGroup`\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Implements\n\n- `Favoritable`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `abstract readonly` | `\"project\"` \\| `\"user\"` \\| `\"team\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | How the entity-addressed APIs (favorites) identify this entity's type. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |",+ "FavoritableEntity.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\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`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n`Favoritable.favorite`",+ "FavoritableEntity.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>",+ "FavoritableEntity.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "FavoritableEntity.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`FavoritableEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n`Favoritable.unfavorite`",+ "MacroEntity": "# Abstract Class: MacroEntity\\<Detail\\>\n\nBase for entity handles: a free-to-construct `(client, id)` pair whose\ndetail record loads lazily on first field access and is dropped after any\nmutation. Subclasses implement fetch and build their surface from\nfield and mutate.\n\n## Extended by\n\n- `AgentSession`\n- `CodeExecution`\n- `SessionReview`\n- `Agent`\n- `UserApiKey`\n- `Calendar`\n- `CalendarEvent`\n- `CalendarNote`\n- `CallMessage`\n- `ChatMessage`\n- `CrmComment`\n- `CrmPipeline`\n- `PipelineTable`\n- `PipelineRow`\n- `PipelineColumn`\n- `Database`\n- `DocumentAnchor`\n- `Comment`\n- `EmailAttachment`\n- `EmailFilter`\n- `Label`\n- `Link`\n- `EmailMessage`\n- `FavoritableEntity`\n- `Form`\n- `GithubPullRequest`\n- `Harness`\n- `HarnessPairing`\n- `Initiative`\n- `Meeting`\n- `MessageThread`\n- `Notification`\n- `Routine`\n- `AccessRequest`\n- `Team`\n- `Webhook`\n- `WhatsAppAccount`\n- `WhatsAppChat`\n- `WhatsAppMessage`\n- `WhatsAppSend`\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` |",+ "MacroEntity.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |",+ "PropertiedEntity": "# Abstract Class: PropertiedEntity\\<Detail\\>\n\nA favoritable entity that also carries user-defined properties.\n\n## Extends\n\n- `FavoritableEntity`\\<`Detail`\\>\n\n## Extended by\n\n- `Channel`\n- `Chat`\n- `Company`\n- `Document`\n- `EmailThread`\n- `Project`\n- `User`\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-detail\"></a> `Detail` |\n\n## Implements\n\n- `Propertied`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `abstract readonly` | `\"project\"` \\| `\"user\"` \\| `\"team\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"channel_message\"` \\| `\"document\"` \\| `\"email_thread\"` \\| `\"calendar_event\"` \\| `\"call\"` \\| `\"foreign_entity\"` \\| `\"static_file\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` \\| `\"crm_pipeline\"` \\| `\"reminder\"` \\| `\"skill\"` \\| `\"agent_session\"` \\| `\"scheduled_action\"` \\| `\"initiative\"` \\| `\"database\"` \\| `\"database_row\"` \\| `\"form\"` \\| `\"whatsapp_group\"` | How the entity-addressed APIs (favorites) identify this entity's type. | `FavoritableEntity.entityType` |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `FavoritableEntity.id` |",+ "PropertiedEntity.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Implementation of\n\n`Propertied.deleteProperty`",+ "PropertiedEntity.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\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`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n`Propertied.favorite`\n\n#### Inherited from\n\n`FavoritableEntity.favorite`",+ "PropertiedEntity.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "PropertiedEntity.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Implementation of\n\n`Propertied.properties`",+ "PropertiedEntity.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`",+ "PropertiedEntity.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Implementation of\n\n`Propertied.setProperty`",+ "PropertiedEntity.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `Detail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `Detail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "PropertiedEntity.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`PropertiedEntity`\\<`Detail`\\>\\>\n\n#### Implementation of\n\n`Propertied.unfavorite`\n\n#### Inherited from\n\n`FavoritableEntity.unfavorite`",+ "PropertiedEntity.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>",+ "Favoritable": "# Interface: Favoritable\n\nAn entity that can be added to and removed from the user's favorites.\n\n## Extended by\n\n- `Propertied`\n\n## Methods\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Favoritable`\\>\n\n#### Returns\n\n`Promise`\\<`Favoritable`\\>\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Favoritable`\\>\n\n#### Returns\n\n`Promise`\\<`Favoritable`\\>",+ "Propertied": "# Interface: Propertied\n\nA favoritable entity that also carries user-defined properties.\n\n## Extends\n\n- `Favoritable`\n\n## Methods\n\n### deleteProperty()\n\n> **deleteProperty**(`assignment`): `Promise`\\<`void`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `assignment` | `EntityPropertyWithDefinition` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### favorite()\n\n> **favorite**(): `Promise`\\<`Propertied`\\>\n\n#### Returns\n\n`Promise`\\<`Propertied`\\>\n\n#### Inherited from\n\n`Favoritable.favorite`\n\n***\n\n### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `includeMetadata?`: `boolean`; \\} |\n| `opts.includeMetadata?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`EntityPropertyWithDefinition`[]\\>\n\n***\n\n### setProperty()\n\n> **setProperty**(`property`, `value?`): `Promise`\\<`void`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `property` | `PropertyDefinition` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n***\n\n### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Propertied`\\>\n\n#### Returns\n\n`Promise`\\<`Propertied`\\>\n\n#### Inherited from\n\n`Favoritable.unfavorite`",+ "PropertyOptionDelta": "# Interface: PropertyOptionDelta\n\nA delta to apply to one multi-select property.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-add\"></a> `add?` | `PropertyOption`[] | Options to add to the property's current selection. |\n| <a id=\"property-property\"></a> `property` | `PropertyDefinition` | The multi-select property definition to update. |\n| <a id=\"property-remove\"></a> `remove?` | `PropertyOption`[] | Options to remove from the property's current selection. |",+ "MacroEntityType": "# Type Alias: MacroEntityType\n\n> **MacroEntityType** = `FavoriteEntityRef`\\[`\"entityType\"`\\]\n\nHow the entity-addressed APIs (favorites) identify an entity's type.",+ "FavoritesNamespace": "# Class: FavoritesNamespace\n\nThe user's favorites: a manually ordered collection of entity references.",+ "FavoritesNamespace.add": "### add()\n\n> **add**(`entity`): `Promise`\\<`Favorite`\\>\n\nFavorite an entity. Returns the favorite record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | `FavoritableEntity`\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`Favorite`\\>",+ "FavoritesNamespace.list": "### list()\n\n> **list**(`filter?`): `Promise`\\<`Favorite`[]\\>\n\nThe user's favorites, in manual order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `filter?` | `FavoritesFilter` |\n\n#### Returns\n\n`Promise`\\<`Favorite`[]\\>",+ "FavoritesNamespace.remove": "### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nRemove an entity from the user's favorites.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | `FavoritableEntity`\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "FavoritesNamespace.reorder": "### reorder()\n\n> **reorder**(`favorites`): `Promise`\\<`void`\\>\n\nReorder the favorites: pass every favorited entity in the desired order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `favorites` | `FavoriteEntityRef`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "FavoritesFilter": "# Type Alias: FavoritesFilter\n\n> **FavoritesFilter** = \\{ `entityIds?`: `string`[]; `entityTypes?`: `MacroEntityType`[]; \\}\n\nWhich favorites to list.\n\nThe two dimensions are independent. Within one, the values are alternatives;\nbetween them they are both required, so `entityTypes: ['document']` with\n`entityIds: [a, b]` matches only documents `a` and `b`. An omitted or empty\nlist constrains nothing, which is why the default lists the whole collection.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-entityids\"></a> `entityIds?` | `string`[] |\n| <a id=\"property-entitytypes\"></a> `entityTypes?` | `MacroEntityType`[] |",+ "ForeignEntity": "# Class: ForeignEntity\n\nA read-only mapping to an entity owned by an external system (e.g. a\nGitHub pull request). Keyed by the internal foreign-entity record id.\n\n## Extends\n\n- `FavoritableEntity`\\<`ForeignEntityDetail`\\>\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 record was created (ISO timestamp). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"foreign_entity\"` | `'foreign_entity'` | Favorites identify foreign entities as `foreign_entity`. | `FavoritableEntity.entityType` | - |\n| <a id=\"property-foreignentityid\"></a> `foreignEntityId` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The identifier assigned by the external system. | - | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `FavoritableEntity.id` |\n| <a id=\"property-source\"></a> `source` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The source system that owns the external identifier (e.g. `github_pull_request`). | - | - |\n| <a id=\"property-storedforauthentity\"></a> `storedForAuthEntity` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The internal auth entity namespace this foreign entity is stored for. | - | - |\n| <a id=\"property-storedforid\"></a> `storedForId` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The internal entity id this foreign entity is stored for. | - | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | `...` | When the record was last updated (ISO timestamp). | - | - |",+ "ForeignEntity.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`ForeignEntity`\\>\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`\\<`ForeignEntity`\\>\n\n#### Inherited from\n\n`FavoritableEntity.favorite`",+ "ForeignEntity.metadata": "### metadata()\n\n> **metadata**(): `Promise`\\<`unknown`\\>\n\nArbitrary source-specific metadata stored with the mapping.\n\n#### Returns\n\n`Promise`\\<`unknown`\\>",+ "ForeignEntity.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "ForeignEntity.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.ForeignEntity`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.ForeignEntity`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.ForeignEntity` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "ForeignEntity.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`ForeignEntity`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`ForeignEntity`\\>\n\n#### Inherited from\n\n`FavoritableEntity.unfavorite`",+ "ForeignEntity.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `ForeignEntity`\n\nA handle to a foreign entity by its internal record 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`ForeignEntity`",+ "ForeignEntity.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `ForeignEntity`\n\nBuild a foreign entity from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `storage.ForeignEntity` |\n\n#### Returns\n\n`ForeignEntity`",+ "ForeignEntityNamespace": "# Class: ForeignEntityNamespace",+ "ForeignEntityNamespace.byId": "### byId()\n\n> **byId**(`id`): `ForeignEntity`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`ForeignEntity`",+ "ForeignEntityNamespace.bySource": "### bySource()\n\n> **bySource**(`source`, `foreignEntityId`): `Promise`\\<`ForeignEntity`\\>\n\nLook a foreign entity up by the identifier its source system assigned.\n\n`foreignEntityId` may contain slashes — sources store them inside the\nidentifier, for example `owner/repo/pull/12`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `source` | `string` |\n| `foreignEntityId` | `string` |\n\n#### Returns\n\n`Promise`\\<`ForeignEntity`\\>",+ "ForeignEntityNamespace.githubPullRequestFacets": "### githubPullRequestFacets()\n\n> **githubPullRequestFacets**(): `Promise`\\<`GithubPullRequestFacets`\\>\n\nRepositories, authors, assignees, and labels among the GitHub pull\nrequests visible to the authenticated user and their team, each with how\nmany pull requests it covers. A pull request visible to both the user and\nthe team counts once.\n\n#### Returns\n\n`Promise`\\<`GithubPullRequestFacets`\\>",+ "GithubPullRequestFacets": "# Interface: GithubPullRequestFacets\n\nRepositories, authors, assignees, and labels among the GitHub pull requests\nvisible to the caller.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-assignees\"></a> `assignees` | `GithubUserFacet`[] | Assignees, most pull requests first. |\n| <a id=\"property-authors\"></a> `authors` | `GithubUserFacet`[] | Authors, most pull requests first. |\n| <a id=\"property-labels\"></a> `labels` | `GithubLabelFacet`[] | Labels, most pull requests first. |\n| <a id=\"property-repositories\"></a> `repositories` | `GithubRepositoryFacet`[] | Repositories, most pull requests first. |",+ "GithubLabelFacet": "# Type Alias: GithubLabelFacet\n\n> **GithubLabelFacet** = `Omit`\\<`storage.GithubLabelFacet`, `\"color\"`\\> & \\{ `color?`: `string`; \\}\n\nA label among the GitHub pull requests visible to the caller.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `color?` | `string` | The label's most recently synced color, as six hex digits without `#`. |",+ "GithubUserFacet": "# Type Alias: GithubUserFacet\n\n> **GithubUserFacet** = `Omit`\\<`storage.GithubUserFacet`, `\"login\"`\\> & \\{ `login?`: `string`; \\}\n\nA GitHub user among the pull requests visible to the caller, as an author or an assignee.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `login?` | `string` | The user's most recently synced GitHub login, when known. |",+ "Form": "# Class: Form\n\nA form over a database table. Viewers can read its questions and submit;\neditors can build it and read responses; owners control its audience.\n\n## Extends\n\n- `MacroEntity`\\<`FormDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | () => `Promise`\\<`FormAccess`\\> | The caller's access level. | - |\n| <a id=\"property-audience\"></a> `audience` | `readonly` | () => `Promise`\\<`Audience`\\> | Who may respond. | - |\n| <a id=\"property-closesat\"></a> `closesAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled closing time, when set. | - |\n| <a id=\"property-database\"></a> `database` | `readonly` | () => `Promise`\\<`Database`\\> | The response database. Reading its contents requires separate access. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string`\\> | Introductory text shown to respondents. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The form's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | The owning user. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`FormStatus`\\> | Whether submissions are currently enabled. A closing time can also close the form. | - |\n| <a id=\"property-table\"></a> `table` | `readonly` | () => `Promise`\\<`DatabaseTable`\\> | The linked table, without fetching its contents. | - |",+ "Form.editResponse": "### editResponse()\n\n> **editResponse**(`answers`): `Promise`\\<`FormSubmissionOutcome`\\>\n\nReplace the caller's answers while the form is open; gates are evaluated again.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | `FormAnswer`[] |\n\n#### Returns\n\n`Promise`\\<`FormSubmissionOutcome`\\>",+ "Form.myResponse": "### myResponse()\n\n> **myResponse**(): `Promise`\\<`MyFormResponse`\\>\n\nRead the caller's receipt and answers without reading anyone else's responses.\n\n#### Returns\n\n`Promise`\\<`MyFormResponse`\\>",+ "Form.questions": "### questions()\n\n> **questions**(): `Promise`\\<`FormQuestion`[]\\>\n\nAll questions in display order, skipping gates.\n\n#### Returns\n\n`Promise`\\<`FormQuestion`[]\\>",+ "Form.replaceLayout": "### replaceLayout()\n\n> **replaceLayout**(`sections`): `Promise`\\<`FormLayoutResult`\\>\n\nSave a replacement in the shared draft. Existing handles retain identity;\nomitted handles mint sections or questions. Column facts use the database API.\nA publicationError means the draft was saved but respondents still see the last\nvalid version. Repair the reported problem or reload to retry publication.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sections` | `FormSectionPlacement`[] |\n\n#### Returns\n\n`Promise`\\<`FormLayoutResult`\\>",+ "Form.respondUrl": "### respondUrl()\n\n> **respondUrl**(): `string`\n\nThe respondent page, which public forms also expose without signing in.\n\n#### Returns\n\n`string`",+ "Form.responseSummary": "### responseSummary()\n\n> **responseSummary**(): `Promise`\\<`FormResponseSummary`\\>\n\nLedger counts and total table rows; requires edit access.\n\n#### Returns\n\n`Promise`\\<`FormResponseSummary`\\>",+ "Form.schema": "### schema()\n\n> **schema**(): `Promise`\\<`FormDetail`\\>\n\nThe form's presentation and column facts; this never contains response rows.\n\n#### Returns\n\n`Promise`\\<`FormDetail`\\>",+ "Form.sections": "### sections()\n\n> **sections**(): `Promise`\\<`FormSection`[]\\>\n\nSections in display order.\n\n#### Returns\n\n`Promise`\\<`FormSection`[]\\>",+ "Form.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead the form's sharing grants. Requires ownership.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Form.submit": "### submit()\n\n> **submit**(`answers`): `Promise`\\<`FormSubmissionOutcome`\\>\n\nSubmit answers. Signed-in respondents get at most one response; use editResponse afterwards.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | `FormAnswer`[] |\n\n#### Returns\n\n`Promise`\\<`FormSubmissionOutcome`\\>",+ "Form.tally": "### tally()\n\n> **tally**(): `Promise`\\<`FormQuestionTally`[]\\>\n\nChoice and checkbox counts, available to viewers when tally visibility is enabled.\n\n#### Returns\n\n`Promise`\\<`FormQuestionTally`[]\\>",+ "Form.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `FormDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `FormDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `FormDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Form.update": "### update()\n\n> **update**(`updates`): `Promise`\\<`Form`\\>\n\nUpdate presentation or owner-controlled settings; null explicitly clears the closing time.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | `UpdateForm` |\n\n#### Returns\n\n`Promise`\\<`Form`\\>",+ "Form.updateSharePermissions": "### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<`storage.SharePermissionV2`\\>\n\nUpdate grants. Public responding is controlled by audience, not link sharing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `UpdateSharePermissionRequestV2` |\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Form.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nOpen the form's builder in Macro.\n\n#### Returns\n\n`string`",+ "Form.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Form`\n\nA form handle with details loaded on demand.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Form`",+ "Form.create": "### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Form`\\>\n\nCreate a form, optionally over a table of a database the caller owns.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; `table?`: `DatabaseTable`; \\} |\n| `options.name` | `string` |\n| `options.table?` | `DatabaseTable` |\n\n#### Returns\n\n`Promise`\\<`Form`\\>",+ "Form.list": "### list()\n\n> `static` **list**(`client`, `database?`): `Promise`\\<`Form`[]\\>\n\nForms shared with the caller, or live forms over a specified database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `database?` | `Database` |\n\n#### Returns\n\n`Promise`\\<`Form`[]\\>",+ "FormReference": "# Class: FormReference\n\nA typed reference read from a form answer, without fetching the referenced entity.\n\n## Implements\n\n- `FormEntityHandle`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `EntityKind` | The referenced entity's kind. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The referenced entity's identifier. |",+ "FormReference.byId": "### byId()\n\n> `static` **byId**(`entityType`, `id`): `FormReference`\n\nConstruct a reference when its kind and identifier are known.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entityType` | `EntityKind` |\n| `id` | `string` |\n\n#### Returns\n\n`FormReference`",+ "FormEntityHandle": "# Interface: FormEntityHandle\n\nAn entity handle used in a reference answer or rule.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The entity's identifier. |",+ "FormAnswer": "# Type Alias: FormAnswer\n\n> **FormAnswer** = \\{ `question`: `FormQuestion`; `value`: `FormAnswerValue`; \\}\n\nOne question and its answer.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-question\"></a> `question` | `FormQuestion` |\n| <a id=\"property-value\"></a> `value` | `FormAnswerValue` |",+ "FormAnswerValue": "# Type Alias: FormAnswerValue\n\n> **FormAnswerValue** = `Exclude`\\<`CellValue`, \\{ `type`: `\"rows\"` \\| `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `type`: `\"rows\"`; `value`: `DatabaseRow`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: `FormOption`[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: \\{ `entity`: `FormEntityHandle`; `entityType`: `EntityKind`; \\}[]; \\}\n\nAn answer value; references use handles, and scalar values keep their cell representation.",+ "FormBookingStep": "# Type Alias: FormBookingStep\n\n> **FormBookingStep** = `Omit`\\<`UnlockedBooking`, `\"section\"`\\> & \\{ `section`: `FormSection`; \\}\n\nA booking step released after the form accepts the caller's answers.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `section` | `FormSection` |",+ "FormBookingTarget": "# Type Alias: FormBookingTarget\n\n> **FormBookingTarget** = `BookingTarget`\n\nThe public Macro booking destination selected by a form editor.",+ "FormLayoutResult": "# Type Alias: FormLayoutResult\n\n> **FormLayoutResult** = \\{ `form`: `Form`; `publicationError?`: `FormPublicationProblem`; \\}\n\nA saved layout and any reason it is not yet visible to respondents.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `Form` |\n| <a id=\"property-publicationerror\"></a> `publicationError?` | `FormPublicationProblem` |",+ "FormQuestionPlacement": "# Type Alias: FormQuestionPlacement\n\n> **FormQuestionPlacement** = \\{ `column`: `DatabaseColumn`; `helpText?`: `string`; `question?`: `FormQuestion`; `required?`: `boolean`; `widget?`: `Widget`; \\}\n\nA question placement in a layout replacement. Omit question to mint a new stable question.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `DatabaseColumn` |\n| <a id=\"property-helptext\"></a> `helpText?` | `string` |\n| <a id=\"property-question\"></a> `question?` | `FormQuestion` |\n| <a id=\"property-required\"></a> `required?` | `boolean` |\n| <a id=\"property-widget\"></a> `widget?` | `Widget` |",+ "FormQuestionTally": "# Type Alias: FormQuestionTally\n\n> **FormQuestionTally** = \\{ `buckets`: \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: `FormOption`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[]; `question`: `FormQuestion`; `responses`: `number`; \\}\n\nA question's public tally. Options with no votes are retained.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-buckets\"></a> `buckets` | \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: `FormOption`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[] |\n| <a id=\"property-question\"></a> `question` | `FormQuestion` |\n| <a id=\"property-responses\"></a> `responses` | `number` |",+ "FormResponseSummary": "# Type Alias: FormResponseSummary\n\n> **FormResponseSummary** = \\{ `rows`: `number`; `stopped`: `number`; `stoppedBySection`: \\{ `count`: `number`; `section`: `FormSection`; \\}[]; `submitted`: `number`; \\}\n\nCounts from the response ledger and its linked table.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-rows\"></a> `rows` | `number` |\n| <a id=\"property-stopped\"></a> `stopped` | `number` |\n| <a id=\"property-stoppedbysection\"></a> `stoppedBySection` | \\{ `count`: `number`; `section`: `FormSection`; \\}[] |\n| <a id=\"property-submitted\"></a> `submitted` | `number` |",+ "FormRuleTest": "# Type Alias: FormRuleTest\n\n> **FormRuleTest** = `Exclude`\\<`FilterTest`, \\{ `kind`: `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `kind`: `\"options\"`; `operator`: `Extract`\\<`FilterTest`, \\{ `kind`: `\"options\"`; \\}\\>\\[`\"operator\"`\\]; `options`: `FormOption`[]; \\} \\| \\{ `entities`: `FormEntityHandle`[]; `kind`: `\"entities\"`; `operator`: `Extract`\\<`FilterTest`, \\{ `kind`: `\"entities\"`; \\}\\>\\[`\"operator\"`\\]; \\}\n\nA form rule, with option and entity references represented by handles.",+ "FormRules": "# Type Alias: FormRules\n\n> **FormRules** = \\{ `conditions`: (\\{ `column`: `DatabaseColumn`; `kind`: `\"condition\"`; `test`: `FormRuleTest`; \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[]; `conjunction`: `FilterGroup`\\[`\"conjunction\"`\\]; \\}\n\nConditions over columns asked in earlier sections.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | (\\{ `column`: `DatabaseColumn`; `kind`: `\"condition\"`; `test`: `FormRuleTest`; \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[] |\n| <a id=\"property-conjunction\"></a> `conjunction` | `FilterGroup`\\[`\"conjunction\"`\\] |",+ "FormSectionPlacement": "# Type Alias: FormSectionPlacement\n\n> **FormSectionPlacement** = \\{ `description?`: `string`; `section?`: `FormSection`; `title`: `string`; \\} & \\{ `kind`: `\"questions\"`; `questions`: `FormQuestionPlacement`[]; \\} \\| \\{ `kind`: `\"gate\"`; `message`: `string`; `rules`: `FormRules`; \\} \\| \\{ `kind`: `\"booking\"`; `target`: `BookingTarget`; \\}\n\nA section in a layout replacement. Omit section to mint a new stable section.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `description?` | `string` |\n| `section?` | `FormSection` |\n| `title` | `string` |",+ "FormSubmissionOutcome": "# Type Alias: FormSubmissionOutcome\n\n> **FormSubmissionOutcome** = \\{ `booking?`: `FormBookingStep`; `outcome`: `\"submitted\"`; `response`: `FormResponse`; `row`: `DatabaseRow`; \\} \\| \\{ `message`: `string`; `outcome`: `\"stopped\"`; `section`: `FormSection`; \\}\n\nThe result of submitting or editing a response. A stopped submission has no row.",+ "MyFormResponse": "# Type Alias: MyFormResponse\n\n> **MyFormResponse** = \\{ `answers`: `FormAnswer`[]; `booking?`: `FormBookingStep`; `response`: `FormResponse`; `row?`: `DatabaseRow`; `status`: `ResponseStatus`; `stoppedAtSection?`: `FormSection`; `submittedAt`: `string`; `updatedAt`: `string`; \\}\n\nThe caller's receipt and current answers, read without access to other responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-answers\"></a> `answers` | `FormAnswer`[] |\n| <a id=\"property-booking\"></a> `booking?` | `FormBookingStep` |\n| <a id=\"property-response\"></a> `response` | `FormResponse` |\n| <a id=\"property-row\"></a> `row?` | `DatabaseRow` |\n| <a id=\"property-status\"></a> `status` | `ResponseStatus` |\n| <a id=\"property-stoppedatsection\"></a> `stoppedAtSection?` | `FormSection` |\n| <a id=\"property-submittedat\"></a> `submittedAt` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` |",+ "FormNamespace": "# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.",+ "FormNamespace.byId": "### byId()\n\n> **byId**(`id`): `Form`\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Form`",+ "FormNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Form`\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: `DatabaseTable`; \\} |\n| `options.name` | `string` |\n| `options.table?` | `DatabaseTable` |\n\n#### Returns\n\n`Promise`\\<`Form`\\>",+ "FormNamespace.list": "### list()\n\n> **list**(`database?`): `Promise`\\<`Form`[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | `Database` |\n\n#### Returns\n\n`Promise`\\<`Form`[]\\>",+ "FormOption": "# Class: FormOption\n\nA choice of one form question, resolved through that question's current options.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The backing database option's identifier. |\n| <a id=\"property-question\"></a> `question` | `readonly` | `FormQuestion` | The question offering this choice. |",+ "FormOption.color": "### color()\n\n> **color**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe choice's color, when one is set.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>",+ "FormOption.detail": "### detail()\n\n> **detail**(): `Promise`\\<`QuestionOption`\\>\n\nThe choice's label and color.\n\n#### Returns\n\n`Promise`\\<`QuestionOption`\\>",+ "FormOption.label": "### label()\n\n> **label**(): `Promise`\\<`string`\\>\n\nThe choice's label.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "FormOption.byId": "### byId()\n\n> `static` **byId**(`question`, `id`): `FormOption`\n\nA handle to a known choice of a question.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `question` | `FormQuestion` |\n| `id` | `string` |\n\n#### Returns\n\n`FormOption`",+ "FormQuestion": "# Class: FormQuestion\n\nOne question, backed by a column. Its details never require reading the response table.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | `Form` | The form that asks this question. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The question's stable identifier within its form layout. |",+ "FormQuestion.column": "### column()\n\n> **column**(): `Promise`\\<`DatabaseColumn`\\>\n\nThe column behind the question. Reading the column itself needs database access.\n\n#### Returns\n\n`Promise`\\<`DatabaseColumn`\\>",+ "FormQuestion.detail": "### detail()\n\n> **detail**(): `Promise`\\<`FormQuestionDetail`\\>\n\nThe question's current presentation and column facts.\n\n#### Returns\n\n`Promise`\\<`FormQuestionDetail`\\>",+ "FormQuestion.options": "### options()\n\n> **options**(): `Promise`\\<`FormOption`[]\\>\n\nCurrent choices, in display order.\n\n#### Returns\n\n`Promise`\\<`FormOption`[]\\>",+ "FormQuestion.title": "### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe question's current title (its column's name).\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "FormQuestion.byId": "### byId()\n\n> `static` **byId**(`form`, `id`): `FormQuestion`\n\nA question handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | `Form` |\n| `id` | `string` |\n\n#### Returns\n\n`FormQuestion`",+ "FormResponse": "# Class: FormResponse\n\nA cached receipt for the caller's response; other respondents' receipts are private.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | `Form` | The form that received this response. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The response ledger entry's identifier. |",+ "FormResponse.answers": "### answers()\n\n> **answers**(): `Promise`\\<`FormAnswer`[]\\>\n\nAnswers as submitted or last read. Refresh to include later changes to the row.\n\n#### Returns\n\n`Promise`\\<`FormAnswer`[]\\>",+ "FormResponse.booking": "### booking()\n\n> **booking**(): `Promise`\\<`FormBookingStep` \\| `undefined`\\>\n\nThe booking step unlocked by this saved response, if any.\n\n#### Returns\n\n`Promise`\\<`FormBookingStep` \\| `undefined`\\>",+ "FormResponse.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`FormResponse`\\>\n\nReload the caller's current receipt; requires a signed-in respondent.\n\n#### Returns\n\n`Promise`\\<`FormResponse`\\>",+ "FormResponse.row": "### row()\n\n> **row**(): `Promise`\\<`DatabaseRow` \\| `undefined`\\>\n\nThe receipt's row, if any. Reading that row requires database access.\n\n#### Returns\n\n`Promise`\\<`DatabaseRow` \\| `undefined`\\>",+ "FormResponse.status": "### status()\n\n> **status**(): `Promise`\\<`ResponseStatus`\\>\n\nWhether this receipt was submitted or stopped by a gate.\n\n#### Returns\n\n`Promise`\\<`ResponseStatus`\\>",+ "FormResponse.byId": "### byId()\n\n> `static` **byId**(`form`, `id`, `snapshot?`): `FormResponse`\n\nA response handle, optionally seeded with an already returned receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | `Form` |\n| `id` | `string` |\n| `snapshot?` | `ResponseSnapshot` |\n\n#### Returns\n\n`FormResponse`",+ "FormSection": "# Class: FormSection\n\nAn ordered group of questions, or a gate between groups.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | `Form` | The owning form. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The section's stable identifier. |",+ "FormSection.detail": "### detail()\n\n> **detail**(): `Promise`\\<`FormSectionDetail`\\>\n\nThe section's current presentation.\n\n#### Returns\n\n`Promise`\\<`FormSectionDetail`\\>",+ "FormSection.questions": "### questions()\n\n> **questions**(): `Promise`\\<`FormQuestion`[]\\>\n\nQuestions in display order; gates contain no questions.\n\n#### Returns\n\n`Promise`\\<`FormQuestion`[]\\>",+ "FormSection.title": "### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe section heading.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "FormSection.byId": "### byId()\n\n> `static` **byId**(`form`, `id`): `FormSection`\n\nA section handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | `Form` |\n| `id` | `string` |\n\n#### Returns\n\n`FormSection`",+ "GithubPullRequestNamespace": "# Class: GithubPullRequestNamespace\n\nGitHub pull request snapshots and captured diffs.",+ "GithubPullRequestNamespace.byId": "### byId()\n\n> **byId**(`id`): `GithubPullRequest`\n\nConstruct from a Macro foreign entity's identity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`GithubPullRequest`",+ "GithubPullRequestNamespace.forEntity": "### forEntity()\n\n> **forEntity**(`entity`): `GithubPullRequest`\n\nResolve a foreign entity as a pull request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | `ForeignEntity` |\n\n#### Returns\n\n`GithubPullRequest`",+ "GithubPullRequest": "# Class: GithubPullRequest\n\nA stored GitHub pull request addressed by its Macro foreign entity.\n\n## Extends\n\n- `MacroEntity`\\<`StoredGithubPullRequest`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`NonNullable`\\<`\"open\"` \\| `\"closed\"` \\| `\"merged\"` \\| `null` \\| `undefined`\\> \\| `undefined`\\> | Current state. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Pull request title. | - |\n| <a id=\"property-url\"></a> `url` | `readonly` | () => `Promise`\\<`string`\\> | GitHub URL. | - |",+ "GithubPullRequest.changes": "### changes()\n\n> **changes**(): `Promise`\\<\\{ `changeset?`: `PullRequestChangeset`; `error?`: `string`; \\}\\>\n\nCaptured change metadata, when available.\n\n#### Returns\n\n`Promise`\\<\\{ `changeset?`: `PullRequestChangeset`; `error?`: `string`; \\}\\>",+ "GithubPullRequest.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `StoredGithubPullRequest`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `StoredGithubPullRequest`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `StoredGithubPullRequest` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "GithubPullRequest.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `GithubPullRequest`\n\nConstruct a lazy pull request handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`GithubPullRequest`",+ "PullRequestChangeset": "# Class: PullRequestChangeset\n\nOne captured diff belonging to a pull request.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-pullrequest\"></a> `pullRequest` | `readonly` | `GithubPullRequest` | Parent pull request. |\n| <a id=\"property-record\"></a> `record` | `readonly` | `storage.ChangesetDto` | Captured metadata. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string`\n\nCaptured identity.\n\n##### Returns\n\n`string`",+ "PullRequestChangeset.patch": "### patch()\n\n> **patch**(): `Promise`\\<`string`\\>\n\nRead the captured unified patch.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "PullRequestChangeset.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `additions`: `number`; `base`: `storage.GitRefDto`; `capturedAt`: `string`; `deletions`: `number`; `files`: `storage.ChangedFileDto`[]; `head`: `storage.GitRefDto`; `id`: `string`; `patchBytes`: `number`; `pullRequestId`: `string`; `repository?`: `string` \\| `null`; `source`: `\"github_pull_request\"`; `truncated`: `boolean`; \\}\n\nSerialize captured metadata and parent identity.\n\n#### Returns\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `additions` | `number` | Lines added across all files. |\n| `base` | `storage.GitRefDto` | The side the work started from. |\n| `capturedAt` | `string` | When the diff was taken. |\n| `deletions` | `number` | Lines removed across all files. |\n| `files` | `storage.ChangedFileDto`[] | Every changed file, in patch order. |\n| `head` | `storage.GitRefDto` | The side carrying the work. |\n| `id` | `string` | The changeset's id; a different id means different changes. |\n| `patchBytes` | `number` | Size of the patch the matching patch route serves; zero when nothing changed. |\n| `pullRequestId` | `string` | - |\n| `repository?` | `string` \\| `null` | `https://github.com/owner/name`, when known. |\n| `source` | `\"github_pull_request\"` | Where the diff was read from. |\n| `truncated` | `boolean` | Some files' hunks were left out of the patch. |",+ "Harness": "# Class: Harness\n\nA registered host for coding agents.\n\n## Extends\n\n- `MacroEntity`\\<`storage.Harness`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-connected\"></a> `connected` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the host is connected. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`string`\\> | Runtime kind. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |",+ "Harness.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nRemove the host.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Harness.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Harness`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Harness`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Harness` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Harness.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Harness`\n\nConstruct a lazy host handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Harness`",+ "Harness.from": "### from()\n\n> `static` **from**(`client`, `record`): `Harness`\n\nSeed from a listed host.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `storage.Harness` |\n\n#### Returns\n\n`Harness`",+ "HarnessNamespace": "# Class: HarnessNamespace\n\nHosts and device pairing. Self operations require host credentials.",+ "HarnessNamespace.agents": "### agents()\n\n> **agents**(): `Promise`\\<`Agent`[]\\>\n\nAgent handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`Agent`[]\\>",+ "HarnessNamespace.byId": "### byId()\n\n> **byId**(`id`): `Harness`\n\nConstruct a lazy host handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Harness`",+ "HarnessNamespace.createPairing": "### createPairing()\n\n> **createPairing**(`options`): `Promise`\\<\\{ `device`: `DevicePairing`; `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: `HarnessPairing`; `pollIntervalSeconds`: `number`; \\}\\>\n\nStart pairing a device; persist the secret separately from the handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `CreatePairingRequest` |\n\n#### Returns\n\n`Promise`\\<\\{ `device`: `DevicePairing`; `deviceSecret`: `string`; `expiresAt`: `string`; `pairing`: `HarnessPairing`; `pollIntervalSeconds`: `number`; \\}\\>",+ "HarnessNamespace.deleteSelf": "### deleteSelf()\n\n> **deleteSelf**(): `Promise`\\<`void`\\>\n\nRevoke the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "HarnessNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Harness`[]\\>\n\nAll hosts visible to the caller.\n\n#### Returns\n\n`Promise`\\<`Harness`[]\\>",+ "HarnessNamespace.me": "### me()\n\n> **me**(): `Promise`\\<`Harness`\\>\n\nThe currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`Harness`\\>",+ "HarnessNamespace.pairing": "### pairing()\n\n> **pairing**(`code`): `HarnessPairing`\n\nConstruct a lazy pairing from its displayed code.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `code` | `string` |\n\n#### Returns\n\n`HarnessPairing`",+ "HarnessNamespace.sessions": "### sessions()\n\n> **sessions**(): `Promise`\\<`AgentSession`[]\\>\n\nSession handles for the currently authenticated host.\n\n#### Returns\n\n`Promise`\\<`AgentSession`[]\\>",+ "DevicePairing": "# Class: DevicePairing\n\nDevice side pairing identity. Keep the device secret outside the handle.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Pairing identifier. |",+ "DevicePairing.claim": "### claim()\n\n> **claim**(`deviceSecret`): `Promise`\\<\\{ `harness`: `Harness`; `token`: `string`; \\} \\| `undefined`\\>\n\nAttempt to claim an approved pairing. Pending claims return undefined.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `deviceSecret` | `string` |\n\n#### Returns\n\n`Promise`\\<\\{ `harness`: `Harness`; `token`: `string`; \\} \\| `undefined`\\>",+ "DevicePairing.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; \\}\n\nSerialize identity only.\n\n#### Returns\n\n\\{ `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |",+ "DevicePairing.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `DevicePairing`\n\nConstruct the device side handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`DevicePairing`",+ "HarnessPairing": "# Class: HarnessPairing\n\nA short lived host pairing, addressed by its displayed code.\n\n## Extends\n\n- `MacroEntity`\\<`PairingDetails`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-expiresat\"></a> `expiresAt` | `readonly` | () => `Promise`\\<`string`\\> | Expiration time. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Requested name. | - |",+ "HarnessPairing.approve": "### approve()\n\n> **approve**(`options?`): `Promise`\\<`Harness`\\>\n\nApprove this pairing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `allowPermissionBypass?`: `boolean`; `name?`: `string`; `team?`: `Team`; \\} |\n| `options.allowPermissionBypass?` | `boolean` |\n| `options.name?` | `string` |\n| `options.team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<`Harness`\\>",+ "HarnessPairing.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `PairingDetails`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `PairingDetails`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `PairingDetails` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "HarnessPairing.byId": "### byId()\n\n> `static` **byId**(`client`, `code`): `HarnessPairing`\n\nConstruct a lazy pairing from a pairing code.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `code` | `string` |\n\n#### Returns\n\n`HarnessPairing`",+ "Initiative": "# Class: Initiative\n\nA group of tasks and members working toward an outcome.\n\n## Extends\n\n- `MacroEntity`\\<`InitiativeDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | Access requests and direct user grants. | - |\n| <a id=\"property-accesslevel\"></a> `accessLevel` | `readonly` | () => `Promise`\\<`storage.AccessLevel`\\> | Current user's access. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-members\"></a> `members` | `readonly` | () => `Promise`\\<`User`[]\\> | Assigned members. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | Owner. | - |\n| <a id=\"property-sharepermissions\"></a> `sharePermissions` | `readonly` | () => `Promise`\\<`storage.SharePermissionV2`\\> | Sharing configuration. | - |\n| <a id=\"property-tasks\"></a> `tasks` | `readonly` | () => `Promise`\\<`Task`[]\\> | Tasks in this initiative. | - |",+ "Initiative.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this initiative.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Initiative.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `InitiativeDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `InitiativeDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `InitiativeDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Initiative.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nUpdate the name, membership or sharing configuration.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `members?`: `User`[]; `name?`: `string`; `sharePermission?`: `SharePermissionOptions`; \\} |\n| `options.members?` | `User`[] |\n| `options.name?` | `string` |\n| `options.sharePermission?` | `SharePermissionOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Initiative.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Initiative`\n\nConstruct a lazy initiative handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Initiative`",+ "Initiative.from": "### from()\n\n> `static` **from**(`client`, `record`): `Initiative`\n\nSeed from an initiative detail response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `InitiativeDetail` |\n\n#### Returns\n\n`Initiative`",+ "InitiativeOptions": "# Interface: InitiativeOptions\n\nInitiative creation settings.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description?` | `string` | Collaborative description. |\n| <a id=\"property-members\"></a> `members?` | `User`[] | Members assigned to this initiative. |\n| <a id=\"property-name\"></a> `name` | `string` | Initiative name. |\n| <a id=\"property-propertyvalues\"></a> `propertyValues?` | `InitialPropertyValue`[] | Initial properties. |\n| <a id=\"property-sharewithteam\"></a> `shareWithTeam?` | `boolean` | Whether the current team can access it. |",+ "InitiativeNamespace": "# Class: InitiativeNamespace\n\nInitiatives in the caller's workspace.",+ "InitiativeNamespace.byId": "### byId()\n\n> **byId**(`id`): `Initiative`\n\nConstruct a lazy initiative handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Initiative`",+ "InitiativeNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Initiative`\\>\n\nCreate an initiative.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `InitiativeOptions` |\n\n#### Returns\n\n`Promise`\\<`Initiative`\\>",+ "InitiativeNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Initiative`[]\\>\n\nList accessible initiatives.\n\n#### Returns\n\n`Promise`\\<`Initiative`[]\\>",+ "Meeting": "# Class: Meeting\n\nA meeting's schedule and invitation link.\n\n## Extends\n\n- `MacroEntity`\\<`storage.Meeting`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-call\"></a> `call` | `readonly` | () => `Promise`\\<`CallRecord` \\| `undefined`\\> | Associated call record. | - |\n| <a id=\"property-channel\"></a> `channel` | `readonly` | () => `Promise`\\<`Channel` \\| `undefined`\\> | Associated channel. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-scheduledend\"></a> `scheduledEnd` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled end. | - |\n| <a id=\"property-scheduledstart\"></a> `scheduledStart` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled start. | - |\n| <a id=\"property-title\"></a> `title` | `readonly` | () => `Promise`\\<`string`\\> | Display title. | - |",+ "Meeting.cancel": "### cancel()\n\n> **cancel**(): `Promise`\\<`void`\\>\n\nCancel this meeting.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Meeting.invite": "### invite()\n\n> **invite**(`email`): `Promise`\\<`void`\\>\n\nInvite an email address.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `email` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Meeting.invitePermissions": "### invitePermissions()\n\n> **invitePermissions**(): `Promise`\\<`MeetingInvitePermissions`\\>\n\nWhether the caller can send invitations.\n\n#### Returns\n\n`Promise`\\<`MeetingInvitePermissions`\\>",+ "Meeting.inviteUsers": "### inviteUsers()\n\n> **inviteUsers**(`users`): `Promise`\\<`void`\\>\n\nInvite Macro users.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `users` | `User`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Meeting.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Meeting`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Meeting`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Meeting` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Meeting.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nUpdate schedule or title.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `UpdateMeetingRequest` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Meeting.webUrl": "### webUrl()\n\n> **webUrl**(): `Promise`\\<`string`\\>\n\nShareable meeting link.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Meeting.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Meeting`\n\nConstruct a lazy meeting handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Meeting`",+ "Meeting.from": "### from()\n\n> `static` **from**(`client`, `record`): `Meeting`\n\nSeed a meeting from a server response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `storage.Meeting` |\n\n#### Returns\n\n`Meeting`",+ "MeetingNamespace": "# Class: MeetingNamespace\n\nMeeting schedules and invitation lookup.",+ "MeetingNamespace.active": "### active()\n\n> **active**(): `Promise`\\<`Meeting`[]\\>\n\nList active meetings.\n\n#### Returns\n\n`Promise`\\<`Meeting`[]\\>",+ "MeetingNamespace.byId": "### byId()\n\n> **byId**(`id`): `Meeting`\n\nConstruct a handle to one of the caller's newest 100 standalone meetings. Use lookup for invitations.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Meeting`",+ "MeetingNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Meeting`\\>\n\nCreate a meeting.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<`CreateMeetingRequest`, `\"preparationId\"`\\> |\n\n#### Returns\n\n`Promise`\\<`Meeting`\\>",+ "MeetingNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Meeting`[]\\>\n\nList the caller's newest 100 standalone meetings.\n\n#### Returns\n\n`Promise`\\<`Meeting`[]\\>",+ "MeetingNamespace.lookup": "### lookup()\n\n> **lookup**(`token`): `Promise`\\<`Meeting`\\>\n\nResolve a meeting's invitation token.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `token` | `string` |\n\n#### Returns\n\n`Promise`\\<`Meeting`\\>",+ "MessageThread": "# Class: MessageThread\n\nA shared message thread with resolution and deletion operations.\n\n## Extends\n\n- `MacroEntity`\\<`ThreadState`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | `MessageParent` | The entity containing this thread. | - |\n| <a id=\"property-resolved\"></a> `resolved` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the thread is resolved. | - |",+ "MessageThread.delete": "### delete()\n\n> **delete**(`nonce?`): `Promise`\\<`void`\\>\n\nDelete the entire thread, including replies.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `nonce?` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "MessageThread.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ThreadState`; `id`: `string`; `parentId`: `string`; `parentType`: `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"`; \\}\n\nSerialize identity with its owning resource.\n\n#### Returns\n\n\\{ `detail?`: `ThreadState`; `id`: `string`; `parentId`: `string`; `parentType`: `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ThreadState` |\n| `id` | `string` |\n| `parentId` | `string` |\n| `parentType` | `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"crm_company\"` \\| `\"crm_contact\"` |\n\n#### Overrides\n\n`MacroEntity.toJSON`",+ "MessageThread.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nResolve the thread or detach its annotation anchor.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `detachAnchor?`: `boolean`; `nonce?`: `string`; `resolved?`: `boolean`; \\} |\n| `options.detachAnchor?` | `boolean` |\n| `options.nonce?` | `string` |\n| `options.resolved?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "MessageThread.byId": "### byId()\n\n> `static` **byId**(`client`, `parent`, `id`): `MessageThread`\n\nConstruct a scoped thread handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | `MessageParent` |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`",+ "timeline": "# Function: timeline()\n\n> **timeline**\\<`TMessage`\\>(`client`, `parent`, `map`, `selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `TMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA bounded mixed message/activity page with typed message handles.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-tmessage\"></a> `TMessage` *extends* `TimelineMessage` |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `parent` | `MessageParent` |\n| `map` | (`record`) => `TMessage` |\n| `selection?` | `TimelineOptions`\\<`TMessage`\\> |\n\n## Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `TMessage`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>",+ "TimelineOptions": "# Interface: TimelineOptions\\<TMessage\\>\n\nTimeline selection with typed message references and camel case options.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-tmessage\"></a> `TMessage` *extends* `TimelineMessage` | `TimelineMessage` |\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-activityafter\"></a> `activityAfter?` | `string` | Inclusive activity lower bound. |\n| <a id=\"property-activitybefore\"></a> `activityBefore?` | `string` | Exclusive activity upper bound. |\n| <a id=\"property-anchored\"></a> `anchored?` | `boolean` | Select anchored threads. |\n| <a id=\"property-around\"></a> `around?` | `TMessage` | Fetch around this message. |\n| <a id=\"property-cursor\"></a> `cursor?` | `MessageCursor` \\| `null` | Opaque continuation cursor from a previous page. |\n| <a id=\"property-direction\"></a> `direction?` | `MessageDirection` | Page direction. |\n| <a id=\"property-includedeletedthreads\"></a> `includeDeletedThreads?` | `boolean` | Include deleted threads. |\n| <a id=\"property-limit\"></a> `limit?` | `number` | Page size. |\n| <a id=\"property-messages\"></a> `messages?` | `TMessage`[] | Restrict selection to these messages. |",+ "MessageParent": "# Type Alias: MessageParent\n\n> **MessageParent** = \\{ `entity`: `Channel`; `type`: `\"channel\"`; \\} \\| \\{ `entity`: `Document`; `type`: `\"document\"`; \\} \\| \\{ `entity`: `Company`; `type`: `\"crm_company\"`; \\} \\| \\{ `entity`: `Contact`; `type`: `\"crm_contact\"`; \\} \\| \\{ `entity`: `CallRecord`; `type`: `\"call\"`; \\}\n\nThe typed parent of a shared message thread.",+ "TimelineMessage": "# Type Alias: TimelineMessage\n\n> **TimelineMessage** = `Message` \\| `Comment` \\| `CrmComment` \\| `CallMessage`\n\nA message handle accepted by a mixed timeline selector.",+ "NotificationNamespace": "# Class: NotificationNamespace",+ "NotificationNamespace.byId": "### byId()\n\n> **byId**(`id`): `Notification`\n\nA handle to a notification by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Notification`",+ "NotificationNamespace.delete": "### delete()\n\n> **delete**(`ids`): `Promise`\\<`void`\\>\n\nDelete a batch of notifications.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "NotificationNamespace.disableType": "### disableType()\n\n> **disableType**(`type`): `Promise`\\<`void`\\>\n\nDisable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "NotificationNamespace.enableType": "### enableType()\n\n> **enableType**(`type`): `Promise`\\<`void`\\>\n\nRe-enable delivery of a notification type.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `type` | `\"reminder\"` \\| `\"channel_mention\"` \\| `\"document_mention\"` \\| `\"mentioned_in_document_comment\"` \\| `\"replied_to_document_comment_thread\"` \\| `\"commented_on_document\"` \\| `\"entity_access_requested\"` \\| `\"entity_access_granted\"` \\| `\"initiative_discussion\"` \\| `\"crm_discussion\"` \\| `\"channel_invite\"` \\| `\"channel_message_send\"` \\| `\"channel_message_reply\"` \\| `\"call_started\"` \\| `\"new_email\"` \\| `\"inbox_reauth_required\"` \\| `\"invite_to_team\"` \\| `\"task_assigned\"` \\| `\"whatsapp_group_message\"` \\| `\"calendar_event_reminder\"` \\| `\"ai_response\"` \\| `\"github_pr_status_changed\"` \\| `\"github_pr_check_run\"` \\| `\"github_review_requested\"` \\| `\"github_pr_comment\"` \\| `\"github_pr_mention\"` \\| `\"github_pr_review\"` \\| `\"agent_session_settled\"` \\| `\"agent_session_waiting_for_input\"` \\| `\"agent_session_mentioned\"` \\| `\"channel_message_reaction\"` \\| `\"calendar_event_join_request\"` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "NotificationNamespace.list": "### list()\n\n> **list**(`opts?`): `AsyncGenerator`\\<`Notification`\\>\n\nThe viewer's notification feed, 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`\\<`Notification`\\>",+ "NotificationNamespace.markDone": "### markDone()\n\n> **markDone**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as done.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "NotificationNamespace.markSeen": "### markSeen()\n\n> **markSeen**(`ids`): `Promise`\\<`void`\\>\n\nMark a batch of notifications as seen.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `ids` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "NotificationNamespace.preferences": "### preferences()\n\n> **preferences**(): `Promise`\\<`GetNotificationTypePreferencesResponse`\\>\n\nThe viewer's notification type preferences (disabled types).\n\n#### Returns\n\n`Promise`\\<`GetNotificationTypePreferencesResponse`\\>",+ "NotificationType": "# Type Alias: NotificationType\n\n> **NotificationType** = `NotifEvent`\\[`\"tag\"`\\]\n\nA notification event type name, e.g. `channel_mention`.",+ "Notification": "# Class: Notification\n\nA notification in the viewer's feed.\n\n## Extends\n\n- `MacroEntity`\\<`NotificationDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the notification was created. | - |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the notification was deleted, if it has been. | - |\n| <a id=\"property-done\"></a> `done` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the notification is completed. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-metadata\"></a> `metadata` | `readonly` | () => `Promise`\\<`NotifEvent`\\> | The typed notification payload (tagged by event type). | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | The user who owns (receives) this notification. | - |\n| <a id=\"property-sender\"></a> `sender` | `readonly` | () => `Promise`\\<`User` \\| `undefined`\\> | The user who triggered the notification, if any. | - |\n| <a id=\"property-sent\"></a> `sent` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the notification has been sent (delivered out of band). | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<`notification.NotificationState`\\> | The authoritative lifecycle state, independent of viewing timestamps. | - |\n| <a id=\"property-type\"></a> `type` | `readonly` | () => `Promise`\\<`string`\\> | The notification event type (e.g. `channel_mention`). | - |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string`\\> | When the notification was last updated. | - |\n| <a id=\"property-viewedat\"></a> `viewedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the notification was viewed, if it has been seen. | - |",+ "Notification.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the notification.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Notification.markDone": "### markDone()\n\n> **markDone**(): `Promise`\\<`void`\\>\n\nMark the notification as done.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Notification.markSeen": "### markSeen()\n\n> **markSeen**(): `Promise`\\<`void`\\>\n\nMark the notification as seen.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Notification.markUndone": "### markUndone()\n\n> **markUndone**(): `Promise`\\<`void`\\>\n\nMove the notification back to not-done.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Notification.seen": "### seen()\n\n> **seen**(): `Promise`\\<`boolean`\\>\n\nWhether the notification is acknowledged (seen or done).\n\n#### Returns\n\n`Promise`\\<`boolean`\\>",+ "Notification.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ApiUserNotification`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ApiUserNotification`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiUserNotification` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Notification.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Notification`\n\nA handle to a notification 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`Notification`",+ "Notification.from": "### from()\n\n> `static` **from**(`client`, `data`): `Notification`\n\nBuild a notification from a list-endpoint record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `data` | `ApiUserNotification` |\n\n#### Returns\n\n`Notification`",+ "Notification.list": "### list()\n\n> `static` **list**(`client`, `opts?`): `AsyncGenerator`\\<`Notification`\\>\n\nThe viewer's notification feed, most recent first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts?` | \\{ `pageSize?`: `number`; `states?`: `notification.NotificationState`[]; \\} |\n| `opts.pageSize?` | `number` |\n| `opts.states?` | `notification.NotificationState`[] |\n\n#### Returns\n\n`AsyncGenerator`\\<`Notification`\\>",+ "PinsNamespace": "# Class: PinsNamespace\n\nThe user's pins: items pinned to fixed slots in the home view.",+ "PinsNamespace.add": "### add()\n\n> **add**(`entity`, `opts`): `Promise`\\<`void`\\>\n\nPin an entity to a slot. `index` is the slot to put it in.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | `FavoritableEntity`\\<`unknown`\\> |\n| `opts` | \\{ `index`: `number`; \\} |\n| `opts.index` | `number` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PinsNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`PinnedItem`[]\\>\n\nThe user's pinned items, with their pin indices.\n\n#### Returns\n\n`Promise`\\<`PinnedItem`[]\\>",+ "PinsNamespace.remove": "### remove()\n\n> **remove**(`entity`): `Promise`\\<`void`\\>\n\nUnpin an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entity` | `FavoritableEntity`\\<`unknown`\\> |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PinsNamespace.reorder": "### reorder()\n\n> **reorder**(`pins`): `Promise`\\<`void`\\>\n\nReorder pins: pass each pinned item with its type and new index.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `pins` | `ReorderPinRequest`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "ProjectNamespace": "# Class: ProjectNamespace",+ "ProjectNamespace.byId": "### byId()\n\n> **byId**(`id`): `Project`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Project`",+ "ProjectNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`Project`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `name`: `string`; `parent?`: `Project`; \\} |\n| `opts.name` | `string` |\n| `opts.parent?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Project`\\>",+ "ProjectNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`Project`\\>\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | `SearchOpts` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Project`\\>",+ "Project": "# Class: Project\n\nA Macro project: a folder-like container for documents, chats, and subprojects.\n\n## Extends\n\n- `PropertiedEntity`\\<`ProjectDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | `...` | Access requests and direct user grants. | - | - |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the project was created (RFC 3339 timestamp). | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"project\"` | `'project'` | Favorites identify projects as `project`. | `PropertiedEntity.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `PropertiedEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The project's display name. | - | - |\n| <a id=\"property-parent\"></a> `parent` | `readonly` | () => `Promise`\\<`Project` \\| `undefined`\\> | `...` | The parent project, if this project is nested. | - | - |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Project`\\> | `...` | Search projects by name and content, most relevant first, auto-paginated. | - | - |",+ "Project.accessLevel": "### accessLevel()\n\n> **accessLevel**(): `Promise`\\<`\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\\>\n\nRead the caller's effective access level.\n\n#### Returns\n\n`Promise`\\<`\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\\>",+ "Project.delete": "### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the project and its contents. Soft by default (reversible with\n[restore](#restore)); pass `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`\\>",+ "Project.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "Project.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`Project`\\>\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`\\<`Project`\\>\n\n#### Inherited from\n\n`PropertiedEntity.favorite`",+ "Project.items": "### items()\n\n> **items**(): `Promise`\\<`Item`[]\\>\n\nThe items (documents, chats, subprojects) directly inside this project.\n\n#### Returns\n\n`Promise`\\<`Item`[]\\>",+ "Project.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "Project.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "Project.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "Project.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the project.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Project.restore": "### restore()\n\n> **restore**(): `Promise`\\<`void`\\>\n\nRestore a soft-deleted project.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Project.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "Project.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead this project's sharing configuration.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "Project.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Project`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Project`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Project` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "Project.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Project`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Project`\\>\n\n#### Inherited from\n\n`PropertiedEntity.unfavorite`",+ "Project.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "Project.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Project`\n\nA handle to a project 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`Project`",+ "Project.create": "### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Project`\\>\n\nCreate a project, optionally nested inside a parent project.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `name`: `string`; `parent?`: `Project`; \\} |\n| `opts.name` | `string` |\n| `opts.parent?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Project`\\>",+ "PropertiesNamespace": "# Class: PropertiesNamespace\n\nProperty definitions and tag sets. Entity-level reads and writes live on\nthe entity handles (`PropertiedEntity.properties`, `setProperty`,\n`deleteProperty`).",+ "PropertiesNamespace.addEntityPropertyOption": "### addEntityPropertyOption()\n\n> **addEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nAdd a select option to a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: `PropertiedEntity`\\<`unknown`\\>; `option`: `PropertyOption`; `property`: `PropertyDefinition`; \\} |\n| `opts.entity` | `PropertiedEntity`\\<`unknown`\\> |\n| `opts.option` | `PropertyOption` |\n| `opts.property` | `PropertyDefinition` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PropertiesNamespace.bulkEntityProperties": "### bulkEntityProperties()\n\n> **bulkEntityProperties**(`request`): `Promise`\\<`Record`\\<`string`, `EntityPropertiesResponse`\\>\\>\n\nGet properties for multiple entities in a single request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `BulkEntityPropertiesRequest` |\n\n#### Returns\n\n`Promise`\\<`Record`\\<`string`, `EntityPropertiesResponse`\\>\\>",+ "PropertiesNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`PropertyDefinition`\\>\n\nCreate a new custom property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `dataType`: `PropertyDataType`; `displayName`: `string`; `scope`: `CreatePropertyScope`; \\} |\n| `opts.dataType` | `PropertyDataType` |\n| `opts.displayName` | `string` |\n| `opts.scope` | `CreatePropertyScope` |\n\n#### Returns\n\n`Promise`\\<`PropertyDefinition`\\>",+ "PropertiesNamespace.definition": "### definition()\n\n> **definition**(`id`): `PropertyDefinition`\n\nA handle to an existing property definition by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`PropertyDefinition`",+ "PropertiesNamespace.list": "### list()\n\n> **list**(`opts?`): `Promise`\\<`PropertyDefinition`[]\\>\n\nList property definitions visible to the user, pre-hydrated with their records.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | \\{ `forEntityType?`: `PropertyTargetEntityType`; `scope?`: `PropertyScope`; \\} |\n| `opts.forEntityType?` | `PropertyTargetEntityType` |\n| `opts.scope?` | `PropertyScope` |\n\n#### Returns\n\n`Promise`\\<`PropertyDefinition`[]\\>",+ "PropertiesNamespace.removeEntityPropertyOption": "### removeEntityPropertyOption()\n\n> **removeEntityPropertyOption**(`opts`): `Promise`\\<`void`\\>\n\nRemove a select option from a multi-select property value on an entity.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `entity`: `PropertiedEntity`\\<`unknown`\\>; `option`: `PropertyOption`; `property`: `PropertyDefinition`; \\} |\n| `opts.entity` | `PropertiedEntity`\\<`unknown`\\> |\n| `opts.option` | `PropertyOption` |\n| `opts.property` | `PropertyDefinition` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PropertiesNamespace.tags": "### tags()\n\n> **tags**(): `Promise`\\<`TagSetResponse`[]\\>\n\nThe user's tag sets: their personal set, plus their team's when on a team.\n\n#### Returns\n\n`Promise`\\<`TagSetResponse`[]\\>",+ "PropertiesNamespace.updateEntityPropertyOptions": "### updateEntityPropertyOptions()\n\n> **updateEntityPropertyOptions**(`entities`, `change`): `Promise`\\<`BulkEntityOptionUpdateResult`[]\\>\n\nApply one multi-select option delta to several entity handles.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entities` | `PropertiedEntity`\\<`unknown`\\>[] |\n| `change` | `PropertyOptionDelta` |\n\n#### Returns\n\n`Promise`\\<`BulkEntityOptionUpdateResult`[]\\>",+ "PropertyDefinition": "# Class: PropertyDefinition\n\nA property definition: schema for a custom field that can be attached to\nentities. Obtain instances via PropertiesNamespace.create,\nPropertiesNamespace.list, or PropertiesNamespace.definition.\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` |\n\n## Accessors\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### dataType\n\n#### Get Signature\n\n> **get** **dataType**(): `Promise`\\<`properties.DataType`\\>\n\n##### Returns\n\n`Promise`\\<`properties.DataType`\\>\n\n***\n\n### displayName\n\n#### Get Signature\n\n> **get** **displayName**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### isMultiSelect\n\n#### Get Signature\n\n> **get** **isMultiSelect**(): `Promise`\\<`boolean`\\>\n\n##### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### isSystem\n\n#### Get Signature\n\n> **get** **isSystem**(): `Promise`\\<`boolean`\\>\n\n##### Returns\n\n`Promise`\\<`boolean`\\>\n\n***\n\n### owner\n\n#### Get Signature\n\n> **get** **owner**(): `Promise`\\<`properties.PropertyOwner`\\>\n\n##### Returns\n\n`Promise`\\<`properties.PropertyOwner`\\>\n\n***\n\n### updatedAt\n\n#### Get Signature\n\n> **get** **updatedAt**(): `Promise`\\<`string`\\>\n\n##### Returns\n\n`Promise`\\<`string`\\>",+ "PropertyDefinition.addOption": "### addOption()\n\n> **addOption**(`option`): `Promise`\\<`PropertyOption`\\>\n\nAdd an option to this select-type property.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | `AddPropertyOptionRequest` |\n\n#### Returns\n\n`Promise`\\<`PropertyOption`\\>",+ "PropertyDefinition.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this property definition.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PropertyDefinition.deleteOption": "### deleteOption()\n\n> **deleteOption**(`option`): `Promise`\\<`void`\\>\n\nDelete an option from this property.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | `PropertyOption` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PropertyDefinition.options": "### options()\n\n> **options**(): `Promise`\\<`PropertyOption`[]\\>\n\nThe selectable options for this definition (select-type properties).\n\n#### Returns\n\n`Promise`\\<`PropertyOption`[]\\>",+ "PropertyDefinition.updateOption": "### updateOption()\n\n> **updateOption**(`option`, `updates`): `Promise`\\<`PropertyOption`\\>\n\nUpdate an option (label, color, display order).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `option` | `PropertyOption` |\n| `updates` | `UpdatePropertyOptionRequest` |\n\n#### Returns\n\n`Promise`\\<`PropertyOption`\\>",+ "PropertyDefinition.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `PropertyDefinition`\n\nA handle to an existing definition by id. Fields load lazily on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`PropertyDefinition`",+ "PropertyDefinition.create": "### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`PropertyDefinition`\\>\n\nCreate a new property definition.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `dataType`: `PropertyDataType`; `displayName`: `string`; `scope`: `CreatePropertyScope`; \\} |\n| `opts.dataType` | `PropertyDataType` |\n| `opts.displayName` | `string` |\n| `opts.scope` | `CreatePropertyScope` |\n\n#### Returns\n\n`Promise`\\<`PropertyDefinition`\\>",+ "PropertyDefinition.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `PropertyDefinition`\n\nWrap a record already in hand (e.g. from a list response).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `properties.PropertyDefinition` |\n\n#### Returns\n\n`PropertyDefinition`",+ "PropertyOption": "# Class: PropertyOption\n\nA selectable option on a select-type property definition. There is no\nsingle-option GET, so instances are only built from a seed record — via\nPropertyDefinition.options or PropertyDefinition.addOption.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-definitionid\"></a> `definitionId` | `readonly` | `string` | The property definition this option belongs to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | - |\n\n## Accessors\n\n### color\n\n#### Get Signature\n\n> **get** **color**(): `string` \\| `undefined`\n\nThe option's display color, if set.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### createdAt\n\n#### Get Signature\n\n> **get** **createdAt**(): `string`\n\nWhen the option was created.\n\n##### Returns\n\n`string`\n\n***\n\n### displayOrder\n\n#### Get Signature\n\n> **get** **displayOrder**(): `number`\n\nThe option's position among its definition's options.\n\n##### Returns\n\n`number`\n\n***\n\n### updatedAt\n\n#### Get Signature\n\n> **get** **updatedAt**(): `string`\n\nWhen the option was last updated.\n\n##### Returns\n\n`string`\n\n***\n\n### value\n\n#### Get Signature\n\n> **get** **value**(): `properties.PropertyOptionValue`\n\nThe option's value (string or number, per the property's data type).\n\n##### Returns\n\n`properties.PropertyOptionValue`",+ "PropertyOption.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete this option from its property definition.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "PropertyOption.update": "### update()\n\n> **update**(`updates`): `Promise`\\<`PropertyOption`\\>\n\nUpdate this option's label, color, or display order.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | `UpdatePropertyOptionRequest` |\n\n#### Returns\n\n`Promise`\\<`PropertyOption`\\>",+ "PropertyOption.from": "### from()\n\n> `static` **from**(`client`, `definitionId`, `record`): `PropertyOption`\n\nWrap a record already in hand (e.g. from a list or create response).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `definitionId` | `string` |\n| `record` | `properties.PropertyOption` |\n\n#### Returns\n\n`PropertyOption`",+ "EntityReference": "# Type Alias: EntityReference\n\n> **EntityReference** = \\{ `entity`: `User`; `type`: `\"user\"`; \\} \\| \\{ `entity`: `Team`; `type`: `\"team\"`; \\} \\| \\{ `entity`: `Document`; `type`: `\"document\"`; \\} \\| \\{ `entity`: `Chat`; `type`: `\"chat\"`; \\} \\| \\{ `entity`: `Channel`; `type`: `\"channel\"`; \\} \\| \\{ `entity`: `Message`; `type`: `\"channel_message\"`; \\} \\| \\{ `entity`: `Project`; `type`: `\"project\"`; \\} \\| \\{ `entity`: `EmailThread`; `type`: `\"email_thread\"`; \\} \\| \\{ `entity`: `CalendarEvent`; `type`: `\"calendar_event\"`; \\} \\| \\{ `entity`: `CallRecord`; `type`: `\"call\"`; \\} \\| \\{ `entity`: `ForeignEntity`; `type`: `\"foreign_entity\"`; \\} \\| \\{ `entity`: `Company`; `type`: `\"crm_company\"`; \\} \\| \\{ `entity`: `Contact`; `type`: `\"crm_contact\"`; \\} \\| \\{ `entity`: `CrmPipeline`; `type`: `\"crm_pipeline\"`; \\} \\| \\{ `entity`: `AgentSession`; `type`: `\"agent_session\"`; \\} \\| \\{ `entity`: `Routine`; `type`: `\"scheduled_action\"`; \\} \\| \\{ `entity`: `Initiative`; `type`: `\"initiative\"`; \\} \\| \\{ `entity`: `Database`; `type`: `\"database\"`; \\} \\| \\{ `entity`: `DatabaseRow`; `type`: `\"database_row\"`; \\} \\| \\{ `entity`: `Form`; `type`: `\"form\"`; \\}\n\nTyped entity references accepted by cross-resource APIs.",+ "RoutineNamespace": "# Class: RoutineNamespace\n\nScheduled and event-triggered routines.",+ "RoutineNamespace.byId": "### byId()\n\n> **byId**(`id`): `Routine`\n\nConstruct a lazy routine handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Routine`",+ "RoutineNamespace.create": "### create()\n\n> **create**(`options`): `Promise`\\<`Routine`\\>\n\nCreate an agent routine.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n#### Returns\n\n`Promise`\\<`Routine`\\>",+ "RoutineNamespace.list": "### list()\n\n> **list**(`options?`): `Promise`\\<`Routine`[]\\>\n\nList routines, optionally including event triggers.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `includeEvents?`: `boolean`; \\} |\n| `options.includeEvents?` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`Routine`[]\\>",+ "Routine": "# Class: Routine\n\nA scheduled or event-triggered agent task.\n\n## Extends\n\n- `MacroEntity`\\<`ScheduledActionResponse`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-enabled\"></a> `enabled` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the routine is enabled. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Routine name. | - |\n| <a id=\"property-nextrunat\"></a> `nextRunAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Next scheduled execution. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | Routine owner. | - |\n| <a id=\"property-revision\"></a> `revision` | `readonly` | () => `Promise`\\<`number`\\> | Configuration revision. | - |\n| <a id=\"property-runvisibility\"></a> `runVisibility` | `readonly` | () => `Promise`\\<`RunVisibility`\\> | Whether the routine's runs appear in Home and the Agents list. | - |\n| <a id=\"property-trigger\"></a> `trigger` | `readonly` | () => `Promise`\\<`ActionTrigger`\\> | Configured triggers. | - |",+ "Routine.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the routine.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Routine.execute": "### execute()\n\n> **execute**(): `Promise`\\<`AgentSession` \\| `Chat` \\| `undefined`\\>\n\nStart an execution immediately and return its transcript handle if available.\n\n#### Returns\n\n`Promise`\\<`AgentSession` \\| `Chat` \\| `undefined`\\>",+ "Routine.history": "### history()\n\n> **history**(): `Promise`\\<`RoutineExecution`[]\\>\n\nCompleted executions, with their routine scoped identity.\n\n#### Returns\n\n`Promise`\\<`RoutineExecution`[]\\>",+ "Routine.setEnabled": "### setEnabled()\n\n> **setEnabled**(`enabled`): `Promise`\\<`void`\\>\n\nEnable or disable triggering.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `enabled` | `boolean` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Routine.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ScheduledActionResponse`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ScheduledActionResponse`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ScheduledActionResponse` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Routine.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nReplace the routine's task and trigger configuration.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Routine.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Routine`\n\nConstruct a lazy routine handle.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Routine`",+ "Routine.from": "### from()\n\n> `static` **from**(`client`, `record`): `Routine`\n\nSeed a handle from a server record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `ScheduledActionResponse` |\n\n#### Returns\n\n`Routine`",+ "RoutineExecution": "# Class: RoutineExecution\n\nA completed routine execution, as recorded by the service.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-record\"></a> `record` | `readonly` | `ActionExecutionRecord` | Execution snapshot. |\n| <a id=\"property-routine\"></a> `routine` | `readonly` | `Routine` | Parent routine. |\n\n## Accessors\n\n### id\n\n#### Get Signature\n\n> **get** **id**(): `string` \\| `undefined`\n\nExecution identity, when assigned.\n\n##### Returns\n\n`string` \\| `undefined`",+ "RoutineExecution.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `action_id`: `string`; `created_at`: `string`; `end_time`: `string`; `id?`: `string` \\| `null`; `is_success`: `boolean`; `resource_id?`: `string` \\| `null`; `result`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `routine`: `string`; `start_time`: `string`; \\}\n\nSerialize without the authenticated client.\n\n#### Returns\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `action_id` | `string` | - |\n| `created_at` | `string` | - |\n| `end_time` | `string` | - |\n| `id?` | `string` \\| `null` | - |\n| `is_success` | `boolean` | - |\n| `resource_id?` | `string` \\| `null` | ID of the primary resource produced by this run. Its type is recorded in `result`, independently of the routine's current configuration. |\n| `result` | \\{\\[`key`: `string`\\]: `unknown`; \\} | - |\n| `routine` | `string` | - |\n| `start_time` | `string` | - |",+ "routineBody": "# Function: routineBody()\n\n> **routineBody**(`options`): \\{ `enabled`: `boolean` \\| `undefined`; `kind`: `\"Agent\"`; `name`: `string`; `run_visibility`: `RunVisibility` \\| `undefined`; `task`: \\{ `agent?`: `AgentTaskAgent` \\| `null`; `mcp_servers?`: `scheduled-action.AgentMcpServer`[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\}; `trigger`: `ActionTrigger`; \\}\n\nTranslate typed routine options into the generated wire contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n## Returns\n\n\\{ `enabled`: `boolean` \\| `undefined`; `kind`: `\"Agent\"`; `name`: `string`; `run_visibility`: `RunVisibility` \\| `undefined`; `task`: \\{ `agent?`: `AgentTaskAgent` \\| `null`; `mcp_servers?`: `scheduled-action.AgentMcpServer`[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\}; `trigger`: `ActionTrigger`; \\}\n\n| Name | Type | Default value | Description |\n| ------ | ------ | ------ | ------ |\n| `enabled` | `boolean` \\| `undefined` | `options.enabled` | - |\n| `kind` | `\"Agent\"` | - | - |\n| `name` | `string` | `options.name` | - |\n| `run_visibility` | `RunVisibility` \\| `undefined` | `options.runVisibility` | - |\n| `task` | \\{ `agent?`: `AgentTaskAgent` \\| `null`; `mcp_servers?`: `scheduled-action.AgentMcpServer`[]; `model?`: `string` \\| `null`; `prompt`: `string`; `user_prompt`: `string`; \\} | - | - |\n| `task.agent?` | `AgentTaskAgent` \\| `null` | - | - |\n| `task.mcp_servers?` | `scheduled-action.AgentMcpServer`[] | - | Apps the routine requires on top of the agent's own. The owner must have each one connected to save the routine and for it to run. |\n| `task.model?` | `string` \\| `null` | - | - |\n| `task.prompt` | `string` | - | - |\n| `task.user_prompt` | `string` | - | - |\n| `trigger` | `ActionTrigger` | - | - |",+ "RoutineOptions": "# Interface: RoutineOptions\n\nConfiguration of an agent routine.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-agent\"></a> `agent?` | `Agent` | Agent to run the task. |\n| <a id=\"property-enabled\"></a> `enabled?` | `boolean` | Whether triggers can start executions. Defaults to true on creation. |\n| <a id=\"property-model\"></a> `model?` | `string` | Model override. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name. |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | Instructions delivered to the agent. |\n| <a id=\"property-runvisibility\"></a> `runVisibility?` | `RunVisibility` | Whether runs appear in Home and the Agents list. Defaults to `unlisted` on creation; an update that omits it keeps the stored value. |\n| <a id=\"property-trigger\"></a> `trigger` | `RoutineTriggerOptions` | Schedules or Macro events that start the routine. |\n| <a id=\"property-userprompt\"></a> `userPrompt` | `string` | Original user instructions. |",+ "RoutineEventFilter": "# Type Alias: RoutineEventFilter\n\n> **RoutineEventFilter** = `Omit`\\<`EventFilter`, `\"ids\"` \\| `\"condition\"`\\> & \\{ `condition?`: `string`; `entities?`: `EntityReference`[]; \\}\n\nAn event selector references resources by typed handles.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `condition?` | `string` | Optional yes/no condition on the triggering content. |\n| `entities?` | `EntityReference`[] | Resource selectors for these events. Omit to match all resources. |",+ "RoutineTriggerOptions": "# Type Alias: RoutineTriggerOptions\n\n> **RoutineTriggerOptions** = `SingleRoutineTrigger` \\| \\{ `triggers`: `SingleRoutineTrigger`[]; `type`: `\"multiple\"`; \\}\n\nOne or multiple routine triggers.",+ "SingleRoutineTrigger": "# Type Alias: SingleRoutineTrigger\n\n> **SingleRoutineTrigger** = `Extract`\\<`RoutineTrigger`, \\{ `type`: `\"cron\"`; \\}\\> \\| \\{ `filters`: `RoutineEventFilter`[]; `type`: `\"events\"`; \\}\n\nOne schedule or set of event selectors.",+ "entitySearch": "# Function: entitySearch()\n\n> **entitySearch**\\<`T`, `K`\\>(`opts`): (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`T`\\>\n\nBuild a `search(client, query, opts?)` function for one entity type: unified\nsearch hits narrowed to `type`, each mapped through `make`.\nMost relevant first, auto-paginated.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-t\"></a> `T` |\n| <a id=\"type-parameter-k\"></a> `K` *extends* `\"email\"` \\| `\"project\"` \\| `\"chat\"` \\| `\"channel\"` \\| `\"document\"` \\| `\"call\"` \\| `\"company\"` \\| `\"calendarEvent\"` \\| `\"agentSession\"` \\| `\"channelMessage\"` |\n\n## Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `filters?`: `EntityFilters`; `includeCrm?`: `boolean`; `make`: (`client`, `hit`) => `T`; `type`: `K`; \\} | - |\n| `opts.filters?` | `EntityFilters` | - |\n| `opts.includeCrm?` | `boolean` | Opt in to CRM results (off by default server-side; required for company hits). |\n| `opts.make` | (`client`, `hit`) => `T` | - |\n| `opts.type` | `K` | - |\n\n## Returns\n\n(`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`T`\\>",+ "SearchOpts": "# Interface: SearchOpts\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-pagesize\"></a> `pageSize?` | `number` |\n| <a id=\"property-searchon\"></a> `searchOn?` | `SearchOn` |",+ "SearchOn": "# Type Alias: SearchOn\n\n> **SearchOn** = `\"name\"` \\| `\"content\"` \\| `\"name_content\"`",+ "AccessRequest": "# Class: AccessRequest\n\nOne access request; resolutions preserve optimistic concurrency.\n\n## Extends\n\n- `MacroEntity`\\<`storage.AccessRequest`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | Entity access surface owning the request. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-requestedlevel\"></a> `requestedLevel` | `readonly` | () => `Promise`\\<`storage.AccessLevel`\\> | Requested access. | - |\n| <a id=\"property-requester\"></a> `requester` | `readonly` | () => `Promise`\\<`User`\\> | Requesting user. | - |\n| <a id=\"property-revision\"></a> `revision` | `readonly` | () => `Promise`\\<`number`\\> | Request revision. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`RequestStatus`\\> | Current request state. | - |",+ "AccessRequest.resolve": "### resolve()\n\n> **resolve**(`grantedLevel?`): `Promise`\\<`void`\\>\n\nApprove with an access level, or decline by omitting it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `grantedLevel?` | `storage.AccessLevel` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "AccessRequest.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.AccessRequest`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.AccessRequest`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.AccessRequest` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "AccessRequest.from": "### from()\n\n> `static` **from**(`client`, `access`, `record`): `AccessRequest`\n\nSeed a request from a state or submission response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `access` | `EntityAccess` |\n| `record` | `storage.AccessRequest` |\n\n#### Returns\n\n`AccessRequest`",+ "EntityAccess": "# Class: EntityAccess\n\nAccess requests and direct grants scoped to a shareable entity.",+ "EntityAccess.cancel": "### cancel()\n\n> **cancel**(`revision`): `Promise`\\<`void`\\>\n\nCancel the caller's own request at its observed revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `revision` | `number` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EntityAccess.direct": "### direct()\n\n> **direct**(): `Promise`\\<\\{ `accessLevel`: `storage.AccessLevel`; `user`: `User`; \\}[]\\>\n\nDirect grants expressed as user handles.\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: `storage.AccessLevel`; `user`: `User`; \\}[]\\>",+ "EntityAccess.grant": "### grant()\n\n> **grant**(`user`, `accessLevel?`): `Promise`\\<`void`\\>\n\nGrant direct access, or remove it by omitting the access level.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | `User` |\n| `accessLevel?` | `storage.AccessLevel` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EntityAccess.remove": "### remove()\n\n> **remove**(`user`): `Promise`\\<`void`\\>\n\nRemove one user's direct grant.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | `User` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "EntityAccess.resolve": "### resolve()\n\n> **resolve**(`request`, `resolution`): `Promise`\\<`storage.AccessRequest`\\>\n\nResolve a request belonging to this entity at an observed revision.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | `AccessRequest` |\n| `resolution` | `ResolveRequest` |\n\n#### Returns\n\n`Promise`\\<`storage.AccessRequest`\\>",+ "EntityAccess.state": "### state()\n\n> **state**(`offset?`): `Promise`\\<\\{ `accessLevel`: `storage.AccessLevel` \\| `undefined`; `canReview`: `boolean`; `mine`: `AccessRequest` \\| `undefined`; `nextOffset`: `number` \\| `undefined`; `owner`: `User` \\| `undefined`; `pendingCount`: `number`; `requests`: `AccessRequest`[]; `supportedLevels`: `storage.AccessLevel`[]; \\}\\>\n\nA page of access requests, including the caller's own request and review rights.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `offset?` | `number` |\n\n#### Returns\n\n`Promise`\\<\\{ `accessLevel`: `storage.AccessLevel` \\| `undefined`; `canReview`: `boolean`; `mine`: `AccessRequest` \\| `undefined`; `nextOffset`: `number` \\| `undefined`; `owner`: `User` \\| `undefined`; `pendingCount`: `number`; `requests`: `AccessRequest`[]; `supportedLevels`: `storage.AccessLevel`[]; \\}\\>",+ "EntityAccess.submit": "### submit()\n\n> **submit**(`requestedLevel`, `revision?`): `Promise`\\<`AccessRequest`\\>\n\nRequest access, optionally naming the revision of an earlier request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `requestedLevel` | `storage.AccessLevel` |\n| `revision?` | `number` |\n\n#### Returns\n\n`Promise`\\<`AccessRequest`\\>",+ "EntityAccess.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `entity_id`: `string`; `entity_type`: `ShareEntityType`; \\}\n\nSerialize the entity reference without credentials.\n\n#### Returns\n\n\\{ `entity_id`: `string`; `entity_type`: `ShareEntityType`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `entity_id` | `string` |\n| `entity_type` | `ShareEntityType` |",+ "sharePermissionBody": "# Function: sharePermissionBody()\n\n> **sharePermissionBody**(`options`): `UpdateSharePermissionRequestV2`\n\nConvert sharing options into the generated backend contract.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `SharePermissionOptions` |\n\n## Returns\n\n`UpdateSharePermissionRequestV2`",+ "SharePermissionOptions": "# Type Alias: SharePermissionOptions\n\n> **SharePermissionOptions** = `Omit`\\<`UpdateSharePermissionRequestV2`, `\"channelSharePermissions\"`\\> & \\{ `channelSharePermissions?`: \\{ `accessLevel?`: `storage.AccessLevel`; `channel`: `Channel`; `operation`: `UpdateChannelSharePermission`\\[`\"operation\"`\\]; \\}[] \\| `null`; \\}\n\nSharing updates reference channels by handle. Null clears the corresponding grant collection.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `channelSharePermissions?` | \\{ `accessLevel?`: `storage.AccessLevel`; `channel`: `Channel`; `operation`: `UpdateChannelSharePermission`\\[`\"operation\"`\\]; \\}[] \\| `null` | Channel grants to create or replace. |",+ "TaskNamespace": "# Class: TaskNamespace",+ "TaskNamespace.byId": "### byId()\n\n> **byId**(`id`): `Task`\n\nA handle to a task by document id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Task`",+ "TaskNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`Task`\\>\n\nCreate a task.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: `Project`; `shareWithTeam?`: `boolean`; `team?`: `Team`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n| `opts.shareWithTeam?` | `boolean` |\n| `opts.team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<`Task`\\>",+ "TaskNamespace.forPullRequest": "### forPullRequest()\n\n> **forPullRequest**(`url`): `Promise`\\<`Task`[]\\>\n\nThe tasks the GitHub pull request at `url` references, oldest link first.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Task`[]\\>",+ "TaskNamespace.search": "### search()\n\n> **search**(`query`, `opts?`): `AsyncGenerator`\\<`Task`\\>\n\nSearch tasks by name and content, most relevant first, auto-paginated.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n| `opts?` | `SearchOpts` |\n\n#### Returns\n\n`AsyncGenerator`\\<`Task`\\>",+ "Task": "# Class: Task\n\nA Macro task: a document with sub-type `task`. Inherits the full document\nsurface (`Document.rename`, move, delete, restore, content, events)\nand adds task-specific state.\n\n## Extends\n\n- `Document`\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | `EntityAccess` | `...` | Access requests and direct user grants. | - | `Document.access` |\n| <a id=\"property-branchedfrom\"></a> `branchedFrom` | `readonly` | () => `Promise`\\<`Document` \\| `undefined`\\> | `...` | The document this one was branched from, if any. | - | `Document.branchedFrom` |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was created. | - | `Document.createdAt` |\n| <a id=\"property-deletedat\"></a> `deletedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was deleted, if it has been. | - | `Document.deletedAt` |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"document\"` | `'document'` | Favorites identify documents as `document`. | - | `Document.entityType` |\n| <a id=\"property-filetype\"></a> `fileType` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | The document's file type (e.g. `md`, `pdf`, `docx`). | - | `Document.fileType` |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `Document.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | `...` | The document's display name. | - | `Document.name` |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | `...` | The user who owns the document. | - | `Document.owner` |\n| <a id=\"property-project\"></a> `project` | `readonly` | () => `Promise`\\<`Project` \\| `undefined`\\> | `...` | The project this document belongs to, if any. | - | `Document.project` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | `...` | When the document was last updated. | - | `Document.updatedAt` |\n| <a id=\"property-search\"></a> `search` | `static` | (`client`, `query`, `searchOpts?`) => `AsyncGenerator`\\<`Task`\\> | `...` | Search tasks by name and content, most relevant first, auto-paginated. | `Document.search` | - |",+ "Task.anchors": "### anchors()\n\n> **anchors**(): `Promise`\\<`DocumentAnchor`[]\\>\n\nPDF annotations in this document.\n\n#### Returns\n\n`Promise`\\<`DocumentAnchor`[]\\>\n\n#### Inherited from\n\n`Document.anchors`",+ "Task.branchName": "### 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#### Inherited from\n\n`Document.branchName`",+ "Task.comment": "### comment()\n\n> **comment**(`body`, `opts?`): `Promise`\\<`Comment`\\>\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` | Plain text, or a rich body composed with msg. |\n| `opts?` | \\{ `threadId?`: `string`; \\} | - |\n| `opts.threadId?` | `string` | - |\n\n#### Returns\n\n`Promise`\\<`Comment`\\>\n\nThe created comment.\n\n#### Inherited from\n\n`Document.comment`",+ "Task.comments": "### comments()\n\n> **comments**(): `Promise`\\<`CommentThread`[]\\>\n\nThe document's live comment threads, each with its comments, newest thread first.\n\n#### Returns\n\n`Promise`\\<`CommentThread`[]\\>\n\n#### Inherited from\n\n`Document.comments`",+ "Task.completed": "### completed()\n\n> **completed**(): `Promise`\\<`boolean` \\| `undefined`\\>\n\nWhether the task is completed (its Status property is \"Completed\");\n`undefined` if the document is not a task.\n\n#### Returns\n\n`Promise`\\<`boolean` \\| `undefined`\\>",+ "Task.content": "### 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#### Inherited from\n\n`Document.content`",+ "Task.copy": "### 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#### Inherited from\n\n`Document.copy`",+ "Task.createHighlight": "### createHighlight()\n\n> **createHighlight**(`options`): `Promise`\\<`DocumentAnchor`\\>\n\nCreate a standalone PDF highlight.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `Omit`\\<`PdfHighlightAnchorRequest`, `\"uuid\"`\\> |\n\n#### Returns\n\n`Promise`\\<`DocumentAnchor`\\>\n\n#### Inherited from\n\n`Document.createHighlight`",+ "Task.delete": "### delete()\n\n> **delete**(`opts?`): `Promise`\\<`void`\\>\n\nDelete the document. Soft by default (reversible with `Document.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#### Inherited from\n\n`Document.delete`",+ "Task.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`Document.deleteProperty`",+ "Task.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`Task`\\>\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`\\<`Task`\\>\n\n#### Inherited from\n\n`Document.favorite`",+ "Task.githubPullRequests": "### githubPullRequests()\n\n> **githubPullRequests**(): `Promise`\\<`storage.GithubPullRequest`[]\\>\n\nGitHub pull requests associated with the document.\n\n#### Returns\n\n`Promise`\\<`storage.GithubPullRequest`[]\\>\n\n#### Inherited from\n\n`Document.githubPullRequests`",+ "Task.meetingNotes": "### meetingNotes()\n\n> **meetingNotes**(): `Promise`\\<\\{ `eventTitle`: `string`; `note`: `CalendarNote`; \\}[]\\>\n\nMeeting links visible to the reader. Owners also receive unavailable grants and may unlink them to revoke meeting/team access.\n\n#### Returns\n\n`Promise`\\<\\{ `eventTitle`: `string`; `note`: `CalendarNote`; \\}[]\\>\n\n#### Inherited from\n\n`Document.meetingNotes`",+ "Task.messageThreadById": "### messageThreadById()\n\n> **messageThreadById**(`id`): `MessageThread`\n\nA shared message thread scoped to this resource.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`MessageThread`\n\n#### Inherited from\n\n`Document.messageThreadById`",+ "Task.move": "### 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` \\| `null` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`Document.move`",+ "Task.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`Document.permission`",+ "Task.permissionsToken": "### permissionsToken()\n\n> **permissionsToken**(): `Promise`\\<`string`\\>\n\nMint a scoped permissions token.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n#### Inherited from\n\n`Document.permissionsToken`",+ "Task.prepareSave": "### prepareSave()\n\n> **prepareSave**(`parts`): `Promise`\\<`PreSaveDocumentResponseData`\\>\n\nPrepare multipart content saving and return the service's upload instructions.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `parts` | `SaveBomPart`[] |\n\n#### Returns\n\n`Promise`\\<`PreSaveDocumentResponseData`\\>\n\n#### Inherited from\n\n`Document.prepareSave`",+ "Task.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`Document.properties`",+ "Task.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`Document.propertyReference`",+ "Task.rename": "### 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#### Inherited from\n\n`Document.rename`",+ "Task.restore": "### restore()\n\n> **restore**(): `Promise`\\<`void`\\>\n\nRestore a soft-deleted document.\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`Document.restore`",+ "Task.save": "### save()\n\n> **save**(`options`): `Promise`\\<`SaveDocumentResponseData`\\>\n\nCommit uploaded content. Does not retry uncertain writes.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `SaveDocumentRequest` |\n\n#### Returns\n\n`Promise`\\<`SaveDocumentResponseData`\\>\n\n#### Inherited from\n\n`Document.save`",+ "Task.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`Document.setProperty`",+ "Task.setTeamShare": "### 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#### Inherited from\n\n`Document.setTeamShare`",+ "Task.sharePermissions": "### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nSharing configuration.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>\n\n#### Inherited from\n\n`Document.sharePermissions`",+ "Task.shortId": "### 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#### Inherited from\n\n`Document.shortId`",+ "Task.simpleSave": "### simpleSave()\n\n> **simpleSave**(): `Promise`\\<`SaveDocumentResponseData`\\>\n\nCommit a simple document save.\n\n#### Returns\n\n`Promise`\\<`SaveDocumentResponseData`\\>\n\n#### Inherited from\n\n`Document.simpleSave`",+ "Task.teamShare": "### teamShare()\n\n> **teamShare**(): `Promise`\\<`DocumentTeamShareResponse`\\>\n\nWhether the document is shared with the owner's team, and which team.\n\n#### Returns\n\n`Promise`\\<`DocumentTeamShareResponse`\\>\n\n#### Inherited from\n\n`Document.teamShare`",+ "Task.timelinePage": "### timelinePage()\n\n> **timelinePage**(`selection?`): `Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Comment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\nA mixed message and activity timeline page.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `selection?` | `TimelineOptions`\\<`Comment`\\> |\n\n#### Returns\n\n`Promise`\\<\\{ `entries`: (\\{ `activity`: \\{ `action`: `string`; `actor`: `User`; `actor_id`: `string`; `id`: `string`; `occurred_at`: `string`; `payload?`: `unknown`; \\}; `message?`: `undefined`; `type`: `\"activity\"`; \\} \\| \\{ `activity?`: `undefined`; `message`: `Comment`; `type`: `\"message\"`; \\})[]; `nextCursor`: `MessageCursor` \\| `undefined`; `previousCursor`: `MessageCursor` \\| `undefined`; \\}\\>\n\n#### Inherited from\n\n`Document.timelinePage`",+ "Task.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DocumentMetadataWithContent` |\n| `id` | `string` |\n\n#### Inherited from\n\n`Document.toJSON`",+ "Task.toMention": "### toMention()\n\n> **toMention**(): `MentionPart`\n\n#### Returns\n\n`MentionPart`\n\n#### Inherited from\n\n`Document.toMention`",+ "Task.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`Task`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`Task`\\>\n\n#### Inherited from\n\n`Document.unfavorite`",+ "Task.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`Document.updatePropertyOptions`",+ "Task.version": "### version()\n\n> **version**(`version`): `DocumentVersion`\n\nA handle to an immutable version.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `version` | `number` |\n\n#### Returns\n\n`DocumentVersion`\n\n#### Inherited from\n\n`Document.version`",+ "Task.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe task's URL in the Macro web app.\n\n#### Returns\n\n`string`\n\n#### Overrides\n\n`Document.webUrl`",+ "Task.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Task`\n\nA handle to a task by document 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`Task`\n\n#### Overrides\n\n`Document.byId`",+ "Task.create": "### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Task`\\>\n\nCreate a task. `team` scopes the team task number and may be omitted\nwhen the creator belongs to exactly one team; `shareWithTeam` defaults\nto true.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `markdown?`: `string`; `name`: `string`; `project?`: `Project`; `shareWithTeam?`: `boolean`; `team?`: `Team`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n| `opts.shareWithTeam?` | `boolean` |\n| `opts.team?` | `Team` |\n\n#### Returns\n\n`Promise`\\<`Task`\\>\n\n#### Overrides\n\n`Document.create`",+ "Task.createSkill": "### 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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n`Document.createSkill`",+ "Task.createSnippet": "### 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`; \\} |\n| `opts.markdown?` | `string` |\n| `opts.name` | `string` |\n| `opts.project?` | `Project` |\n\n#### Returns\n\n`Promise`\\<`Document`\\>\n\n#### Inherited from\n\n`Document.createSnippet`",+ "Task.forPullRequest": "### forPullRequest()\n\n> `static` **forPullRequest**(`client`, `url`): `Promise`\\<`Task`[]\\>\n\nThe tasks the GitHub pull request at `url` references (as `MACRO-<id>` in\nits text, branch, or comments), oldest link first. Empty when the caller\ncannot see the pull request; tasks the caller cannot open still appear.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Task`[]\\>",+ "Task.recent": "### 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#### Inherited from\n\n`Document.recent`",+ "Task.recentlyDeleted": "### 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#### Inherited from\n\n`Document.recentlyDeleted`",+ "TeamNamespace": "# Class: TeamNamespace",+ "TeamNamespace.byId": "### byId()\n\n> **byId**(`id`): `Team`\n\nA handle to a team by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Team`",+ "TeamNamespace.current": "### current()\n\n> **current**(): `Promise`\\<`Team`\\>\n\nThe caller's current team.\n\n#### Returns\n\n`Promise`\\<`Team`\\>",+ "TeamNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Team`[]\\>\n\nThe teams the caller belongs to.\n\n#### Returns\n\n`Promise`\\<`Team`[]\\>",+ "Team": "# Class: Team\n\nA Macro team. A free-to-construct handle; the record loads lazily on first\nfield access, resolved from the caller's team memberships.\n\n## Extends\n\n- `MacroEntity`\\<`auth.Team`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-defaultlinkshare\"></a> `defaultLinkShare` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkShare \\| null \\| undefined\\> \\| `undefined`\\> | The team's default link-share scope for newly shared items, or null when link sharing is off by default. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The team's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | The user who owns the team. | - |\n| <a id=\"property-slug\"></a> `slug` | `readonly` | () => `Promise`\\<`string`\\> | The team's slug (its URL identifier). | - |",+ "Team.members": "### members()\n\n> **members**(): `Promise`\\<`TeamMembership`[]\\>\n\nThe team's members, with their roles. The API only exposes members for\nthe caller's current team, so this rejects for any other team.\n\n#### Returns\n\n`Promise`\\<`TeamMembership`[]\\>",+ "Team.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `auth.Team`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `auth.Team`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `auth.Team` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Team.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Team`\n\nA handle to a team 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`Team`",+ "Team.current": "### current()\n\n> `static` **current**(`client`): `Promise`\\<`Team`\\>\n\nThe caller's current team.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Team`\\>",+ "Team.list": "### list()\n\n> `static` **list**(`client`): `Promise`\\<`Team`[]\\>\n\nThe teams the caller belongs to.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`Team`[]\\>",+ "TeamMembership": "# Interface: TeamMembership\n\nA member of a team: the user and their role.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-role\"></a> `role` | `auth.TeamRole` | Their role on the team. |\n| <a id=\"property-user\"></a> `user` | `User` | The member. |",+ "UnfurlNamespace": "# Class: UnfurlNamespace\n\nURL metadata lookup.",+ "UnfurlNamespace.bulk": "### bulk()\n\n> **bulk**(`urls`): `Promise`\\<`GetUnfurlBulkResponse`\\>\n\nRead metadata for multiple URLs in one request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `urls` | `string`[] |\n\n#### Returns\n\n`Promise`\\<`GetUnfurlBulkResponse`\\>",+ "UnfurlNamespace.get": "### get()\n\n> **get**(`url`): `Promise`\\<`GetUnfurlResponse`\\>\n\nRead title, description and preview metadata for a URL.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`GetUnfurlResponse`\\>",+ "UserNamespace": "# Class: UserNamespace",+ "UserNamespace.byId": "### byId()\n\n> **byId**(`id`): `User`\n\nA handle to a user by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`User`",+ "UserNamespace.me": "### me()\n\n> **me**(): `Promise`\\<`User`\\>\n\nThe current authenticated user.\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "UserNamespace.search": "### search()\n\n> **search**(`query`): `Promise`\\<`User`[]\\>\n\nFind people in your existing Macro contacts by name or email, as in the\nmention picker. This is not a global directory. Returns every matching\ncontact so callers can disambiguate; it never chooses a person for you.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `query` | `string` |\n\n#### Returns\n\n`Promise`\\<`User`[]\\>",+ "User": "# Class: User\n\nA Macro user. Identity lives in the auth service, so details like the\ndisplay name are fetched on demand. Can be dropped into a msg\ntemplate to @-mention the user.\n\n## Extends\n\n- `PropertiedEntity`\\<`UserName`\\>\n\n## Implements\n\n- `Mentionable`\n\n## Properties\n\n| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"user\"` | `'user'` | Favorites identify users as `user`. | `PropertiedEntity.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | `undefined` | - | - | `PropertiedEntity.id` |",+ "User.deleteProperty": "### 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` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.deleteProperty`",+ "User.dm": "### dm()\n\n> **dm**(): `Promise`\\<`Channel`\\>\n\nOpen (or create) your direct-message channel with this user.\n\n#### Returns\n\n`Promise`\\<`Channel`\\>\n\nThe DM `Channel`.",+ "User.email": "### email()\n\n> **email**(): `string` \\| `undefined`\n\nThis user's email address. Macro user ids encode it as `macro|<email>`,\nso this reads straight off the id — no auth-service endpoint returns\nemails for arbitrary users.\n\n#### Returns\n\n`string` \\| `undefined`\n\nThe email, or `undefined` if the id is not email-derived.",+ "User.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`User`\\>\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`\\<`User`\\>\n\n#### Inherited from\n\n`PropertiedEntity.favorite`",+ "User.name": "### name()\n\n> **name**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThis user's display name, fetched from the auth service (falling back to\nyour email contacts when the Macro profile has none).\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\nThe full name, or `undefined` if the user has no name on record.",+ "User.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`PropertiedEntity.permission`",+ "User.properties": "### properties()\n\n> **properties**(`opts?`): `Promise`\\<`EntityPropertyWithDefinition`[]\\>\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`[]\\>\n\n#### Inherited from\n\n`PropertiedEntity.properties`",+ "User.propertyReference": "### propertyReference()\n\n> **propertyReference**(): `PropertyTargetReference`\n\nThis entity's reference for bulk property operations.\n\n#### Returns\n\n`PropertyTargetReference`\n\n#### Inherited from\n\n`PropertiedEntity.propertyReference`",+ "User.setProperty": "### 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` |\n| `value?` | `properties.SetPropertyValue` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Inherited from\n\n`PropertiedEntity.setProperty`",+ "User.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `UserName`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `UserName`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `UserName` |\n| `id` | `string` |\n\n#### Inherited from\n\n`PropertiedEntity.toJSON`",+ "User.toMention": "### toMention()\n\n> **toMention**(): `MentionPart`\n\n#### Returns\n\n`MentionPart`\n\n#### Implementation of\n\n`Mentionable.toMention`",+ "User.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`User`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`User`\\>\n\n#### Inherited from\n\n`PropertiedEntity.unfavorite`",+ "User.updatePropertyOptions": "### updatePropertyOptions()\n\n> **updatePropertyOptions**(`changes`): `Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\nApply multi-select option deltas atomically across this entity's properties.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `changes` | `PropertyOptionDelta`[] |\n\n#### Returns\n\n`Promise`\\<`BulkUpdateEntityPropertyOptionsResponse`\\>\n\n#### Inherited from\n\n`PropertiedEntity.updatePropertyOptions`",+ "User.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `User`\n\nA handle to a user by id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`User`",+ "User.fromName": "### fromName()\n\n> `static` **fromName**(`client`, `name`): `User`\n\nA user handle seeded with an already loaded auth-service name.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `name` | `UserName` |\n\n#### Returns\n\n`User`",+ "User.me": "### me()\n\n> `static` **me**(`client`): `Promise`\\<`User`\\>\n\nA handle to the current authenticated user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`User`\\>",+ "WebhooksNamespace": "# Class: WebhooksNamespace\n\nWebhook registrations for receiving signed entity-event deliveries.",+ "WebhooksNamespace.byId": "### byId()\n\n> **byId**(`id`): `Webhook`\n\nA handle to an existing webhook by id. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`Webhook`",+ "WebhooksNamespace.create": "### create()\n\n> **create**(`opts`): `Promise`\\<`Webhook`\\>\n\nRegister a webhook. `namespace` must be unique among the owning\nworkspace's webhooks (the endpoint returns 409 on a clash) and cannot be\nchanged later. `filters` must be non-empty (each entry matches event\nnames, optionally narrowed to entity ids); `scope` defaults to `'user'`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `filters`: `WebhookFilter`[]; `headers?`: `Record`\\<`string`, `string`\\>; `name`: `string`; `namespace`: `string`; `scope?`: `WebhookScope`; `url`: `string`; \\} |\n| `opts.filters` | `WebhookFilter`[] |\n| `opts.headers?` | `Record`\\<`string`, `string`\\> |\n| `opts.name` | `string` |\n| `opts.namespace` | `string` |\n| `opts.scope?` | `WebhookScope` |\n| `opts.url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Webhook`\\>",+ "WebhooksNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`Webhook`[]\\>\n\nThe caller's webhooks across their personal and team workspaces, newest\nfirst. Each returned handle already holds its record.\n\n#### Returns\n\n`Promise`\\<`Webhook`[]\\>",+ "Webhook": "# Class: Webhook\n\nA webhook registration: an HTTPS endpoint Macro delivers signed entity\nevents to.\n\nA free-to-construct `(client, id)` handle like any other entity: the detail\nrecord loads lazily from the webhook GET endpoint on first field access and\nis dropped after any mutation. WebhooksNamespace.list enumerates the\ncaller's webhooks across their personal and team workspaces.\n\nThe signing secret is only ever returned once, from [create](#create); it's\nexposed there as [Webhook.signingSecret](#property-signingsecret). Save it — patches, gets,\nand `byId` handles never carry it again — and pass it to\n`MacroOpts.webhookSecret` so `macro.events.webhook()` can verify\ndeliveries. Live SSE via `macro.events.listen()` does not use a\npersisted webhook or signing secret.\n\n## Extends\n\n- `MacroEntity`\\<`storage.Webhook`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the webhook was created. | - |\n| <a id=\"property-createdby\"></a> `createdBy` | `readonly` | () => `Promise`\\<`User`\\> | The user who registered this webhook. | - |\n| <a id=\"property-endpointurl\"></a> `endpointUrl` | `readonly` | () => `Promise`\\<`string`\\> | The HTTPS endpoint URL deliveries are sent to. | - |\n| <a id=\"property-filters\"></a> `filters` | `readonly` | () => `Promise`\\<`storage.Vec`\\> | The event/entity-id filters that gate deliveries. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-isvalid\"></a> `isValid` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the current endpoint configuration has passed validation. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The webhook's display name. | - |\n| <a id=\"property-namespace\"></a> `namespace` | `readonly` | () => `Promise`\\<`string`\\> | The caller-chosen namespace, unique among the owning workspace's webhooks. Fixed at creation time; it cannot be patched. | - |\n| <a id=\"property-signingsecret\"></a> `signingSecret?` | `readonly` | `string` | The signing secret used to verify deliveries, present only on the handle returned by [create](#create). `undefined` for `byId` and listed handles. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<`WebhookStatus`\\> | The webhook's lifecycle status. | - |\n| <a id=\"property-workspaceid\"></a> `workspaceId` | `readonly` | () => `Promise`\\<`string`\\> | The owning workspace id: the creator's user id for a personal webhook, or a team id for a team webhook. | - |",+ "Webhook.delete": "### delete()\n\n> **delete**(): `Promise`\\<`void`\\>\n\nDelete the webhook.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.pause": "### pause()\n\n> **pause**(): `Promise`\\<`void`\\>\n\nPause deliveries.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.rename": "### rename()\n\n> **rename**(`name`): `Promise`\\<`void`\\>\n\nRename the webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `name` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.resume": "### resume()\n\n> **resume**(): `Promise`\\<`void`\\>\n\nResume deliveries.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.scope": "### scope()\n\n> **scope**(): `Promise`\\<`WebhookScope`\\>\n\nWhether this webhook is owned by the caller personally (`user`) or by\ntheir team (`team`). Derived from ownership: a personal webhook's owning\nworkspace is the creator's own user id, whereas a team webhook's workspace\nis a distinct team id.\n\n#### Returns\n\n`Promise`\\<`WebhookScope`\\>",+ "Webhook.setFilters": "### setFilters()\n\n> **setFilters**(`filters`): `Promise`\\<`void`\\>\n\nReplace the webhook's delivery filters (must be non-empty).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `filters` | `WebhookFilter`[] |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.setUrl": "### setUrl()\n\n> **setUrl**(`url`): `Promise`\\<`void`\\>\n\nPoint the webhook at a new HTTPS endpoint URL.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `url` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.Webhook`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.Webhook`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Webhook` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "Webhook.update": "### update()\n\n> **update**(`body`): `Promise`\\<`void`\\>\n\nUpdate the webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `PatchWebhookRequest` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "Webhook.validate": "### validate()\n\n> **validate**(): `Promise`\\<`ValidateWebhookResponse`\\>\n\nSend a signed validation test delivery to the endpoint and report whether\nit was accepted. Drops the cached detail so a subsequent [isValid](#property-isvalid)\nread reflects the new validation state.\n\n#### Returns\n\n`Promise`\\<`ValidateWebhookResponse`\\>",+ "Webhook.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `Webhook`\n\nA handle to a webhook 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`Webhook`",+ "Webhook.create": "### create()\n\n> `static` **create**(`client`, `opts`): `Promise`\\<`Webhook`\\>\n\nRegister a webhook.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `filters`: `WebhookFilter`[]; `headers?`: `Record`\\<`string`, `string`\\>; `name`: `string`; `namespace`: `string`; `scope?`: `WebhookScope`; `url`: `string`; \\} |\n| `opts.filters` | `WebhookFilter`[] |\n| `opts.headers?` | `Record`\\<`string`, `string`\\> |\n| `opts.name` | `string` |\n| `opts.namespace` | `string` |\n| `opts.scope?` | `WebhookScope` |\n| `opts.url` | `string` |\n\n#### Returns\n\n`Promise`\\<`Webhook`\\>",+ "Webhook.fromRecord": "### fromRecord()\n\n> `static` **fromRecord**(`client`, `record`): `Webhook`\n\nWrap an already-loaded record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `storage.Webhook` |\n\n#### Returns\n\n`Webhook`",+ "WhatsAppAccount": "# Class: WhatsAppAccount\n\nThe current user's WhatsApp account, connected through the Macro app.\n\n## Extends\n\n- `MacroEntity`\\<`LinkedAccount`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-identity\"></a> `identity` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Verified remote identity, absent until pairing succeeds. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | The Macro user who owns this account. | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<`LinkedAccountState`\\> | Account connection state; call refresh before polling it again. | - |",+ "WhatsAppAccount.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppAccount`\\>\n\nDiscard cached connection state and load its current value.\n\n#### Returns\n\n`Promise`\\<`WhatsAppAccount`\\>",+ "WhatsAppAccount.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `LinkedAccount`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `LinkedAccount`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `LinkedAccount` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "WhatsAppAccount.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `WhatsAppAccount`\n\nReference an account; reads still enforce the authenticated owner's scope.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppAccount`",+ "WhatsAppAccount.from": "### from()\n\n> `static` **from**(`client`, `record`): `WhatsAppAccount`\n\nSeed an account handle from an API record.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `LinkedAccount` |\n\n#### Returns\n\n`WhatsAppAccount`",+ "WhatsAppChat": "# Class: WhatsAppChat\n\nOne chat of the current user's WhatsApp chat list: a group or a direct chat.\n\n## Extends\n\n- `MacroEntity`\\<`LinkedChat`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-archived\"></a> `archived` | `readonly` | () => `Promise`\\<`boolean`\\> | Archived in WhatsApp. | - |\n| <a id=\"property-canadd\"></a> `canAdd` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether adding it to Macro works now. | - |\n| <a id=\"property-cannotaddreason\"></a> `cannotAddReason` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedCannotAdd \\| null \\| undefined\\> \\| `undefined`\\> | Why it can't be added (`not_in_group`, `community`, `own_chat`, `not_in_chat_list`), when it is neither added, shared nor addable. | - |\n| <a id=\"property-community\"></a> `community` | `readonly` | () => `Promise`\\<`WhatsAppCommunity` \\| `undefined`\\> | The WhatsApp community a group belongs to, if any: the community's own chat, its name, and whether this is its announcement group. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | () => `Promise`\\<`WhatsAppGroup` \\| `undefined`\\> | The current user's own Macro group for this chat, once added. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`LinkedChatKind`\\> | `group` or `direct`. | - |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Newest activity WhatsApp reported, when known. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Group subject (or member names), or the other person's name or number. | - |\n| <a id=\"property-pinned\"></a> `pinned` | `readonly` | () => `Promise`\\<`boolean`\\> | Pinned in WhatsApp. | - |\n| <a id=\"property-shared\"></a> `shared` | `readonly` | () => `Promise`\\<`WhatsAppGroup` \\| `undefined`\\> | Someone else's Macro group for this chat, shared with the current user. | - |",+ "WhatsAppChat.adopt": "### adopt()\n\n> **adopt**(): `Promise`\\<`WhatsAppGroup`\\>\n\nAdd the chat (a group or a direct chat) to Macro as the current user's\nown; its earlier messages are imported from the phone. Adding it again\nreturns the same chat. Only the owner sends in a direct chat.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`\\>",+ "WhatsAppChat.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppChat`\\>\n\nReload the chat's list entry.\n\n#### Returns\n\n`Promise`\\<`WhatsAppChat`\\>",+ "WhatsAppChat.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `LinkedChat`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `LinkedChat`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `LinkedChat` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "WhatsAppChat.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `WhatsAppChat`\n\nReference a chat by its WhatsApp JID.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppChat`",+ "WhatsAppChat.from": "### from()\n\n> `static` **from**(`client`, `record`): `WhatsAppChat`\n\nSeed a chat handle from the chat list.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `LinkedChat` |\n\n#### Returns\n\n`WhatsAppChat`",+ "communityOf": "# Function: communityOf()\n\n> **communityOf**(`client`, `record`): `WhatsAppCommunity`\n\nA community reference as a handle on the community's own chat.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `LinkedCommunityReference` |\n\n## Returns\n\n`WhatsAppCommunity`",+ "WhatsAppCommunity": "# Type Alias: WhatsAppCommunity\n\n> **WhatsAppCommunity** = \\{ `announcements`: `boolean`; `chat`: `WhatsAppChat`; `name`: `string`; \\}\n\nThe WhatsApp community a group belongs to.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-announcements\"></a> `announcements` | `boolean` | This group is the community's announcement group. |\n| <a id=\"property-chat\"></a> `chat` | `WhatsAppChat` | The community itself, as a chat of the list (it can't be added). |\n| <a id=\"property-name\"></a> `name` | `string` | The community's name. |",+ "WhatsAppGroup": "# Class: WhatsAppGroup\n\nIndependently shareable added WhatsApp chat: a group or a direct chat.\n\n## Extends\n\n- `FavoritableEntity`\\<`WhatsAppGroupDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill` | `readonly` | () => `Promise`\\<`LinkedBackfill` \\| `undefined`\\> | Importing earlier messages from the owner's phone after adding, if any. | - | - |\n| <a id=\"property-cansend\"></a> `canSend` | `readonly` | () => `Promise`\\<`boolean`\\> | Whether the caller can send from their own connected account. | - | - |\n| <a id=\"property-community\"></a> `community` | `readonly` | () => `Promise`\\<`WhatsAppCommunity` \\| `undefined`\\> | The WhatsApp community this group belongs to, if any: the community's own chat, its name, and whether this is its announcement group. | - | - |\n| <a id=\"property-disappearingseconds\"></a> `disappearingSeconds` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | WhatsApp's disappearing-messages timer in seconds while on; Macro keeps the messages. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"whatsapp_group\"` | Canonical sharing and favorites kind. | `FavoritableEntity.entityType` | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | - | `FavoritableEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`LinkedChatKind`\\> | `group`, or `direct` for a one-to-one chat (only its owner sends). | - | - |\n| <a id=\"property-limits\"></a> `limits` | `readonly` | () => `Promise`\\<`LinkedCapabilities`\\> | Supported sizes and mutation window. | - | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Display name: the group's, or a direct chat's other person. | - | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<`User`\\> | Actual owner, independent of WhatsApp membership. | - | - |\n| <a id=\"property-participants\"></a> `participants` | `readonly` | () => `Promise`\\<`WhatsAppParticipant`[]\\> | Everyone in the chat, from its roster; empty when no roster is known. | - | - |\n| <a id=\"property-roster\"></a> `roster` | `readonly` | () => `Promise`\\<`WhatsAppRoster` \\| `undefined`\\> | Current remote roster (name, participants, announce), when available. | - | - |\n| <a id=\"property-sendingidentity\"></a> `sendingIdentity` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Caller's own verified sending identity. | - | - |\n| <a id=\"property-sendreason\"></a> `sendReason` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedReplyBlock \\| null \\| undefined\\> \\| `undefined`\\> | Reason sending is blocked. | - | - |\n| <a id=\"property-unreadcount\"></a> `unreadCount` | `readonly` | () => `Promise`\\<`number`\\> | Per-user unread count. | - | - |",+ "WhatsAppGroup.delivery": "### delivery()\n\n> **delivery**(`sends`): `Promise`\\<`WhatsAppSend`[]\\>\n\nRead delivery for selected caller-owned intents or messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sends` | (`WhatsAppMessage` \\| `WhatsAppSend`)[] |\n\n#### Returns\n\n`Promise`\\<`WhatsAppSend`[]\\>",+ "WhatsAppGroup.detach": "### detach()\n\n> **detach**(): `Promise`\\<`void`\\>\n\nStop observation while preserving history and established sharing.\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "WhatsAppGroup.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`WhatsAppGroup`\\>\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`\\<`WhatsAppGroup`\\>\n\n#### Inherited from\n\n`FavoritableEntity.favorite`",+ "WhatsAppGroup.markRead": "### markRead()\n\n> **markRead**(`message`): `Promise`\\<`void`\\>\n\nAdvance the caller's own read cursor.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `message` | `WhatsAppMessage` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "WhatsAppGroup.messageAttachments": "### messageAttachments()\n\n> **messageAttachments**(`messages`): `Promise`\\<\\{ `attachments`: \\{ `document`: `Document` \\| `undefined`; `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: `LinkedAttachmentState`; \\}[]; `message`: `WhatsAppMessage`; \\}[]\\>\n\nRead attachment states for selected messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `messages` | `WhatsAppMessage`[] |\n\n#### Returns\n\n`Promise`\\<\\{ `attachments`: \\{ `document`: `Document` \\| `undefined`; `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: `LinkedAttachmentState`; \\}[]; `message`: `WhatsAppMessage`; \\}[]\\>",+ "WhatsAppGroup.messages": "### messages()\n\n> **messages**(`options?`): `AsyncGenerator`\\<`WhatsAppMessage`\\>\n\nIterate newest-first timeline pages lazily.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options?` | \\{ `limit?`: `number`; \\} |\n| `options.limit?` | `number` |\n\n#### Returns\n\n`AsyncGenerator`\\<`WhatsAppMessage`\\>",+ "WhatsAppGroup.permission": "### permission()\n\n> **permission**(): `Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\nRead the caller's effective permission on this entity.\n\n#### Returns\n\n`Promise`\\<\\{ `permission`: `EntityPermission`; `status`: `\"access\"`; \\} \\| \\{ `status`: `\"no_access\"`; \\}\\>\n\n#### Inherited from\n\n`FavoritableEntity.permission`",+ "WhatsAppGroup.permissions": "### permissions()\n\n> **permissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead standard link/team sharing settings.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",+ "WhatsAppGroup.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppGroup`\\>\n\nReload detail, permissions and caller capabilities.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`\\>",+ "WhatsAppGroup.reply": "### reply()\n\n> **reply**(`content`, `options`): `Promise`\\<`WhatsAppSend`\\>\n\nPersonal sessions and owner API credentials can send. Bots never send.\nPreserve the idempotency key; uncertain outcomes are never automatically resent.\nThe server enforces one request per second per user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `content` | `WhatsAppReply` |\n| `options` | \\{ `idempotencyKey`: `string`; `replyTo?`: `WhatsAppMessage`; \\} |\n| `options.idempotencyKey` | `string` |\n| `options.replyTo?` | `WhatsAppMessage` |\n\n#### Returns\n\n`Promise`\\<`WhatsAppSend`\\>",+ "WhatsAppGroup.sends": "### sends()\n\n> **sends**(): `Promise`\\<`WhatsAppSend`[]\\>\n\nRead only the caller's pending, uncertain or failed sends.\n\n#### Returns\n\n`Promise`\\<`WhatsAppSend`[]\\>",+ "WhatsAppGroup.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `WhatsAppGroupDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `WhatsAppGroupDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `WhatsAppGroupDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",+ "WhatsAppGroup.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`WhatsAppGroup`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`\\>\n\n#### Inherited from\n\n`FavoritableEntity.unfavorite`",+ "WhatsAppGroup.updatePermissions": "### updatePermissions()\n\n> **updatePermissions**(`update`): `Promise`\\<`void`\\>\n\nActual owner updates standard link/team sharing settings.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `update` | `UpdateSharePermissionRequestV2` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",+ "WhatsAppGroup.upload": "### upload()\n\n> **upload**(`file`): `Promise`\\<`WhatsAppUpload`\\>\n\nStage a supported attachment for a deliberate send.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `file` | `Blob` \\| `File` |\n\n#### Returns\n\n`Promise`\\<`WhatsAppUpload`\\>",+ "WhatsAppGroup.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `WhatsAppGroup`\n\nReference an adopted group; access is checked on each request.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppGroup`",+ "WhatsAppReply": "# Type Alias: WhatsAppReply\n\n> **WhatsAppReply** = \\{ `mentions?`: `WhatsAppParticipant`[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string`; `type`: `\"media\"`; `upload`: `WhatsAppUpload`; \\} \\| \\{ `message`: `WhatsAppMessage`; `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}\n\nDeliberate content from the credential owner's own WhatsApp account.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mentions?`: `WhatsAppParticipant`[]; `text`: `string`; `type`: `\"text\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mentions?` | `WhatsAppParticipant`[] | Participants mentioned (from `participants()`); the text names each as `@<mentionToken>`. |\n| `text` | `string` | - |\n| `type` | `\"text\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `caption?`: `string`; `type`: `\"media\"`; `upload`: `WhatsAppUpload`; \\}\n\n***\n\n### Type Literal\n\n\\{ `message`: `WhatsAppMessage`; `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}",+ "WhatsAppMessage": "# Class: WhatsAppMessage\n\nMessage in an independently shared WhatsApp group.\n\n## Extends\n\n- `MacroEntity`\\<`WhatsAppGroupMessage`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `readonly` | () => `Promise`\\<\\{ `document`: `Document` \\| `undefined`; `durationSeconds`: `number` \\| `undefined`; `fileName`: `string`; `height`: `number` \\| `undefined`; `mime`: `string`; `ordinal`: `number`; `presentation`: `LinkedMediaPresentation` \\| `undefined`; `size`: `number`; `state`: `LinkedAttachmentState`; `width`: `number` \\| `undefined`; \\}[]\\> | Attachment state and imported document handles. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string`\\> | Plain WhatsApp text. | - |\n| <a id=\"property-deleted\"></a> `deleted` | `readonly` | () => `Promise`\\<`boolean`\\> | Deleted for everyone. | - |\n| <a id=\"property-deliverystate\"></a> `deliveryState` | `readonly` | () => `Promise`\\<`NonNullable`\\<LinkedDeliveryState \\| null \\| undefined\\> \\| `undefined`\\> | Caller-owned send's delivery state, when present. | - |\n| <a id=\"property-editedat\"></a> `editedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Last edit time. | - |\n| <a id=\"property-forwarded\"></a> `forwarded` | `readonly` | () => `Promise`\\<`boolean`\\> | Forwarded from another chat. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | `WhatsAppGroup` | The chat this message is in. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`WhatsAppMessageKind`\\> | `message`, or `system` for something that happened in the group (see `rich`). | - |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | () => `Promise`\\<`WhatsAppMention`[]\\> | People the body @-mentions: `@<token>` in the body is this person. | - |\n| <a id=\"property-reactions\"></a> `reactions` | `readonly` | () => `Promise`\\<`WhatsAppGroupReaction`[]\\> | Grouped emoji counts and caller's own reaction. | - |\n| <a id=\"property-replyto\"></a> `replyTo` | `readonly` | () => `Promise`\\<`WhatsAppMessage` \\| `undefined`\\> | Quoted message in this group. | - |\n| <a id=\"property-rich\"></a> `rich` | `readonly` | () => `Promise`\\<`NonNullable`\\<WhatsAppRichContent \\| null \\| undefined\\> \\| `undefined`\\> | Poll (with tallies), location, contact cards, event or system line. | - |\n| <a id=\"property-sender\"></a> `sender` | `readonly` | () => `Promise`\\<`WhatsAppGroupSender`\\> | Protocol-verified sender association and display name. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string`\\> | WhatsApp timestamp. | - |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `readonly` | () => `Promise`\\<`boolean`\\> | Sent as view-once in WhatsApp; Macro keeps and shows it like any media. | - |",+ "WhatsAppMessage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `WhatsAppGroupMessage`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `WhatsAppGroupMessage`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `WhatsAppGroupMessage` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "WhatsAppMessage.byId": "### byId()\n\n> `static` **byId**(`client`, `group`, `id`): `WhatsAppMessage`\n\nReference a message within its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | `WhatsAppGroup` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppMessage`",+ "WhatsAppMessage.from": "### from()\n\n> `static` **from**(`client`, `group`, `record`): `WhatsAppMessage`\n\nSeed a message handle from a timeline response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | `WhatsAppGroup` |\n| `record` | `WhatsAppGroupMessage` |\n\n#### Returns\n\n`WhatsAppMessage`",+ "WhatsAppNamespace": "# Class: WhatsAppNamespace\n\nOperate on an account already paired through the Macro app.",+ "WhatsAppNamespace.account": "### account()\n\n> **account**(): `Promise`\\<`WhatsAppAccount` \\| `undefined`\\>\n\nCurrent owner's account, or undefined when no account has been connected.\n\n#### Returns\n\n`Promise`\\<`WhatsAppAccount` \\| `undefined`\\>",+ "WhatsAppNamespace.byId": "### byId()\n\n> **byId**(`id`): `WhatsAppGroup`\n\nReference an adopted entity without fetching it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppGroup`",+ "WhatsAppNamespace.groups": "### groups()\n\n> **groups**(): `Promise`\\<`WhatsAppGroup`[]\\>\n\nAdopted groups shared with the caller, including without WhatsApp.\n\n#### Returns\n\n`Promise`\\<`WhatsAppGroup`[]\\>",+ "WhatsAppParticipant": "# Class: WhatsAppParticipant\n\nSomeone in an added WhatsApp chat, from its roster; mention them in a text reply.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-group\"></a> `group` | `readonly` | `WhatsAppGroup` | The chat whose roster lists them. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Their WhatsApp id: correlation data, not a Macro user. |\n\n## Accessors\n\n### admin\n\n#### Get Signature\n\n> **get** **admin**(): `boolean` \\| `undefined`\n\nWhether they administer the group, when read from the roster.\n\n##### Returns\n\n`boolean` \\| `undefined`\n\n***\n\n### displayName\n\n#### Get Signature\n\n> **get** **displayName**(): `string` \\| `undefined`\n\nTheir WhatsApp name, untrusted, when the roster had one.\n\n##### Returns\n\n`string` \\| `undefined`\n\n***\n\n### mentionToken\n\n#### Get Signature\n\n> **get** **mentionToken**(): `string`\n\nThe digits a text reply writes as `@<digits>` to mention them.\n\n##### Returns\n\n`string`",+ "WhatsAppParticipant.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `admin`: `boolean` \\| `undefined`; `displayName`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; \\}\n\nSerialize the participant reference without credentials.\n\n#### Returns\n\n\\{ `admin`: `boolean` \\| `undefined`; `displayName`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `admin` | `boolean` \\| `undefined` |\n| `displayName` | `string` \\| `undefined` |\n| `group` | `string` |\n| `id` | `string` |",+ "WhatsAppParticipant.byId": "### byId()\n\n> `static` **byId**(`group`, `id`): `WhatsAppParticipant`\n\nReference a participant of a chat by WhatsApp id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | `WhatsAppGroup` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppParticipant`",+ "WhatsAppParticipant.from": "### from()\n\n> `static` **from**(`group`, `record`): `WhatsAppParticipant`\n\nSeed a participant from the chat's roster.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | `WhatsAppGroup` |\n| `record` | `storage.WhatsAppParticipant` |\n\n#### Returns\n\n`WhatsAppParticipant`",+ "WhatsAppSend": "# Class: WhatsAppSend\n\nOne deliberate send intent. Unknown outcomes must never be automatically resent.\n\n## Extends\n\n- `MacroEntity`\\<`LinkedSendProgress`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the send intent was created. | - |\n| <a id=\"property-errorcode\"></a> `errorCode` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Sanitized failure code, when present. | - |\n| <a id=\"property-group\"></a> `group` | `readonly` | `WhatsAppGroup` | Group entity containing this send. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-message\"></a> `message` | `readonly` | () => `Promise`\\<`WhatsAppMessage` \\| `undefined`\\> | Group message once WhatsApp accepted the send. | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<`LinkedDeliveryState`\\> | Last observed delivery state; refresh explicitly to poll again. | - |",+ "WhatsAppSend.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`WhatsAppSend`\\>\n\nFetch current delivery state without retrying or submitting the message.\n\n#### Returns\n\n`Promise`\\<`WhatsAppSend`\\>",+ "WhatsAppSend.request": "### request()\n\n> **request**(): `Promise`\\<\\{ `idempotencyKey`: `string`; `message`: `WhatsAppReply`; `replyTo?`: `WhatsAppMessage`; \\}\\>\n\nInspect the original intent for reconciliation; never resubmit an unknown outcome automatically.\n\n#### Returns\n\n`Promise`\\<\\{ `idempotencyKey`: `string`; `message`: `WhatsAppReply`; `replyTo?`: `WhatsAppMessage`; \\}\\>",+ "WhatsAppSend.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `LinkedSendProgress`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `LinkedSendProgress`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `LinkedSendProgress` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",+ "WhatsAppSend.byId": "### byId()\n\n> `static` **byId**(`client`, `group`, `id`): `WhatsAppSend`\n\nReference a send intent within its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | `WhatsAppGroup` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppSend`",+ "WhatsAppSend.from": "### from()\n\n> `static` **from**(`client`, `group`, `record`): `WhatsAppSend`\n\nSeed a send handle from a server response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `group` | `WhatsAppGroup` |\n| `record` | `LinkedSendProgress` |\n\n#### Returns\n\n`WhatsAppSend`",+ "WhatsAppUpload": "# Class: WhatsAppUpload\n\nA staged attachment scoped to one adopted group; use it in a deliberate media send.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-filename\"></a> `filename?` | `readonly` | `string` | Display filename supplied by the server. |\n| <a id=\"property-group\"></a> `group` | `readonly` | `WhatsAppGroup` | The chat this upload can be sent to. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Correlation identity of the staged upload. |\n| <a id=\"property-kind\"></a> `kind?` | `readonly` | `LinkedMediaKind` | Media category supplied by the server. |",+ "WhatsAppUpload.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `filename`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; `kind`: `LinkedMediaKind` \\| `undefined`; \\}\n\nSerialize the upload reference without credentials.\n\n#### Returns\n\n\\{ `filename`: `string` \\| `undefined`; `group`: `string`; `id`: `string`; `kind`: `LinkedMediaKind` \\| `undefined`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `filename` | `string` \\| `undefined` |\n| `group` | `string` |\n| `id` | `string` |\n| `kind` | `LinkedMediaKind` \\| `undefined` |",+ "WhatsAppUpload.byId": "### byId()\n\n> `static` **byId**(`group`, `id`): `WhatsAppUpload`\n\nReference a previously staged upload in its original group.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | `WhatsAppGroup` |\n| `id` | `string` |\n\n#### Returns\n\n`WhatsAppUpload`",+ "WhatsAppUpload.from": "### from()\n\n> `static` **from**(`group`, `record`): `WhatsAppUpload`\n\nSeed a handle from the server's upload receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `group` | `WhatsAppGroup` |\n| `record` | `LinkedUploadedAttachment` |\n\n#### Returns\n\n`WhatsAppUpload`",+ "MacroEvents": "# Class: MacroEvents\n\nPer-instance event receiver. Subscribe with [MacroEvents.on](#on), then\neither [MacroEvents.listen](#listen) (SSE, the default) or mount\n[MacroEvents.webhook](#webhook) at a persisted webhook URL.\n\nObtain via `macro.events` — do not construct directly.",+ "MacroEvents.handle": "### handle()\n\n> **handle**(`rawBody`, `headers`): `Promise`\\<`void`\\>\n\nFeed a raw webhook delivery in: verifies the signature, parses, and\ndispatches to matching handlers.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `rawBody` | `string` |\n| `headers` | `DeliveryHeaders` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Throws\n\nif no signing secret was configured, or if the\n signature is missing or invalid.",+ "MacroEvents.listen": "### listen()\n\n> **listen**(`opts?`): `Promise`\\<() => `void`\\>\n\nOpen a live Server-Sent Events stream of matching broker events. This is\nthe default way to receive events — no public URL or signing secret\nrequired. Delivery is best-effort: events published before the\nconnection, while disconnected, or dropped for a slow subscriber are\nmissed; there is no replay.\n\nFilters default to the event names currently registered with [on](#on).\nThe stream uses those filters for its lifetime; later `.on` / unsubscribe\ncalls do not change what the server sends.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts?` | `ListenOptions` |\n\n#### Returns\n\n`Promise`\\<() => `void`\\>\n\nA function that closes the stream.",+ "MacroEvents.on": "### on()\n\n> **on**\\<`E`\\>(`event`, `handler`): () => `void`\n\nSubscribe to an event across all entities.\n\n#### Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-e\"></a> `E` *extends* `\"agent_session.opened\"` \\| `\"agent_session.turn_started\"` \\| `\"agent_session.turn_ended\"` \\| `\"agent_session.command_rejected\"` \\| `\"agent_session.settled\"` \\| `\"agent_session.waiting_for_input\"` \\| `\"agent_session.input_received\"` \\| `\"agent_session.mentioned\"` \\| `\"agent_session.stopped\"` \\| `\"agent_session.renamed\"` \\| `\"agent_session.deleted\"` \\| `\"channel.picture_changed\"` \\| `\"channel.created\"` \\| `\"channel.updated\"` \\| `\"channel.deleted\"` \\| `\"channel.participant_added\"` \\| `\"channel.participant_removed\"` \\| `\"document.created\"` \\| `\"document.updated\"` \\| `\"document.deleted\"` \\| `\"document.content_uploaded\"` \\| `\"document.sync_content_updated\"` \\| `\"document.purged\"` \\| `\"document.copied\"` \\| `\"document.interaction\"` \\| `\"message.posted\"` \\| `\"message.patched\"` \\| `\"message.deleted\"` \\| `\"message.mentioned\"` \\| `\"message.attachment_created\"` \\| `\"message.attachment_removed\"` |\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `event` | `E` |\n| `handler` | `EventHandler`\\<`E`\\> |\n\n#### Returns\n\nAn unsubscribe function.\n\n() => `void`",+ "MacroEvents.onSelfMention": "### onSelfMention()\n\n> **onSelfMention**(`handler`): () => `void`\n\nSubscribe to @-mentions of the authenticated caller: `message.mentioned`\ndeliveries whose mentioned entity is this bot (bot auth) or this user\n(user auth), in channels and in document comments alike.\n\n`message.mentioned` deliveries cover every mention the stream's (or\nwebhook's) workspace can access (its `ids` filter holds channel or\ndocument ids); picking out \"me\" happens here, client-side. The caller's\nidentity is resolved lazily (once) on the first delivery.\n\nFor SSE, register this handler before [listen](#listen) so the derived\nfilters include `message.mentioned`. For persisted webhooks, register the\nwebhook separately, e.g. `macro.webhooks.create({ filters: [{ events:\n['message.mentioned'] }], … })`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `handler` | `EventHandler`\\<`\"message.mentioned\"`\\> |\n\n#### Returns\n\nAn unsubscribe function.\n\n() => `void`",+ "MacroEvents.webhook": "### webhook()\n\n> **webhook**(): (`req`) => `Promise`\\<`Response`\\>\n\nA Fetch-style handler to mount at your persisted webhook route.\n\nRequires `webhookSecret` (or `MACRO_WEBHOOK_SECRET`).\n\n#### Returns\n\n(`req`) => `Promise`\\<`Response`\\>\n\n#### Example\n\n```ts\napp.post('/webhook', macro.events.webhook()); // Hono\n```",+ "ListenOptions": "# Interface: ListenOptions\n\nOptions for `MacroEvents.listen`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-filters\"></a> `filters?` | `WebhookFilter`[] | Event/entity-id filters, identical to persisted webhook `filters`. Defaults to one filter covering every event currently registered with `MacroEvents.on`. |\n| <a id=\"property-scope\"></a> `scope?` | `WebhookScope` | Personal or team workspace whose webhook lifecycle events are delivered. Defaults to `'user'`. |\n| <a id=\"property-signal\"></a> `signal?` | `AbortSignal` | Abort the stream. |",+ "Macro": "# Class: Macro\\<T\\>\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` *extends* `MacroOpts` | `MacroOpts` |\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-_client\"></a> `_client` | `readonly` | `MacroClient` | Direct access to the underlying hey-api service clients. |\n| <a id=\"property-agents\"></a> `agents` | `readonly` | `AgentNamespace` | agents resources and operations. |\n| <a id=\"property-agentsessions\"></a> `agentSessions` | `readonly` | `AgentSessionNamespace` | - |\n| <a id=\"property-ai\"></a> `ai` | `readonly` | `AiNamespace` | - |\n| <a id=\"property-apikeys\"></a> `apiKeys` | `readonly` | `ApiKeyNamespace` | apiKeys resources and operations. |\n| <a id=\"property-bots\"></a> `bots` | `readonly` | `BotsNamespace` | - |\n| <a id=\"property-calendar\"></a> `calendar` | `readonly` | `CalendarNamespace` | - |\n| <a id=\"property-calls\"></a> `calls` | `readonly` | `CallRecordNamespace` | - |\n| <a id=\"property-channels\"></a> `channels` | `readonly` | `ChannelNamespace` | - |\n| <a id=\"property-crm\"></a> `crm` | `readonly` | `CrmNamespace` | - |\n| <a id=\"property-databases\"></a> `databases` | `readonly` | `DatabaseNamespace` | - |\n| <a id=\"property-documents\"></a> `documents` | `readonly` | `DocumentNamespace` | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | `EmailNamespace` | - |\n| <a id=\"property-entitymentions\"></a> `entityMentions` | `readonly` | `EntityMentionNamespace` | entityMentions resources and operations. |\n| <a id=\"property-events\"></a> `events` | `readonly` | `MacroEvents` | - |\n| <a id=\"property-favorites\"></a> `favorites` | `readonly` | `FavoritesNamespace` | - |\n| <a id=\"property-foreignentities\"></a> `foreignEntities` | `readonly` | `ForeignEntityNamespace` | - |\n| <a id=\"property-forms\"></a> `forms` | `readonly` | `FormNamespace` | Build forms and submit answers without granting respondents database access. |\n| <a id=\"property-githubpullrequests\"></a> `githubPullRequests` | `readonly` | `GithubPullRequestNamespace` | githubPullRequests resources and operations. |\n| <a id=\"property-harnesses\"></a> `harnesses` | `readonly` | `HarnessNamespace` | harnesses resources and operations. |\n| <a id=\"property-initiatives\"></a> `initiatives` | `readonly` | `InitiativeNamespace` | initiatives resources and operations. |\n| <a id=\"property-meetings\"></a> `meetings` | `readonly` | `MeetingNamespace` | meetings resources and operations. |\n| <a id=\"property-notifications\"></a> `notifications` | `readonly` | `NotificationNamespace` | - |\n| <a id=\"property-pins\"></a> `pins` | `readonly` | `PinsNamespace` | - |\n| <a id=\"property-projects\"></a> `projects` | `readonly` | `ProjectNamespace` | - |\n| <a id=\"property-properties\"></a> `properties` | `readonly` | `PropertiesNamespace` | - |\n| <a id=\"property-routines\"></a> `routines` | `readonly` | `RoutineNamespace` | routines resources and operations. |\n| <a id=\"property-tasks\"></a> `tasks` | `readonly` | `TaskNamespace` | - |\n| <a id=\"property-teams\"></a> `teams` | `readonly` | `TeamNamespace` | - |\n| <a id=\"property-unfurls\"></a> `unfurls` | `readonly` | `UnfurlNamespace` | unfurls resources and operations. |\n| <a id=\"property-users\"></a> `users` | `readonly` | `UserNamespace` | - |\n| <a id=\"property-webappurl\"></a> `webAppUrl` | `readonly` | `string` | Base URL of the Macro web app, used to build entity URLs. |\n| <a id=\"property-webhooks\"></a> `webhooks` | `readonly` | `WebhooksNamespace` | - |\n| <a id=\"property-whatsapp\"></a> `whatsapp` | `readonly` | `WhatsAppNamespace` | Personal WhatsApp groups and shared group operations. |",+ "Macro.myPrincipalId": "### myPrincipalId()\n\n> **myPrincipalId**(): `Promise`\\<`string`\\>\n\nThe authenticated caller's mentionable principal — `bot|<uuid>` for bot\nauth, `macro|<email>` for user auth — fetched once and cached.\n\n#### Returns\n\n`Promise`\\<`string`\\>",+ "Macro.requestedAs": "### requestedAs()\n\n> **requestedAs**(`user`): `Macro`\\<`T`\\>\n\nClone of this SDK acting on behalf of `user` (sent as\n`x-macro-bot-for-macro-user-id`). Bot auth only — throws for user auth,\nsince a user token always acts as its own user.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `user` | `User` |\n\n#### Returns\n\n`Macro`\\<`T`\\>",+ "RequestActivity": "# Type Alias: RequestActivity\n\n> **RequestActivity** = \\{ `id`: `number`; `operation`: `string`; `service`: `string`; `status`: `\"started\"` \\| `\"completed\"` \\| `\"failed\"`; \\}\n\nA generated SDK operation lifecycle. Contains no arguments, URLs or response data.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `number` |\n| <a id=\"property-operation\"></a> `operation` | `string` |\n| <a id=\"property-service\"></a> `service` | `string` |\n| <a id=\"property-status\"></a> `status` | `\"started\"` \\| `\"completed\"` \\| `\"failed\"` |",+ "msg": "# Function: msg()\n\n> **msg**(`strings`, ...`values`): `RichMessage`\n\nCompose a rich message. Interpolate mentions (a User, Document,\n`here`, …) or plain strings. Each mention writes its `<m-*>` tag into the\ncontent *and* adds itself to `mentions[]`, so the two can never drift; strings\nare inserted as-is, so markdown like `**bold**` passes through untouched.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `strings` | `TemplateStringsArray` |\n| ...`values` | `Interpolation`[] |\n\n## Returns\n\n`RichMessage`\n\n## Example\n\n```ts\nchannel.send(msg`Hey ${user}, see ${doc}. cc ${here}`);\nchannel.send(msg`Status: ${status} — see ${doc}`);\n```",+ "toBody": "# Function: toBody()\n\n> **toBody**(`body`): `RichMessage`\n\nNormalize a plain string or a `RichMessage` to the wire shape.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| `RichMessage` |\n\n## Returns\n\n`RichMessage`",+ "wrapXml": "# Function: wrapXml()\n\n> **wrapXml**(`tag`, `data`): `string`\n\nSerialize a mention node to its `<tag>{json}</tag>` wire form. Readers take\neverything up to the first closing tag, so `<`, `>` and `&` in the JSON are\nwritten as `\\u` escapes: a document named `</m-document-mention>` would\notherwise end the tag early. Decoding the JSON restores the original text.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `tag` | `string` |\n| `data` | `unknown` |\n\n## Returns\n\n`string`",+ "MentionPart": "# Interface: MentionPart\n\nThe two things a mentionable entity contributes to a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-mention\"></a> `mention` | `SimpleMention` | The parallel entry the backend uses for notifications and permissions. |\n| <a id=\"property-tag\"></a> `tag` | `string` | The `<m-*>` tag written into the message content. |",+ "Mentionable": "# Interface: Mentionable\n\nAnything that can be dropped into a `msg` template as a mention.\n\n## Methods\n\n### toMention()\n\n> **toMention**(): `MentionPart`\n\n#### Returns\n\n`MentionPart`",+ "RichMessage": "# Interface: RichMessage\n\nA composed message body: content with embedded tags, and the matching mentions.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-content\"></a> `content` | `string` |\n| <a id=\"property-mentions\"></a> `mentions` | `SimpleMention`[] |",+ "Interpolation": "# Type Alias: Interpolation\n\n> **Interpolation** = `Mentionable` \\| `string` \\| `number`\n\nWhat may be interpolated into a `msg` template: a mention, or plain text.",+ "here": "# Variable: here\n\n> `const` **here**: `Mentionable`\n\nThe `@here` group mention.",+ "Lazy": "# Class: Lazy\\<T\\>\n\nA value fetched on first access and cached thereafter. Powers thin entity\nhandles: construction is free, the record is loaded lazily the first time a\nfield is read, and concurrent reads share one in-flight request. Pass a\n`seed` when the record is already known (from a list or an event) to skip the\nfetch entirely.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-t\"></a> `T` |",+ "Lazy.clear": "### clear()\n\n> **clear**(): `void`\n\nDrop the cached value so the next read refetches.\n\n#### Returns\n\n`void`",+ "Lazy.get": "### get()\n\n> **get**(): `Promise`\\<`T`\\>\n\n#### Returns\n\n`Promise`\\<`T`\\>",+ "Lazy.peek": "### peek()\n\n> **peek**(): `T` \\| `undefined`\n\nThe cached value, if already loaded — never triggers a fetch.\n\n#### Returns\n\n`T` \\| `undefined`",+ "paginate": "# Function: paginate()\n\n> **paginate**\\<`T`, `Cursor`\\>(`fetchPage`): `AsyncGenerator`\\<`T`\\>\n\nAsync generator over a cursor-paginated API. Iterate with `for await`.\nCursors are plain JSON values (strings or small objects), so a page whose\nnext cursor serialises identically to the one it was fetched with means the\nserver is not advancing; the generator throws instead of looping forever.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` | - |\n| <a id=\"type-parameter-cursor\"></a> `Cursor` | `string` |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `fetchPage` | (`cursor?`) => `Promise`\\<`Page`\\<`T`, `Cursor`\\>\\> |\n\n## Returns\n\n`AsyncGenerator`\\<`T`\\>",+ "Page": "# Interface: Page\\<T, Cursor\\>\n\nOne page of a cursor-paginated list.\n\n## Type Parameters\n\n| Type Parameter | Default type |\n| ------ | ------ |\n| <a id=\"type-parameter-t\"></a> `T` | - |\n| <a id=\"type-parameter-cursor\"></a> `Cursor` | `string` |\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-items\"></a> `items` | `T`[] |\n| <a id=\"property-nextcursor\"></a> `nextCursor?` | `Cursor` \\| `null` |",+ "MacroApiError": "# Class: MacroApiError\n\nA non-2xx HTTP response (Macro API, or a raw fetch like presigned downloads).\n\n## Extends\n\n- `MacroError`\n\n## Extended by\n\n- `MacroOpRefusedError`\n\n## Properties\n\n| Property | Modifier | Type |\n| ------ | ------ | ------ |\n| <a id=\"property-data\"></a> `data` | `readonly` | `unknown` |\n| <a id=\"property-status\"></a> `status` | `readonly` | `number` |",+ "MacroError": "# Class: MacroError\n\nBase for every error the SDK throws.\n\n## Extends\n\n- `Error`\n\n## Extended by\n\n- `MacroApiError`\n- `MacroNotFoundError`",+ "MacroNotFoundError": "# Class: MacroNotFoundError\n\nThe API succeeded but the addressed entity doesn't exist in the result.\n\n## Extends\n\n- `MacroError`",+ "unwrap": "# Function: unwrap()\n\n> **unwrap**\\<`TData`, `TError`\\>(`res`): `TData`\n\nTurn a hey-api `{ data, error, response? }` result into either the success\npayload or a thrown MacroApiError.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-tdata\"></a> `TData` |\n| <a id=\"type-parameter-terror\"></a> `TError` |\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `res` | \\{ `data?`: `TData`; `error?`: `TError`; `response?`: `Response`; \\} |\n| `res.data?` | `TData` |\n| `res.error?` | `TError` |\n| `res.response?` | `Response` |\n\n## Returns\n\n`TData`"}-]+}diff --git a/crates/agent_code_mode/src/domain/documentation.rs b/crates/agent_code_mode/src/domain/documentation.rsindex a85285570a..59a9c38c72 100644--- a/crates/agent_code_mode/src/domain/documentation.rs+++ b/crates/agent_code_mode/src/domain/documentation.rs@@ -3,28 +3,45 @@ use cognition::domain::{Cognition, DecisionRequest};use macro_user_id::user_id::MacroUserIdStr;use schemars::JsonSchema;use serde::{Deserialize, Serialize};-use std::{sync::Arc, time::Duration};+use std::collections::HashMap;+use std::sync::{Arc, LazyLock};+use std::time::Duration;use tokio_util::sync::CancellationToken;-/// Public Markdown documentation generated from the real SDK by TypeDoc.+/// One SDK entity, generated from the real SDK by TypeDoc.#[derive(Clone, Deserialize, Serialize, JsonSchema)]pub struct SdkDocumentation {/// SDK namespace.pub name: String,/// Compact capability summary.pub description: String,- /// API reference Markdown; omitted in a compact catalog.- pub documentation: Option<String>,- /// TypeDoc namespace reference used when the full section exceeds the turn budget.- #[serde(default, skip_serializing)]- #[schemars(skip)]- pub overview: Option<String>,+ /// Every class, method and type the entity declares, one line each and+ /// named by the symbol `ReadCodeDocs` reads; omitted in a compact catalog.+ #[serde(skip_serializing_if = "Option::is_none")]+ pub index: Option<String>,}-/// Immutable SDK documentation supplied at build time.-pub fn sdk_documentation() -> Vec<SdkDocumentation> {+/// The SDK reference as generated: an index per entity, and each symbol's own+/// reference by name (`Task`, `Task.update`, `storage.Message`).+#[derive(Deserialize)]+struct Generated {+ entities: Vec<SdkDocumentation>,+ symbols: HashMap<String, String>,+}++static GENERATED: LazyLock<Generated> = LazyLock::new(|| {serde_json::from_str(include_str!("documentation.json")).expect("generated SDK documentation is valid")+});++/// Every SDK entity with its index, supplied at build time.+pub fn sdk_documentation() -> &'static [SdkDocumentation] {+ &GENERATED.entities+}++/// The reference for one symbol an entity index or another reference names.+pub fn symbol_reference(symbol: &str) -> Option<&'static str> {+ GENERATED.symbols.get(symbol).map(String::as_str)}/// How the Jev relevance pass ended.@@ -105,15 +122,7 @@ async fn rank_entities<'a>()}-/// The full reference when it fits `remaining` bytes, else the namespace overview.-fn fitting_reference(doc: &SdkDocumentation, remaining: usize) -> Option<&String> {- [doc.documentation.as_ref(), doc.overview.as_ref()]- .into_iter()- .flatten()- .find(|text| text.len() <= remaining)-}--/// Expand relevant SDK docs in one Jev call; failures retain the compact index.+/// Load relevant entity indexes in one Jev call; failures retain the compact catalog./// The byte cap bounds prompt growth; it is not an exact tokenizer count.#[tracing::instrument(skip_all, fields(selected = tracing::field::Empty, bytes = tracing::field::Empty, selection_status = tracing::field::Empty, selected_entities = tracing::field::Empty))]pub async fn select_documentation(@@ -124,16 +133,16 @@ pub async fn select_documentation() -> String {let docs = sdk_documentation();let mut output = String::from(- "\n<macro_sdk>\nUse the real Macro SDK in ExecuteCode. API reference sections below are already loaded documentation: execute directly when they cover the task. Use DescribeCodeTools only for missing methods, options, enum values or workflow guidance; do not request a section again merely to confirm it. The entity index alone does not contain method signatures.\nAvailable entities:\n",+ "\n<macro_sdk>\nUse the real Macro SDK in ExecuteCode. Entity indexes below list each class, method and type by symbol, with method signatures. Read the symbols a program needs with ReadCodeDocs for their parameters, options and return types, all together in one call, unless their reference is already in context. Use DescribeCodeTools for the index of an entity not loaded here.\nAvailable entities:\n",);- for doc in &docs {+ for doc in docs {output.push_str(&format!("{}: {}\n", doc.name, doc.description));}let started = tokio::time::Instant::now();let (ranked, status) = rank_entities(user,prompt,- &docs,+ docs,cognition,Duration::from_millis(1000),cancel,@@ -141,9 +150,10 @@ pub async fn select_documentation(.await;let mut selected_entities = Vec::new();for doc in ranked.into_iter().take(4) {- let remaining = (48 * 1024_usize).saturating_sub(output.len() + doc.name.len() + 32);- if let Some(text) = fitting_reference(doc, remaining) {- output.push_str(&format!("\n### {}\n{}\n", doc.name, text));+ let remaining = (48 * 1024_usize).saturating_sub(output.len() + 1);+ if let Some(index) = doc.index.as_ref().filter(|index| index.len() <= remaining) {+ output.push('\n');+ output.push_str(index);selected_entities.push(doc.name.as_str());}}@@ -162,25 +172,24 @@ pub async fn select_documentation(output}-/// Budget for one task-documentation tool result. Claude Code moved an 87K+/// Budget for one documentation tool result. Claude Code moved an 87K/// character response out of context into a file; reference Markdown tokenizes/// densely, so stay well below that.-const TASK_DOCUMENTATION_BYTES: usize = 32 * 1024;+const DOCUMENTATION_BYTES: usize = 32 * 1024;-/// Every SDK reference Jev considers relevant to a described task.+/// Every SDK entity Jev considers relevant to a described task.#[derive(Clone, Serialize, JsonSchema)]pub struct TaskDocumentation {- /// How selection ended; anything but selected means no entity was expanded.+ /// How selection ended; anything but selected means no entity was chosen.pub status: SelectionStatus,- /// Relevant entities, most relevant first, each with its full reference or,- /// when that does not fit, its namespace overview.+ /// Relevant entities, most relevant first, each with its index.pub entities: Vec<SdkDocumentation>,/// Relevant entities left out for size; request them by name.pub omitted: Vec<String>,}-/// Select references for a task the agent describes, for clients that never-/// show the server the user's request.+/// Select entity indexes for a task the agent describes, for clients that+/// never show the server the user's request.#[tracing::instrument(name = "code_mode.task_documentation", skip_all, fields(selected = tracing::field::Empty, omitted = tracing::field::Empty, bytes = tracing::field::Empty, selection_status = tracing::field::Empty, selected_entities = tracing::field::Empty))]pub async fn documentation_for_task(user: &MacroUserIdStr<'static>,@@ -191,21 +200,17 @@ pub async fn documentation_for_task(let docs = sdk_documentation();// The agent is waiting on this call, unlike the per-turn prompt path.let (ranked, status) =- rank_entities(user, task, &docs, cognition, Duration::from_secs(5), cancel).await;+ rank_entities(user, task, docs, cognition, Duration::from_secs(5), cancel).await;let mut bytes = 0;let mut entities = Vec::new();let mut omitted = Vec::new();for doc in ranked {- match fitting_reference(doc, TASK_DOCUMENTATION_BYTES.saturating_sub(bytes)) {- Some(text) => {- bytes += text.len();- entities.push(SdkDocumentation {- documentation: Some(text.clone()),- overview: None,- ..doc.clone()- });- }- None => omitted.push(doc.name.clone()),+ let size = doc.index.as_ref().map_or(0, String::len);+ if bytes + size <= DOCUMENTATION_BYTES {+ bytes += size;+ entities.push(doc.clone());+ } else {+ omitted.push(doc.name.clone());}}let span = tracing::Span::current();@@ -228,5 +233,59 @@ pub async fn documentation_for_task(}}+/// One symbol's reference.+#[derive(Clone, Serialize, JsonSchema)]+pub struct SymbolReference {+ /// The symbol as requested.+ pub symbol: String,+ /// Its TypeDoc reference; symbols it names in backticks can be read too.+ pub reference: String,+}++/// The references for requested symbols, within one result's budget.+#[derive(Clone, Serialize, JsonSchema)]+pub struct SymbolReferences {+ /// References in request order.+ pub references: Vec<SymbolReference>,+ /// Requested symbols left out for size; request them again.+ #[serde(skip_serializing_if = "Vec::is_empty")]+ pub omitted: Vec<String>,+ /// Requested symbols no index or reference names.+ #[serde(skip_serializing_if = "Vec::is_empty")]+ pub unknown: Vec<String>,+}++/// The references for `symbols`, in order, until they fill the budget.+#[tracing::instrument(name = "code_mode.read_symbols", skip_all, fields(requested = symbols.len(), read = tracing::field::Empty, unknown = tracing::field::Empty, bytes = tracing::field::Empty))]+pub fn read_symbols(symbols: &[String]) -> SymbolReferences {+ let mut bytes = 0;+ let mut result = SymbolReferences {+ references: Vec::new(),+ omitted: Vec::new(),+ unknown: Vec::new(),+ };+ for symbol in symbols {+ let Some(reference) = symbol_reference(symbol.trim()) else {+ result.unknown.push(symbol.clone());+ continue;+ };+ // The first reference is always returned; none is larger than the budget.+ if !result.references.is_empty() && bytes + reference.len() > DOCUMENTATION_BYTES {+ result.omitted.push(symbol.clone());+ continue;+ }+ bytes += reference.len();+ result.references.push(SymbolReference {+ symbol: symbol.clone(),+ reference: reference.to_owned(),+ });+ }+ let span = tracing::Span::current();+ span.record("read", result.references.len());+ span.record("unknown", result.unknown.len());+ span.record("bytes", bytes);+ result+}+#[cfg(test)]mod test;diff --git a/crates/agent_code_mode/src/domain/documentation/test.rs b/crates/agent_code_mode/src/domain/documentation/test.rsindex 0c9e49f961..005d9eb2bb 100644--- a/crates/agent_code_mode/src/domain/documentation/test.rs+++ b/crates/agent_code_mode/src/domain/documentation/test.rs@@ -65,9 +65,9 @@ async fn one_bounded_request_expands_only_selected_entities() {&CancellationToken::new(),).await;- assert!(result.contains("### ai"));- assert!(result.contains("### documents"));- assert!(!result.contains("### email"));+ assert!(result.contains("\n## ai\n"));+ assert!(result.contains("\n## documents\n"));+ assert!(!result.contains("\n## email\n"));assert!(result.contains("email:"));assert!(result.len() <= 48 * 1024);let requests = classifier.requests.lock().unwrap();@@ -80,20 +80,6 @@ async fn one_bounded_request_expands_only_selected_entities() {requests[0].validate().unwrap();}-#[test]-fn namespace_overview_is_not_duplicated_in_discovery_responses() {- let doc: SdkDocumentation = serde_json::from_value(serde_json::json!({- "name": "documents",- "description": "Documents",- "documentation": "Full API reference",- "overview": "Namespace reference"- }))- .unwrap();- assert_eq!(doc.overview.as_deref(), Some("Namespace reference"));- let response = serde_json::to_value(doc).unwrap();- assert!(response.get("overview").is_none());- assert_eq!(response["documentation"], "Full API reference");-}#[tokio::test]async fn errors_and_absent_provider_retain_catalog() {let classifier: Arc<dyn Cognition> = Arc::new(Classifier {@@ -171,10 +157,16 @@ async fn task_documentation_returns_every_relevant_entity_within_budget() {.collect();names.sort();assert_eq!(names, ["ai", "documents"]);- let full = |name: &str| catalog.iter().find(|entry| entry.name == name).unwrap();- // ai fits whole; documents' full reference then exceeds the budget.- assert_eq!(result.entities[0].documentation, full("ai").documentation);- assert_eq!(result.entities[1].documentation, full("documents").overview);+ let index = |name: &str| {+ catalog+ .iter()+ .find(|entry| entry.name == name)+ .unwrap()+ .index+ .clone()+ };+ assert_eq!(result.entities[0].index, index("ai"));+ assert_eq!(result.entities[1].index, index("documents"));assert!(result.omitted.is_empty());}@@ -196,7 +188,7 @@ async fn task_documentation_stays_within_budget_and_names_omissions() {let bytes: usize = result.entities.iter()- .map(|doc| doc.documentation.as_ref().unwrap().len())+ .map(|doc| doc.index.as_ref().unwrap().len()).sum();assert!(bytes <= 32 * 1024);assert!(!result.omitted.is_empty());@@ -227,3 +219,37 @@ async fn task_documentation_reports_why_nothing_was_selected() {assert_eq!(result.status, SelectionStatus::ProviderError);assert!(result.entities.is_empty());}++#[test]+fn symbol_references_stay_within_one_result_budget() {+ // The largest references, requested together, overflow one result: the+ // first is read and the rest are named for another request.+ let symbols: Vec<String> = [+ "NotifEvent",+ "calendar.CalendarEvent",+ "email.CalendarEvent",+ "CallRecord",+ "storage.CallRecord",+ "EmailFilters",+ "Document",+ "Database",+ "Channel",+ "Task",+ ]+ .map(String::from)+ .to_vec();+ let result = read_symbols(&symbols);+ let bytes: usize = result+ .references+ .iter()+ .map(|reference| reference.reference.len())+ .sum();+ assert!(bytes <= 32 * 1024);+ assert_eq!(result.references[0].symbol, "NotifEvent");+ assert!(!result.omitted.is_empty());+ assert_eq!(+ result.references.len() + result.omitted.len(),+ symbols.len()+ );+ assert!(result.unknown.is_empty());+}diff --git a/crates/agent_code_mode/src/inbound/toolset.rs b/crates/agent_code_mode/src/inbound/toolset.rsindex 73bca0e055..c8410c595d 100644--- a/crates/agent_code_mode/src/inbound/toolset.rs+++ b/crates/agent_code_mode/src/inbound/toolset.rs@@ -1,7 +1,7 @@//! SDK discovery and one awaited code execution exposed as ordinary tools.use crate::domain::{- CodeModeError, ExecutionId, ExecutionReceipt, SessionCodeMode, TaskDocumentation, UserCodeMode,- UserExecutionReceipt, documentation_for_task,+ CodeModeError, ExecutionId, ExecutionReceipt, SessionCodeMode, SymbolReferences,+ TaskDocumentation, UserCodeMode, UserExecutionReceipt, documentation_for_task, read_symbols,};use agent_session::domain::model::AgentSession;use ai_toolset::{@@ -36,6 +36,7 @@ pub fn toolset() -> AsyncToolCollection<CodeModeToolContext> {AsyncToolCollection::new().add_tool::<ExecuteCode, CodeModeToolContext>().add_tool::<DescribeCodeTools, CodeModeToolContext>()+ .add_tool::<ReadCodeDocs, CodeModeToolContext>()}/// Facts supplied by an adapter that authenticated a user, not a session.@@ -52,6 +53,7 @@ pub fn user_toolset() -> AsyncToolCollection<UserCodeModeToolContext> {AsyncToolCollection::new().add_tool::<UserExecuteCode, UserCodeModeToolContext>().add_tool::<DescribeCodeTools, UserCodeModeToolContext>()+ .add_tool::<ReadCodeDocs, UserCodeModeToolContext>()}/// Who discovery is written for.@@ -198,19 +200,19 @@ impl AsyncTool<UserCodeModeToolContext> for UserExecuteCode {#[serde(deny_unknown_fields)]#[schemars(title = "DescribeCodeTools",- description = "Look up Macro SDK documentation for ExecuteCode. Before writing a program, pass task, a short description of what the program must do, to receive every relevant SDK entity reference in one call; skip it only when the references you need are already in context. Request up to five entity names together for full declarations, e.g. entities omitted for size. Request topics for workflow guides. With no arguments, returns the compact entity catalog."+ description = "Find Macro SDK methods for ExecuteCode. Before writing a program, pass task, a short description of what the program must do, to receive the index of every relevant SDK entity in one call; skip it only when the indexes you need are already in context. An index lists each class, method and type by symbol with its signature; read the symbols you need with ReadCodeDocs. Request up to five entity names together for their indexes, e.g. entities omitted for size. Request topics for workflow guides. With no arguments, returns the compact entity catalog.")]pub struct DescribeCodeTools {/// What the next program must do; selects relevant references.#[serde(default)]#[schemars(- description = "What the program you are about to write must do, in the user's terms, e.g. 'find unread emails from Acme this week and summarize them'. Returns every relevant SDK entity reference."+ description = "What the program you are about to write must do, in the user's terms, e.g. 'find unread emails from Acme this week and summarize them'. Returns the index of every relevant SDK entity.")]pub task: Option<String>,- /// Exact method names; empty means list the catalog.+ /// Entity names whose indexes to return; empty means list the catalog.#[serde(default)]#[schemars(- description = "Up to five SDK entity names such as documents, email, ai, or core. Empty names, topics and task list the compact entity catalog."+ description = "Up to five SDK entity names such as documents, email, ai, or core, for their indexes. Empty names, topics and task list the compact entity catalog.")]pub names: Vec<String>,/// Workflow guides to read directly, without starting a code execution.@@ -266,7 +268,7 @@ pub struct CodeToolsDescription {pub guides: Vec<CodeGuide>,/// How to execute methods and interpret discovery results.pub instructions: String,- /// SDK entities; full declarations are omitted in the compact catalog.+ /// SDK entities; indexes are omitted in the compact catalog.pub tools: Vec<CodeToolDescription>,}@@ -371,10 +373,10 @@ impl DescribeCodeTools {.collect::<Result<Vec<_>, _>>()?} else if self.topics.is_empty() && !selected {catalog- .into_iter()- .map(|mut doc| {- doc.documentation = None;- doc+ .iter()+ .map(|doc| CodeToolDescription {+ index: None,+ ..doc.clone()}).collect()} else {@@ -413,6 +415,62 @@ impl DescribeCodeTools {}}+/// Read the references of SDK symbols an entity index or reference names.+#[derive(Deserialize, JsonSchema)]+#[serde(deny_unknown_fields)]+#[schemars(+ title = "ReadCodeDocs",+ description = "Read the Macro SDK reference for symbols named in an entity index or another reference: a class (Task), one of its methods (TaskNamespace.create) or a type (CreateReviewOptions). Request every symbol the next program needs together, up to ten. Each reference has the full signature, parameters, option fields and return type; symbols it names in backticks can be read the same way."+)]+pub struct ReadCodeDocs {+ /// Symbols exactly as an index or reference names them.+ #[schemars(+ description = "Up to ten symbols exactly as an index or reference names them, e.g. [\"TaskNamespace.create\", \"Task\"]."+ )]+ pub symbols: Vec<String>,+}++impl ReadCodeDocs {+ fn read(&self) -> Result<SymbolReferences, CodeModeError> {+ if self.symbols.is_empty() || self.symbols.len() > 10 {+ return Err(CodeModeError::Invalid(+ "Request between one and ten SDK symbols.".into(),+ ));+ }+ Ok(read_symbols(&self.symbols))+ }+}++impl ToolAnnotated for ReadCodeDocs {+ const ANNOTATIONS: ToolAnnotations = ToolAnnotations::read_only("Read SDK reference");+}++#[async_trait]+impl AsyncTool<CodeModeToolContext> for ReadCodeDocs {+ type Output = SymbolReferences;++ async fn call(+ &self,+ _context: ServiceContext<CodeModeToolContext>,+ _request: RequestContext,+ ) -> ToolResult<Self::Output> {+ self.read().map_err(tool_error)+ }+}++#[async_trait]+impl AsyncTool<UserCodeModeToolContext> for ReadCodeDocs {+ type Output = SymbolReferences;++ async fn call(+ &self,+ _context: ServiceContext<UserCodeModeToolContext>,+ _request: RequestContext,+ ) -> ToolResult<Self::Output> {+ self.read().map_err(tool_error)+ }+}+fn tool_error(error: CodeModeError) -> ToolCallError {ToolCallError {description: error.to_string(),diff --git a/crates/agent_code_mode/src/inbound/toolset/session/discovery.md b/crates/agent_code_mode/src/inbound/toolset/session/discovery.mdindex 7d548c72cb..58738a4013 100644--- a/crates/agent_code_mode/src/inbound/toolset/session/discovery.md+++ b/crates/agent_code_mode/src/inbound/toolset/session/discovery.md@@ -1,3 +1,3 @@-Explore the real public Macro SDK by entity. Empty names returns a compact list of namespaces and one-sentence descriptions. Request up to five exact entity names together for declarations, e.g. {names:["documents","email","ai","agentSessions","core"]}. Request topics ["search","ai","templates","examples"] for workflow examples. API reference sections already expanded in context require no further discovery call. Execute directly when they cover the task; request only missing details. Declarations are documentation; generated programs are plain JavaScript.+Explore the real public Macro SDK by entity. Empty names returns a compact list of namespaces and one-sentence descriptions. Request up to five exact entity names together for their indexes, e.g. {names:["documents","email","ai","agentSessions","core"]}: each lists the entity's classes, methods with signatures, and types by symbol. Read the symbols a program needs with ReadCodeDocs, e.g. {symbols:["TaskNamespace.create","Task"]}. Request topics ["search","ai","templates","examples"] for workflow examples. Indexes and references already in context need no further discovery call. References are documentation; generated programs are plain JavaScript.ExecuteCode runs an ES module exporting async main({macro,session,execution}). The provided objects are real SDK entity handles. Methods return their documented promises or async iterators; they are not tool-name proxies. Optional explicit imports are @macro-inc/sdk and handlebars. Return {data:<JSON>} with optional reviews:[...] (defaults to []); fetch fields on entities rather than serializing handles. See agentSessions for persistent, nonblocking review stacks.diff --git a/crates/agent_code_mode/src/inbound/toolset/session/execute_code.md b/crates/agent_code_mode/src/inbound/toolset/session/execute_code.mdindex 28c69f0e2e..d46403f8d0 100644--- a/crates/agent_code_mode/src/inbound/toolset/session/execute_code.md+++ b/crates/agent_code_mode/src/inbound/toolset/session/execute_code.md@@ -1,5 +1,5 @@Copy turn_id from the current prompt’s hidden invocation context; never substitute another turn’s ID for a stale call. Run a JavaScript ES module in Deno. Export async function main({macro, session, execution}); return {data: <JSON>}. Optional reviews: [{kind: "email" | "calendar", id: "..."}] defaults to an empty list when omitted. The host supplies real public Macro SDK handles authenticated as the explicitly selected acting_as account. Optional imports: import {Macro} from "@macro-inc/sdk"; import Handlebars from "handlebars". main also receives token, hosts, sessionId and executionId for explicit SDK construction. Never print, return or persist token. No TypeScript syntax or package installation.-Prefer ExecuteCode for supported Macro work, including a single precise call. SDK API reference sections expanded in context are already your documentation. Execute directly when they cover the task; do not call DescribeCodeTools merely to confirm them. The compact entity index alone is not a method reference. Use DescribeCodeTools only for missing methods, options, enum values or workflow guides, requesting the missing entities together rather than guessing. Request up to five entity names together (e.g. workspace, documents, email, ai, core).+Prefer ExecuteCode for supported Macro work, including a single precise call. Entity indexes in context list each method with its signature. Before writing a program, read the symbols it needs with ReadCodeDocs for their parameters, options and return types, all together in one call, unless their reference is already in context; do not guess option names. Use DescribeCodeTools for the index of an entity not in context or for workflow guides, requesting entities together (e.g. documents, email, ai, core).For editable email/calendar drafts, persist them with execution.reviews.create({kind, title, drafts}), then return reviews: [await review.reference()]. This does not send emails or create calendar events. Creation immediately presents a completed PresentReview ACP tool call, even while main continues. "Presented to the user" means saved in the conversation, not approved or sent. The saved cards remain usable after this execution and chat continues. User decisions arrive as typed system events referring to the same review ID. Use GetReview to read final drafts and confirmed outcomes; notifications never authorize repeating an action. Use the direct EditDocument tool for AI document edits. Direct human-interactive tools, subagents and unsupported SDK operations remain available.diff --git a/crates/agent_code_mode/src/inbound/toolset/session/overview.md b/crates/agent_code_mode/src/inbound/toolset/session/overview.mdindex 08159dbe64..cab7ebe555 100644--- a/crates/agent_code_mode/src/inbound/toolset/session/overview.md+++ b/crates/agent_code_mode/src/inbound/toolset/session/overview.md@@ -1,2 +1,2 @@Use the real Macro SDK, prebundled for Deno. Write an ES module exporting async main({macro,session,execution}); optionally import {Macro} from "@macro-inc/sdk" or Handlebars from "handlebars". The provided macro is already authenticated; main also receives token and hosts for explicit construction. Never expose the token. Return plain JSON as {data, reviews}; reviews contains references to actual saved review entities, usually [].-A compact entity index is supplied automatically; Jev may expand relevant declarations before the turn. DescribeCodeTools supplies more entity declarations and workflow guides. Source and final result are retained in the session journal, not credentials. Direct API calls are not individually captured as old tool receipts.+A compact entity catalog is supplied automatically; Jev may load the indexes of relevant entities before the turn. DescribeCodeTools supplies more entity indexes and workflow guides, and ReadCodeDocs the reference for any symbol an index names. Source and final result are retained in the session journal, not credentials. Direct API calls are not individually captured as old tool receipts.diff --git a/crates/agent_code_mode/src/inbound/toolset/test.rs b/crates/agent_code_mode/src/inbound/toolset/test.rsindex 208b040bfc..55e30b26f7 100644--- a/crates/agent_code_mode/src/inbound/toolset/test.rs+++ b/crates/agent_code_mode/src/inbound/toolset/test.rs@@ -13,7 +13,7 @@ async fn describe(}#[tokio::test]-async fn entity_catalog_is_compact_and_exact_lookup_has_real_sdk_signatures() {+async fn entity_catalog_is_compact_and_named_entities_list_their_symbols() {let catalog = describe(DescribeCodeTools {task: None,@@ -25,7 +25,7 @@ async fn entity_catalog_is_compact_and_exact_lookup_has_real_sdk_signatures() {.await.unwrap();assert!(catalog.tools.len() > 15);- assert!(catalog.tools.iter().all(|doc| doc.documentation.is_none()));+ assert!(catalog.tools.iter().all(|doc| doc.index.is_none()));let docs = describe(DescribeCodeTools {task: None,@@ -36,26 +36,22 @@ async fn entity_catalog_is_compact_and_exact_lookup_has_real_sdk_signatures() {).await.unwrap();+ let documents = docs.tools[0].index.as_deref().unwrap();assert!(- docs.tools[0]- .documentation- .as_ref()- .unwrap()- .contains("AsyncGenerator")+ documents+ .contains("`DocumentNamespace.search`: search(query, opts?): AsyncGenerator<Document>"));assert!(- docs.tools[0]- .documentation- .as_ref()+ docs.tools[1]+ .index+ .as_deref().unwrap()- .contains("Document")+ .contains("(`macro.email`)"));assert!(- docs.tools[1]- .documentation- .as_ref()- .unwrap()- .contains("Email")+ docs.tools+ .iter()+ .all(|doc| doc.index.as_ref().unwrap().len() < 16 * 1024));assert!(describe(@@ -164,11 +160,11 @@ async fn user_host_rejects_session_only_guides() {}#[test]-fn user_toolset_exposes_execute_and_describe_without_session_fields() {+fn user_toolset_exposes_execute_and_discovery_without_session_fields() {let tools = user_toolset();let mut names: Vec<_> = tools.tools.keys().map(String::as_str).collect();names.sort();- assert_eq!(names, ["DescribeCodeTools", "ExecuteCode"]);+ assert_eq!(names, ["DescribeCodeTools", "ExecuteCode", "ReadCodeDocs"]);let schema = serde_json::to_value(&tools.tools["ExecuteCode"].input_schema).unwrap();assert!(schema["properties"].get("execution_id").is_none());assert!(schema["properties"].get("source").is_some());@@ -189,3 +185,35 @@ fn both_execute_code_descriptions_share_one_runtime_contract() {assert!(!user.contains("execution.reviews.create"));assert!(user.contains("DescribeCodeTools with task"));}++#[test]+fn symbols_from_an_index_read_as_their_own_references() {+ let read = ReadCodeDocs {+ symbols: vec![+ "TaskNamespace.create".into(),+ "Task".into(),+ "TaskNamespace.missing".into(),+ ],+ }+ .read()+ .unwrap();+ let references: Vec<_> = read+ .references+ .iter()+ .map(|reference| reference.symbol.as_str())+ .collect();+ assert_eq!(references, ["TaskNamespace.create", "Task"]);+ // A method's reference carries its option fields, linked by symbol.+ assert!(read.references[0].reference.contains("`opts.name`"));+ assert!(read.references[0].reference.contains("`Task`"));+ assert!(!read.references[0].reference.contains(".md"));+ assert_eq!(read.unknown, ["TaskNamespace.missing"]);+ assert!(+ ReadCodeDocs { symbols: vec![] }.read().is_err()+ && ReadCodeDocs {+ symbols: vec!["Task".into(); 11]+ }+ .read()+ .is_err()+ );+}diff --git a/crates/agent_code_mode/src/inbound/toolset/user/discovery.md b/crates/agent_code_mode/src/inbound/toolset/user/discovery.mdindex 8dc1fc020f..bc37f45304 100644--- a/crates/agent_code_mode/src/inbound/toolset/user/discovery.md+++ b/crates/agent_code_mode/src/inbound/toolset/user/discovery.md@@ -1,3 +1,3 @@-Pass task to receive every SDK entity reference relevant to it in one call; do this before writing ExecuteCode. entities are most relevant first; omitted lists relevant entities left out for size, which you can request by name. A status other than selected means nothing was chosen automatically: pick entities from the catalog and request them by name. Request up to five exact entity names together for full declarations. Topics search and ai return workflow examples. Declarations are documentation; programs are plain JavaScript.+Pass task to receive the index of every SDK entity relevant to it in one call; do this before writing ExecuteCode. entities are most relevant first; omitted lists relevant entities left out for size, which you can request by name. A status other than selected means nothing was chosen automatically: pick entities from the catalog and request them by name, up to five together. An index lists each class, method with its signature, and type by symbol; read the symbols a program needs with ReadCodeDocs, all together in one call. Topics search and ai return workflow examples. References are documentation; programs are plain JavaScript.ExecuteCode runs an ES module exporting async main({macro}). macro is a real SDK client. Methods return their documented promises or async iterators. Return {data:<JSON>}; fetch fields on entities rather than serializing handles.diff --git a/crates/agent_code_mode/src/inbound/toolset/user/execute_code.md b/crates/agent_code_mode/src/inbound/toolset/user/execute_code.mdindex faa29a65f5..f9a7958517 100644--- a/crates/agent_code_mode/src/inbound/toolset/user/execute_code.md+++ b/crates/agent_code_mode/src/inbound/toolset/user/execute_code.md@@ -1,3 +1,3 @@Run a JavaScript ES module in Deno against the real Macro SDK, as the signed-in user. Export async function main({macro}); return {data: <JSON>}. macro is an authenticated Macro SDK client. Optional imports: import {Macro} from "@macro-inc/sdk"; import Handlebars from "handlebars". main also receives token and hosts for explicit SDK construction. Never print, return or persist the token. No TypeScript syntax or package installation.-Prefer ExecuteCode for Macro work that would otherwise take several tool calls. Before writing a program, call DescribeCodeTools with task set to what the program must do, unless the SDK references it needs are already in this conversation. The SDK is large; do not guess method names or options. If a program fails with an SDK error, look up the missing entity with DescribeCodeTools and fix the program.+Prefer ExecuteCode for Macro work that would otherwise take several tool calls. Before writing a program, call DescribeCodeTools with task set to what the program must do, unless the entity indexes it needs are already in this conversation, then read the symbols the program uses with ReadCodeDocs, all together in one call. The SDK is large; do not guess method names or options. If a program fails with an SDK error, read the symbol involved with ReadCodeDocs and fix the program.diff --git a/crates/agent_inmem/src/outbound/rig_engine/test/tool_mode.rs b/crates/agent_inmem/src/outbound/rig_engine/test/tool_mode.rsindex 57d5bf543b..7e481d4bd9 100644--- a/crates/agent_inmem/src/outbound/rig_engine/test/tool_mode.rs+++ b/crates/agent_inmem/src/outbound/rig_engine/test/tool_mode.rs@@ -79,13 +79,18 @@ impl ToolModeSelector for RecordingSelector {}#[tokio::test]-async fn requires_both_code_tools_and_loads_once_as_the_session_owner() {+async fn requires_every_code_tool_and_loads_once_as_the_session_owner() {let selector = RecordingSelector::default();assert_eq!(select_tool_mode(&selector, &request(None)).await,Some(ToolMode::Standard));- for names in [vec![], vec!["ExecuteCode"], vec!["DescribeCodeTools"]] {+ for names in [+ vec![],+ vec!["ExecuteCode"],+ vec!["DescribeCodeTools"],+ vec!["ExecuteCode", "DescribeCodeTools"],+ ] {let (server, tools) = remote(&names).await;assert_eq!(select_tool_mode(&selector, &request(Some(tools))).await,@@ -94,7 +99,7 @@ async fn requires_both_code_tools_and_loads_once_as_the_session_owner() {server.cancel().await.unwrap();}assert!(selector.0.lock().unwrap().is_empty());- let (server, tools) = remote(&["ExecuteCode", "DescribeCodeTools"]).await;+ let (server, tools) = remote(&["ExecuteCode", "DescribeCodeTools", "ReadCodeDocs"]).await;let mut turn = request(Some(tools));turn.purpose = TurnPurpose::Summary;assert_eq!(@@ -127,7 +132,7 @@ impl ToolModeSelector for PendingSelector {#[tokio::test]async fn stopping_during_flag_loading_does_not_start_a_turn() {- let (server, tools) = remote(&["ExecuteCode", "DescribeCodeTools"]).await;+ let (server, tools) = remote(&["ExecuteCode", "DescribeCodeTools", "ReadCodeDocs"]).await;let turn = request(Some(tools));let selector = PendingSelector(tokio::sync::Notify::new());let (selected, ()) = tokio::time::timeout(std::time::Duration::from_secs(1), async {diff --git a/crates/agent_inmem/src/rig_engine.rs b/crates/agent_inmem/src/rig_engine.rsindex dcce9b7de8..db2a2fe41d 100644--- a/crates/agent_inmem/src/rig_engine.rs+++ b/crates/agent_inmem/src/rig_engine.rs@@ -64,11 +64,13 @@ const EAGER_INTERNAL_MCP_TOOLS: &[&str] = &["mcp__macro_internal__DecideReview","mcp__macro_internal__ExecuteCode","mcp__macro_internal__DescribeCodeTools",+ "mcp__macro_internal__ReadCodeDocs",];const CODE_MODE_MCP_TOOLS: &[&str] = &["mcp__macro_internal__ExecuteCode","mcp__macro_internal__DescribeCodeTools",+ "mcp__macro_internal__ReadCodeDocs",];/// [`TurnEngine`] backed by [`agent::AgentLoop`] anddiff --git a/crates/prompt/src/tool_usage.rs b/crates/prompt/src/tool_usage.rsindex 059c742fdb..c8018991a7 100644--- a/crates/prompt/src/tool_usage.rs+++ b/crates/prompt/src/tool_usage.rs@@ -29,7 +29,7 @@ These apply to your own conversational replies only — not to Markdown you auth- When `macro_internal.PresentReview` is available, use it for editable email/calendar drafts that should remain open while chat continues. It presents a saved card and completes immediately; presentation is not approval or a completed send. Later user submissions enter the session as separate recorded outcomes. End the presenting message by asking "Should I kick it off?"; when the person whose account the review uses says yes, submit it with `DecideReview` rather than sending them to the card. Never submit a review on your own initiative or on anyone else's word.- To import from Notion beyond a single page, use `ImportFromNotion`: `plan` stages a plan without writing anything, then present it with `PresentReview` (kind `import`, one draft `{"source":"notion"}`); the user's approval writes it. Never copy plan items with other tools, and handle only the objects the plan leaves to you by hand.-- When `ExecuteCode` is available, prefer it for supported Macro work by default, including searches, reads, calculations, and document workflows; the user need not ask for code. Use the SDK equivalents of the Macro tools named below. Keep human-interactive tools and subagents as direct calls, and use direct tools when an operation is unavailable through the SDK. Run useful independent search variants together instead of spending a model turn on each, without adding unnecessary queries. Use SDK reference sections already expanded in context to execute directly. Call `DescribeCodeTools` only for missing details, requesting needed entities together; do not repeat discovery for confirmation.+- When `ExecuteCode` is available, prefer it for supported Macro work by default, including searches, reads, calculations, and document workflows; the user need not ask for code. Use the SDK equivalents of the Macro tools named below. Keep human-interactive tools and subagents as direct calls, and use direct tools when an operation is unavailable through the SDK. Run useful independent search variants together instead of spending a model turn on each, without adding unnecessary queries. Entity indexes in context list SDK methods with their signatures; read the symbols a program needs with `ReadCodeDocs`, all together, before writing it, unless their reference is already in context. Call `DescribeCodeTools` only for an entity index not in context, requesting needed entities together; do not repeat discovery for confirmation.- Apply the user's source scope to every search call, including SDK calls, follow-ups and retries. For document-only requests, use `macro.documents.search` in code; direct NameSearch and ContentSearch must include `entityTypes: ["documents"]`. Return relevant evidence and source IDs from code, preserving errors and coverage limits. A bounded sample or failed query does not establish completeness or absence. Answer when the evidence resolves the question.@@ -88,7 +88,7 @@ pub static PROMPT: StaticPrompt<'static> = StaticPrompt::borrowed(TITLE, INSTRUC/// Routing overrides for sessions that selected the code-mode feature flag.pub static CODE_MODE_ROUTING: StaticPrompt<'static> = StaticPrompt::borrowed("Code Mode Routing",- r#"Use ExecuteCode for SDK-supported listing, search, and retrieval, including a single precise call. This takes precedence over general references to direct tools elsewhere in these instructions. Consult DescribeCodeTools for the relevant SDK entity before falling back.+ r#"Use ExecuteCode for SDK-supported listing, search, and retrieval, including a single precise call. This takes precedence over general references to direct tools elsewhere in these instructions. Consult the relevant SDK entity index (DescribeCodeTools) and symbol references (ReadCodeDocs) before falling back.For workspace activity, unified inbox, tasks, and mixed-entity feeds, use the direct ListEntities tool with the requested type, time, tag, property, and mailbox filters. Use NameSearch for mixed-entity name searches. These tools include agent sessions. ContentSearch remains available for session-history search or query scopes the SDK does not support. Preserve the user's source scope in either path. Keep ReadCanvas, RenderCanvas, ApplyCanvasEdits, EditCanvas, EditDocument and other interactive or unsupported operations as direct tools; the public SDK does not expose these live editing workflows."#,"SDK-supported retrieval uses code by default while unsupported scopes retain direct fallbacks.",diff --git a/docs/agent-guide/ai-chat.md b/docs/agent-guide/ai-chat.mdindex f11c90142e..35662eb5c3 100644--- a/docs/agent-guide/ai-chat.md+++ b/docs/agent-guide/ai-chat.md@@ -901,8 +901,8 @@ and settlement tests still require the isolated backend fixtures above.## Code mode in agent sessionsWhen the harness has its local Deno runtime configured, the session's `macro_internal`-server exposes `DescribeCodeTools` and `ExecuteCode`. The in-process agent sees-both schemas on its first model call, without `SearchTools` or `LoadTools`.+server exposes `DescribeCodeTools`, `ReadCodeDocs` and `ExecuteCode`. The in-process agent sees+all three schemas on its first model call, without `SearchTools` or `LoadTools`.For Macro's in-process agent, the backend evaluates the session owner's`ai-code-mode` flag once per conversational turn. Enabled users get a smallerdirect toolset: SDK-supported searches, reads, listing, and data operations run@@ -957,19 +957,21 @@ prompted by someone else, the existing owner-approval card asks to “run potentIt offers Approve, Decline and, for a named requester, Always allow; the carddoes not display source code. Executions acting as the verified requester do not need this extra approval.-Every code-mode turn receives a compact entity index. Jev can expand relevant-entity declarations before generation, with a one-second deadline and index-only-fallback. Compact namespace references include their linked local options and-enum types. For workspace overviews, the agent samples relevant categories in+Every code-mode turn receives the compact entity catalog. Jev can load the+indexes of relevant entities before generation, with a one-second deadline and+catalog-only fallback. An entity index lists each class (with its `macro.*`+accessor and fields), each method with its signature and first sentence, and+each type, by symbol (`TaskNamespace.create`, `Task`, `storage.Message`). For workspace overviews, the agent samples relevant categories inparallel; it reports sampled coverage rather than treating a mixed recent pageas the whole workspace. `DescribeCodeTools` takes entity names (such as `documents`, `email`,`ai`, `agentSessions`) and guide topics (`examples`, `search`, `ai`, `templates`).-It also takes a `task`: the same Jev selection runs over that text and returns-every relevant entity reference within a 32 KiB budget, falling back to an-entity's namespace overview and naming entities omitted for size.-Expanded API references are already loaded: the agent should execute directly when-they cover the task and request only missing details. The compact index alone-is not a method reference. There is no runtime `sdk.help` or+Names return those entities' indexes. It also takes a `task`: the same Jev+selection runs over that text and returns every relevant entity index within a+32 KiB budget, naming entities omitted for size. `ReadCodeDocs` takes up to ten+symbols and returns each one's TypeDoc reference (signature, parameters, option+fields, return type) within a 32 KiB budget; references name other symbols in+backticks, which read the same way. The agent reads the symbols a program uses,+together, before writing it. There is no runtime `sdk.help` or`sdk.ToolName` proxy. The actual SDK exposes `macro.ai.structuredCompletion` and`macro.ai.decide`; Handlebars is imported from `handlebars`. Use the direct`EditDocument` tool for AI document edits.@@ -1038,10 +1040,10 @@ provider usage and completed writes may remain after cancellation.The public workspace MCP (`mcp-server[-dev].macro.com`) evaluates the same`ai-code-mode` flag for the OAuth user on `initialize`, `tools/list` and-`tools/call`, cached per user for a minute. Enabled users see `ExecuteCode` and-`DescribeCodeTools` in place of the SDK-covered native tools, and the server-instructions tell the client to call `DescribeCodeTools` with a `task` before-writing a program. Programs export `async function main({macro})` and return+`tools/call`, cached per user for a minute. Enabled users see `ExecuteCode`,+`DescribeCodeTools` and `ReadCodeDocs` in place of the SDK-covered native tools,+and the server instructions tell the client to call `DescribeCodeTools` with a+`task`, then `ReadCodeDocs` for the symbols it uses, before writing a program. Programs export `async function main({macro})` and returnexactly `{data}` (an empty `reviews: []` is dropped). There is no session,execution journal, review stack or `execution_id`; the receipt carries status,observed SDK activity, result and error. Runs act as the user with no agentdiff --git a/packages/code-mode-sdk/AGENTS.md b/packages/code-mode-sdk/AGENTS.mdindex 4f756a0861..333bb16a21 100644--- a/packages/code-mode-sdk/AGENTS.md+++ b/packages/code-mode-sdk/AGENTS.md@@ -9,7 +9,8 @@ HTML worker belong to `packages/sdk-docs`.## Start here- `scripts/generate.ts`: bundle and backend artifact generation.-- `scripts/typedoc.ts`: collect linked Markdown documentation by entity.+- `scripts/typedoc.ts`: index each entity and split linked Markdown into+ per-symbol references (classes, methods, types).- `scripts/catalog.ts`: compact entity descriptions; agent and harness docs sharea topic, as do native channels and standalone WhatsApp groups, so discovery stayswithin its 32-question classifier limit.diff --git a/packages/code-mode-sdk/README.md b/packages/code-mode-sdk/README.mdindex 9c0739ca07..85d77e9968 100644--- a/packages/code-mode-sdk/README.md+++ b/packages/code-mode-sdk/README.md@@ -31,16 +31,18 @@ interactive after execution. A review is an optional human workflow, not asecurity barrier against direct SDK writes.The independent `@macro-inc/sdk-docs` package uses TypeDoc and its Markdown plugin to generate the canonical public SDK Markdown-hierarchy and an HTML site from one reflection model. Backend entity sections-and namespace overviews use those Markdown pages. Compact overviews include-linked local option types and enums; full sections also include linked wire types.+hierarchy and an HTML site from one reflection model. The backend catalog is built from those Markdown pages: an index per entity+(classes, methods with signatures, and types, by symbol) and a reference per+symbol, each class split into its own methods, with links rewritten to the+symbols they name. Wire types an entity reaches are included as symbols; a name+two pages share is qualified by its service or entity (`storage.Message`).Discovery uses at most 32 topics; agent and host setup share a topic, as donative channels and linked WhatsApp groups. New SDKservices must also be registered in the generated operation-label catalog.There is no separate declaration parser. Private, protected and internal members-are excluded. `DescribeCodeTools` provides the compact catalog, generated API-documentation and workflow guides. See [documentation hosting](../sdk-docs/README.md). Jev-selects likely sections before a code-mode turn, bounded by+are excluded. `DescribeCodeTools` provides the compact catalog, entity indexes and workflow+guides; `ReadCodeDocs` provides symbol references. See [documentation hosting](../sdk-docs/README.md). Jev+selects likely entity indexes before a code-mode turn, bounded byone second and a context byte cap; failure leaves the compact catalog available.There is no runtime documentation helper. See the[agent playbook](../../crates/agent_code_mode/SKILL.md).diff --git a/packages/code-mode-sdk/scripts/typedoc.ts b/packages/code-mode-sdk/scripts/typedoc.tsindex c71f41d6ed..34bc854058 100644--- a/packages/code-mode-sdk/scripts/typedoc.ts+++ b/packages/code-mode-sdk/scripts/typedoc.ts@@ -15,22 +15,41 @@ export async function readMarkdownPages(directory: string) {return pages;}+/** One SDK entity: what it is for, and the compact index of what it declares. */+export type EntityDocs = { name: string; description: string; index: string };++/**+ * The agent reads the SDK in two steps: an entity's index lists its classes,+ * methods and types by symbol, and each symbol's own reference is read on+ * request. Symbols are a class (`Task`), one of its methods (`Task.update`) or+ * a type (`CreateTaskOptions`); a name two pages share is qualified by its+ * directory (`storage.Message`).+ */+export type SdkDocs = {+ entities: EntityDocs[];+ symbols: Record<string, string>;+};++const LINK = /\[([^\]]*)\]\(([^)]+\.md)(?:#([^)]*))?\)/g;+export function packageEntityDocs(sourcePages: ReadonlyMap<string, string>,descriptions: Readonly<Record<string, string>>-) {+): SdkDocs {// The public SDK retains deployed legacy APIs. Native discovery tools cover// current sessions; omit the legacy chat and workspace namespaces here.const hiddenNamespace = (path: string) =>/^src\/entities\/(chats|workspace)\//.test(path);const pages = new Map([...sourcePages]- .filter(([path]) => !hiddenNamespace(path))+ .filter(+ ([path]) => !hiddenNamespace(path) && !path.endsWith('/README.md')+ ).map(([path, markdown]) => [path,markdown.replace(- /^### (?:chats|workspace)\b[^\n]*\n[\s\S]*?(?=^### |(?![\s\S]))/gm,+ /^### (?:chats|workspace)\b[^\n]*\n[\s\S]*?(?=^### |^## |(?![\s\S]))/gm,'').replace(/^\| <a id="property-(?:chats|workspace)"[^\n]*\n/gm, ''),@@ -73,74 +92,222 @@ export function packageEntityDocs(prefixes: core,},];- return sections.map(({ name, description, prefixes }) => {- const included = new Set(- [...pages.keys()].filter(- (path) =>- !path.endsWith('/README.md') &&- prefixes.some((prefix) => path.startsWith(prefix))- )+ const resolve = (from: string, target: string) =>+ posix.normalize(+ posix.join(posix.dirname(from), decodeURIComponent(target)));- if (!included.size)- throw new Error(`TypeDoc generated no pages for ${name}`);++ // Every page an entity declares, and every wire contract those reach.+ const documented = new Set<string>();+ const owned = sections.map(({ name, prefixes }) => {+ const own = [...pages.keys()].filter((path) =>+ prefixes.some((prefix) => path.startsWith(prefix))+ );+ if (!own.length) throw new Error(`TypeDoc generated no pages for ${name}`);+ const reached = new Set(own);// Follow the plugin's links, not TypeScript syntax. Shared wire definitions// may recurse or reference one another; a Set handles cycles deterministically.- for (const path of included) {- const markdown = pages.get(path);- if (markdown === undefined)- throw new Error(`Missing TypeDoc page: ${path}`);- for (const match of markdown.matchAll(/\]\(([^)]+\.md)(?:#[^)]*)?\)/g)) {- const target = posix.normalize(- posix.join(posix.dirname(path), decodeURIComponent(match[1] ?? ''))- );+ for (const path of reached) {+ for (const match of (pages.get(path) ?? '').matchAll(LINK)) {+ const target = resolve(path, match[2] ?? '');if (hiddenNamespace(target)) continue;if (!pages.has(target))throw new Error(`Broken TypeDoc link: ${path} -> ${target}`);- if (target.startsWith('generated/')) included.add(target);+ if (target.startsWith('generated/')) reached.add(target);}}- const overviewPages = new Set(- [...included].filter((path) =>- name === 'core'- ? path.startsWith('src/macro/') || path.startsWith('src/config/')- : path.includes('/namespace/')- )- );- // Namespace signatures are not usable without their local options and enums.- // Follow those TypeDoc links, while leaving entity classes and large wire- // contracts in the full reference available through explicit discovery.- for (const path of overviewPages) {- for (const match of (pages.get(path) ?? '').matchAll(- /\]\(([^)]+\.md)(?:#[^)]*)?\)/g- )) {- const target = posix.normalize(- posix.join(posix.dirname(path), decodeURIComponent(match[1] ?? ''))- );- if (- prefixes.some((prefix) => target.startsWith(prefix)) &&- (target.includes('/type-aliases/') ||- target.includes('/interfaces/')) &&- pages.has(target)- )- overviewPages.add(target);- }+ for (const path of reached) documented.add(path);+ return own.sort();+ });++ // A page is known by its name. An SDK class or type keeps it when no other+ // SDK page shares it; a wire contract keeps it only when no page at all does.+ const named = new Map<string, string[]>();+ for (const path of documented) {+ const name = pageName(path);+ named.set(name, [...(named.get(name) ?? []), path]);+ }+ const symbolOf = new Map<string, string>();+ for (const [name, paths] of named) {+ const sdk = paths.filter((path) => path.startsWith('src/'));+ for (const path of paths) {+ const bare = path.startsWith('src/')+ ? sdk.length === 1+ : paths.length === 1;+ symbolOf.set(path, bare ? name : `${pageGroup(path)}.${name}`);}- if (!overviewPages.size)- throw new Error(`TypeDoc generated no namespace overview for ${name}`);- return {+ }+ if (new Set(symbolOf.values()).size !== symbolOf.size)+ throw new Error('Two TypeDoc pages share a qualified symbol');++ // Links name the symbol they point at, as ReadCodeDocs takes it.+ const relink = (path: string, markdown: string) =>+ markdown+ .replace(LINK, (_whole, label: string, target: string, anchor) => {+ const symbol = symbolOf.get(resolve(path, target));+ if (!symbol) return label;+ // An anchor is a member; its label keeps the member's case.+ const member = anchor+ ? `.${label.replaceAll('`', '').split('.').pop()}`+ : '';+ return `\`${symbol}${member}\``;+ })+ // TypeDoc writes an inherited member as `[Class].[member]`.+ .replace(/`([^`]+)`\.`\1\.([^`]+)`/g, '`$1.$2`');++ const symbols: Record<string, string> = {};+ for (const path of [...documented].sort()) {+ const symbol = symbolOf.get(path) ?? '';+ const markdown = relink(path, pages.get(path) ?? '');+ if (!path.includes('/classes/')) {+ symbols[symbol] = markdown.trim();+ continue;+ }+ const { header, methods } = splitClass(markdown);+ symbols[symbol] = header;+ for (const method of methods)+ symbols[`${symbol}.${method.name}`] = method.markdown;+ }++ // Where each namespace class is reached from: `macro.tasks`.+ const accessors = new Map<string, string>();+ for (const match of relink(+ 'src/macro/classes/Macro.md',+ pages.get('src/macro/classes/Macro.md') ?? ''+ ).matchAll(+ /^\| <a id="property-[^"]+"><\/a> `([^`]+)` \| `readonly` \| `([^`]+)`/gm+ ))+ accessors.set(match[2] ?? '', `macro.${match[1]}`);++ return {+ entities: sections.map(({ name, description }, index) => ({name,description,- overview: [...overviewPages]- .sort()- .map((path) => `<!-- ${path} -->\n${pages.get(path)}`)- .join('\n\n'),- documentation: [- `# Macro SDK: ${name}`,- 'Generated 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.',- ...[...included]- .sort()- .map((path) => `<!-- ${path} -->\n${pages.get(path)}`),- ].join('\n\n'),- };- });+ index: entityIndex(+ name,+ description,+ (owned[index] ?? []).map((path) => ({+ path,+ symbol: symbolOf.get(path) ?? '',+ markdown: relink(path, pages.get(path) ?? ''),+ })),+ accessors+ ),+ })),+ symbols,+ };+}++function pageName(path: string) {+ return posix.basename(path, '.md');+}++/** The directory that tells two same-named pages apart: a wire service or an entity. */+function pageGroup(path: string) {+ const parts = path.split('/');+ return parts[0] === 'generated'+ ? (parts[1] ?? '')+ : (parts[parts.indexOf('entities') + 1] ?? parts[1] ?? '');+}++type Method = { name: string; markdown: string; inherited: boolean };++/** A class page's own description and fields, and each method on its own. */+function splitClass(markdown: string) {+ const sections = markdown.split(/^(?=## )/m);+ const header = sections+ .filter(+ (section) =>+ !section.startsWith('## Constructors') &&+ !section.startsWith('## Methods')+ )+ .join('')+ .trim();+ const methods: Method[] = (+ sections.find((section) => section.startsWith('## Methods')) ?? ''+ )+ .split(/^(?=### )/m)+ .filter((block) => block.startsWith('### '))+ .map((block) => {+ const text = block.replace(/\n\*\*\*\s*$/, '').trim();+ return {+ name: (text.match(/^### (\S+?)\(\)/) ?? [])[1] ?? '',+ markdown: text,+ inherited: /^#### Inherited from/m.test(text),+ };+ })+ .filter((method) => method.name);+ return { header, methods };+}++/** Markdown inline code and escapes, as plain text. */+function plain(markdown: string) {+ return markdown+ .replace(/\*\*|`/g, '')+ .replace(/\\([<>|_*[\]{}])/g, '$1')+ .trim();+}++/** The first sentence of the paragraph after a heading's signature. */+function summary(markdown: string) {+ const paragraph =+ markdown+ .split(/\n\n+/)+ .slice(1)+ .find(+ (part) =>+ !part.startsWith('>') &&+ !part.startsWith('#') &&+ !part.startsWith('|') &&+ !part.startsWith('-')+ ) ?? '';+ const sentence =+ plain(paragraph.replace(/\n/g, ' ')).split(/(?<=\.)\s/)[0] ?? '';+ return sentence.length > 160 ? `${sentence.slice(0, 157)}...` : sentence;+}++function entityIndex(+ name: string,+ description: string,+ pages: { path: string; symbol: string; markdown: string }[],+ accessors: ReadonlyMap<string, string>+) {+ const lines = [+ `## ${name}`,+ description,+ 'Read any symbol below, or one a reference names, with ReadCodeDocs.',+ ];+ const kinds: Record<string, string[]> = {};+ for (const { path, symbol, markdown } of pages) {+ if (!path.includes('/classes/')) {+ const kind = path.includes('/functions/') ? 'Functions' : 'Types';+ kinds[kind] = [...(kinds[kind] ?? []), `\`${symbol}\``];+ continue;+ }+ const { header, methods } = splitClass(markdown);+ const reach = accessors.get(symbol);+ const parent = header.match(/^## Extends\n\n- `([^`]+)`/m)?.[1];+ lines.push(+ '',+ `### ${symbol}${reach ? ` (\`${reach}\`)` : ''}`,+ ...[summary(header), parent && `Extends \`${parent}\`.`].filter(+ (line): line is string => Boolean(line)+ )+ );+ const fields = [+ ...header.matchAll(/^\| <a id="property-[^"]+"><\/a> `([^`]+)`/gm),+ ].map((match) => match[1]);+ if (fields.length) lines.push(`Fields: ${fields.join(', ')}`);+ for (const method of methods.filter((method) => !method.inherited)) {+ const signature = method.markdown.match(/^> (.+)$/m)?.[1] ?? '';+ const about = summary(method.markdown);+ lines.push(+ `- \`${symbol}.${method.name}\`: ${plain(signature)}${about ? ` — ${about}` : ''}`+ );+ }+ }+ for (const kind of ['Functions', 'Types'])+ if (kinds[kind]?.length)+ lines.push('', `${kind}: ${kinds[kind].join(', ')}`);+ return `${lines.join('\n')}\n`;}diff --git a/packages/code-mode-sdk/src/documentation.test.ts b/packages/code-mode-sdk/src/documentation.test.tsindex 4c1e80df59..5179fef6da 100644--- a/packages/code-mode-sdk/src/documentation.test.ts+++ b/packages/code-mode-sdk/src/documentation.test.ts@@ -1,17 +1,77 @@import { readFile } from 'node:fs/promises';import { describe, expect, it } from 'vitest';-import { packageEntityDocs } from '../scripts/typedoc';+import { packageEntityDocs, type SdkDocs } from '../scripts/typedoc';const artifact = new URL('../../../crates/agent_code_mode/src/domain/documentation.json',import.meta.url);+const NAMESPACE = `# Class: ExampleNamespace++## Constructors++### Constructor++> **new ExampleNamespace**(\`client\`): \`ExampleNamespace\`++## Methods++### create()++> **create**(\`opts\`): \`Promise\`\\<[\`Example\`](../../example/classes/Example.md)\\>++Create an example. It is shared.++#### Parameters++| Parameter | Type |+| ------ | ------ |+| \`opts\` | [\`Request\`](../../../../../generated/example/types.gen/type-aliases/Request.md) |++***++### byId()++> **byId**(\`id\`): [\`Example\`](../../example/classes/Example.md)++A handle by id.+`;++const EXAMPLE = `# Class: Example++An example handle.++## Extends++- [\`Base\`](../../../entity/classes/Base.md)++## Properties++| Property | Modifier | Type | Description | Inherited from |+| ------ | ------ | ------ | ------ | ------ |+| <a id="property-id"></a> \`id\` | \`readonly\` | \`string\` | - | [\`Base\`](../../../entity/classes/Base.md).[\`id\`](../../../entity/classes/Base.md#property-id) |++## Methods++### rename()++> **rename**(\`name\`): \`Promise\`\\<\`void\`\\>++Rename it.++#### Inherited from++[\`Base\`](../../../entity/classes/Base.md).[\`rename\`](../../../entity/classes/Base.md#rename)+`;+function fixturePages() {return new Map([+ ['src/entities/example/namespace/classes/ExampleNamespace.md', NAMESPACE],+ ['src/entities/example/example/classes/Example.md', EXAMPLE],[- 'src/entities/example/namespace/classes/ExampleNamespace.md',- '# ExampleNamespace\n[next](../../../../../generated/example/types.gen/type-aliases/Request.md)',+ 'src/entities/entity/classes/Base.md',+ '# Class: Base\n\nBase handle. [Child](../../../../generated/other/types.gen/type-aliases/Child.md)',],['generated/example/types.gen/type-aliases/Request.md',@@ -21,151 +81,122 @@ function fixturePages() {'generated/example/types.gen/type-aliases/Child.md','# Child\n[cycle](Request.md)',],- ['src/macro/classes/Macro.md', '# Macro'],+ [+ 'generated/other/types.gen/type-aliases/Child.md',+ '# Child\nAnother service',+ ],+ [+ 'src/macro/classes/Macro.md',+ '# Class: Macro\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id="property-examplespace"></a> `exampleSpace` | `readonly` | [`ExampleNamespace`](../../entities/example/namespace/classes/ExampleNamespace.md) | Examples. |\n',+ ],]);}+function pack(pages = fixturePages()) {+ return packageEntityDocs(pages, { example: 'An example.' });+}+describe('TypeDoc documentation packaging', () => {- it('retains transitive and cyclic wire references without rewriting Markdown', () => {- const pages = fixturePages();- const [entity] = packageEntityDocs(pages, { example: 'An example.' });- expect(entity?.documentation).toContain('# Request\n[child](Child.md)');- expect(entity?.documentation.match(/# Child/g)).toHaveLength(1);- expect(entity?.overview).toContain('# ExampleNamespace');- expect(entity?.overview).not.toContain('# Child');+ it('indexes an entity by symbol with signatures, summaries and its accessor', () => {+ const [entity] = pack().entities;+ expect(entity?.index).toContain(+ '### ExampleNamespace (`macro.exampleSpace`)'+ );+ expect(entity?.index).toContain(+ '- `ExampleNamespace.create`: create(opts): Promise<Example> — Create an example.'+ );+ expect(entity?.index).toContain('### Example\nAn example handle.');+ expect(entity?.index).toContain('Extends `Base`.\nFields: id');+ // Inherited methods are read on the class that declares them.+ expect(entity?.index).not.toContain('Example.rename');+ expect(entity?.index).not.toContain('Constructor');+ });++ it('splits classes into methods and names links by the symbol to read', () => {+ const { symbols } = pack();+ expect(symbols['ExampleNamespace.create']).toContain(+ '| `opts` | `Request` |'+ );+ expect(symbols['ExampleNamespace.create']).toContain(+ '`Promise`\\<`Example`\\>'+ );+ expect(symbols.ExampleNamespace).not.toContain('### create()');+ expect(symbols.ExampleNamespace).not.toContain('Constructor');+ expect(symbols.Example).toContain('| `Base.id` |');+ expect(symbols['Example.rename']).toContain('`Base.rename`');+ expect(Object.values(symbols).join('\n')).not.toContain('.md');+ });++ it('keeps transitive and cyclic wire references, qualifying shared names', () => {+ const { symbols } = pack();+ expect(symbols.Request).toBe('# Request\n`example.Child`');+ expect(symbols['example.Child']).toBe('# Child\n`Request`');+ expect(symbols['other.Child']).toBe('# Child\nAnother service');});it('omits legacy namespaces without removing adjacent current session methods', () => {const pages = fixturePages();pages.set('src/macro/classes/Macro.md',- '# Macro\n### chats\n[Chats](../../entities/chats/namespace/classes/Chats.md)\n### agentSessions\nCurrent sessions\n### workspace\nLegacy feed'+ '# Class: Macro\n\n## Methods\n\n### chats()\n[Chats](../../entities/chats/namespace/classes/Chats.md)\n\n### agentSessions()\n\nCurrent sessions\n\n### workspace()\n\nLegacy feed');- const docs = packageEntityDocs(pages, { example: 'An example.' });- const core = docs.find((doc) => doc.name === 'core');- expect(core?.documentation).toContain(- '### agentSessions\nCurrent sessions'- );- expect(core?.documentation).not.toContain('### chats');- expect(core?.documentation).not.toContain('Legacy feed');+ const { symbols } = pack(pages);+ expect(symbols['Macro.agentSessions']).toContain('Current sessions');+ expect(symbols['Macro.chats']).toBeUndefined();+ expect(symbols['Macro.workspace']).toBeUndefined();});it('fails generation on a missing referenced contract or missing namespace', () => {const pages = fixturePages();pages.delete('generated/example/types.gen/type-aliases/Child.md');- expect(() => packageEntityDocs(pages, { example: 'An example.' })).toThrow(- 'Broken TypeDoc link'- );+ expect(() => pack(pages)).toThrow('Broken TypeDoc link');expect(() =>packageEntityDocs(new Map(), { example: 'An example.' })).toThrow('no pages');});- it('includes namespace option types and their local enum dependencies in compact docs', () => {- const pages = fixturePages();- pages.set(- 'src/entities/example/namespace/classes/ExampleNamespace.md',- '# ExampleNamespace\n[Options](../../types/type-aliases/Options.md)'- );- pages.set(- 'src/entities/example/types/type-aliases/Options.md',- '# Options\n[Kind](Kind.md) [Entity](../../entity/classes/Entity.md)'- );- pages.set(- 'src/entities/example/types/type-aliases/Kind.md',- '# Kind\n"calendar_event" | "ai_chat"\n[Options](Options.md)'- );- pages.set('src/entities/example/entity/classes/Entity.md', '# Entity');- const [entity] = packageEntityDocs(pages, { example: 'An example.' });- expect(entity?.overview).toContain('# Options');- expect(entity?.overview).toContain('"calendar_event" | "ai_chat"');- expect(entity?.overview?.match(/# Options/g)).toHaveLength(1);- expect(entity?.overview).not.toContain('# Entity');- });-- it('documents real public review handles and full wire fields without private members', async () => {- const docs = JSON.parse(await readFile(artifact, 'utf8')) as Array<{- name: string;- documentation: string;- overview: string;- }>;- const reviews = docs.find((doc) => doc.name === 'agentSessions');- if (!reviews) throw new Error('Missing agentSessions docs');- expect(reviews.documentation).toContain('# Class: SessionReview');- const canonical = await readFile(- new URL(- '../../sdk-docs/dist/docs/markdown/src/entities/agent-sessions/review/classes/SessionReview.md',- import.meta.url- ),- 'utf8'- );- expect(reviews.documentation).toContain(canonical);- const html = await readFile(- new URL(- '../../sdk-docs/dist/docs/html/classes/src_entities_agent-sessions_review.SessionReview.html',- import.meta.url- ),- 'utf8'- );- expect(html).toContain('submitAll');- expect(html).toContain('ReviewRecord');-- expect(reviews.documentation).toContain('submitAll');- expect(reviews.documentation).toContain('presentedAt');- expect(reviews.documentation).toContain('executionId');- expect(reviews.documentation).not.toContain('property-parent');- expect(reviews.documentation).not.toContain('property-client');- expect(reviews.documentation).not.toContain('private constructor');- expect(docs.find((doc) => doc.name === 'ai')?.documentation).toContain(- 'output_schema'- );+ it('documents real public SDK handles in small indexes and references', async () => {+ const docs = JSON.parse(await readFile(artifact, 'utf8')) as SdkDocs;+ const entity = (name: string) => {+ const found = docs.entities.find((doc) => doc.name === name);+ if (!found) throw new Error(`Missing ${name} docs`);+ return found.index;+ };+ expect(entity('agentSessions')).toContain('### SessionReview');+ expect(entity('agentSessions')).toContain('`SessionReview.submitAll`');+ expect(docs.symbols.ReviewRecord).toContain('presentedAt');+ expect(docs.symbols.SessionReview).not.toContain('property-parent');+ expect(docs.symbols.SessionReview).not.toContain('property-client');+ expect(docs.symbols.SessionReview).not.toContain('private constructor');+ expect(entity('documents')).toContain('`Document.content`');+ expect(entity('core')).toContain('### Macro');+ expect(docs.symbols.Macro).toContain('`agentSessions`');+ expect(docs.symbols.Macro).not.toContain('property-chats');+ expect(docs.symbols.Macro).not.toContain('property-workspace');+ expect(entity('routines')).toContain('`RoutineOptions`');+ expect(entity('agents')).toContain('### HarnessNamespace');+ expect(entity('apiKeys')).toContain('### UserApiKey');+ expect(entity('entityMentions')).toContain('EntityMentionNamespace');+ expect(entity('githubPullRequests')).toContain('PullRequestChangeset');+ expect(entity('core')).toContain('`SharePermissionOptions`');expect(- docs.find((doc) => doc.name === 'documents')?.documentation- ).toContain('content()');- expect(docs.some((doc) => ['chats', 'workspace'].includes(doc.name))).toBe(- false- );- const core = docs.find((doc) => doc.name === 'core');- expect(core?.documentation).not.toMatch(/^### (chats|workspace)\b/m);- expect(core?.documentation).toContain('`agentSessions`');- expect(core?.documentation).not.toContain('property-chats');- expect(core?.documentation).not.toContain('property-workspace');- expect(docs.length).toBeLessThanOrEqual(32);- expect(- docs.find((doc) => doc.name === 'routines')?.documentation- ).toContain('RoutineOptions');- expect(docs.find((doc) => doc.name === 'agents')?.documentation).toContain(- 'HarnessNamespace'- );- expect(docs.find((doc) => doc.name === 'apiKeys')?.documentation).toContain(- 'UserApiKey'- );- expect(- docs.find((doc) => doc.name === 'entityMentions')?.overview- ).toContain('EntityMentionNamespace');- expect(- docs.find((doc) => doc.name === 'githubPullRequests')?.documentation- ).toContain('PullRequestChangeset');- expect(docs.find((doc) => doc.name === 'core')?.documentation).toContain(- 'SharePermissionOptions'- );- for (const doc of docs) {- expect(doc.overview.length).toBeGreaterThan(0);- expect(Buffer.byteLength(doc.overview)).toBeLessThan(16 * 1024);- expect(doc.documentation).not.toContain('/home/wolf/');+ docs.entities.some((doc) => ['chats', 'workspace'].includes(doc.name))+ ).toBe(false);+ expect(docs.entities.length).toBeLessThanOrEqual(32);+ for (const doc of docs.entities)+ expect(Buffer.byteLength(doc.index)).toBeLessThan(16 * 1024);+ for (const reference of Object.values(docs.symbols)) {+ expect(Buffer.byteLength(reference)).toBeLessThan(16 * 1024);+ expect(reference).not.toContain('/home/');}});});it('linked WhatsApp handles share the channels discovery topic without pairing methods', async () => {- const docs = JSON.parse(await readFile(artifact, 'utf8')) as Array<{- name: string;- documentation: string;- overview: string;- }>;- const channels = docs.find((entry) => entry.name === 'channels');- expect(channels?.documentation).toContain('WhatsAppNamespace');- expect(channels?.documentation).toContain('WhatsAppGroup');- expect(channels?.overview).toContain('groups()');- expect(channels?.overview).not.toContain('linkedConnect');+ const docs = JSON.parse(await readFile(artifact, 'utf8')) as SdkDocs;+ const channels = docs.entities.find((entry) => entry.name === 'channels');+ expect(channels?.index).toContain('WhatsAppNamespace');+ expect(channels?.index).toContain('WhatsAppGroup');+ expect(channels?.index).toContain('.groups`');+ expect(channels?.index).not.toContain('linkedConnect');});diff --git a/services/agent_harness_service/AGENTS.md b/services/agent_harness_service/AGENTS.mdindex 4708fe0f07..910bd72887 100644--- a/services/agent_harness_service/AGENTS.md+++ b/services/agent_harness_service/AGENTS.md@@ -24,7 +24,7 @@ Pulumi stacks; they do not host extra agent processes.- `src/internal_mcp.rs`: the internal MCP server exposed to running sessions.- `src/public_mcp.rs` + `src/public_mcp/`: public workspace MCP and OAuth;reuses the harness tool context and retains bearer authentication. Users with- `ai-code-mode` get `ExecuteCode`/`DescribeCodeTools` in place of SDK-covered+ `ai-code-mode` get `ExecuteCode`/`DescribeCodeTools`/`ReadCodeDocs` in place of SDK-coveredtools (`tool_service.rs`); the flag is cached per user (`tool_mode_cache.rs`).`src/public_mcp/analytics.rs` sends PostHog `$mcp_initialize` /`$mcp_tool_call` events (PostHog MCP analytics schema) in the background,diff --git a/services/agent_harness_service/src/internal_mcp.rs b/services/agent_harness_service/src/internal_mcp.rsindex 8b3f559154..13aa2b1dd9 100644--- a/services/agent_harness_service/src/internal_mcp.rs+++ b/services/agent_harness_service/src/internal_mcp.rs@@ -95,7 +95,7 @@ impl ServerHandler for InternalTools {);if self.code_mode.is_some() {info.instructions.as_mut().expect("instructions are set").push_str(- " macro_internal.ExecuteCode and macro_internal.DescribeCodeTools are available directly, without tool search. Follow their descriptions for the JavaScript main module, real SDK entity documentation, and persistent review workflow. Reuse entity documentation already expanded in context.",+ " macro_internal.ExecuteCode, macro_internal.DescribeCodeTools and macro_internal.ReadCodeDocs are available directly, without tool search. Follow their descriptions for the JavaScript main module, SDK entity indexes and symbol references, and persistent review workflow. Reuse indexes and references already in context.",);}info@@ -168,7 +168,10 @@ impl ServerHandler for InternalTools {}),);for tool in &mut definitions {- if !matches!(tool.name.as_ref(), "DescribeCodeTools" | "ExecuteCode") {+ if !matches!(+ tool.name.as_ref(),+ "DescribeCodeTools" | "ReadCodeDocs" | "ExecuteCode"+ ) {ai_toolset::actor::add_actor_schema(Arc::make_mut(&mut tool.input_schema));}}@@ -196,7 +199,10 @@ impl ServerHandler for InternalTools {.owner_user().map_err(|error| rmcp::ErrorData::invalid_request(error.to_string(), None))?;let mut acting_user = owner.clone();- if !matches!(request.name.as_ref(), "ExecuteCode" | "DescribeCodeTools") {+ if !matches!(+ request.name.as_ref(),+ "ExecuteCode" | "DescribeCodeTools" | "ReadCodeDocs"+ ) {let arguments = serde_json::Value::Object(request.arguments.take().unwrap_or_default());let (_, cleaned) = match ai_toolset::actor::ToolActor::take(&arguments) {Ok(selection) => selection,diff --git a/services/agent_harness_service/src/internal_mcp/test.rs b/services/agent_harness_service/src/internal_mcp/test.rsindex 96fccc860f..38b3974fe4 100644--- a/services/agent_harness_service/src/internal_mcp/test.rs+++ b/services/agent_harness_service/src/internal_mcp/test.rs@@ -111,7 +111,12 @@ async fn rpc(method: &str,mut params: serde_json::Value,) -> (StatusCode, serde_json::Value) {- if method == "tools/call" && params["name"] != "DescribeCodeTools" {+ if method == "tools/call"+ && !matches!(+ params["name"].as_str(),+ Some("DescribeCodeTools" | "ReadCodeDocs")+ )+ {params["arguments"]["acting_as"] = serde_json::json!("owner");}let mut request = Request::builder()diff --git a/services/agent_harness_service/src/internal_mcp/test/code_mode.rs b/services/agent_harness_service/src/internal_mcp/test/code_mode.rsindex 57e0cb67d8..702e60ffdc 100644--- a/services/agent_harness_service/src/internal_mcp/test/code_mode.rs+++ b/services/agent_harness_service/src/internal_mcp/test/code_mode.rs@@ -116,7 +116,11 @@ async fn authenticated_mcp_runs_javascript_and_persists_source_and_result(pool:.iter().map(|tool| tool["name"].as_str().unwrap()).collect();- assert!(names.contains(&"ExecuteCode") && names.contains(&"DescribeCodeTools"));+ assert!(+ ["ExecuteCode", "DescribeCodeTools", "ReadCodeDocs"]+ .iter()+ .all(|name| names.contains(name))+ );let (_, docs) = rpc(app.clone(),Some("session-secret"),@@ -131,10 +135,25 @@ async fn authenticated_mcp_runs_javascript_and_persists_source_and_result(pool:let doc = &docs["result"]["structuredContent"]["tools"][0];assert_eq!(doc["name"], "documents");assert!(- doc["documentation"]+ doc["index"]+ .as_str()+ .unwrap()+ .contains("### DocumentNamespace (`macro.documents`)")+ );+ let (_, read) = rpc(+ app.clone(),+ Some("session-secret"),+ "tools/call",+ json!({"name": "ReadCodeDocs", "arguments": {"symbols": ["DocumentNamespace.search"]}}),+ )+ .await;+ let reference = &read["result"]["structuredContent"]["references"][0];+ assert_eq!(reference["symbol"], "DocumentNamespace.search");+ assert!(+ reference["reference"].as_str().unwrap()- .contains("Class: DocumentNamespace")+ .starts_with("### search()"));let (_, guides) = rpc(app.clone(),diff --git a/services/agent_harness_service/src/public_mcp/code_mode_instructions.md b/services/agent_harness_service/src/public_mcp/code_mode_instructions.mdindex 023b3df34f..f26b3a3cda 100644--- a/services/agent_harness_service/src/public_mcp/code_mode_instructions.md+++ b/services/agent_harness_service/src/public_mcp/code_mode_instructions.md@@ -1 +1 @@-Code mode is on. ExecuteCode runs a JavaScript program against the full Macro SDK as the user; prefer it for multi-step, bulk or filtered work, and for anything the direct tools do not cover. Before writing a program, call DescribeCodeTools with task set to what the program must do; it returns the relevant SDK references. Do not guess SDK methods. If a program fails with an SDK error, look up the missing entity and fix the program. Direct tools remain for search (NameSearch, ContentSearch, ListEntities), document editing and other work outside the SDK.+Code mode is on. ExecuteCode runs a JavaScript program against the full Macro SDK as the user; prefer it for multi-step, bulk or filtered work, and for anything the direct tools do not cover. Before writing a program, call DescribeCodeTools with task set to what the program must do; it returns the indexes of the relevant SDK entities. Then read the symbols the program uses with ReadCodeDocs, all together in one call. Do not guess SDK methods or options. If a program fails with an SDK error, read the symbol involved and fix the program. Direct tools remain for search (NameSearch, ContentSearch, ListEntities), document editing and other work outside the SDK.diff --git a/services/agent_harness_service/src/public_mcp/tool_service.rs b/services/agent_harness_service/src/public_mcp/tool_service.rsindex 6805628782..110f39631c 100644--- a/services/agent_harness_service/src/public_mcp/tool_service.rs+++ b/services/agent_harness_service/src/public_mcp/tool_service.rs@@ -45,7 +45,7 @@ fn definitions<Context>(toolset: &AsyncToolCollection<Context>) -> impl Iteratorpub struct CodeModeSurface<Context> {/// Native tools still listed in code mode, from `tools_for_mcp_code_mode`.pub native: Arc<AsyncToolCollection<Context>>,- /// `ExecuteCode` and `DescribeCodeTools`.+ /// `ExecuteCode`, `DescribeCodeTools` and `ReadCodeDocs`.pub tools: Arc<AsyncToolCollection<UserCodeModeToolContext>>,/// User-scoped execution and Jev.pub context: UserCodeModeToolContext,diff --git a/services/agent_harness_service/src/public_mcp/tool_service/test.rs b/services/agent_harness_service/src/public_mcp/tool_service/test.rsindex de45400793..4ce670574e 100644--- a/services/agent_harness_service/src/public_mcp/tool_service/test.rs+++ b/services/agent_harness_service/src/public_mcp/tool_service/test.rs@@ -362,7 +362,10 @@ mod code_mode {let app = app(Arc::new(Runs::default()));let flagged = rpc(app.clone(), FLAGGED, "tools/list", serde_json::json!({})).await;- assert_eq!(tool_names(&flagged), ["DescribeCodeTools", "ExecuteCode"]);+ assert_eq!(+ tool_names(&flagged),+ ["DescribeCodeTools", "ExecuteCode", "ReadCodeDocs"]+ );let unflagged = rpc(app.clone(), UNFLAGGED, "tools/list", serde_json::json!({})).await;assert!(tool_names(&unflagged).is_empty());