Skip to content

armgit / macro

Public Imported from GitHub
0

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

build(code-mode): generate the Deno SDK bundle and docs at build time (#9527)

Wolf Mermelstein6037f779bb77
diff --git a/.github/workflows/check_node_modules_nix.yml b/.github/workflows/check_node_modules_nix.yml
index 3883fd7323..2bd88fe35b 100644
--- a/.github/workflows/check_node_modules_nix.yml
+++ b/.github/workflows/check_node_modules_nix.yml
@@ -7,6 +7,7 @@ name: check node_modules nix
- main
paths:
- bun.lock
+ - packages/sdk/bun.lock
- package.json
- apps/**/package.json
- packages/**/package.json
diff --git a/.github/workflows/code_check_cloud_storage.yml b/.github/workflows/code_check_cloud_storage.yml
index a297fa1797..6d111a71c4 100644
--- a/.github/workflows/code_check_cloud_storage.yml
+++ b/.github/workflows/code_check_cloud_storage.yml
@@ -58,8 +58,13 @@ jobs:
- 'tooling/xtask/**'
- 'static_assets/**'
- 'nix/**'
+ - 'nix-support/node_modules*'
- 'flake.nix'
- 'flake.lock'
+ - 'bun.lock'
+ - 'packages/sdk/**'
+ - 'packages/sdk-docs/**'
+ - 'packages/code-mode-sdk/**'
- '.github/actions/setup-nix/**'
- '.github/actions/setup-nix-dev-shell/**'
- '.github/actions/teardown-nix/**'
@@ -287,8 +292,10 @@ jobs:
else
echo "::warning::Namespace remote sccache setup failed; using local cache fallback"
fi
- - name: Check embedded code execution assets
- run: nix build --no-link .#checks.x86_64-linux.code-execution-assets
+ - name: Build code-mode assets
+ run: |
+ assets="$(nix build --no-link --print-out-paths --print-build-logs .#code-mode-assets)"
+ echo "CODE_MODE_ASSETS_DIR=$assets" >> "$GITHUB_ENV"
- name: fmt
run: cargo fmt --check
- name: clippy
@@ -454,6 +461,10 @@ jobs:
else
echo "::warning::Namespace remote sccache setup failed; using local cache fallback"
fi
+ - name: Build code-mode assets
+ run: |
+ assets="$(nix build --no-link --print-out-paths --print-build-logs .#code-mode-assets)"
+ echo "CODE_MODE_ASSETS_DIR=$assets" >> "$GITHUB_ENV"
- id: doppler-bins
name: compute affected Doppler config bins
run: |
@@ -587,6 +598,10 @@ jobs:
fi
- name: Start sccache server
run: sccache --start-server
+ - name: Build code-mode assets
+ run: |
+ assets="$(nix build --no-link --print-out-paths --print-build-logs .#code-mode-assets)"
+ echo "CODE_MODE_ASSETS_DIR=$assets" >> "$GITHUB_ENV"
- name: configure postgres for concurrent tests
run: |
postgres_container="$(docker ps --format '{{.ID}} {{.Image}}' | awk '$2 == "pgvector/pgvector:pg14" { print $1; exit }')"
diff --git a/.github/workflows/web-app-check-main.yml b/.github/workflows/web-app-check-main.yml
index fd7044123a..26d332ab19 100644
--- a/.github/workflows/web-app-check-main.yml
+++ b/.github/workflows/web-app-check-main.yml
@@ -50,8 +50,6 @@ jobs:
- 'packages/sdk-docs/**'
- 'services/ai-editing-worker/**'
- 'packages/code-mode-sdk/**'
- - 'crates/code_execution/src/outbound/deno/*.mjs'
- - 'crates/agent_code_mode/src/domain/documentation.json'
- 'crates/agent_code_mode/SKILL.md'
- '.github/actions/setup-reqs-web/**'
codegen_changed:
@@ -306,6 +304,10 @@ jobs:
else
echo "::warning::Namespace remote sccache setup failed; using local cache fallback"
fi
+ - name: Build code-mode assets
+ run: |
+ assets="$(nix build --no-link --print-out-paths --print-build-logs .#code-mode-assets)"
+ echo "CODE_MODE_ASSETS_DIR=$assets" >> "$GITHUB_ENV"
- name: Build schema binaries
run: |
set -euo pipefail
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index d11766c28b..2b285e23dc 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -323,6 +323,7 @@
"crates/channel_sender",
"crates/channels",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/connect_client",
"crates/connection",
@@ -757,6 +758,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/codex_cloud_agents",
"crates/codex_connection",
"crates/cognition",
@@ -959,6 +961,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/collab_surface",
"crates/comms_db_client",
@@ -1846,6 +1849,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/collab_surface",
"crates/comms_db_client",
@@ -2027,6 +2031,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/collab_surface",
"crates/comms_db_client",
@@ -3159,6 +3164,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/collab_surface",
"crates/comms_db_client",
@@ -3492,6 +3498,11 @@
],
"code_execution": [
"crates/code_execution",
+ "crates/code_mode_assets",
+ "crates/workspace-hack"
+ ],
+ "code_mode_assets": [
+ "crates/code_mode_assets",
"crates/workspace-hack"
],
"codex_cloud_agents": [
@@ -5293,6 +5304,7 @@
"crates/channels",
"crates/chat",
"crates/code_execution",
+ "crates/code_mode_assets",
"crates/cognition",
"crates/collab_surface",
"crates/comms_db_client",
diff --git a/.gitignore b/.gitignore
index 2293809c89..cec94db848 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,12 @@ infra/local/generated/
.pi/outputs/
.commandcode/
**/.webhook.json
+# Code-mode assets are generated at build time (crates/code_mode_assets);
+# never commit them.
+/crates/code_execution/src/outbound/deno/sdk.mjs
+/crates/code_execution/src/outbound/deno/handlebars.mjs
+/crates/agent_code_mode/src/domain/documentation.json
+/crates/agent_code_mode/src/domain/operations.json
/artifacts
# Raw SSE captures from CURSOR_ACP_RECORD_DIR; sanitize into
diff --git a/Cargo.lock b/Cargo.lock
index 5ff6864f21..0de4526948 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -317,6 +317,7 @@ dependencies = [
"calendar_events",
"chrono",
"code_execution",
+ "code_mode_assets",
"cognition",
"dynamic_ui",
"email",
@@ -4527,6 +4528,7 @@ name = "code_execution"
version = "0.1.0"
dependencies = [
"async-trait",
+ "code_mode_assets",
"futures",
"rootcause",
"serde",
@@ -4541,6 +4543,13 @@ dependencies = [
"workspace-hack",
]
+[[package]]
+name = "code_mode_assets"
+version = "0.1.0"
+dependencies = [
+ "workspace-hack",
+]
+
[[package]]
name = "codex_cloud_agents"
version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index 9e8d7054a6..9168ad9908 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,6 +13,7 @@ members = [
"crates/trigger_context",
"crates/agent_preview",
"crates/agent_code_mode",
+ "crates/code_mode_assets",
"crates/dynamic_ui",
"crates/agent_inmem",
"crates/agent_runtime_protocol", "crates/agent_session", "crates/agent_session_realtime",
diff --git a/crates/agent_code_mode/AGENTS.md b/crates/agent_code_mode/AGENTS.md
index 8b9c9fb676..6d1a1d9909 100644
--- a/crates/agent_code_mode/AGENTS.md
+++ b/crates/agent_code_mode/AGENTS.md
@@ -42,7 +42,7 @@ stacks. Process isolation belongs to
and streams it as a completed `PresentView` call (`view_<id>`) through
`ReviewActions::present_view`. There is no `PresentView` tool: ExecuteCode's
description carries the view schema and when to present one.
-- `src/domain/documentation.rs`: the generated SDK catalog (an index per
+- `src/domain/documentation.rs`: the build-time 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).
@@ -81,8 +81,9 @@ longer delivery state.
- The review toolset test builds every review tool through shared provider schema
validation.
- Keep generated discovery topics within the classifier's 32-question limit.
-- Regenerate SDK documentation through `packages/code-mode-sdk`; never edit
- `src/domain/documentation.json` by hand.
+- The SDK catalog and operation labels come from `crates/code_mode_assets`,
+ generated from the public SDK at build time; change the SDK or
+ `packages/code-mode-sdk`, never a generated file.
Import reviews contain exactly one draft, with source `notion`, `linear`, or
`jira`. Source selection stays on that draft through presentation and approval.
diff --git a/crates/agent_code_mode/Cargo.toml b/crates/agent_code_mode/Cargo.toml
index c87b56a206..897c85991b 100644
--- a/crates/agent_code_mode/Cargo.toml
+++ b/crates/agent_code_mode/Cargo.toml
@@ -17,6 +17,7 @@ axum = { workspace = true }
bot_id = { path = "../bot_id" }
calendar_events = { path = "../calendar_events", features = ["ai_tools"] }
code_execution = { path = "../code_execution" }
+code_mode_assets = { path = "../code_mode_assets" }
email = { path = "../email", features = ["ai_tools", "inbound"] }
entity_access = { path = "../entity_access", default-features = false, features = ["ports", "inbound"] }
import = { path = "../import" }
diff --git a/crates/agent_code_mode/src/domain/activity.rs b/crates/agent_code_mode/src/domain/activity.rs
index cd5a4cf374..0895c361de 100644
--- a/crates/agent_code_mode/src/domain/activity.rs
+++ b/crates/agent_code_mode/src/domain/activity.rs
@@ -4,7 +4,7 @@ use serde::Deserialize;
use std::{collections::BTreeMap, sync::LazyLock};
static OPERATIONS: LazyLock<BTreeMap<String, String>> = LazyLock::new(|| {
- serde_json::from_str(include_str!("operations.json")).expect("generated operation catalog")
+ serde_json::from_str(code_mode_assets::OPERATIONS).expect("generated operation catalog")
});
#[derive(Deserialize)]
diff --git a/crates/agent_code_mode/src/domain/documentation.json b/crates/agent_code_mode/src/domain/documentation.json
deleted file mode 100644
index 59a0b14b3d..0000000000
--- a/crates/agent_code_mode/src/domain/documentation.json
+++ /dev/null
@@ -1,2068 +0,0 @@
-{
- "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, archivedAt, archivedBy, codeExecutions, createdAt, harness, id, instructions, model, modifiedAt, name, repoUrl, reviews, sandboxSize, status, views, workspace\n- `AgentSession.archive`: archive(): Promise<void> — Archive this session, making it read-only until unarchived.\n- `AgentSession.autoArchive`: autoArchive(): Promise<SessionAutoArchive> — This session's auto-archive settings, and when a trigger archived it.\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.setAutoArchive`: setAutoArchive(overrides): Promise<void> — Replace this session's auto-archive choices.\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.toJSON`: toJSON(): { detail?: AgentSessionResponse; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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.webUrl`: webUrl(): string — The session's URL in the Macro web app; hand it to users as the link.\n- `AgentSession.autoArchivePreferences`: static autoArchivePreferences(client): Promise<AutoArchivePreferencesBody> — Which triggers archive the caller's sessions by default; each is off unless chosen.\n- `AgentSession.byId`: static byId(client, id): AgentSession — A handle to an agent session by id.\n- `AgentSession.chooseMode`: static chooseMode(client, prompt): Promise<AgentMode> — Whether prompt needs a chat agent or a coding agent, as the app's Auto mode decides before starting a session.\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 as agent when one is named, otherwise the deployment's default coding persona.\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.setAutoArchivePreferences`: static setAutoArchivePreferences(client, preferences): Promise<AutoArchivePreferencesBody> — Replace which triggers archive the caller's sessions by default.\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, views\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.autoArchivePreferences`: autoArchivePreferences(): Promise<AutoArchivePreferencesBody> — Which triggers archive the caller's sessions by default; each is off unless chosen.\n- `AgentSessionNamespace.byId`: byId(id): AgentSession — A handle to an agent session by id.\n- `AgentSessionNamespace.chooseMode`: chooseMode(prompt): Promise<AgentMode> — Whether prompt needs a chat agent ('chat') or a coding agent ('code'), as the app's Auto mode decides before starting a session.\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 session as agent when one is named, otherwise the deployment's default coding persona.\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.setAutoArchivePreferences`: setAutoArchivePreferences(preferences): Promise<AutoArchivePreferencesBody> — Replace which triggers archive the caller's sessions by default.\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> — Replace this pending draft; kind must match the review's.\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: \"calendar\" | \"email\" | \"import\"; }> — 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\nFunctions: `presentView`\n\nTypes: `AutoArchiveOverrides`, `CreateManagedSessionOptions`, `FoldedAgentSessionLog`, `SelectableRepository`, `SessionAutoArchive`, `SessionPullRequest`, `CodeResult`, `JsonValue`, `CreateReviewOptions`, `ReviewCalendarDraft`, `ReviewDraft`, `ReviewEmailDraft`, `SessionView`\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[]> — Accessible custom 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.toJSON`: toJSON(): { detail?: InitiativeDetail; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n- `Initiative.update`: update(options): Promise<void> — Update the name, membership or sharing configuration.\n- `Initiative.webUrl`: webUrl(): string — The initiative's URL in the Macro web app; hand it to users as the link.\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; find one by name with one summaries() call, not name() on each listed handle (one request each).\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 as handles; use summaries() for their names.\n- `InitiativeNamespace.summaries`: summaries(): Promise<InitiativeSummary[]> — Every accessible initiative with its name, in one request.\n\nTypes: `InitiativeOptions`, `InitiativeSummary`\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, sourceTemplate, trigger\n- `Routine.activateTemplate`: activateTemplate(options): Promise<Routine> — Create the caller's own routine from this routine's shared template, with its references already filled in for them.\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.shareAsTemplate`: shareAsTemplate(options): Promise<RoutineTemplate> — Share this routine as a template, or update its shared snapshot.\n- `Routine.stopSharingTemplate`: stopSharingTemplate(): Promise<void> — Stop sharing this routine.\n- `Routine.template`: template(): Promise<RoutineTemplate | undefined> — This routine's shared template, or undefined when it isn't shared.\n- `Routine.toJSON`: toJSON(): { detail?: ScheduledActionResponse; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n- `Routine.update`: update(options): Promise<void> — Replace the routine's task and trigger configuration.\n- `Routine.webUrl`: webUrl(): string — The routine's URL in the Macro web app; hand it to users as the link.\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\n### RoutineTemplate\nA routine shared as a template, which people activate as their own routine.\nFields: author, record, routine\n- `RoutineTemplate.activate`: activate(options): Promise<Routine> — Create the caller's own routine from this template, with its references already filled in for them.\n- `RoutineTemplate.toJSON`: toJSON(): scheduled-action.RoutineTemplate — 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 and images (`macro.images.generate`, attachable to channel messages), classify supplied content with Jev and read AI usage.",
- "index": "## ai\nGenerate structured objects and images (`macro.images.generate`, attachable to channel messages), 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\n### GeneratedImage\nAn image made by macro.images.generate(), stored as a static file.\nExtends `StaticImage`.\nFields: height, id, mimeType, note?, sizeBytes, url, width\n- `GeneratedImage.toJSON`: toJSON(): { height: number | undefined; id: string; mimeType: string; note: string | undefined; sizeBytes: number; url: string; width: number | undefined; } — Serialize the generated image without its client.\n\n### StaticImage\nAn image in static file storage: an upload, or one made with macro.images.generate().\nFields: height?, id, url, width?\n- `StaticImage.toJSON`: toJSON(): { height: number | undefined; id: string; url: string; width: number | undefined; } — Serialize the image reference without its client.\n- `StaticImage.byId`: static byId(client, id, size?): StaticImage — A handle to an image already in static file storage.\n\n### ImagesNamespace (`macro.images`)\nImage generation, charged to the acting user's AI allowance.\n- `ImagesNamespace.generate`: generate(options): Promise<GeneratedImage> — Generate or edit an image with Google's Nano Banana model and store it as a static file.\n\nTypes: `GenerateImageOptions`\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, contributesToAvailability, 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.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: every calendar the caller can see (not all of them theirs), 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 calendars the caller can see, some possibly not theirs, 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.occurrences`: occurrences(options): AsyncGenerator<{ calendarName: string | undefined; contributesToAvailability: boolean | undefined; event: CalendarEvent; inbox: string | undefined; occurrence: storage.CalendarOccurrence; role: CalendarEventRole | undefined; }, any, any> — Occurrences on every calendar the user can see: their schedule is only contributesToAvailability rows and meetings they attend; call the rest by calendarName.\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: 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### 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.toJSON`: toJSON(): { detail?: storage.CallRecord; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n- `CallRecord.webUrl`: webUrl(): string — The call's URL in the Macro web app; hand it to users as the link.\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) and add chats to Macro as external chats; read and share external 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) and add chats to Macro as external chats; read and share external 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.toJSON`: toJSON(): { detail?: ApiChannelDetail; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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(): AsyncGenerator<Channel> — Every channel the authenticated user is a member of, auto-paginated.\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 (case-insensitive substring match over every channel the user is a member of) 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, opts?): 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### ExternalChat\nA chat from an external messaging provider (WhatsApp today), added to Macro by its owner and shareable like any other entity: a group or a direct chat.\nExtends `FavoritableEntity`.\nFields: backfill, canSend, disappearingSeconds, entityType, id, kind, limits, members, name, owner, participants, provider, sendingIdentity, sendReason, unreadCount\n- `ExternalChat.community`: community(): Promise<WhatsAppCommunity | undefined> — The community a group belongs to, if any: the community's own provider chat, its name, and whether this is its announcement group.\n- `ExternalChat.delivery`: delivery(sends): Promise<ExternalChatSend[]> — Read delivery for selected caller-owned intents or messages.\n- `ExternalChat.markRead`: markRead(message): Promise<void> — Advance the caller's own read cursor.\n- `ExternalChat.messageAttachments`: messageAttachments(messages): Promise<{ attachments: { fileName: string; mime: string; ordinal: number; size: number; state: ExternalChatAttachmentState; url: string | undefined; }[]; message: ExternalChatMessage; }[]> — Read attachment states for selected messages.\n- `ExternalChat.messages`: messages(options?): AsyncGenerator<ExternalChatMessage> — Iterate newest-first timeline pages lazily.\n- `ExternalChat.permissions`: permissions(): Promise<storage.SharePermissionV2> — Read standard link/team sharing settings.\n- `ExternalChat.refresh`: refresh(): Promise<ExternalChat> — Reload detail, permissions and caller capabilities.\n- `ExternalChat.remove`: remove(): Promise<void> — Owner stops syncing the chat; history and established sharing stay.\n- `ExternalChat.send`: send(content, options): Promise<ExternalChatSend> — Personal sessions and owner API credentials can send.\n- `ExternalChat.sends`: sends(): Promise<ExternalChatSend[]> — Read only the caller's pending, uncertain or failed sends.\n- `ExternalChat.updatePermissions`: updatePermissions(update): Promise<void> — Actual owner updates standard link/team sharing settings.\n- `ExternalChat.upload`: upload(file): Promise<ExternalChatUpload> — Stage a supported attachment for a deliberate send.\n- `ExternalChat.byId`: static byId(client, id): ExternalChat — Reference an added chat; access is checked on each request.\n\n### ExternalChatMessage\nMessage in an added external chat.\nExtends `MacroEntity`.\nFields: attachments, body, chat, deleted, deliveryState, editedAt, forwarded, id, kind, mentions, reactions, replyTo, rich, sender, sentAt, viewOnce\n- `ExternalChatMessage.byId`: static byId(client, chat, id): ExternalChatMessage — Reference a message within its original chat.\n- `ExternalChatMessage.from`: static from(client, chat, record): ExternalChatMessage — Seed a message handle from a timeline response.\n\n### ExternalChatsNamespace (`macro.externalChats`)\nChats from external messaging providers (WhatsApp today) that someone added to Macro: read, share and send in them.\n- `ExternalChatsNamespace.byId`: byId(id): ExternalChat — Reference an added chat without fetching it.\n- `ExternalChatsNamespace.list`: list(): Promise<ExternalChat[]> — Added chats the caller can view, including without a provider account of their own.\n\n### ExternalChatParticipant\nSomeone in an added external chat, from its members; mention them in a text reply.\nFields: chat, id\n- `ExternalChatParticipant.toJSON`: toJSON(): { admin: boolean | undefined; chat: string; displayName: string | undefined; id: string; } — Serialize the participant reference without credentials.\n- `ExternalChatParticipant.byId`: static byId(chat, id): ExternalChatParticipant — Reference a participant of a chat by provider id.\n- `ExternalChatParticipant.from`: static from(chat, record): ExternalChatParticipant — Seed a participant from the chat's members.\n\n### ExternalChatSend\nOne deliberate send intent.\nExtends `MacroEntity`.\nFields: chat, createdAt, errorCode, id, message, state\n- `ExternalChatSend.refresh`: refresh(): Promise<ExternalChatSend> — Fetch current delivery state without retrying or submitting the message.\n- `ExternalChatSend.request`: request(): Promise<{ idempotencyKey: string; message: ExternalChatContent; replyTo?: ExternalChatMessage; }> — Inspect the original intent for reconciliation; never resubmit an unknown outcome automatically.\n- `ExternalChatSend.byId`: static byId(client, chat, id): ExternalChatSend — Reference a send intent within its original chat.\n- `ExternalChatSend.from`: static from(client, chat, record): ExternalChatSend — Seed a send handle from a server response.\n\n### ExternalChatUpload\nA staged attachment scoped to one added chat; use it in a deliberate media send.\nFields: chat, filename?, id, kind?\n- `ExternalChatUpload.toJSON`: toJSON(): { chat: string; filename: string | undefined; id: string; kind: ExternalChatMediaKind | undefined; } — Serialize the upload reference without credentials.\n- `ExternalChatUpload.byId`: static byId(chat, id): ExternalChatUpload — Reference a previously staged upload in its original chat.\n- `ExternalChatUpload.from`: static from(chat, record): ExternalChatUpload — Seed a handle from the server's upload receipt.\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: added, archived, canAdd, cannotAddReason, community, id, kind, lastActivityAt, name, phoneNumber, pinned, shared\n- `WhatsAppChat.add`: add(): Promise<ExternalChat> — Add the chat (a group or a direct chat) to Macro as the current user's own external chat; 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### WhatsAppNamespace (`macro.whatsapp`)\nThe current user's WhatsApp account, paired through the Macro app, and its chat list.\n- `WhatsAppNamespace.account`: account(): Promise<WhatsAppAccount | undefined> — Current owner's account, or undefined when no account has been connected.\n- `WhatsAppNamespace.chats`: chats(): Promise<WhatsAppChat[]> — The caller's WhatsApp chat list (groups and direct chats), newest activity first: each chat says whether it is added, shared with the caller or addable, and ...\n\nFunctions: `postToChannel`, `communityOf`\n\nTypes: `ChannelAttachment`, `ChannelParticipant`, `MessageData`, `ExternalChatContent`, `WhatsAppCommunity`\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.blockDomain`: blockDomain(domain): Promise<void> — Block a domain (like acme.com): email sync skips it, and the company that owns it, that company's contacts, and contacts without a company at the domain are ...\n- `CrmNamespace.blockedDomains`: blockedDomains(): Promise<string[]> — The domains the caller's current team keeps out of email sync.\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.createContact`: createContact(opts): Promise<Contact> — Create a contact without a 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.unblockDomain`: unblockDomain(domain): Promise<void> — Unblock a domain: email sync resumes for addresses the team's personal-email and generic-provider filters allow.\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.viewPositions`: viewPositions(view): Promise<CardPosition[]> — Saved card order through this pipeline's authorization boundary.\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.views`: views(): Promise<PipelineView[]> — Stored views in display order.\n- `PipelineTable.from`: static from(client, pipeline, record): PipelineTable — Seed a table from a pipeline table response.\n\n### PipelineView\nA view owned and authorized by its CRM pipeline.\nFields: id, table\n- `PipelineView.detail`: detail(): Promise<storage.DatabaseView> — The current view definition from the pipeline's shared schema cache.\n- `PipelineView.positions`: positions(): Promise<CardPosition[]> — Read only cards with saved positions; unplaced cards are omitted.\n- `PipelineView.toJSON`: toJSON(): { id: string; pipelineId: string; tableId: string; } — Serialize identity without an authenticated client.\n- `PipelineView.byId`: static byId(table, id): PipelineView — A handle to a stored view within a pipeline table.\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.duplicate`: duplicate(options?): Promise<Database> — Copy the database into a new one the caller owns, with its tables, columns, views and rows.\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.toJSON`: toJSON(): { detail?: DatabaseDetail; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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.webUrl`: webUrl(): string — The database's URL in the Macro web app; hand it to users as the link.\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.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.toJSON`: toJSON(): { detail?: DocumentMetadataWithContent; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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.downloadEml`: downloadEml(): Promise<Blob> — The message's original source, exactly as Gmail or Outlook holds it, as message/rfc822 bytes for an .eml file.\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.readReceipts`: readReceipts(): Promise<EmailReadReceipt[]> — Opens recorded for messages sent from the caller's own or delegated inboxes with read receipts on, newest message first.\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.toJSON`: toJSON(): { detail?: ApiThread; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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.webUrl`: webUrl(): string — The thread's URL in the Macro web app; hand it to users as the link.\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`, `EmailReadReceipt`, `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.toJSON`: toJSON(): { detail?: FormDetail; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\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`, `SavedFormResponse`\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.toJSON`: toJSON(): { detail?: storage.Project; id: string; url: string; } — Identity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n- `Project.webUrl`: webUrl(): string — The project's URL in the Macro web app; hand it to users as the link.\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": "referrals",
- "description": "Share the caller's referral link and email people invites to join Macro.",
- "index": "## referrals\nShare the caller's referral link and email people invites to join Macro.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### ReferralNamespace (`macro.referrals`)\nInvite people to Macro with the caller's referral link.\n- `ReferralNamespace.invite`: invite(email): Promise<void> — Email an invite to join Macro, with the caller's referral link; only send to addresses the user asked you to invite.\n- `ReferralNamespace.link`: link(): Promise<ReferralLink> — The caller's referral link, to share wherever the user wants.\n\nTypes: `ReferralLink`\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`)\nTasks: one create call sets initiative, assignees and due date; one summaries call reads many names (name() loads each whole document).\n- `TaskNamespace.byId`: byId(id): Task — A handle to a task by document id.\n- `TaskNamespace.create`: create(opts): Promise<Task> — Create a task, with its initiative, assignees and due date in the same request.\n- `TaskNamespace.findSimilar`: findSimilar(opts): Promise<SimilarTask[]> — Existing tasks of yours or your team's that look like the same work as a task with this title and body, most similar first.\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- `TaskNamespace.summaries`: summaries(tasks): Promise<TaskSummary[]> — Names and state of many tasks in one request, in the order given.\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, with its initiative, assignees and due date in the same request.\n- `Task.findSimilar`: static findSimilar(client, opts): Promise<SimilarTask[]> — Existing tasks of the caller or their team that look like the same work as a task with this title and body, most similar first.\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- `Task.summaries`: static summaries(client, tasks): Promise<TaskSummary[]> — Names and state of many tasks in one request, in the order given.\n\nTypes: `SimilarTask`, `TaskSummary`\n"
- },
- {
- "name": "teams",
- "description": "Manage teams and membership: invite people to the team by email, list and revoke pending invites.",
- "index": "## teams\nManage teams and membership: invite people to the team by email, list and revoke pending invites.\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### TeamInvite\nA pending invite to the caller's current team.\nExtends `MacroEntity`.\nFields: createdAt, email, id, invitedBy, lastSentAt, role\n- `TeamInvite.revoke`: revoke(): Promise<void> — Revoke this invite so it can no longer be accepted; only a team admin or owner may revoke.\n- `TeamInvite.byId`: static byId(client, id): TeamInvite — A handle to a pending team invite by id.\n- `TeamInvite.from`: static from(client, record): TeamInvite — Build an invite from an already-fetched record (pre-seeded, no fetch).\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.invite`: invite(emails, options?): Promise<boolean> — Invite people to this team by email; only invite addresses the user asked you to invite.\n- `Team.invites`: invites(): Promise<TeamInvite[]> — Pending invites to this team; only a team admin or owner may list them.\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; set your own name and picture (`macro.me.update`).",
- "index": "## users\nLook up users and their profiles; set your own name and picture (`macro.me.update`).\nRead any symbol below, or one a reference names, with ReadCodeDocs.\n\n### MeNamespace (`macro.me`)\nThe authenticated user's own profile.\n- `MeNamespace.update`: update(options): Promise<void> — Set your display name and profile picture.\n- `MeNamespace.uploadProfilePicture`: uploadProfilePicture(data, options): Promise<StaticImage> — Upload an image to use as your profile picture.\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.isAgent`: isAgent(): Promise<boolean> — Whether this user is an agent account rather than a person.\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\nTypes: `UpdateMeOptions`, `UploadProfilePictureOptions`\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.request`: request(requestedLevel): Promise<AccessRequest> — Ask the item's reviewers for more access in the caller's name, as the Share menu's Request access does, superseding the caller's latest request.\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, externalChats, favorites, foreignEntities, forms, githubPullRequests, harnesses, images, initiatives, me, meetings, notifications, pins, projects, properties, referrals, 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### MacroForbiddenError\nA 403: the caller lacks the access the request needs.\nExtends `MacroApiError`.\nFields: data, status\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. |",
- "AgentMode": "# Type Alias: AgentMode\n\n> **AgentMode** = `\"chat\"` \\| `\"code\"`\n\nWhich kind of agent a prompt is sent to.",
- "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`; `archivedAt?`: `string` \\| `null`; `archivedBy?`: `null` \\| `ArchiveCause`; `botId`: `string`; `canEdit`: `boolean`; `createdAt`: `string`; `external?`: `null` \\| `ExternalSessionResponse`; `harness`: `string`; `id`: `string`; `instructions?`: `string` \\| `null`; `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-archivedat\"></a> `archivedAt?` | `string` \\| `null` | When the session was archived, or `None` while it is active. |\n| <a id=\"property-archivedby\"></a> `archivedBy?` | `null` \\| `ArchiveCause` | - |\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-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` | - |\n| <a id=\"property-workspace\"></a> `workspace` | `string` | The directory the session's harness runs in on its runtime. |",
- "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. |",
- "ArchiveCause": "# Type Alias: ArchiveCause\n\n> **ArchiveCause** = `\"user\"` \\| `\"pull_request_merged\"` \\| `\"runtime_closed\"`\n\nWho or what archived a session.",
- "AutoArchivePreferencesBody": "# Type Alias: AutoArchivePreferencesBody\n\n> **AutoArchivePreferencesBody** = \\{ `onPullRequestMerged`: `boolean`; `onRuntimeClosed`: `boolean`; \\}\n\nWhich triggers archive the caller's sessions when a session has no choice of its own.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-onpullrequestmerged\"></a> `onPullRequestMerged` | `boolean` | Archive a session once every pull request linked to it is closed and at least one merged. |\n| <a id=\"property-onruntimeclosed\"></a> `onRuntimeClosed` | `boolean` | Archive a session once the runtime session backing it is deliberately closed. |",
- "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.",
- "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. |",
- "agent-harness.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`: `agent-harness.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` | `agent-harness.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\"`; \\}",
- "PresentView": "# Type Alias: PresentView\n\n> **PresentView** = \\{ `executionId?`: `null` \\| `agent-harness.ExecutionId`; `view`: \\{\\[`key`: `string`\\]: `unknown`; \\}; \\}\n\nA view to present.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-executionid\"></a> `executionId?` | `null` \\| `agent-harness.ExecutionId` | - |\n| <a id=\"property-view\"></a> `view` | \\{\\[`key`: `string`\\]: `unknown`; \\} | A dynamic-UI view, in the format of the PresentView schema in ExecuteCode's description. |",
- "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. |",
- "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.",
- "AttendeeInput": "# Type Alias: AttendeeInput\n\n> **AttendeeInput** = \\{ `email`: `EmailAddress`; `isOptional?`: `boolean`; \\}\n\nAn attendee supplied to a calendar tool.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `EmailAddress` | Attendee email address. |\n| <a id=\"property-isoptional\"></a> `isOptional?` | `boolean` | Whether attendance is optional. |",
- "AutoDeclineModeInput": "# Type Alias: AutoDeclineModeInput\n\n> **AutoDeclineModeInput** = `\"decline_none\"` \\| `\"decline_all\"` \\| `\"decline_new_only\"`\n\nHow an out-of-office event handles conflicting invitations.",
- "CalendarEventTypeInput": "# Type Alias: CalendarEventTypeInput\n\n> **CalendarEventTypeInput** = `\"default\"` \\| `\"out_of_office\"`\n\nThe kind of event a create tool call makes.",
- "CreateCalendarEvent_Deserialize": "# Type Alias: CreateCalendarEvent\\_Deserialize\n\n> **CreateCalendarEvent\\_Deserialize** = \\{ `addMacroCall?`: `boolean`; `attendees?`: `AttendeeInput`[]; `calendarId?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `CalendarEventTypeInput`; `guestPolicy?`: `agent-reviews.GuestPolicy` \\| `null`; `location?`: `string` \\| `null`; `outOfOffice?`: `OutOfOfficeInput` \\| `null`; `recurrenceLines?`: `string`[]; `reminders?`: `EventRemindersInput` \\| `null`; `time`: `EventTimeInput`; `title`: `string`; \\} & \\{ `addConference?`: `boolean`; \\} \\| \\{ `addGoogleMeet?`: `boolean`; \\}\n\nCreate a calendar event.\n\n## Union Members\n\n\\{ `addMacroCall?`: `boolean`; `attendees?`: `AttendeeInput`[]; `calendarId?`: `string` \\| `null`; `description?`: `string` \\| `null`; `eventType?`: `CalendarEventTypeInput`; `guestPolicy?`: `agent-reviews.GuestPolicy` \\| `null`; `location?`: `string` \\| `null`; `outOfOffice?`: `OutOfOfficeInput` \\| `null`; `recurrenceLines?`: `string`[]; `reminders?`: `EventRemindersInput` \\| `null`; `time`: `EventTimeInput`; `title`: `string`; \\} & \\{ `addConference?`: `boolean`; \\}\n\n***\n\n### Type Literal\n\n\\{ `addGoogleMeet?`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `addGoogleMeet?` | `boolean` | Whether to attach the calendar provider's meeting conference. |",
- "CreateCalendarEvent_Serialize": "# Type Alias: CreateCalendarEvent\\_Serialize\n\n> **CreateCalendarEvent\\_Serialize** = \\{ `addConference`: `boolean`; `addMacroCall`: `boolean`; `attendees`: `AttendeeInput`[]; `calendarId`: `string` \\| `null`; `description`: `string` \\| `null`; `eventType`: `CalendarEventTypeInput`; `guestPolicy`: `agent-reviews.GuestPolicy` \\| `null`; `location`: `string` \\| `null`; `outOfOffice`: `OutOfOfficeInput` \\| `null`; `recurrenceLines`: `string`[]; `reminders`: `EventRemindersInput` \\| `null`; `time`: `EventTimeInput`; `title`: `string`; \\}\n\nCreate a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-addconference\"></a> `addConference` | `boolean` | Whether to attach the calendar provider's meeting conference. |\n| <a id=\"property-addmacrocall\"></a> `addMacroCall` | `boolean` | Whether to attach a Macro meeting link. |\n| <a id=\"property-attendees\"></a> `attendees` | `AttendeeInput`[] | Attendees to invite. |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` \\| `null` | Calendar to create the event on. |\n| <a id=\"property-description\"></a> `description` | `string` \\| `null` | Optional event body. |\n| <a id=\"property-eventtype\"></a> `eventType` | `CalendarEventTypeInput` | Kind of event to create. |\n| <a id=\"property-guestpolicy\"></a> `guestPolicy` | `agent-reviews.GuestPolicy` \\| `null` | What guests may do with the event. |\n| <a id=\"property-location\"></a> `location` | `string` \\| `null` | Optional location label. |\n| <a id=\"property-outofoffice\"></a> `outOfOffice` | `OutOfOfficeInput` \\| `null` | Out-of-office decline behavior. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Recurrence properties. |\n| <a id=\"property-reminders\"></a> `reminders` | `EventRemindersInput` \\| `null` | Reminder configuration. |\n| <a id=\"property-time\"></a> `time` | `EventTimeInput` | Timed or all-day span. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |",
- "DecisionVia": "# Type Alias: DecisionVia\n\n> **DecisionVia** = `\"card\"` \\| `\"chat\"` \\| `\"inbox\"`\n\nSurface of a review decision.",
- "DraftList": "# Type Alias: DraftList\\<Draft\\>\n\n> **DraftList**\\<`Draft`\\> = `Draft`[]\n\nOne to [`MAX_DRAFTS`] drafts of one kind.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-draft\"></a> `Draft` |",
- "EmailAddress": "# Type Alias: EmailAddress\n\n> **EmailAddress** = `string`\n\nAn address that passes [`is_valid_email`]; decoding rejects any other string.",
- "agent-reviews.EmailAttachment": "# Type Alias: EmailAttachment\n\n> **EmailAttachment** = \\{ `documentId`: `string`; \\}\n\nA Macro document attached to an outgoing email as a file.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-documentid\"></a> `documentId` | `string` | The id of the Macro document to attach. It must be a stored file - an uploaded PDF, image, spreadsheet, Word document, or other upload - that the user can view. A Macro-native document (one written in the editor) has no file to attach; link to it in the body instead. |",
- "EmailRecipient": "# Type Alias: EmailRecipient\n\n> **EmailRecipient** = \\{ `email`: `EmailAddress`; `name?`: `string` \\| `null`; \\}\n\nA recipient for an email.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email` | `EmailAddress` | The recipient's email address. |\n| <a id=\"property-name\"></a> `name?` | `string` \\| `null` | The recipient's display name (optional). |",
- "EventReminderOverrideInput": "# Type Alias: EventReminderOverrideInput\n\n> **EventReminderOverrideInput** = \\{ `method`: `string`; `minutes`: `number`; \\}\n\nOne reminder override supplied to a calendar tool.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-method\"></a> `method` | `string` | Provider reminder method. `popup` creates a Macro notification. |\n| <a id=\"property-minutes\"></a> `minutes` | `number` | Minutes before the event start. |",
- "EventRemindersInput": "# Type Alias: EventRemindersInput\n\n> **EventRemindersInput** = \\{ `overrides?`: `EventReminderOverrideInput`[]; `useDefault`: `boolean`; \\}\n\nReminder configuration supplied when creating a calendar event.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-overrides\"></a> `overrides?` | `EventReminderOverrideInput`[] | Overrides used when calendar defaults are disabled. |\n| <a id=\"property-usedefault\"></a> `useDefault` | `boolean` | Whether the selected calendar's default reminders should apply. |",
- "EventTimeInput": "# Type Alias: EventTimeInput\n\n> **EventTimeInput** = \\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\} \\| \\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nThe mutually exclusive time shape supplied to calendar tools.\n\n## Union Members\n\n### Type Literal\n\n\\{ `endsAt`: `string`; `kind`: `\"timed\"`; `startsAt`: `string`; `timeZone?`: `string` \\| `null`; \\}\n\nA clock-time event with absolute instants.\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endsAt` | `string` | Exclusive end instant, RFC 3339 UTC. Must be after the start. |\n| `kind` | `\"timed\"` | - |\n| `startsAt` | `string` | Inclusive start instant, RFC 3339 UTC (e.g. 2026-08-20T17:00:00Z). |\n| `timeZone?` | `string` \\| `null` | IANA time zone the event was scheduled in (e.g. America/New_York). Recurring events expand in this zone. |\n\n***\n\n### Type Literal\n\n\\{ `endDate`: `string`; `kind`: `\"allDay\"`; `startDate`: `string`; \\}\n\nAn all-day event spanning whole local dates.\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `endDate` | `string` | Exclusive local end date (YYYY-MM-DD); the day after the last covered day, so a one-day event ends the next date. |\n| `kind` | `\"allDay\"` | - |\n| `startDate` | `string` | Inclusive local start date (YYYY-MM-DD). |",
- "agent-reviews.ExecutionId": "# Type Alias: ExecutionId\n\n> **ExecutionId** = `string`\n\nCaller-selected UUID persisted in tool input before execution begins.",
- "agent-reviews.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\n do. 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. |",
- "ImportDraft": "# Type Alias: ImportDraft\n\n> **ImportDraft** = \\{ `excluded?`: `string`[]; `personal?`: `string`[]; `shared?`: `string`[]; `source`: `ImportReviewSource`; \\}\n\nThe one draft an import review carries: which source's staged plan it\n presents, the plan rows the user took out of it, and the rows whose\n sharing they changed: `shared` to share with their team, `personal` to\n keep to themselves.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-excluded\"></a> `excluded?` | `string`[] | Plan rows left out of the import. |\n| <a id=\"property-personal\"></a> `personal?` | `string`[] | Plan rows kept private although the plan shares them. |\n| <a id=\"property-shared\"></a> `shared?` | `string`[] | Plan rows shared with the team although the plan keeps them private. |\n| <a id=\"property-source\"></a> `source` | `ImportReviewSource` | The staged plan's source; fixed once the review is presented. |",
- "ImportKind": "# Type Alias: ImportKind\n\n> **ImportKind** = `\"issue\"` \\| `\"project\"` \\| `\"document\"` \\| `\"page\"` \\| `\"database\"` \\| `\"data_source\"` \\| `\"row\"` \\| `\"jira_issue\"` \\| `\"jira_project\"` \\| `\"jira_epic\"` \\| `\"channel\"`\n\nWhat an imported item is in its source system. Each source has its own\n kinds; a Notion database and a Notion page, or a Linear project and a\n Linear issue, are tracked and deduplicated separately.",
- "ImportReviewSource": "# Type Alias: ImportReviewSource\n\n> **ImportReviewSource** = `\"notion\"` \\| `\"linear\"` \\| `\"jira\"`\n\nWhich source's staged plan an import review presents.",
- "ItemStatus": "# Type Alias: ItemStatus\n\n> **ItemStatus** = `\"pending\"` \\| `\"submitting\"` \\| `\"completed\"` \\| `\"dismissed\"` \\| `\"unknown\"`\n\nReview item state, shared with notification consumers.",
- "NotionImportReport_Serialize": "# Type Alias: NotionImportReport\\_Serialize\n\n> **NotionImportReport\\_Serialize** = \\{ `alreadyImportedBy`: `NotionImporter`[]; `alreadyInMacro`: `number`; `copy`: `number`; `databaseRows`: `number`; `databases`: `number`; `dataSources`: `number`; `deciding`: `number`; `documents`: `number`; `error?`: `string` \\| `null`; `failures`: `NotionReportItem_Serialize`[]; `hand`: `number`; `handItems`: `NotionReportItem_Serialize`[]; `imported`: `number`; `issues`: `number`; `onTeam`: `boolean`; `pages`: `number`; `projects`: `number`; `reviewId?`: `string` \\| `null`; `scanned?`: `ScanCounts` \\| `null`; `sharedWithTeam`: `number`; `skip`: `number`; `status?`: `RunStatus` \\| `null`; `taskRows`: `number`; `tasks`: `number`; `waiting`: `number`; `waitingOnTeammates`: `number`; `warnings?`: `string`[]; `writing`: `number`; \\}\n\nWhere a Notion workspace import stands.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-alreadyimportedby\"></a> `alreadyImportedBy` | `NotionImporter`[] | Who imported the objects already in Macro, most first. |\n| <a id=\"property-alreadyinmacro\"></a> `alreadyInMacro` | `number` | Plan objects a teammate already imported and shared with the team; they link to that copy and are not counted as copies. |\n| <a id=\"property-copy\"></a> `copy` | `number` | Objects to copy as they are. |\n| <a id=\"property-databaserows\"></a> `databaseRows` | `number` | Rows those databases hold, every one counted while planning. |\n| <a id=\"property-databases\"></a> `databases` | `number` | Data sources written as databases. |\n| <a id=\"property-datasources\"></a> `dataSources` | `number` | Data sources (database tables) in the plan. |\n| <a id=\"property-deciding\"></a> `deciding` | `number` | Plan objects the decision model has not answered for yet, while planning is still `running`. |\n| <a id=\"property-documents\"></a> `documents` | `number` | Pages written as documents. |\n| <a id=\"property-error\"></a> `error?` | `string` \\| `null` | Why the run failed, when it did. |\n| <a id=\"property-failures\"></a> `failures` | `NotionReportItem_Serialize`[] | Objects that failed to import, with the failure. |\n| <a id=\"property-hand\"></a> `hand` | `number` | Objects that need handling by hand. |\n| <a id=\"property-handitems\"></a> `handItems` | `NotionReportItem_Serialize`[] | Objects that need handling by hand, with reasons. |\n| <a id=\"property-imported\"></a> `imported` | `number` | Plan objects already imported. |\n| <a id=\"property-issues\"></a> `issues` | `number` | Tracker issues in the plan. |\n| <a id=\"property-onteam\"></a> `onTeam` | `boolean` | Whether the user is on a team. Without one, everything the import writes stays visible only to them. |\n| <a id=\"property-pages\"></a> `pages` | `number` | Pages in the plan. |\n| <a id=\"property-projects\"></a> `projects` | `number` | Tracker groups written as Macro projects. |\n| <a id=\"property-reviewid\"></a> `reviewId?` | `string` \\| `null` | The review the plan is tied to, once presented. |\n| <a id=\"property-scanned\"></a> `scanned?` | `ScanCounts` \\| `null` | What planning has found in Notion so far, while it is `running`. |\n| <a id=\"property-sharedwithteam\"></a> `sharedWithTeam` | `number` | Written plan objects shared with the user's team. |\n| <a id=\"property-skip\"></a> `skip` | `number` | Objects left in Notion. |\n| <a id=\"property-status\"></a> `status?` | `RunStatus` \\| `null` | The run's state: `running` while planning, `ready` once a plan is staged, `importing` while writing, `completed`, `failed`, or `dismissed` when cancelled. Absent before the first run. |\n| <a id=\"property-taskrows\"></a> `taskRows` | `number` | Tasks the task lists become, one per row. |\n| <a id=\"property-tasks\"></a> `tasks` | `number` | Data sources whose rows become tasks. |\n| <a id=\"property-waiting\"></a> `waiting` | `number` | Plan objects still waiting to be written. |\n| <a id=\"property-waitingonteammates\"></a> `waitingOnTeammates` | `number` | Plan objects waiting for a teammate who is writing the same object for the team; they link to the teammate's copy once it is written. |\n| <a id=\"property-warnings\"></a> `warnings?` | `string`[] | Provider items skipped because they were unreadable, or optional features unavailable. |\n| <a id=\"property-writing\"></a> `writing` | `number` | Plan objects being written now. |",
- "NotionImporter": "# Type Alias: NotionImporter\n\n> **NotionImporter** = \\{ `by`: `string`; `count`: `number`; \\}\n\nA teammate who already imported some of a plan's objects.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-by\"></a> `by` | `string` | The teammate, by email. |\n| <a id=\"property-count\"></a> `count` | `number` | How many of the plan's objects they imported. |",
- "NotionReportItem_Serialize": "# Type Alias: NotionReportItem\\_Serialize\n\n> **NotionReportItem\\_Serialize** = \\{ `importId`: `string`; `kind`: `ImportKind`; `reason?`: `string` \\| `null`; `title`: `string`; `url?`: `string` \\| `null`; \\}\n\nOne object a workspace import report calls out.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-importid\"></a> `importId` | `string` | The ledger row. |\n| <a id=\"property-kind\"></a> `kind` | `ImportKind` | What the object is. |\n| <a id=\"property-reason\"></a> `reason?` | `string` \\| `null` | Why it is called out: the decision model's reason, or the failure. |\n| <a id=\"property-title\"></a> `title` | `string` | The object's title. |\n| <a id=\"property-url\"></a> `url?` | `string` \\| `null` | Its Notion URL. |",
- "OutOfOfficeInput": "# Type Alias: OutOfOfficeInput\n\n> **OutOfOfficeInput** = \\{ `autoDeclineMode?`: `AutoDeclineModeInput` \\| `null`; `declineMessage?`: `string` \\| `null`; \\}\n\nOut-of-office decline behavior supplied to the calendar tools.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autodeclinemode\"></a> `autoDeclineMode?` | `AutoDeclineModeInput` \\| `null` | How conflicting invitations are handled. Defaults to declining nothing, so the event only blocks time and shows the away status. |\n| <a id=\"property-declinemessage\"></a> `declineMessage?` | `string` \\| `null` | Message returned to organizers whose invitations are auto-declined. |",
- "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. |",
- "ReviewDraft_Deserialize": "# Type Alias: ReviewDraft\\_Deserialize\n\n> **ReviewDraft\\_Deserialize** = \\{ `draft`: `SendEmail`; `kind`: `\"email\"`; \\} \\| \\{ `draft`: `CreateCalendarEvent_Deserialize`; `kind`: `\"calendar\"`; \\} \\| \\{ `draft`: `ImportDraft`; `kind`: `\"import\"`; \\}\n\nOne replacement draft, keyed by the kind of the review it edits.\n\n## Union Members\n\n### Type Literal\n\n\\{ `draft`: `SendEmail`; `kind`: `\"email\"`; \\}\n\nAn edited email.\n\n***\n\n### Type Literal\n\n\\{ `draft`: `CreateCalendarEvent_Deserialize`; `kind`: `\"calendar\"`; \\}\n\nAn edited calendar event.\n\n***\n\n### Type Literal\n\n\\{ `draft`: `ImportDraft`; `kind`: `\"import\"`; \\}\n\nAn edited import plan selection.",
- "ReviewDrafts_Deserialize": "# Type Alias: ReviewDrafts\\_Deserialize\n\n> **ReviewDrafts\\_Deserialize** = \\{ `drafts`: `DraftList`\\<`SendEmail`\\>; `kind`: `\"email\"`; \\} \\| \\{ `drafts`: `DraftList`\\<`CreateCalendarEvent_Deserialize`\\>; `kind`: `\"calendar\"`; \\} \\| \\{ `drafts`: \\`ImportDraft`\\]; `kind`: `\"import\"`; \\}\n\nThe drafts a new review presents, keyed by the review's kind.\n\n## Union Members\n\n### Type Literal\n\n\\{ `drafts`: `DraftList`\\<`SendEmail`\\>; `kind`: `\"email\"`; \\}\n\nEmails, each sent with the SendEmail action (Markdown body).\n\n***\n\n### Type Literal\n\n\\{ `drafts`: `DraftList`\\<`CreateCalendarEvent_Deserialize`\\>; `kind`: `\"calendar\"`; \\}\n\nCalendar events, each created with the CreateCalendarEvent action.\n\n***\n\n### Type Literal\n\n\\{ `drafts`: \\`ImportDraft`\\]; `kind`: `\"import\"`; \\}\n\nExactly one staged import plan, approved as one item.",
- "ReviewId": "# Type Alias: ReviewId\n\n> **ReviewId** = `string`\n\nPersisted review identity.",
- "agent-reviews.ReviewItem": "# Type Alias: ReviewItem\\<Draft, Outcome\\>\n\n> **ReviewItem**\\<`Draft`, `Outcome`\\> = \\{ `draft`: `Draft`; `result`: `Outcome` \\| `null`; \\} & `ReviewItemState`\n\nOne editable item and its durable outcome.\n\n## Type Parameters\n\n| Type Parameter |\n| ------ |\n| <a id=\"type-parameter-draft\"></a> `Draft` |\n| <a id=\"type-parameter-outcome\"></a> `Outcome` |\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `draft` | `Draft` | Arguments for the existing composer and action. |\n| `result` | `Outcome` \\| `null` | The action's confirmed response, never a model assertion. |",
- "ReviewItemState": "# Type Alias: ReviewItemState\n\n> **ReviewItemState** = \\{ `edited?`: `boolean`; `error`: `string` \\| `null`; `id`: `string`; `status`: `ItemStatus`; \\}\n\nItem facts every kind shares.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\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-status\"></a> `status` | `ItemStatus` | Current outcome. |",
- "ReviewItems_Serialize": "# Type Alias: ReviewItems\\_Serialize\n\n> **ReviewItems\\_Serialize** = \\{ `items`: `agent-reviews.ReviewItem`\\<`SendEmail`, `SendEmailResponse`\\>[]; `kind`: `\"email\"`; \\} \\| \\{ `items`: `agent-reviews.ReviewItem`\\<`CreateCalendarEvent_Serialize`, `ToolCalendarEvent`\\>[]; `kind`: `\"calendar\"`; \\} \\| \\{ `items`: \\`agent-reviews.ReviewItem`\\<`ImportDraft`, `NotionImportReport_Serialize`\\>\\]; `kind`: `\"import\"`; \\}\n\nSaved items keyed by the review's kind.\n\n## Union Members\n\n### Type Literal\n\n\\{ `items`: `agent-reviews.ReviewItem`\\<`SendEmail`, `SendEmailResponse`\\>[]; `kind`: `\"email\"`; \\}\n\nEmail drafts and their send responses.\n\n***\n\n### Type Literal\n\n\\{ `items`: `agent-reviews.ReviewItem`\\<`CreateCalendarEvent_Serialize`, `ToolCalendarEvent`\\>[]; `kind`: `\"calendar\"`; \\}\n\nCalendar drafts and their created events.\n\n***\n\n### Type Literal\n\n\\{ `items`: \\`agent-reviews.ReviewItem`\\<`ImportDraft`, `NotionImportReport_Serialize`\\>\\]; `kind`: `\"import\"`; \\}\n\nThe import plan selection and the started write's report.",
- "ReviewRecord_Serialize": "# Type Alias: ReviewRecord\\_Serialize\n\n> **ReviewRecord\\_Serialize** = \\{ `actingUser`: `string`; `decision`: `ReviewDecisionContext` \\| `null`; `executionId`: `agent-reviews.ExecutionId` \\| `null`; `id`: `ReviewId`; `presentedAt`: `number` \\| `null`; `revision`: `number`; `sessionId`: `string`; `title`: `ReviewTitle`; `updatedAt`: `number`; \\} & `ReviewItems_Serialize`\n\nFull UI record, fetched outside the model context.\n\n## Type Declaration\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `actingUser` | `string` | Account whose email/calendar the drafts use. |\n| `decision` | `ReviewDecisionContext` \\| `null` | Current batch's authenticated decision, preserved for interrupted work. |\n| `executionId` | `agent-reviews.ExecutionId` \\| `null` | Originating code execution, absent for directly presented reviews. |\n| `id` | `ReviewId` | Review identity. |\n| `presentedAt` | `number` \\| `null` | Durable presentation acknowledgment, separate from user decisions. |\n| `revision` | `number` | Compare-and-swap revision for edits and submissions. |\n| `sessionId` | `string` | Owning session. |\n| `title` | `ReviewTitle` | Stack label. |\n| `updatedAt` | `number` | Milliseconds since epoch of the last state change. |",
- "ReviewTitle": "# Type Alias: ReviewTitle\n\n> **ReviewTitle** = `string`\n\nA review stack label: not blank, at most 256 characters.",
- "RunStatus": "# Type Alias: RunStatus\n\n> **RunStatus** = `\"running\"` \\| `\"ready\"` \\| `\"importing\"` \\| `\"completed\"` \\| `\"failed\"` \\| `\"dismissed\"`\n\nLifecycle of a discovery run (one per user × source).",
- "ScanCounts": "# Type Alias: ScanCounts\n\n> **ScanCounts** = \\{ `dataSources`: `number`; `pages`: `number`; \\}\n\nWhat a planning run has found in the source so far.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-datasources\"></a> `dataSources` | `number` | Data sources (database tables) found. |\n| <a id=\"property-pages\"></a> `pages` | `number` | Pages found. |",
- "SendEmail": "# Type Alias: SendEmail\n\n> **SendEmail** = \\{ `attachments?`: `agent-reviews.EmailAttachment`[]; `bcc?`: `EmailRecipient`[]; `body`: `string`; `cc?`: `EmailRecipient`[]; `from?`: `string` \\| `null`; `includeSignature?`: `boolean` \\| `null`; `replyingToId?`: `string` \\| `null`; `subject`: `string`; `to`: `EmailRecipient`[]; \\}\n\nCompose and send an email. Creates a draft and immediately queues it for delivery.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments?` | `agent-reviews.EmailAttachment`[] | Macro documents to attach as files (optional). Each must be an uploaded file the user can view; together they may total 18 MB. |\n| <a id=\"property-bcc\"></a> `bcc?` | `EmailRecipient`[] | Blind carbon copy recipients (optional). |\n| <a id=\"property-body\"></a> `body` | `string` | The body of the email, written as Markdown. A host with a composer (chat) replaces this with the base64url-encoded HTML the composer exported before the tool runs; a host without one (an agent session) leaves the Markdown, and this tool renders it the same way. |\n| <a id=\"property-cc\"></a> `cc?` | `EmailRecipient`[] | Carbon copy recipients (optional). |\n| <a id=\"property-from\"></a> `from?` | `string` \\| `null` | The address of the inbox to send from, when the user has more than one connected and this email belongs to a particular one. Use the exact `emailAddress` of a connected inbox — `ListInboxes` lists them, and `GetThread` reports the `inbox` a thread belongs to. Omit it unless you know which inbox is right: a reply then goes out from the inbox that received the message it answers, and a new email from the user's primary inbox. The user can change it in the composer either way. |\n| <a id=\"property-includesignature\"></a> `includeSignature?` | `boolean` \\| `null` | Per-message signature override, set by the composer's signature preview — not normally by you. Omit to use the inbox's default policy (always on a new email; on replies/forwards only when the user enabled it). `false` excludes the signature for this one email. |\n| <a id=\"property-replyingtoid\"></a> `replyingToId?` | `string` \\| `null` | The ID of a message to reply to (optional). When set, the email is sent as a reply within the same thread. |\n| <a id=\"property-subject\"></a> `subject` | `string` | The subject line of the email. |\n| <a id=\"property-to\"></a> `to` | `EmailRecipient`[] | The primary recipients (To field). |",
- "SendEmailResponse": "# Type Alias: SendEmailResponse\n\n> **SendEmailResponse** = \\{ `sent`: \\{ `message_id`: `string`; `thread_id`: `string`; \\}; \\} & \\{ `convertedToDraft?`: `never`; \\} \\| \\{ `convertedToDraft`: \\{ `draft_id`: `string`; \\}; \\} & \\{ `sent?`: `never`; \\} \\| `\"userEdited\"`\n\nResponse from the SendEmail tool.",
- "ToolCalendarEvent": "# Type Alias: ToolCalendarEvent\n\n> **ToolCalendarEvent** = \\{ `attendeeCount`: `number`; `attendees`: `ToolEventAttendee`[]; `calendarId`: `string` \\| `null`; `calendarName`: `string` \\| `null`; `conferenceUrl`: `string` \\| `null`; `description`: `string` \\| `null`; `end`: `string`; `eventId`: `string`; `inbox`: `string` \\| `null`; `isAllDay`: `boolean`; `isReadOnly`: `boolean`; `isRecurring`: `boolean`; `location`: `string` \\| `null`; `macroCallUrl`: `string` \\| `null`; `myRole`: `ToolEventRole` \\| `null`; `organizerEmail`: `string` \\| `null`; `recurrenceLines`: `string`[]; `start`: `string`; `status`: `string`; `timeZone`: `string` \\| `null`; `title`: `string`; \\}\n\nA calendar event as returned by the create and update tools.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attendeecount\"></a> `attendeeCount` | `number` | Total number of attendees. |\n| <a id=\"property-attendees\"></a> `attendees` | `ToolEventAttendee`[] | Attendees, capped at 20; `attendee_count` has the full number. |\n| <a id=\"property-calendarid\"></a> `calendarId` | `string` \\| `null` | Calendar the event belongs to, when known. |\n| <a id=\"property-calendarname\"></a> `calendarName` | `string` \\| `null` | Display name of that calendar, when known. |\n| <a id=\"property-conferenceurl\"></a> `conferenceUrl` | `string` \\| `null` | Conference join URL, when a conference is attached. |\n| <a id=\"property-description\"></a> `description` | `string` \\| `null` | Event body, truncated for brevity. |\n| <a id=\"property-end\"></a> `end` | `string` | Exclusive event end: RFC 3339 UTC instant, or YYYY-MM-DD for all-day events. |\n| <a id=\"property-eventid\"></a> `eventId` | `string` | Macro calendar event id, used by UpdateCalendarEvent and DeleteCalendarEvent. |\n| <a id=\"property-inbox\"></a> `inbox` | `string` \\| `null` | Connected inbox address syncing the calendar, when known. It stays the user's own address on a colleague's calendar, so it never says whose calendar it is. |\n| <a id=\"property-isallday\"></a> `isAllDay` | `boolean` | Whether the event covers whole days. |\n| <a id=\"property-isreadonly\"></a> `isReadOnly` | `boolean` | Whether the user's calendar prohibits modifying this event. |\n| <a id=\"property-isrecurring\"></a> `isRecurring` | `boolean` | Whether the event recurs. |\n| <a id=\"property-location\"></a> `location` | `string` \\| `null` | Location label, when set. |\n| <a id=\"property-macrocallurl\"></a> `macroCallUrl` | `string` \\| `null` | Join URL of the Macro call created with the event, when CreateCalendarEvent was asked for one. |\n| <a id=\"property-myrole\"></a> `myRole` | `ToolEventRole` \\| `null` | Whether the user organizes this event or is a guest on it, through that inbox; absent when they are neither, can only write that calendar, or a read-only calendar names them organizer. |\n| <a id=\"property-organizeremail\"></a> `organizerEmail` | `string` \\| `null` | Organizer email address, when known. |\n| <a id=\"property-recurrencelines\"></a> `recurrenceLines` | `string`[] | Raw RFC 5545 recurrence properties, when the event recurs. |\n| <a id=\"property-start\"></a> `start` | `string` | Event start: RFC 3339 UTC instant, or YYYY-MM-DD for all-day events. |\n| <a id=\"property-status\"></a> `status` | `string` | Event status: confirmed, tentative, or cancelled. |\n| <a id=\"property-timezone\"></a> `timeZone` | `string` \\| `null` | IANA time zone the event was scheduled in, when known. |\n| <a id=\"property-title\"></a> `title` | `string` | Display title. |",
- "ToolEventAttendee": "# Type Alias: ToolEventAttendee\n\n> **ToolEventAttendee** = \\{ `email`: `string`; `isOptional`: `boolean`; `isOrganizer`: `boolean`; `responseStatus`: `string`; \\}\n\nAn attendee of a calendar event, as returned by calendar tools.\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| <a id=\"property-isorganizer\"></a> `isOrganizer` | `boolean` | Whether this attendee organized the event. |\n| <a id=\"property-responsestatus\"></a> `responseStatus` | `string` | RSVP state: needs_action, accepted, declined, or tentative. |",
- "ToolEventRole": "# Type Alias: ToolEventRole\n\n> **ToolEventRole** = `\"organizer\"` \\| `\"guest\"`\n\nWhat the user is on one copy of an event, through the inbox holding it.",
- "EmailConnectionProviders": "# Type Alias: EmailConnectionProviders\n\n> **EmailConnectionProviders** = \\{ `gmail`: `boolean`; `outlook`: `boolean`; `outlook_admin_consent_url?`: `string` \\| `null`; \\}\n\nWhat the provider selector offers the requesting user.\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` | Whether this user may start a new Outlook connection: the deployment switch and their `enable-outlook` flag. |\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` | - |",
- "TeamInviteDetails": "# Type Alias: TeamInviteDetails\n\n> **TeamInviteDetails** = \\{ `created_at`: `string`; `email`: `string`; `id`: `string`; `invited_by`: `string`; `is_agent`: `boolean`; `last_sent_at`: `string`; `team_id`: `string`; `team_role`: `auth.TeamRole`; \\}\n\nDetailed information about a team invite\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | When the invite was created |\n| <a id=\"property-email\"></a> `email` | `string` | The invited email |\n| <a id=\"property-id\"></a> `id` | `string` | The invite id |\n| <a id=\"property-invited_by\"></a> `invited_by` | `string` | The user who sent the invitation |\n| <a id=\"property-is_agent\"></a> `is_agent` | `boolean` | Whether the invite creates an agent account |\n| <a id=\"property-last_sent_at\"></a> `last_sent_at` | `string` | When the invite was last sent |\n| <a id=\"property-team_id\"></a> `team_id` | `string` | The team id |\n| <a id=\"property-team_role\"></a> `team_role` | `auth.TeamRole` | The role being invited as |",
- "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`; `is_agent?`: `boolean`; `last_name?`: `string` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-first_name\"></a> `first_name?` | `string` \\| `null` | - |\n| <a id=\"property-id\"></a> `id` | `string` | - |\n| <a id=\"property-is_agent\"></a> `is_agent?` | `boolean` | Whether this is an agent account rather than a person. |\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. |",
- "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.",
- "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. |",
- "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.",
- "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`; `contributesToAvailability?`: `boolean`; `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-contributestoavailability\"></a> `contributesToAvailability?` | `boolean` | Whether this calendar counts toward the requester's busy time: their setting, by default only the primary calendars of inboxes they own. The nearest thing to \"this is the requester's own\": a provider's access role only says what they may do, on a colleague's calendar too. |\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\"` \\| `\"agent_mode_choice\"` \\| `\"dictation\"` \\| `\"image_generation\"` \\| `\"email_focus\"`\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). |",
- "GenerateImageAspectRatio": "# Type Alias: GenerateImageAspectRatio\n\n> **GenerateImageAspectRatio** = `\"square\"` \\| `\"landscape\"` \\| `\"portrait\"` \\| `\"widescreen\"` \\| `\"tall\"`\n\nShape of the generated image.",
- "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`; `has_received_mail`: `boolean`; `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 | Description |\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-has_received_mail\"></a> `has_received_mail` | `boolean` | Whether any message was received rather than drafted or sent. Only threads with received mail can return to the inbox. |\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** = \\{ `read_receipts_enabled?`: `boolean` \\| `null`; `signature?`: `string` \\| `null`; `signature_on_replies_forwards?`: `boolean` \\| `null`; \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-read_receipts_enabled\"></a> `read_receipts_enabled?` | `boolean` \\| `null` | Whether messages sent from this inbox carry an open-tracking pixel. |\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\"` \\| `\"external_chat\"`\n\nThe type of an entity in Macro",
- "ExternalChatMessageMetadata": "# Type Alias: ExternalChatMessageMetadata\n\n> **ExternalChatMessageMetadata** = \\{ `chatName`: `string`; `messageId`: `string`; `provider`: `notification.ExternalChatProvider`; \\}\n\nA live message in an independently shared external chat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-chatname\"></a> `chatName` | `string` | The chat's name. |\n| <a id=\"property-messageid\"></a> `messageId` | `string` | Stable message id; retries use it as their notification id. |\n| <a id=\"property-provider\"></a> `provider` | `notification.ExternalChatProvider` | The messaging service the chat lives in. |",
- "notification.ExternalChatProvider": "# Type Alias: ExternalChatProvider\n\n> **ExternalChatProvider** = `\"whatsapp\"`\n\nThe messaging service an external chat lives in.",
- "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`; `isAgent?`: `boolean`; `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-isagent\"></a> `isAgent?` | `boolean` | Whether the invite creates an agent account. |\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`: `ExternalChatMessageMetadata`; `tag`: `\"external_chat_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\"`; \\} \\| \\{ `content`: `RoutineRunFinishedMetadata`; `tag`: `\"routine_run_finished\"`; \\}\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`: `ExternalChatMessageMetadata`; `tag`: `\"external_chat_message\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `ExternalChatMessageMetadata` | A live message in a shared external chat. |\n| `tag` | `\"external_chat_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\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `content`: `RoutineRunFinishedMetadata`; `tag`: `\"routine_run_finished\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `content` | `RoutineRunFinishedMetadata` | One of the user's routines finished a run, successfully or not. |\n| `tag` | `\"routine_run_finished\"` | - |",
- "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.",
- "RoutineRunFinishedMetadata": "# Type Alias: RoutineRunFinishedMetadata\n\n> **RoutineRunFinishedMetadata** = \\{ `outcome`: `RoutineRunOutcome`; `routineId`: `string`; `routineName`: `string`; \\}\n\nOne of the recipient's routines finished a run. Every run notifies,\nwhether it succeeded or failed.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-outcome\"></a> `outcome` | `RoutineRunOutcome` | How the run ended. |\n| <a id=\"property-routineid\"></a> `routineId` | `string` | The routine that ran. |\n| <a id=\"property-routinename\"></a> `routineName` | `string` | The routine's name when it ran. |",
- "RoutineRunOutcome": "# Type Alias: RoutineRunOutcome\n\n> **RoutineRunOutcome** = `\"succeeded\"` \\| `\"failed\"`\n\nHow a routine run ended, as its notification reports it.",
- "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) |",
- "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\"` \\| `\"DATE_RANGE\"` \\| `\"NUMBER\"` \\| `\"STRING\"` \\| `\"SELECT_NUMBER\"` \\| `\"SELECT_STRING\"` \\| `\"TAG\"` \\| `\"ENTITY\"` \\| `\"LINK\"`\n\nData type for property values, determining storage and validation.",
- "properties.DateRange": "# Type Alias: DateRange\n\n> **DateRange** = \\{ `end`: `string`; `start`: `string`; \\}\n\nA span of time from `start` to `end`, both included. The end is never\nbefore the start: a range that would end earlier does not deserialize.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-end\"></a> `end` | `string` |\n| <a id=\"property-start\"></a> `start` | `string` |",
- "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`: `\"date_range\"`; \\} \\| \\{ `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`: `\"DateRange\"`; `value`: `properties.DateRange`; \\} \\| \\{ `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`: `\"DateRange\"`; `value`: `properties.DateRange`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"DateRange\"` | - |\n| `value` | `properties.DateRange` | Date range value Serializes as: {\"type\": \"DateRange\", \"value\": {\"start\": \"2025-01-01T00:00:00Z\", \"end\": \"2025-01-31T00: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`: `\"date_range\"`; `value`: `properties.DateRange`; \\} \\| \\{ `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`[]; `github?`: `null` \\| `GithubSelector`; `ids?`: `string`[] \\| `null`; `match?`: `PayloadCondition`[] \\| `null`; `property?`: `null` \\| `PropertySelector`; \\}\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`github` comes from outside Macro and carries its payload: it stands\nalone in its filter, takes no ids, and may require\nexact payload values with `match`. A `github` filter narrows deliveries\nwith its `github` selector.\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-github\"></a> `github?` | `null` \\| `GithubSelector` | - |\n| <a id=\"property-ids\"></a> `ids?` | `string`[] \\| `null` | - |\n| <a id=\"property-match\"></a> `match?` | `PayloadCondition`[] \\| `null` | Exact tests on the payload, all of which must pass. |\n| <a id=\"property-property\"></a> `property?` | `null` \\| `PropertySelector` | - |",
- "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\"` \\| `\"github\"`\n\nClosed allowlist: unknown names, deletions and ambiguous attribution are not\nselectors. Adding a broker variant does not automatically enable routines.",
- "GithubSelector": "# Type Alias: GithubSelector\n\n> **GithubSelector** = \\{ `actions?`: `string`[]; `events?`: `string`[]; `includeBots?`: `boolean`; `repositories?`: `string`[]; \\}\n\nWhich GitHub deliveries match.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-actions\"></a> `actions?` | `string`[] | Payload actions, such as `completed` or `opened`; any when empty. |\n| <a id=\"property-events\"></a> `events?` | `string`[] | GitHub event names, such as `workflow_run` or `pull_request`; any when empty. |\n| <a id=\"property-includebots\"></a> `includeBots?` | `boolean` | Also run for deliveries caused by bots and apps, including Macro's own. |\n| <a id=\"property-repositories\"></a> `repositories?` | `string`[] | Repositories as `owner/name`, matched without regard to case; every repository the owner's installations cover when empty. A renamed repository stops matching until it is chosen again. |",
- "LastRun": "# Type Alias: LastRun\n\n> **LastRun** = \\{ `end_time`: `string`; `is_success`: `boolean`; \\}\n\nHow a routine's most recent finished run went, so lists can flag failures.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-end_time\"></a> `end_time` | `string` |\n| <a id=\"property-is_success\"></a> `is_success` | `boolean` |",
- "PayloadCondition": "# Type Alias: PayloadCondition\n\n> **PayloadCondition** = \\{ `equals?`: `null` \\| `PayloadScalar`; `exists?`: `boolean` \\| `null`; `glob?`: `string` \\| `null`; `in?`: `PayloadScalar`[] \\| `null`; `notIn?`: `PayloadScalar`[] \\| `null`; `path`: `string`[]; \\}\n\n`path` walks objects by key; `*` steps into every element of an array and\na number into one. Give exactly one test. `notIn` also passes when the\npath finds nothing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-equals\"></a> `equals?` | `null` \\| `PayloadScalar` | - |\n| <a id=\"property-exists\"></a> `exists?` | `boolean` \\| `null` | Whether the path finds a non-null value. |\n| <a id=\"property-glob\"></a> `glob?` | `string` \\| `null` | Some text found matches this glob; `*` matches any run of characters. |\n| <a id=\"property-in\"></a> `in?` | `PayloadScalar`[] \\| `null` | Some value found is one of these. |\n| <a id=\"property-notin\"></a> `notIn?` | `PayloadScalar`[] \\| `null` | No value found is one of these. |\n| <a id=\"property-path\"></a> `path` | `string`[] | Keys from the payload's root, e.g. `[\"workflow_run\", \"conclusion\"]`. |",
- "PayloadScalar": "# Type Alias: PayloadScalar\n\n> **PayloadScalar** = `null` \\| `boolean` \\| `number` \\| `string`\n\nA JSON text, number, boolean or null that payload values are compared with.",
- "PropertySelector": "# Type Alias: PropertySelector\n\n> **PropertySelector** = \\{ `definitionId`: `string`; `values?`: `string`[]; \\}\n\nNarrows a task property change filter to one property and, optionally, the\nvalues it must gain.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-definitionid\"></a> `definitionId` | `string` | The property definition that must have changed. |\n| <a id=\"property-values\"></a> `values?` | `string`[] | Select option ids or referenced entity ids, one of which the change must add. Any change to the property matches when empty. |",
- "scheduled-action.RoutineTemplate": "# Type Alias: RoutineTemplate\n\n> **RoutineTemplate** = \\{ `active_count`: `number`; `author`: `string`; `created_at`: `string`; `description`: `string`; `id`: `string`; `name`: `string`; `task`: \\{\\[`key`: `string`\\]: `unknown`; \\}; `trigger`: `ActionTrigger`; `updated_at`: `string`; `variables`: `TemplateVariable`[]; \\}\n\nA shared routine's snapshot, readable by signed-in users with sharing enabled.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-active_count\"></a> `active_count` | `number` | Routines activated from this template, including stopped ones. |\n| <a id=\"property-author\"></a> `author` | `string` | Who shared it: the source routine's owner. |\n| <a id=\"property-created_at\"></a> `created_at` | `string` | - |\n| <a id=\"property-description\"></a> `description` | `string` | - |\n| <a id=\"property-id\"></a> `id` | `string` | The routine it was shared from. |\n| <a id=\"property-name\"></a> `name` | `string` | - |\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` | - |\n| <a id=\"property-variables\"></a> `variables` | `TemplateVariable`[] | - |",
- "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`; \\}; `template_id?`: `string` \\| `null`; `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-template_id\"></a> `template_id?` | `string` \\| `null` | The shared template this routine was activated from, if any. |\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` & \\{ `last_run?`: `null` \\| `LastRun`; `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| `last_run?` | `null` \\| `LastRun` | - |\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** |",
- "TemplateVariable": "# Type Alias: TemplateVariable\n\n> **TemplateVariable** = \\{ `fill`: `VariableFill`; `id`: `string`; `kind`: `\"user\"`; `label`: `string`; \\} \\| \\{ `block_name`: `string`; `fill`: `VariableFill`; `id`: `string`; `kind`: `\"item\"`; `label`: `string`; \\} \\| \\{ `fill`: `VariableFill`; `kind`: `\"time_zone\"`; `timezone`: `string`; \\}\n\nA user-specific part of a shared routine.\n\n## Union Members\n\n### Type Literal\n\n\\{ `fill`: `VariableFill`; `id`: `string`; `kind`: `\"user\"`; `label`: `string`; \\}\n\n***\n\n### Type Literal\n\n\\{ `block_name`: `string`; `fill`: `VariableFill`; `id`: `string`; `kind`: `\"item\"`; `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `block_name` | `string` | The mention's block name, such as `channel` or `md`. |\n| `fill` | `VariableFill` | - |\n| `id` | `string` | - |\n| `kind` | `\"item\"` | - |\n| `label` | `string` | - |\n\n***\n\n### Type Literal\n\n\\{ `fill`: `VariableFill`; `kind`: `\"time_zone\"`; `timezone`: `string`; \\}",
- "VariableFill": "# Type Alias: VariableFill\n\n> **VariableFill** = `\"activator\"` \\| `\"shared\"` \\| `\"choice\"`\n\nHow a variable is filled when someone activates the template.",
- "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`; `notification_filters?`: `NotificationFilters`; `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`, `owners` or `notification_filters` 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-notification_filters\"></a> `notification_filters?` | `NotificationFilters` | Filter by initiative notification state. |\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. |",
- "PropertyDateFilterRange": "# Type Alias: PropertyDateFilterRange\n\n> **PropertyDateFilterRange** = \\{ `end?`: `string` \\| `null`; `start?`: `string` \\| `null`; \\}\n\nUTC timestamp interval. Lower bounds are inclusive; upper bounds are exclusive.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-end\"></a> `end?` | `string` \\| `null` | Exclusive UTC upper bound, omitted for an open end. |\n| <a id=\"property-start\"></a> `start?` | `string` \\| `null` | Inclusive UTC lower bound, omitted for an open start. |",
- "PropertyFilter": "# Type Alias: PropertyFilter\n\n> **PropertyFilter** = \\{ `date_range?`: `null` \\| `PropertyDateFilterRange`; `entity_ids?`: `string`[]; `entity_type?`: `string` \\| `null`; `has_date?`: `boolean` \\| `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-date_range\"></a> `date_range?` | `null` \\| `PropertyDateFilterRange` | - |\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-has_date\"></a> `has_date?` | `boolean` \\| `null` | Flat Soup/search presence filter: true expands to an open date range, false to its negation. |\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. |",
- "AccentColor": "# Type Alias: AccentColor\n\n> **AccentColor** = `string`\n\nA color as `#rrggbb`, kept in lowercase.",
- "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`: `\"date_range\"`; `value`: `storage.DateRange`; \\} \\| \\{ `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`: `\"date_range\"`; `value`: `storage.DateRange`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date_range\"` | - |\n| `value` | `storage.DateRange` | A span of time; its end may not come before its start. |\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`: `\"date_range\"`; \\} \\| \\{ `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`: `\"date_range\"`; \\}\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` \\| `null`; `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` \\| `null` | Optional company domain, e.g. \"acme.com\". Omit for a name-only company. When supplied, 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. |",
- "CreateCrmTeamContactRequest": "# Type Alias: CreateCrmTeamContactRequest\n\n> **CreateCrmTeamContactRequest** = \\{ `email?`: `string` \\| `null`; `name`: `string`; \\}\n\nRequest body for `POST /crm/contacts`.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-email\"></a> `email?` | `string` \\| `null` | The contact's email address, of any domain. Optional: omit it to add the contact by name only. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name for the contact. |",
- "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` \\| `null`; `createdAt`: `string`; `email?`: `string` \\| `null`; `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` \\| `null` | The id of the company the contact belongs to; absent for a contact without a company. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When the contact record was created. |\n| <a id=\"property-email\"></a> `email?` | `string` \\| `null` | The contact's email address; absent for contacts added by name alone. |\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`; `exclude_personal_emails`: `boolean`; `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-exclude_personal_emails\"></a> `exclude_personal_emails` | `boolean` | Whether email sync keeps personal-provider addresses (gmail.com etc.) out of the CRM. |\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\"` \\| `\"DATE_RANGE\"` \\| `\"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`; `project_id`: `string` \\| `null`; `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-project_id\"></a> `project_id` | `string` \\| `null` | The folder it is filed in; `null` at the root. |\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.",
- "storage.DateRange": "# Type Alias: DateRange\n\n> **DateRange** = \\{ `end`: `string`; `start`: `string`; \\}\n\nA span of time from `start` to `end`, both included. A write whose end\ncomes before its start is refused.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-end\"></a> `end` | `string` | Where it ends; never before the start. |\n| <a id=\"property-start\"></a> `start` | `string` | Where it starts. |",
- "DateRangeOperator": "# Type Alias: DateRangeOperator\n\n> **DateRangeOperator** = `\"contains\"` \\| `\"doesNotContain\"` \\| `\"endsBefore\"` \\| `\"endsOnOrAfter\"` \\| `\"startsAfter\"` \\| `\"startsOnOrBefore\"`\n\nHow a date-range cell stands to a day: the whole day starting at the\ntest's date-time, so a range from 1 PM to 5 PM contains its day.",
- "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. |",
- "ExternalChatAttachment": "# Type Alias: ExternalChatAttachment\n\n> **ExternalChatAttachment** = \\{ `durationSeconds?`: `number` \\| `null`; `fileId?`: `string` \\| `null`; `fileName`: `string`; `height?`: `number` \\| `null`; `mime`: `string`; `ordinal`: `number`; `presentation?`: `null` \\| `ExternalChatMediaPresentation`; `size`: `number`; `state`: `ExternalChatAttachmentState`; `width?`: `number` \\| `null`; \\}\n\nOne attachment of a message.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-durationseconds\"></a> `durationSeconds?` | `number` \\| `null` | Length of audio or video in whole seconds, when declared. |\n| <a id=\"property-fileid\"></a> `fileId?` | `string` \\| `null` | The static file holding it, once ready. |\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` \\| `ExternalChatMediaPresentation` | - |\n| <a id=\"property-size\"></a> `size` | `number` | Declared size in bytes. |\n| <a id=\"property-state\"></a> `state` | `ExternalChatAttachmentState` | Current state. |\n| <a id=\"property-width\"></a> `width?` | `number` \\| `null` | Pixel width of an image, sticker or video, when WhatsApp declared it. |",
- "ExternalChatAttachmentState": "# Type Alias: ExternalChatAttachmentState\n\n> **ExternalChatAttachmentState** = `\"loading\"` \\| `\"ready\"` \\| `\"unavailable\"` \\| `\"unsupported\"`\n\nWhere an attachment of a message stands.",
- "ExternalChatBackfill": "# Type Alias: ExternalChatBackfill\n\n> **ExternalChatBackfill** = \\{ `imported`: `number`; `state`: `ExternalChatBackfillState`; \\}\n\nEarlier messages imported after adding a chat.\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` | `ExternalChatBackfillState` | Progress. |",
- "ExternalChatBackfillState": "# Type Alias: ExternalChatBackfillState\n\n> **ExternalChatBackfillState** = `\"waiting_for_message\"` \\| `\"pending\"` \\| `\"running\"` \\| `\"waiting_for_phone\"` \\| `\"done\"` \\| `\"partial\"`\n\nWhere importing a group's earlier messages stands.",
- "ExternalChatCall": "# Type Alias: ExternalChatCall\n\n> **ExternalChatCall** = \\{ `durationSeconds?`: `number` \\| `null`; `outcome`: `ExternalChatCallOutcome`; `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` | `ExternalChatCallOutcome` | How it went for the account that saw it. |\n| <a id=\"property-video\"></a> `video` | `boolean` | Video rather than voice. |",
- "ExternalChatCallOutcome": "# Type Alias: ExternalChatCallOutcome\n\n> **ExternalChatCallOutcome** = `\"answered\"` \\| `\"missed\"` \\| `\"rejected\"` \\| `\"other\"`\n\nHow a call went.",
- "ExternalChatCapabilities": "# Type Alias: ExternalChatCapabilities\n\n> **ExternalChatCapabilities** = \\{ `attachmentLimitBytes`: `number`; `attachmentTypes`: `string`[]; `maxAttachments`: `number`; `mutations`: `ExternalChatMutation`[]; `mutationWindowSeconds`: `number`; `textLimitBytes`: `number`; \\}\n\nOperations implemented for a chat, 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` | `ExternalChatMutation`[] | 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. |",
- "ExternalChatCommunity": "# Type Alias: ExternalChatCommunity\n\n> **ExternalChatCommunity** = \\{ `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. |",
- "ExternalChatContactCard": "# Type Alias: ExternalChatContactCard\n\n> **ExternalChatContactCard** = \\{ `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. |",
- "ExternalChatContacts": "# Type Alias: ExternalChatContacts\n\n> **ExternalChatContacts** = \\{ `contacts`: `ExternalChatContactCard`[]; \\}\n\nContact cards.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contacts\"></a> `contacts` | `ExternalChatContactCard`[] | The cards, in order. |",
- "ExternalChatDeliveryState": "# Type Alias: ExternalChatDeliveryState\n\n> **ExternalChatDeliveryState** = `\"pending\"` \\| `\"sending\"` \\| `\"unknown\"` \\| `\"accepted\"` \\| `\"failed\"`\n\nObserved send state. `unknown` means the request may have reached WhatsApp;\nit is never sent again automatically.",
- "ExternalChatDetail": "# Type Alias: ExternalChatDetail\n\n> **ExternalChatDetail** = `ExternalChatSummary` & \\{ `accessLevel`: `storage.AccessLevel`; `disappearingSeconds?`: `number` \\| `null`; `limits`: `ExternalChatCapabilities`; `members?`: `null` \\| `ExternalChatMembers`; `sendingIdentity?`: `string` \\| `null`; `sharePermission`: `storage.SharePermissionV2`; \\}\n\nFull chat 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` | The provider's disappearing-messages timer in seconds while it is on; Macro keeps the messages anyway. `null` when off or unknown. |\n| `limits` | `ExternalChatCapabilities` | Size and mutation limits. |\n| `members?` | `null` \\| `ExternalChatMembers` | - |\n| `sendingIdentity?` | `string` \\| `null` | Caller's own phone identity, never another account's identity. |\n| `sharePermission` | `storage.SharePermissionV2` | Owner-controlled standard sharing configuration. |",
- "ExternalChatEvent": "# Type Alias: ExternalChatEvent\n\n> **ExternalChatEvent** = \\{ `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. |",
- "ExternalChatKind": "# Type Alias: ExternalChatKind\n\n> **ExternalChatKind** = `\"group\"` \\| `\"direct\"`\n\nWhether an external chat is a group or a one-to-one chat.",
- "ExternalChatLocation": "# Type Alias: ExternalChatLocation\n\n> **ExternalChatLocation** = \\{ `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. |",
- "ExternalChatMediaKind": "# Type Alias: ExternalChatMediaKind\n\n> **ExternalChatMediaKind** = `\"image\"` \\| `\"audio\"` \\| `\"video\"` \\| `\"document\"`\n\nAttachment categories WhatsApp distinguishes.",
- "ExternalChatMediaPresentation": "# Type Alias: ExternalChatMediaPresentation\n\n> **ExternalChatMediaPresentation** = `\"sticker\"` \\| `\"gif\"` \\| `\"voice_note\"`\n\nHow WhatsApp shows an attachment, when not as a plain file of its kind.",
- "ExternalChatMembers": "# Type Alias: ExternalChatMembers\n\n> **ExternalChatMembers** = \\{ `announce`: `boolean`; `name`: `string`; `observedAt`: `string`; `participants`: `storage.ExternalChatParticipant`[]; \\}\n\nA chat's members as the caller's account last read them.\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` | The chat's name at the provider. |\n| <a id=\"property-observedat\"></a> `observedAt` | `string` | When this was read from WhatsApp. |\n| <a id=\"property-participants\"></a> `participants` | `storage.ExternalChatParticipant`[] | Everyone in the chat. |",
- "ExternalChatMention": "# Type Alias: ExternalChatMention\n\n> **ExternalChatMention** = `ExternalChatPersonRef` & \\{ `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 (WhatsApp: the digits of the person's id); replace `@<token>` with the name. |",
- "storage.ExternalChatMessage": "# Type Alias: ExternalChatMessage\n\n> **ExternalChatMessage** = \\{ `attachments`: `ExternalChatAttachment`[]; `body`: `string`; `deleted`: `boolean`; `deliveryState?`: `null` \\| `ExternalChatDeliveryState`; `editedAt?`: `string` \\| `null`; `forwarded`: `boolean`; `id`: `string`; `kind`: `ExternalChatMessageKind`; `mentions`: `ExternalChatMention`[]; `reactions`: `ExternalChatReaction`[]; `receivedAt`: `string`; `replyTo?`: `string` \\| `null`; `rich?`: `null` \\| `ExternalChatRichContent`; `sender`: `ExternalChatSender`; `sentAt`: `string`; `viewOnce`: `boolean`; \\}\n\nOne message in an external chat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `ExternalChatAttachment`[] | Imported or pending attachments. |\n| <a id=\"property-body\"></a> `body` | `string` | Plain text. |\n| <a id=\"property-deleted\"></a> `deleted` | `boolean` | Deleted for everyone. |\n| <a id=\"property-deliverystate\"></a> `deliveryState?` | `null` \\| `ExternalChatDeliveryState` | - |\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` | `ExternalChatMessageKind` | A message, or a system line. |\n| <a id=\"property-mentions\"></a> `mentions` | `ExternalChatMention`[] | People the body @-mentions. |\n| <a id=\"property-reactions\"></a> `reactions` | `ExternalChatReaction`[] | 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` \\| `ExternalChatRichContent` | - |\n| <a id=\"property-sender\"></a> `sender` | `ExternalChatSender` | Sender. |\n| <a id=\"property-sentat\"></a> `sentAt` | `string` | Timestamp assigned by the provider. |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `boolean` | Sent as view-once; Macro shows it like any media. |",
- "ExternalChatMessageKind": "# Type Alias: ExternalChatMessageKind\n\n> **ExternalChatMessageKind** = `\"message\"` \\| `\"system\"`\n\nWhat a timeline entry is.",
- "ExternalChatMutation": "# Type Alias: ExternalChatMutation\n\n> **ExternalChatMutation** = `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`\n\nDeliberate operations on an existing message.",
- "storage.ExternalChatParticipant": "# Type Alias: ExternalChatParticipant\n\n> **ExternalChatParticipant** = \\{ `admin`: `boolean`; `alternateJid?`: `string` \\| `null`; `displayName?`: `string` \\| `null`; `jid`: `string`; \\}\n\nSomeone in an external 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 the provider verified for them. |\n| <a id=\"property-displayname\"></a> `displayName?` | `string` \\| `null` | Their name at the provider, untrusted. |\n| <a id=\"property-jid\"></a> `jid` | `string` | Their id at the provider (WhatsApp: phone-number or LID JID). |",
- "ExternalChatPersonRef": "# Type Alias: ExternalChatPersonRef\n\n> **ExternalChatPersonRef** = \\{ `name`: `string`; `userId?`: `string` \\| `null`; \\}\n\nA person named in a message: a Macro user when verified, else their name\nat the provider, 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. |",
- "ExternalChatPoll": "# Type Alias: ExternalChatPoll\n\n> **ExternalChatPoll** = \\{ `options`: `ExternalChatPollOption`[]; `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` | `ExternalChatPollOption`[] | 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. |",
- "ExternalChatPollOption": "# Type Alias: ExternalChatPollOption\n\n> **ExternalChatPollOption** = \\{ `mine`: `boolean`; `name`: `string`; `voters`: `ExternalChatPersonRef`[]; `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` | `ExternalChatPersonRef`[] | Who chose it. |\n| <a id=\"property-votes\"></a> `votes` | `number` | People who chose it. |",
- "storage.ExternalChatProvider": "# Type Alias: ExternalChatProvider\n\n> **ExternalChatProvider** = `\"whatsapp\"`\n\nThe messaging service an external chat lives in.",
- "ExternalChatReaction": "# Type Alias: ExternalChatReaction\n\n> **ExternalChatReaction** = \\{ `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. |",
- "ExternalChatReference": "# Type Alias: ExternalChatReference\n\n> **ExternalChatReference** = \\{ `id`: `string`; `name`: `string`; \\}\n\nAn external chat entity bound to a remote chat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | External chat entity id. |\n| <a id=\"property-name\"></a> `name` | `string` | Display name, following WhatsApp. |",
- "ExternalChatReplyBlock": "# Type Alias: ExternalChatReplyBlock\n\n> **ExternalChatReplyBlock** = `\"no_account\"` \\| `\"disconnected\"` \\| `\"not_added\"` \\| `\"not_allowed\"` \\| `\"unavailable\"`\n\nWhy the viewer cannot send now.",
- "ExternalChatReplyContent": "# Type Alias: ExternalChatReplyContent\n\n> **ExternalChatReplyContent** = \\{ `mentions?`: `string`[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string` \\| `null`; `type`: `\"media\"`; `uploadId`: `string`; \\} \\| \\{ `messageId`: `string`; `operation`: `ExternalChatMutation`; `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, imported as the message's static file. |\n\n***\n\n### Type Literal\n\n\\{ `messageId`: `string`; `operation`: `ExternalChatMutation`; `text?`: `string` \\| `null`; `type`: `\"mutation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `messageId` | `string` | Existing message, resolved to its provider source by the server. |\n| `operation` | `ExternalChatMutation` | Explicit operation. |\n| `text?` | `string` \\| `null` | Replacement text or emoji; absent for delete, empty to remove a reaction. |\n| `type` | `\"mutation\"` | - |",
- "ExternalChatRichContent": "# Type Alias: ExternalChatRichContent\n\n> **ExternalChatRichContent** = `ExternalChatPoll` & \\{ `type`: `\"poll\"`; \\} \\| `ExternalChatLocation` & \\{ `type`: `\"location\"`; \\} \\| `ExternalChatContacts` & \\{ `type`: `\"contacts\"`; \\} \\| `ExternalChatEvent` & \\{ `type`: `\"event\"`; \\} \\| `ExternalChatSystemLine` & \\{ `type`: `\"system\"`; \\}\n\nStructured content of a message besides its body.",
- "ExternalChatSendProgress": "# Type Alias: ExternalChatSendProgress\n\n> **ExternalChatSendProgress** = \\{ `chatId`: `string`; `createdAt`: `string`; `errorCode?`: `string` \\| `null`; `id`: `string`; `messageId?`: `string` \\| `null`; `payload`: `ExternalChatSendReply`; `state`: `ExternalChatDeliveryState`; `userId`: `string`; \\}\n\nDurable result of a deliberate send.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-chatid\"></a> `chatId` | `string` | External chat. |\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-id\"></a> `id` | `string` | Stable intent id. |\n| <a id=\"property-messageid\"></a> `messageId?` | `string` \\| `null` | The chat's message, once the provider accepted it. |\n| <a id=\"property-payload\"></a> `payload` | `ExternalChatSendReply` | The original request, so a failed draft can be recovered. |\n| <a id=\"property-state\"></a> `state` | `ExternalChatDeliveryState` | Current state. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Person who submitted it. |",
- "ExternalChatSendReply": "# Type Alias: ExternalChatSendReply\n\n> **ExternalChatSendReply** = \\{ `idempotencyKey`: `string`; `message`: `ExternalChatReplyContent`; `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` | `ExternalChatReplyContent` | Content. |\n| <a id=\"property-replyto\"></a> `replyTo?` | `string` \\| `null` | Message being quoted, within this chat. |",
- "ExternalChatSender": "# Type Alias: ExternalChatSender\n\n> **ExternalChatSender** = \\{ `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. |",
- "ExternalChatSummary": "# Type Alias: ExternalChatSummary\n\n> **ExternalChatSummary** = \\{ `backfill?`: `null` \\| `ExternalChatBackfill`; `canSend`: `boolean`; `community?`: `null` \\| `ExternalChatCommunity`; `id`: `string`; `kind`: `ExternalChatKind`; `lastMessageAt?`: `string` \\| `null`; `name`: `string`; `provider`: `storage.ExternalChatProvider`; `sendReason?`: `null` \\| `ExternalChatReplyBlock`; `unreadCount`: `number`; `userId`: `string`; \\}\n\nAn external chat visible through ordinary entity sharing.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill?` | `null` \\| `ExternalChatBackfill` | - |\n| <a id=\"property-cansend\"></a> `canSend` | `boolean` | Caller may currently send from their own account. |\n| <a id=\"property-community\"></a> `community?` | `null` \\| `ExternalChatCommunity` | - |\n| <a id=\"property-id\"></a> `id` | `string` | Entity identifier. |\n| <a id=\"property-kind\"></a> `kind` | `ExternalChatKind` | 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-provider\"></a> `provider` | `storage.ExternalChatProvider` | The service the chat lives in. |\n| <a id=\"property-sendreason\"></a> `sendReason?` | `null` \\| `ExternalChatReplyBlock` | - |\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. |",
- "ExternalChatSystemAction": "# Type Alias: ExternalChatSystemAction\n\n> **ExternalChatSystemAction** = `\"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.",
- "ExternalChatSystemLine": "# Type Alias: ExternalChatSystemLine\n\n> **ExternalChatSystemLine** = \\{ `action`: `ExternalChatSystemAction`; `actor?`: `null` \\| `ExternalChatPersonRef`; `call?`: `null` \\| `ExternalChatCall`; `participants`: `ExternalChatPersonRef`[]; `value?`: `string` \\| `null`; \\}\n\nSomething that happened in the chat.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-action\"></a> `action` | `ExternalChatSystemAction` | What happened. |\n| <a id=\"property-actor\"></a> `actor?` | `null` \\| `ExternalChatPersonRef` | - |\n| <a id=\"property-call\"></a> `call?` | `null` \\| `ExternalChatCall` | - |\n| <a id=\"property-participants\"></a> `participants` | `ExternalChatPersonRef`[] | 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). |",
- "ExternalChatUploadedAttachment": "# Type Alias: ExternalChatUploadedAttachment\n\n> **ExternalChatUploadedAttachment** = \\{ `filename`: `string`; `kind`: `ExternalChatMediaKind`; `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` | `ExternalChatMediaKind` | Category. |\n| <a id=\"property-uploadid\"></a> `uploadId` | `string` | Use as `upload_id` in a media send. |",
- "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\"` \\| `\"external_chat\"`; `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\"` \\| `\"external_chat\"` | 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\"` \\| `\"external_chat\"`; \\}\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\"` \\| `\"external_chat\"` | 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`; \\} \\| \\{ `kind`: `\"dateRange\"`; `operator`: `DateRangeOperator`; `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\\{ `kind`: `\"dateRange\"`; `operator`: `DateRangeOperator`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"dateRange\"` | - |\n| `operator` | `DateRangeOperator` | How the cell's range stands to the day. |\n| `value` | `string` | The start of the day 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** = \\{ `anonymous`: `boolean`; `audience`: `Audience`; `branding`: `FormBranding`; `closesAt`: `string` \\| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `isHiddenInDrive`: `boolean`; `name`: `string`; `ownerId`: `string`; `projectId`: `string` \\| `null`; `respondentColumnId`: `string` \\| `null`; `responsesVisible`: `boolean`; `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-anonymous\"></a> `anonymous` | `boolean` | Whether nobody, the owner included, can see who gave which response. Who responded is kept apart from the responses, only so nobody responds twice. Fixed once anyone has responded. |\n| <a id=\"property-audience\"></a> `audience` | `Audience` | Who may respond. |\n| <a id=\"property-branding\"></a> `branding` | `FormBranding` | Its logo, cover image and accent color. |\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-projectid\"></a> `projectId` | `string` \\| `null` | The folder it is filed in; `null` at the root. |\n| <a id=\"property-respondentcolumnid\"></a> `respondentColumnId` | `string` \\| `null` | The person column each signed-in submission names its respondent in; `null` once deleted, and on a form created anonymous. An anonymous form never writes it. |\n| <a id=\"property-responsesvisible\"></a> `responsesVisible` | `boolean` | Whether people with View may read individual response rows. |\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 (and reads responses when\nthey are shared), edit changes questions and reads responses, owner\nalso sets the audience, closes and trashes it.",
- "FormBranding": "# Type Alias: FormBranding\n\n> **FormBranding** = \\{ `accentColor`: `null` \\| `AccentColor`; `coverFileId`: `string` \\| `null`; `logoFileId`: `string` \\| `null`; \\}\n\nA form's logo, cover image and accent color, each unset by default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accentcolor\"></a> `accentColor` | `null` \\| `AccentColor` | - |\n| <a id=\"property-coverfileid\"></a> `coverFileId` | `string` \\| `null` | The static file shown as a banner across the top of the page. |\n| <a id=\"property-logofileid\"></a> `logoFileId` | `string` \\| `null` | The static file shown as the logo above the title. |",
- "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.",
- "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`; `triggered_via?`: `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-triggered_via\"></a> `triggered_via?` | `string` \\| `null` | Self-reported name of the client the user triggered it through, such as \"Claude Code\"; a display label only. |\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`: `\"DateRange\"`; `value`: `storage.DateRange`; \\} \\| \\{ `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`: `\"DateRange\"`; `value`: `storage.DateRange`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"DateRange\"` | - |\n| `value` | `storage.DateRange` | Date range value Serializes as: {\"type\": \"DateRange\", \"value\": {\"start\": \"2025-01-01T00:00:00Z\", \"end\": \"2025-01-31T00: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`; \\} \\| \\{ `barFields?`: `string`[]; `colorBy`: `string` \\| `null`; `groupBy`: `string` \\| `null`; `kind`: `\"timeline\"`; `range`: `string`; `title?`: `string`; \\}\n\nA layout as an op asks for it: a board or timeline may leave its title\nout.\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. |\n\n***\n\n### Type Literal\n\n\\{ `barFields?`: `string`[]; `colorBy`: `string` \\| `null`; `groupBy`: `string` \\| `null`; `kind`: `\"timeline\"`; `range`: `string`; `title?`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `barFields?` | `string`[] | The columns a bar shows after its title, in order. |\n| `colorBy` | `string` \\| `null` | The select or tag column whose options color the bars, if any. |\n| `groupBy` | `string` \\| `null` | The single-select or single-person column grouping the bars, if any. |\n| `kind` | `\"timeline\"` | - |\n| `range` | `string` | The date-range column whose cells are the bars. |\n| `title?` | `string` | The column a bar is labelled by. Left out, a timeline keeps the title it has, and a new timeline 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`: `\"date_range\"`; `value`: `storage.DateRange`; \\} \\| \\{ `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\"` \\| `\"external_chat\"`\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` | - |",
- "SharedExternalChatReference": "# Type Alias: SharedExternalChatReference\n\n> **SharedExternalChatReference** = \\{ `id`: `string`; `name`: `string`; `ownerId`: `string`; \\}\n\nAnother person's external chat entity the caller can view.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `string` | External chat 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 chat and shared it. |",
- "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`: `\"dateRange\"`; `value`: `storage.DateRange`; \\} \\| \\{ `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`: `\"dateRange\"`; `value`: `storage.DateRange`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"dateRange\"` | - |\n| `value` | `storage.DateRange` | A span from one date-time to another. |\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\"` \\| `\"dateRange\"` \\| `\"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.",
- "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`; `exclude_personal_emails?`: `boolean` \\| `null`; `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-exclude_personal_emails\"></a> `exclude_personal_emails?` | `boolean` \\| `null` | Whether email sync keeps personal-provider addresses out of the CRM. Admin/owner only. |\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** = \\{ `accentColor?`: `string` \\| `null`; `anonymous?`: `boolean`; `audience?`: `Audience`; `closesAt?`: `string` \\| `null`; `confirmationMessage?`: `string`; `coverFileId?`: `string` \\| `null`; `description?`: `string`; `logoFileId?`: `string` \\| `null`; `responsesVisible?`: `boolean`; `status?`: `FormStatus`; `tallyVisible?`: `boolean`; \\}\n\nA change to a form's facts; what is left out stays. The description,\nconfirmation message and branding 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-accentcolor\"></a> `accentColor?` | `string` \\| `null` | A new accent color, or `null` for the default. |\n| <a id=\"property-anonymous\"></a> `anonymous?` | `boolean` | Whether nobody can see who gave which response; refused once anyone has responded. |\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-coverfileid\"></a> `coverFileId?` | `string` \\| `null` | A new cover image, or `null` to remove it. |\n| <a id=\"property-description\"></a> `description?` | `string` | Its new description. |\n| <a id=\"property-logofileid\"></a> `logoFileId?` | `string` \\| `null` | A new logo, or `null` to remove it. |\n| <a id=\"property-responsesvisible\"></a> `responsesVisible?` | `boolean` | Whether people with View may read individual response rows. |\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`; \\} \\| \\{ `barFields?`: `string`[]; `colorBy`: `string` \\| `null`; `groupBy`: `string` \\| `null`; `kind`: `\"timeline\"`; `range`: `string`; `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. |\n\n***\n\n### Type Literal\n\n\\{ `barFields?`: `string`[]; `colorBy`: `string` \\| `null`; `groupBy`: `string` \\| `null`; `kind`: `\"timeline\"`; `range`: `string`; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `barFields?` | `string`[] | The columns a bar shows after its title, in order. |\n| `colorBy` | `string` \\| `null` | The select or tag column whose options color the bars, if any. |\n| `groupBy` | `string` \\| `null` | The single-select or single-person column whose values group the bars, if any; moving a bar to another group sets this column. |\n| `kind` | `\"timeline\"` | - |\n| `range` | `string` | The date-range column whose cells are the bars. |\n| `title` | `string` | The column a bar is labelled by, of any type. Removing it labels the bars 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.",
- "storage.WhatsAppAccount": "# Type Alias: WhatsAppAccount\n\n> **WhatsAppAccount** = \\{ `authorizationGeneration`: `number`; `id`: `string`; `identityJid?`: `string` \\| `null`; `state`: `WhatsAppAccountState`; `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` | `WhatsAppAccountState` | Lifecycle. |\n| <a id=\"property-userid\"></a> `userId` | `string` | Authenticated owner. |",
- "WhatsAppAccountState": "# Type Alias: WhatsAppAccountState\n\n> **WhatsAppAccountState** = `\"pairing\"` \\| `\"connected\"` \\| `\"logged_out\"` \\| `\"disconnected\"`\n\nAccount lifecycle. Transport outages are not stored: a connected account\nstays connected while its session service reconnects.",
- "WhatsAppCannotAdd": "# Type Alias: WhatsAppCannotAdd\n\n> **WhatsAppCannotAdd** = `\"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.",
- "storage.WhatsAppChat": "# Type Alias: WhatsAppChat\n\n> **WhatsAppChat** = \\{ `added?`: `null` \\| `ExternalChatReference`; `archived`: `boolean`; `canAdd`: `boolean`; `cannotAddReason?`: `null` \\| `WhatsAppCannotAdd`; `community?`: `null` \\| `ExternalChatCommunity`; `jid`: `string`; `kind`: `ExternalChatKind`; `lastActivityAt?`: `string` \\| `null`; `name`: `string`; `phoneNumber?`: `string` \\| `null`; `pinned`: `boolean`; `shared?`: `null` \\| `SharedExternalChatReference`; \\}\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-added\"></a> `added?` | `null` \\| `ExternalChatReference` | - |\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` \\| `WhatsAppCannotAdd` | - |\n| <a id=\"property-community\"></a> `community?` | `null` \\| `ExternalChatCommunity` | - |\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` | `ExternalChatKind` | Group or direct chat. |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt?` | `string` \\| `null` | Newest activity WhatsApp reported (message or history sync); `null` when unknown, as for saved contacts never messaged. 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-phonenumber\"></a> `phoneNumber?` | `string` \\| `null` | The other person's phone number (`+<digits>`) of a direct chat, when WhatsApp told us it. |\n| <a id=\"property-pinned\"></a> `pinned` | `boolean` | Pinned in WhatsApp. |\n| <a id=\"property-shared\"></a> `shared?` | `null` \\| `SharedExternalChatReference` | - |",
- "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, date ranges,\nentity and row pickers) 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-archivedat\"></a> `archivedAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | When the session was archived (RFC 3339), or `undefined` while it is not. | - |\n| <a id=\"property-archivedby\"></a> `archivedBy` | `readonly` | () => `Promise`\\<`NonNullable`\\<ArchiveCause \\| null \\| undefined\\> \\| `undefined`\\> | Who archived the session, making it read-only: `'user'`, `'pull_request_merged'` or `'runtime_closed'`. `undefined` while it is not archived. | - |\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-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. | - |\n| <a id=\"property-views\"></a> `views` | `readonly` | \\{ `present`: (`view`) => `Promise`\\<`void`\\>; \\} | Views shown in this session at once, with nothing saved. | - |\n| `views.present` | `public` | (`view`) => `Promise`\\<`void`\\> | - | - |\n| <a id=\"property-workspace\"></a> `workspace` | `readonly` | () => `Promise`\\<`string`\\> | The directory in which the agent harness runs. | - |",
- "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.autoArchive": "### autoArchive()\n\n> **autoArchive**(): `Promise`\\<`SessionAutoArchive`\\>\n\nThis session's auto-archive settings, and when a trigger archived it.\n\n#### Returns\n\n`Promise`\\<`SessionAutoArchive`\\>",
- "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.setAutoArchive": "### setAutoArchive()\n\n> **setAutoArchive**(`overrides`): `Promise`\\<`void`\\>\n\nReplace this session's auto-archive choices. Owner only; a trigger left\n`undefined` follows the owner's default.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `overrides` | `AutoArchiveOverrides` |\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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `AgentSessionResponse`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `AgentSessionResponse` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe session's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "AgentSession.autoArchivePreferences": "### autoArchivePreferences()\n\n> `static` **autoArchivePreferences**(`client`): `Promise`\\<`AutoArchivePreferencesBody`\\>\n\nWhich triggers archive the caller's sessions by default; each is off unless chosen.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`Promise`\\<`AutoArchivePreferencesBody`\\>",
- "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.chooseMode": "### chooseMode()\n\n> `static` **chooseMode**(`client`, `prompt`): `Promise`\\<`AgentMode`\\>\n\nWhether `prompt` needs a chat agent or a coding agent, as the app's Auto\nmode decides before starting a session. Rejects when Auto mode is not\nenabled for the caller, the classifier is unavailable or slow, or the\ncaller is out of AI quota.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `prompt` | `string` |\n\n#### Returns\n\n`Promise`\\<`AgentMode`\\>",
- "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 as `agent` when one is named, otherwise the\ndeployment's default coding persona. List personas with\nAgentNamespace.list and construct one with `Agent.byId`.\nUnknown or inaccessible personas fail. `model` and `instructions`\noutrank the persona's. `repoUrl` is honored for Cursor; omit `agent`\nand it starts as Cursor.\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.setAutoArchivePreferences": "### setAutoArchivePreferences()\n\n> `static` **setAutoArchivePreferences**(`client`, `preferences`): `Promise`\\<`AutoArchivePreferencesBody`\\>\n\nReplace which triggers archive the caller's sessions by default.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `preferences` | `AutoArchivePreferencesBody` |\n\n#### Returns\n\n`Promise`\\<`AutoArchivePreferencesBody`\\>",
- "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`\\>",
- "AutoArchiveOverrides": "# Type Alias: AutoArchiveOverrides\n\n> **AutoArchiveOverrides** = \\{ `onPullRequestMerged?`: `boolean`; `onRuntimeClosed?`: `boolean`; \\}\n\nOne session's auto-archive choices. A trigger left `undefined` follows the\nowner's default.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-onpullrequestmerged\"></a> `onPullRequestMerged?` | `boolean` | Archive once every linked pull request is closed and at least one merged. |\n| <a id=\"property-onruntimeclosed\"></a> `onRuntimeClosed?` | `boolean` | Archive once the runtime session backing it is deliberately closed. |",
- "CreateManagedSessionOptions": "# Type Alias: CreateManagedSessionOptions\n\n> **CreateManagedSessionOptions** = \\{ `agent?`: `Agent`; `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-agent\"></a> `agent?` | `Agent` | Persona the session runs as, from AgentNamespace.list or `Agent.byId`. The caller must be able to use it. Omitted, the deployment's default coding persona, or Cursor when `repoUrl` is set. Its harness, instructions and model apply unless `instructions` or `model` override them. |\n| <a id=\"property-instructions\"></a> `instructions?` | `string` | Instructions the session's runtime works under, fixed for its life. Outranks the persona's when both are set. |\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; omit `agent` and the session starts as Cursor. |",
- "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. |",
- "SessionAutoArchive": "# Type Alias: SessionAutoArchive\n\n> **SessionAutoArchive** = \\{ `autoArchivedAt?`: `string`; `defaults`: `AutoArchivePreferencesBody`; `overrides`: `AutoArchiveOverrides`; \\}\n\nA session's auto-archive settings, and when a trigger archived it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-autoarchivedat\"></a> `autoArchivedAt?` | `string` | When a trigger first archived the session, if one did. It stays after the session is unarchived, since a session archives itself at most once. |\n| <a id=\"property-defaults\"></a> `defaults` | `AutoArchivePreferencesBody` | The owner's defaults, which apply where the session has no choice. |\n| <a id=\"property-overrides\"></a> `overrides` | `AutoArchiveOverrides` | The session's own choices. |",
- "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. | - |\n| <a id=\"property-views\"></a> `views` | `readonly` | \\{ `present`: (`view`) => `Promise`\\<`void`\\>; \\} | Views: shown to the user at once, with nothing saved. | - |\n| `views.present` | `public` | (`view`) => `Promise`\\<`void`\\> | - | - |",
- "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.autoArchivePreferences": "### autoArchivePreferences()\n\n> **autoArchivePreferences**(): `Promise`\\<`AutoArchivePreferencesBody`\\>\n\nWhich triggers archive the caller's sessions by default; each is off unless chosen.\n\n#### Returns\n\n`Promise`\\<`AutoArchivePreferencesBody`\\>",
- "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.chooseMode": "### chooseMode()\n\n> **chooseMode**(`prompt`): `Promise`\\<`AgentMode`\\>\n\nWhether `prompt` needs a chat agent (`'chat'`) or a coding agent\n(`'code'`), as the app's Auto mode decides before starting a session.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `prompt` | `string` |\n\n#### Returns\n\n`Promise`\\<`AgentMode`\\>",
- "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 session as `agent` when one is named, otherwise the\ndeployment's default coding persona. List personas with\nAgentNamespace.list and construct one with Agent.byId.\nUnknown or inaccessible personas fail. `model` and `instructions`\noutrank the persona's. `repoUrl` is honored for Cursor; omit `agent`\nand it starts as Cursor.\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.setAutoArchivePreferences": "### setAutoArchivePreferences()\n\n> **setAutoArchivePreferences**(`preferences`): `Promise`\\<`AutoArchivePreferencesBody`\\>\n\nReplace which triggers archive the caller's sessions by default.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `preferences` | `AutoArchivePreferencesBody` |\n\n#### Returns\n\n`Promise`\\<`AutoArchivePreferencesBody`\\>",
- "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**(): `CreateCalendarEvent_Serialize` \\| `ImportDraft` \\| `SendEmail`\n\n##### Returns\n\n`CreateCalendarEvent_Serialize` \\| `ImportDraft` \\| `SendEmail`\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**(): `NotionImportReport_Serialize` \\| `SendEmailResponse` \\| `ToolCalendarEvent` \\| `null`\n\nThe action's confirmed response, `null` until it completes.\n\n##### Returns\n\n`NotionImportReport_Serialize` \\| `SendEmailResponse` \\| `ToolCalendarEvent` \\| `null`\n\n***\n\n### status\n\n#### Get Signature\n\n> **get** **status**(): `ItemStatus`\n\n##### Returns\n\n`ItemStatus`",
- "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\nReplace this pending draft; `kind` must match the review's.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `draft` | `ReviewDraft_Deserialize` |\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`\\<`\"calendar\"` \\| `\"email\"` \\| `\"import\"`\\> | - |\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`: `\"calendar\"` \\| `\"email\"` \\| `\"import\"`; \\}\\>\n\nCompact reference for main()'s returned reviews array.\n\n#### Returns\n\n`Promise`\\<\\{ `id`: `string`; `kind`: `\"calendar\"` \\| `\"email\"` \\| `\"import\"`; \\}\\>",
- "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_Serialize`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ReviewRecord_Serialize`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ReviewRecord_Serialize` |\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_Serialize` |\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** = \\{ `title`: `ReviewTitle`; \\} & `ReviewDrafts_Deserialize`\n\nA review's kind and its drafts; the execution is attached by the handle.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `title` | `ReviewTitle` |",
- "ReviewCalendarDraft": "# Type Alias: ReviewCalendarDraft\n\n> **ReviewCalendarDraft** = `CreateCalendarEvent_Deserialize`\n\nCalendar drafts use the existing calendar composer and creation action.",
- "ReviewDraft": "# Type Alias: ReviewDraft\n\n> **ReviewDraft** = `ReviewDraft_Deserialize`\n\nA replacement draft keyed by its review's kind.",
- "ReviewEmailDraft": "# Type Alias: ReviewEmailDraft\n\n> **ReviewEmailDraft** = `SendEmail`\n\nMarkdown is rendered by the ordinary email action; the UI can edit each draft.",
- "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`",
- "presentView": "# Function: presentView()\n\n> **presentView**(`client`, `session`, `view`, `execution?`): `Promise`\\<`void`\\>\n\nPresent a view in a session: a review with nothing saved. The view is\nchecked and drawn at once; one that does not match throws with what to fix.\n\n## Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `session` | `AgentSession` |\n| `view` | \\{\\[`key`: `string`\\]: `unknown`; \\} |\n| `execution?` | `CodeExecution` |\n\n## Returns\n\n`Promise`\\<`void`\\>",
- "SessionView": "# Type Alias: SessionView\n\n> **SessionView** = `PresentView`\\[`\"view\"`\\]\n\nA dynamic-UI view, in the format of the PresentView schema in ExecuteCode's description.",
- "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\nAccessible custom agents. Pass one to\nAgentSessionNamespace.createManaged to start a session as that\npersona. System personas such as Cursor are constructed with\n`Agent.byId`.\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-contributestoavailability\"></a> `contributesToAvailability` | `readonly` | () => `Promise`\\<`NonNullable`\\<`boolean` \\| `undefined`\\> \\| `undefined`\\> | Whether this calendar counts toward the caller's busy time: their setting, by default only the primary calendars of inboxes they own. | - |\n| <a id=\"property-emailaddress\"></a> `emailAddress` | `readonly` | () => `Promise`\\<`string`\\> | Connected inbox address that syncs this calendar. It stays the user's own address on a calendar someone else shared with them. | - |\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. The user's other calendars are not primary either, so false does not mean it isn't theirs. | - |\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. People can hold that on someone else's calendar, so it does not mean it is theirs. | - |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | Provider display name. Often says whose calendar it is: Google names a person's primary calendar after them or their address. | - |\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.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: every calendar the caller can see (not all of them\ntheirs), event creation, and handles to individual events and calendars.\nBacked by calendar_service (the SDK reaches it on the gateway's `/calendar`\nroute).\n\nThe user can see calendars that are not theirs, such as a colleague's or a\nteam's. `inbox` is the account syncing a calendar, so it stays the user's\nown address on all of them, and neither it, `isPrimary`, `isWritable` nor\n`role` says whose calendar it is. Their schedule is the calendars with\n`contributesToAvailability`, plus meetings they attend: only those are\n\"your calendar\", and only those are conflicts when finding free time, as in\nteam availability. Anything else is what that calendar shows, not where the\nuser is or what they are doing. Call it by `calendarName`, say whose it is\nwhen the name shows that, and otherwise say you cannot tell rather than\nguess. When it overlaps a time you suggest, mention it so the user can\ndecide, since their own other calendars read the same way.\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 calendars the caller can see, some possibly not theirs, 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.occurrences": "### occurrences()\n\n> **occurrences**(`options`): `AsyncGenerator`\\<\\{ `calendarName`: `string` \\| `undefined`; `contributesToAvailability`: `boolean` \\| `undefined`; `event`: `CalendarEvent`; `inbox`: `string` \\| `undefined`; `occurrence`: `storage.CalendarOccurrence`; `role`: `CalendarEventRole` \\| `undefined`; \\}, `any`, `any`\\>\n\nOccurrences on every calendar the user can see: their schedule is only\n`contributesToAvailability` rows and meetings they attend; call the rest\nby `calendarName`. Automatically paginated within the viewport. Each names\nits calendar (`calendarName`), whether a calendar holding it is on the\nuser's schedule (`contributesToAvailability`), the address of the\nconnected inbox holding that copy of the event (`inbox`) and whether the\nuser organizes it or is a guest there (`role`, absent when neither, when\nthey can only write that calendar, or when a read-only calendar names\nthem organizer).\n\n`inbox` is the account syncing the calendar, so a colleague's calendar\nreports the user's own address; it never says whose calendar it is, and\nneither does `role`, since writing someone's calendar lets the user act\nas its organizer. Say \"your calendar\", and count a conflict or busy time,\nonly for `contributesToAvailability` rows and meetings the user attends\n(`role`), the way team availability does. Any other row is what that\ncalendar shows, not where the user is or what they are doing: \"the\nOffsites calendar has...\", or \"[email protected]'s calendar has...\" when\nthe name shows whose it is. If it does not, say you cannot tell rather\nthan guess. When one overlaps a time you suggest, mention it so the user\ncan decide, since their own other calendars read the same way.\n\nA meeting on several of the user's inboxes appears once per inbox, each\nwith its own event; describe them by inbox and role, never 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`\\<\\{ `calendarName`: `string` \\| `undefined`; `contributesToAvailability`: `boolean` \\| `undefined`; `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`: `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`: `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. Being\nable to write someone else's calendar makes them neither, and neither does\na read-only calendar naming them organizer; `viewerCan` says what they may\ndo there.",
- "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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `storage.CallRecord`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.CallRecord` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe call's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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`images` attaches static images, such as one from\n`macro.images.generate()`, below the text.\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.\nThe webhook endpoint takes no images.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `body` | `string` \\| `RichMessage` |\n| `opts?` | \\{ `images?`: `StaticImage`[]; `thread?`: `Thread`; \\} |\n| `opts.images?` | `StaticImage`[] |\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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `ApiChannelDetail`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiChannelDetail` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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` | `\"start\"` \\| `\"stop\"` |\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**(): `AsyncGenerator`\\<`Channel`\\>\n\nEvery channel the authenticated user is a member of, auto-paginated.\nIterate with `for await`; collect with `Array.fromAsync`.\n\n#### Returns\n\n`AsyncGenerator`\\<`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 (case-insensitive substring match over every\nchannel the user is a member of) or 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`, `images?`): `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 takes content only: the `mentions` list, threads and\nimages are dropped. `<m-*>` mention tags in the content still render and\nnotify, because the server extracts a bot's mentions from its content. A\nuser-owned bot gets the full API by acting as its owner with `requestedAs`.\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 | Default value |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | `undefined` |\n| `target` | `Channel` \\| `Thread` | `undefined` |\n| `body` | `RichMessage` | `undefined` |\n| `images?` | `StaticImage`[] | `[]` |\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`, `opts?`): `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| `opts?` | \\{ `images?`: `StaticImage`[]; \\} | - |\n| `opts.images?` | `StaticImage`[] | Static images to attach, such as one from `macro.images.generate()`. |\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. The email is optional and need not\nmatch the company's domains, so personal addresses work too; omitting it\nadds the contact by name alone.\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` \\| `undefined`\\> | `...` | The CRM company this contact belongs to, if it has one. | - | - |\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` \\| `undefined`\\> | `...` | The contact's email address; absent for a contact added by name alone. | - | - |\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.blockDomain": "### blockDomain()\n\n> **blockDomain**(`domain`): `Promise`\\<`void`\\>\n\nBlock a domain (like `acme.com`): email sync skips it, and the company\nthat owns it, that company's contacts, and contacts without a company at\nthe domain are hidden. A contact attached to another company follows that\ncompany's domains. Requires a team admin or owner.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `domain` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "CrmNamespace.blockedDomains": "### blockedDomains()\n\n> **blockedDomains**(): `Promise`\\<`string`[]\\>\n\nThe domains the caller's current team keeps out of email sync.\n\n#### Returns\n\n`Promise`\\<`string`[]\\>",
- "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.createContact": "### createContact()\n\n> **createContact**(`opts`): `Promise`\\<`Contact`\\>\n\nCreate a contact without a company for the caller's current team. The\nemail is optional and may be at any domain. To add someone to a company,\nuse `Company.createContact`.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | `CreateCrmTeamContactRequest` |\n\n#### Returns\n\n`Promise`\\<`Contact`\\>",
- "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.unblockDomain": "### unblockDomain()\n\n> **unblockDomain**(`domain`): `Promise`\\<`void`\\>\n\nUnblock a domain: email sync resumes for addresses the team's\npersonal-email and generic-provider filters allow. Contacts without a\ncompany at this domain are shown again. Its company and attached contacts\nstay hidden until the company's last blocked domain is removed, then are\nshown even if hidden by hand before blocking. Requires a team admin or owner.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `domain` | `string` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "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.viewPositions": "### viewPositions()\n\n> **viewPositions**(`view`): `Promise`\\<`CardPosition`[]\\>\n\nSaved card order through this pipeline's authorization boundary.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `view` | `PipelineView` |\n\n#### Returns\n\n`Promise`\\<`CardPosition`[]\\>",
- "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.views": "### views()\n\n> **views**(): `Promise`\\<`PipelineView`[]\\>\n\nStored views in display order.\n\n#### Returns\n\n`Promise`\\<`PipelineView`[]\\>",
- "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`",
- "PipelineView": "# Class: PipelineView\n\nA view owned and authorized by its CRM pipeline.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | View identity within the pipeline. |\n| <a id=\"property-table\"></a> `table` | `readonly` | `PipelineTable` | The pipeline table this view shows. |",
- "PipelineView.detail": "### detail()\n\n> **detail**(): `Promise`\\<`storage.DatabaseView`\\>\n\nThe current view definition from the pipeline's shared schema cache.\n\n#### Returns\n\n`Promise`\\<`storage.DatabaseView`\\>",
- "PipelineView.positions": "### positions()\n\n> **positions**(): `Promise`\\<`CardPosition`[]\\>\n\nRead only cards with saved positions; unplaced cards are omitted.\nA saved lane may be stale after a row's grouping value changes outside a\ncard move. Compare each lane with the row's current grouping before using it.\n\n#### Returns\n\n`Promise`\\<`CardPosition`[]\\>",
- "PipelineView.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\nSerialize identity without an authenticated client.\n\n#### Returns\n\n\\{ `id`: `string`; `pipelineId`: `string`; `tableId`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `id` | `string` |\n| `pipelineId` | `string` |\n| `tableId` | `string` |",
- "PipelineView.byId": "### byId()\n\n> `static` **byId**(`table`, `id`): `PipelineView`\n\nA handle to a stored view within a pipeline table.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `table` | `PipelineTable` |\n| `id` | `string` |\n\n#### Returns\n\n`PipelineView`",
- "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.duplicate": "### duplicate()\n\n> **duplicate**(`options?`): `Promise`\\<`Database`\\>\n\nCopy the database into a new one the caller owns, with its tables,\ncolumns, views and rows. Its sharing, forms, webhooks and history stay\nwith this one. Viewing it is enough.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options?` | \\{ `name?`: `string`; \\} | - |\n| `options.name?` | `string` | The copy's name; by default, \"<name> copy\". |\n\n#### Returns\n\n`Promise`\\<`Database`\\>",
- "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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `DatabaseDetail`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DatabaseDetail` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe database's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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.\n\nA table the user names can be a tab inside a database with another name,\nso look through every database's tables before saying it does not exist.\nPerson columns hold user ids, never names: find people in `macro.people`,\nthen write their ids. Select the rows a write means first, then change\nexactly those by `row_id`, and read them back before saying it worked.\n\n```js\nconst databases = await macro.databases.list();\nconst matches = await Promise.all(\n databases.map(async (database) => ({ database, table: await database.table('Tickets') })),\n);\nconst { database } = matches.find((match) => match.table);\nconst people = await database.query(\n `SELECT id FROM macro.people WHERE email = '[email protected]'`,\n);\nconst sam = people.result?.rows[0]?.[0]?.value;\nconst open = await database.query(`SELECT row_id FROM \"Tickets\" WHERE \"Status\" = 'Open'`);\nconst ids = open.result?.rowHandles.map((row) => `'${row.id}'`).join(', ');\nawait database.query(`UPDATE \"Tickets\" SET \"Owner\" = '${sam}' WHERE row_id IN (${ids})`);\n```",
- "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.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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DocumentMetadataWithContent` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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\nA skill is a markdown document, so read one with `content()`, by the id of\na skill mention or of a search result:\n\n```js\nconst skill = macro.documents.byId(skillId);\nconst instructions = await skill.content();\n```\n\nRead a skill the request names before doing the task, and follow it for\nthat request only. `systemSkills()` lists the built-in skills, whose\ninstructions have no document; read those with the ReadSkill tool.\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, and\ntheir instructions are read with the ReadSkill tool, not `content()`.\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.downloadEml": "### downloadEml()\n\n> **downloadEml**(): `Promise`\\<`Blob`\\>\n\nThe message's original source, exactly as Gmail or Outlook holds it, as\n`message/rfc822` bytes for an `.eml` file. Drafts and messages still on\ntheir way have no source yet and fail with a 404.\n\n#### Returns\n\n`Promise`\\<`Blob`\\>\n\n#### Inherited from\n\n`EmailMessage.downloadEml`",
- "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.downloadEml": "### downloadEml()\n\n> **downloadEml**(): `Promise`\\<`Blob`\\>\n\nThe message's original source, exactly as Gmail or Outlook holds it, as\n`message/rfc822` bytes for an `.eml` file. Drafts and messages still on\ntheir way have no source yet and fail with a 404.\n\n#### Returns\n\n`Promise`\\<`Blob`\\>",
- "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. To find a person's emails,\nsearch for their quoted email address, not their name: a name only\nmatches where that display name appears. Resolve the address first, for\nexample with `macro.users.search(name)`.\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.readReceipts": "### readReceipts()\n\n> **readReceipts**(): `Promise`\\<`EmailReadReceipt`[]\\>\n\nOpens recorded for messages sent from the caller's own or delegated\ninboxes with read receipts on, newest message first. Counts are\napproximate: some mail apps prefetch images and others block them.\n\n#### Returns\n\n`Promise`\\<`EmailReadReceipt`[]\\>",
- "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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `ApiThread`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ApiThread` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe thread's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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`",
- "EmailReadReceipt": "# Interface: EmailReadReceipt\n\nOpen tracking for one of the caller's sent messages.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-firstopenedat\"></a> `firstOpenedAt?` | `string` | When the first counted fetch happened, if any. |\n| <a id=\"property-lastopenedat\"></a> `lastOpenedAt?` | `string` | When the latest counted fetch happened, if any. |\n| <a id=\"property-message\"></a> `message` | `EmailMessage` | The tracked message. |\n| <a id=\"property-opencount\"></a> `openCount` | `number` | Counted pixel fetches; repeats within a few seconds count once. |",
- "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- `ExternalChat`\n- `ForeignEntity`\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\"` \\| `\"external_chat\"` | 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- `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- `ExternalChatMessage`\n- `ExternalChatSend`\n- `Form`\n- `GithubPullRequest`\n- `Harness`\n- `HarnessPairing`\n- `Initiative`\n- `Meeting`\n- `MessageThread`\n- `Notification`\n- `Routine`\n- `AccessRequest`\n- `TeamInvite`\n- `Team`\n- `Webhook`\n- `WhatsAppAccount`\n- `WhatsAppChat`\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\"` \\| `\"external_chat\"` | 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.",
- "ExternalChat": "# Class: ExternalChat\n\nA chat from an external messaging provider (WhatsApp today), added to Macro\nby its owner and shareable like any other entity: a group or a direct chat.\n\n## Extends\n\n- `FavoritableEntity`\\<`ExternalChatDetail`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Overrides | Inherited from |\n| ------ | ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-backfill\"></a> `backfill` | `readonly` | () => `Promise`\\<`ExternalChatBackfill` \\| `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-disappearingseconds\"></a> `disappearingSeconds` | `readonly` | () => `Promise`\\<`number` \\| `undefined`\\> | The provider's disappearing-messages timer in seconds while on; Macro keeps the messages. | - | - |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | `\"external_chat\"` | 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`\\<`ExternalChatKind`\\> | `group`, or `direct` for a one-to-one chat (only its owner sends). | - | - |\n| <a id=\"property-limits\"></a> `limits` | `readonly` | () => `Promise`\\<`ExternalChatCapabilities`\\> | Supported sizes and mutation window. | - | - |\n| <a id=\"property-members\"></a> `members` | `readonly` | () => `Promise`\\<`ExternalChatMembers` \\| `undefined`\\> | Current remote members (name, participants, announce), when known. | - | - |\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 provider membership. | - | - |\n| <a id=\"property-participants\"></a> `participants` | `readonly` | () => `Promise`\\<`ExternalChatParticipant`[]\\> | Everyone in the chat, from its members; empty when none are known. | - | - |\n| <a id=\"property-provider\"></a> `provider` | `readonly` | () => `Promise`\\<`\"whatsapp\"`\\> | The messaging provider the chat lives in, such as `whatsapp`. | - | - |\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`\\<ExternalChatReplyBlock \\| null \\| undefined\\> \\| `undefined`\\> | Reason sending is blocked. | - | - |\n| <a id=\"property-unreadcount\"></a> `unreadCount` | `readonly` | () => `Promise`\\<`number`\\> | Per-user unread count. | - | - |",
- "ExternalChat.community": "### community()\n\n> **community**(): `Promise`\\<`WhatsAppCommunity` \\| `undefined`\\>\n\nThe community a group belongs to, if any: the community's own provider chat, its name, and whether this is its announcement group.\n\n#### Returns\n\n`Promise`\\<`WhatsAppCommunity` \\| `undefined`\\>",
- "ExternalChat.delivery": "### delivery()\n\n> **delivery**(`sends`): `Promise`\\<`ExternalChatSend`[]\\>\n\nRead delivery for selected caller-owned intents or messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sends` | (`ExternalChatMessage` \\| `ExternalChatSend`)[] |\n\n#### Returns\n\n`Promise`\\<`ExternalChatSend`[]\\>",
- "ExternalChat.favorite": "### favorite()\n\n> **favorite**(): `Promise`\\<`ExternalChat`\\>\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`\\<`ExternalChat`\\>\n\n#### Inherited from\n\n`FavoritableEntity.favorite`",
- "ExternalChat.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` | `ExternalChatMessage` |\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "ExternalChat.messageAttachments": "### messageAttachments()\n\n> **messageAttachments**(`messages`): `Promise`\\<\\{ `attachments`: \\{ `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: `ExternalChatAttachmentState`; `url`: `string` \\| `undefined`; \\}[]; `message`: `ExternalChatMessage`; \\}[]\\>\n\nRead attachment states for selected messages.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `messages` | `ExternalChatMessage`[] |\n\n#### Returns\n\n`Promise`\\<\\{ `attachments`: \\{ `fileName`: `string`; `mime`: `string`; `ordinal`: `number`; `size`: `number`; `state`: `ExternalChatAttachmentState`; `url`: `string` \\| `undefined`; \\}[]; `message`: `ExternalChatMessage`; \\}[]\\>",
- "ExternalChat.messages": "### messages()\n\n> **messages**(`options?`): `AsyncGenerator`\\<`ExternalChatMessage`\\>\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`\\<`ExternalChatMessage`\\>",
- "ExternalChat.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`",
- "ExternalChat.permissions": "### permissions()\n\n> **permissions**(): `Promise`\\<`storage.SharePermissionV2`\\>\n\nRead standard link/team sharing settings.\n\n#### Returns\n\n`Promise`\\<`storage.SharePermissionV2`\\>",
- "ExternalChat.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`ExternalChat`\\>\n\nReload detail, permissions and caller capabilities.\n\n#### Returns\n\n`Promise`\\<`ExternalChat`\\>",
- "ExternalChat.remove": "### remove()\n\n> **remove**(): `Promise`\\<`void`\\>\n\nOwner stops syncing the chat; history and established sharing stay.\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "ExternalChat.send": "### send()\n\n> **send**(`content`, `options`): `Promise`\\<`ExternalChatSend`\\>\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` | `ExternalChatContent` |\n| `options` | \\{ `idempotencyKey`: `string`; `replyTo?`: `ExternalChatMessage`; \\} |\n| `options.idempotencyKey` | `string` |\n| `options.replyTo?` | `ExternalChatMessage` |\n\n#### Returns\n\n`Promise`\\<`ExternalChatSend`\\>",
- "ExternalChat.sends": "### sends()\n\n> **sends**(): `Promise`\\<`ExternalChatSend`[]\\>\n\nRead only the caller's pending, uncertain or failed sends.\n\n#### Returns\n\n`Promise`\\<`ExternalChatSend`[]\\>",
- "ExternalChat.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ExternalChatDetail`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ExternalChatDetail`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ExternalChatDetail` |\n| `id` | `string` |\n\n#### Inherited from\n\n`FavoritableEntity.toJSON`",
- "ExternalChat.unfavorite": "### unfavorite()\n\n> **unfavorite**(): `Promise`\\<`ExternalChat`\\>\n\nRemove this entity from the user's favorites. Returns this handle for chaining.\n\n#### Returns\n\n`Promise`\\<`ExternalChat`\\>\n\n#### Inherited from\n\n`FavoritableEntity.unfavorite`",
- "ExternalChat.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`\\>",
- "ExternalChat.upload": "### upload()\n\n> **upload**(`file`): `Promise`\\<`ExternalChatUpload`\\>\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`\\<`ExternalChatUpload`\\>",
- "ExternalChat.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `ExternalChat`\n\nReference an added chat; 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`ExternalChat`",
- "ExternalChatContent": "# Type Alias: ExternalChatContent\n\n> **ExternalChatContent** = \\{ `mentions?`: `ExternalChatParticipant`[]; `text`: `string`; `type`: `\"text\"`; \\} \\| \\{ `caption?`: `string`; `type`: `\"media\"`; `upload`: `ExternalChatUpload`; \\} \\| \\{ `message`: `ExternalChatMessage`; `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}\n\nDeliberate content sent from the credential owner's own provider account.\n\n## Union Members\n\n### Type Literal\n\n\\{ `mentions?`: `ExternalChatParticipant`[]; `text`: `string`; `type`: `\"text\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `mentions?` | `ExternalChatParticipant`[] | 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`: `ExternalChatUpload`; \\}\n\n***\n\n### Type Literal\n\n\\{ `message`: `ExternalChatMessage`; `operation`: `\"reaction\"` \\| `\"edit\"` \\| `\"delete\"`; `text?`: `string`; `type`: `\"mutation\"`; \\}",
- "ExternalChatMessage": "# Class: ExternalChatMessage\n\nMessage in an added external chat.\n\n## Extends\n\n- `MacroEntity`\\<`storage.ExternalChatMessage`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-attachments\"></a> `attachments` | `readonly` | () => `Promise`\\<\\{ `durationSeconds`: `number` \\| `undefined`; `fileName`: `string`; `height`: `number` \\| `undefined`; `mime`: `string`; `ordinal`: `number`; `presentation`: `ExternalChatMediaPresentation` \\| `undefined`; `size`: `number`; `state`: `ExternalChatAttachmentState`; `url`: `string` \\| `undefined`; `width`: `number` \\| `undefined`; \\}[]\\> | Attachment states, with the stored file's URL once ready. | - |\n| <a id=\"property-body\"></a> `body` | `readonly` | () => `Promise`\\<`string`\\> | Plain message text. | - |\n| <a id=\"property-chat\"></a> `chat` | `readonly` | `ExternalChat` | The chat this message is in. | - |\n| <a id=\"property-deleted\"></a> `deleted` | `readonly` | () => `Promise`\\<`boolean`\\> | Deleted for everyone. | - |\n| <a id=\"property-deliverystate\"></a> `deliveryState` | `readonly` | () => `Promise`\\<`NonNullable`\\<ExternalChatDeliveryState \\| 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-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`ExternalChatMessageKind`\\> | `message`, or `system` for something that happened in the chat (see `rich`). | - |\n| <a id=\"property-mentions\"></a> `mentions` | `readonly` | () => `Promise`\\<`ExternalChatMention`[]\\> | People the body @-mentions: `@<token>` in the body is this person. | - |\n| <a id=\"property-reactions\"></a> `reactions` | `readonly` | () => `Promise`\\<`ExternalChatReaction`[]\\> | Grouped emoji counts and caller's own reaction. | - |\n| <a id=\"property-replyto\"></a> `replyTo` | `readonly` | () => `Promise`\\<`ExternalChatMessage` \\| `undefined`\\> | Quoted message in this chat. | - |\n| <a id=\"property-rich\"></a> `rich` | `readonly` | () => `Promise`\\<`NonNullable`\\<ExternalChatRichContent \\| null \\| undefined\\> \\| `undefined`\\> | Poll (with tallies), location, contact cards, event or system line. | - |\n| <a id=\"property-sender\"></a> `sender` | `readonly` | () => `Promise`\\<`ExternalChatSender`\\> | Protocol-verified sender association and display name. | - |\n| <a id=\"property-sentat\"></a> `sentAt` | `readonly` | () => `Promise`\\<`string`\\> | Provider timestamp. | - |\n| <a id=\"property-viewonce\"></a> `viewOnce` | `readonly` | () => `Promise`\\<`boolean`\\> | Sent as view-once in the provider; Macro keeps and shows it like any media. | - |",
- "ExternalChatMessage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `storage.ExternalChatMessage`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.ExternalChatMessage`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.ExternalChatMessage` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",
- "ExternalChatMessage.byId": "### byId()\n\n> `static` **byId**(`client`, `chat`, `id`): `ExternalChatMessage`\n\nReference a message within its original chat.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `chat` | `ExternalChat` |\n| `id` | `string` |\n\n#### Returns\n\n`ExternalChatMessage`",
- "ExternalChatMessage.from": "### from()\n\n> `static` **from**(`client`, `chat`, `record`): `ExternalChatMessage`\n\nSeed a message handle from a timeline response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `chat` | `ExternalChat` |\n| `record` | `storage.ExternalChatMessage` |\n\n#### Returns\n\n`ExternalChatMessage`",
- "ExternalChatsNamespace": "# Class: ExternalChatsNamespace\n\nChats from external messaging providers (WhatsApp today) that someone added\nto Macro: read, share and send in them. Find and add a provider's chats\nthrough its own namespace, such as `macro.whatsapp.chats()`.",
- "ExternalChatsNamespace.byId": "### byId()\n\n> **byId**(`id`): `ExternalChat`\n\nReference an added chat without fetching it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n`ExternalChat`",
- "ExternalChatsNamespace.list": "### list()\n\n> **list**(): `Promise`\\<`ExternalChat`[]\\>\n\nAdded chats the caller can view, including without a provider account of their own.\n\n#### Returns\n\n`Promise`\\<`ExternalChat`[]\\>",
- "ExternalChatParticipant": "# Class: ExternalChatParticipant\n\nSomeone in an added external chat, from its members; mention them in a text reply.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-chat\"></a> `chat` | `readonly` | `ExternalChat` | The chat whose members list them. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Their provider id (a WhatsApp JID): 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 its members.\n\n##### Returns\n\n`boolean` \\| `undefined`\n\n***\n\n### displayName\n\n#### Get Signature\n\n> **get** **displayName**(): `string` \\| `undefined`\n\nTheir provider display name, untrusted, when known.\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`",
- "ExternalChatParticipant.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `admin`: `boolean` \\| `undefined`; `chat`: `string`; `displayName`: `string` \\| `undefined`; `id`: `string`; \\}\n\nSerialize the participant reference without credentials.\n\n#### Returns\n\n\\{ `admin`: `boolean` \\| `undefined`; `chat`: `string`; `displayName`: `string` \\| `undefined`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `admin` | `boolean` \\| `undefined` |\n| `chat` | `string` |\n| `displayName` | `string` \\| `undefined` |\n| `id` | `string` |",
- "ExternalChatParticipant.byId": "### byId()\n\n> `static` **byId**(`chat`, `id`): `ExternalChatParticipant`\n\nReference a participant of a chat by provider id.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `chat` | `ExternalChat` |\n| `id` | `string` |\n\n#### Returns\n\n`ExternalChatParticipant`",
- "ExternalChatParticipant.from": "### from()\n\n> `static` **from**(`chat`, `record`): `ExternalChatParticipant`\n\nSeed a participant from the chat's members.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `chat` | `ExternalChat` |\n| `record` | `storage.ExternalChatParticipant` |\n\n#### Returns\n\n`ExternalChatParticipant`",
- "ExternalChatSend": "# Class: ExternalChatSend\n\nOne deliberate send intent. Unknown outcomes must never be automatically resent.\n\n## Extends\n\n- `MacroEntity`\\<`ExternalChatSendProgress`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-chat\"></a> `chat` | `readonly` | `ExternalChat` | The chat containing this send. | - |\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-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-message\"></a> `message` | `readonly` | () => `Promise`\\<`ExternalChatMessage` \\| `undefined`\\> | Chat message once the provider accepted the send. | - |\n| <a id=\"property-state\"></a> `state` | `readonly` | () => `Promise`\\<`ExternalChatDeliveryState`\\> | Last observed delivery state; refresh explicitly to poll again. | - |",
- "ExternalChatSend.refresh": "### refresh()\n\n> **refresh**(): `Promise`\\<`ExternalChatSend`\\>\n\nFetch current delivery state without retrying or submitting the message.\n\n#### Returns\n\n`Promise`\\<`ExternalChatSend`\\>",
- "ExternalChatSend.request": "### request()\n\n> **request**(): `Promise`\\<\\{ `idempotencyKey`: `string`; `message`: `ExternalChatContent`; `replyTo?`: `ExternalChatMessage`; \\}\\>\n\nInspect the original intent for reconciliation; never resubmit an unknown outcome automatically.\n\n#### Returns\n\n`Promise`\\<\\{ `idempotencyKey`: `string`; `message`: `ExternalChatContent`; `replyTo?`: `ExternalChatMessage`; \\}\\>",
- "ExternalChatSend.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ExternalChatSendProgress`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `ExternalChatSendProgress`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ExternalChatSendProgress` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",
- "ExternalChatSend.byId": "### byId()\n\n> `static` **byId**(`client`, `chat`, `id`): `ExternalChatSend`\n\nReference a send intent within its original chat.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `chat` | `ExternalChat` |\n| `id` | `string` |\n\n#### Returns\n\n`ExternalChatSend`",
- "ExternalChatSend.from": "### from()\n\n> `static` **from**(`client`, `chat`, `record`): `ExternalChatSend`\n\nSeed a send handle from a server response.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `chat` | `ExternalChat` |\n| `record` | `ExternalChatSendProgress` |\n\n#### Returns\n\n`ExternalChatSend`",
- "ExternalChatUpload": "# Class: ExternalChatUpload\n\nA staged attachment scoped to one added chat; use it in a deliberate media send.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-chat\"></a> `chat` | `readonly` | `ExternalChat` | The chat this upload can be sent to. |\n| <a id=\"property-filename\"></a> `filename?` | `readonly` | `string` | Display filename supplied by the server. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Correlation identity of the staged upload. |\n| <a id=\"property-kind\"></a> `kind?` | `readonly` | `ExternalChatMediaKind` | Media category supplied by the server. |",
- "ExternalChatUpload.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `chat`: `string`; `filename`: `string` \\| `undefined`; `id`: `string`; `kind`: `ExternalChatMediaKind` \\| `undefined`; \\}\n\nSerialize the upload reference without credentials.\n\n#### Returns\n\n\\{ `chat`: `string`; `filename`: `string` \\| `undefined`; `id`: `string`; `kind`: `ExternalChatMediaKind` \\| `undefined`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `chat` | `string` |\n| `filename` | `string` \\| `undefined` |\n| `id` | `string` |\n| `kind` | `ExternalChatMediaKind` \\| `undefined` |",
- "ExternalChatUpload.byId": "### byId()\n\n> `static` **byId**(`chat`, `id`): `ExternalChatUpload`\n\nReference a previously staged upload in its original chat.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `chat` | `ExternalChat` |\n| `id` | `string` |\n\n#### Returns\n\n`ExternalChatUpload`",
- "ExternalChatUpload.from": "### from()\n\n> `static` **from**(`chat`, `record`): `ExternalChatUpload`\n\nSeed a handle from the server's upload receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `chat` | `ExternalChat` |\n| `record` | `ExternalChatUploadedAttachment` |\n\n#### Returns\n\n`ExternalChatUpload`",
- "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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `FormDetail`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `FormDetail` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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** = `SavedFormResponse` \\| \\{ `kind`: `\"anonymous\"`; \\}\n\nThe caller's receipt and current answers, read without access to other\nresponses. On an anonymous form the caller only learns that they\nresponded: nothing links them to their response.",
- "SavedFormResponse": "# Type Alias: SavedFormResponse\n\n> **SavedFormResponse** = \\{ `answers`: `FormAnswer`[]; `booking?`: `FormBookingStep`; `kind`: `\"saved\"`; `response`: `FormResponse`; `row?`: `DatabaseRow`; `status`: `ResponseStatus`; `stoppedAtSection?`: `FormSection`; `submittedAt`: `string`; `updatedAt`: `string`; \\}\n\nThe caller's saved response to a form that isn't anonymous.\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-kind\"></a> `kind` | `\"saved\"` |\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`",
- "GeneratedImage": "# Class: GeneratedImage\n\nAn image made by `macro.images.generate()`, stored as a static file.\n\n## Extends\n\n- `StaticImage`\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-height\"></a> `height` | `readonly` | `number` | Intrinsic pixel height. | `StaticImage.height` |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Static file id. | `StaticImage.id` |\n| <a id=\"property-mimetype\"></a> `mimeType` | `readonly` | `string` | IANA media type, e.g. `image/png`. | - |\n| <a id=\"property-note\"></a> `note?` | `readonly` | `string` | Commentary the model returned alongside the image, if any. | - |\n| <a id=\"property-sizebytes\"></a> `sizeBytes` | `readonly` | `number` | Size of the image in bytes. | - |\n| <a id=\"property-url\"></a> `url` | `readonly` | `string` | Permanent URL of the image bytes. | `StaticImage.url` |\n| <a id=\"property-width\"></a> `width` | `readonly` | `number` | Intrinsic pixel width. | `StaticImage.width` |",
- "GeneratedImage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `height`: `number` \\| `undefined`; `id`: `string`; `mimeType`: `string`; `note`: `string` \\| `undefined`; `sizeBytes`: `number`; `url`: `string`; `width`: `number` \\| `undefined`; \\}\n\nSerialize the generated image without its client.\n\n#### Returns\n\n\\{ `height`: `number` \\| `undefined`; `id`: `string`; `mimeType`: `string`; `note`: `string` \\| `undefined`; `sizeBytes`: `number`; `url`: `string`; `width`: `number` \\| `undefined`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `height` | `number` \\| `undefined` |\n| `id` | `string` |\n| `mimeType` | `string` |\n| `note` | `string` \\| `undefined` |\n| `sizeBytes` | `number` |\n| `url` | `string` |\n| `width` | `number` \\| `undefined` |\n\n#### Overrides\n\n`StaticImage.toJSON`",
- "GeneratedImage.byId": "### byId()\n\n> `static` **byId**(`client`, `id`, `size?`): `StaticImage`\n\nA handle to an image already in static file storage. Pass `width` and\n`height` when you know them, so a message reserves the image's space\nbefore it loads.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `size?` | \\{ `height`: `number`; `width`: `number`; \\} |\n| `size.height` | `number` |\n| `size.width` | `number` |\n\n#### Returns\n\n`StaticImage`\n\n#### Inherited from\n\n`StaticImage.byId`",
- "StaticImage": "# Class: StaticImage\n\nAn image in static file storage: an upload, or one made with\n`macro.images.generate()`. Attach it to a channel message with\n`channel.send(text, { images: [image] })`, or pass it back to `generate` as\na reference.\n\n## Extended by\n\n- `GeneratedImage`\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-height\"></a> `height?` | `readonly` | `number` | Intrinsic pixel height, when known. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | Static file id. |\n| <a id=\"property-url\"></a> `url` | `readonly` | `string` | Permanent URL of the image bytes. |\n| <a id=\"property-width\"></a> `width?` | `readonly` | `number` | Intrinsic pixel width, when known; lets messages reserve space. |",
- "StaticImage.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `height`: `number` \\| `undefined`; `id`: `string`; `url`: `string`; `width`: `number` \\| `undefined`; \\}\n\nSerialize the image reference without its client.\n\n#### Returns\n\n\\{ `height`: `number` \\| `undefined`; `id`: `string`; `url`: `string`; `width`: `number` \\| `undefined`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `height` | `number` \\| `undefined` |\n| `id` | `string` |\n| `url` | `string` |\n| `width` | `number` \\| `undefined` |",
- "StaticImage.byId": "### byId()\n\n> `static` **byId**(`client`, `id`, `size?`): `StaticImage`\n\nA handle to an image already in static file storage. Pass `width` and\n`height` when you know them, so a message reserves the image's space\nbefore it loads.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n| `size?` | \\{ `height`: `number`; `width`: `number`; \\} |\n| `size.height` | `number` |\n| `size.width` | `number` |\n\n#### Returns\n\n`StaticImage`",
- "ImagesNamespace": "# Class: ImagesNamespace\n\nImage generation, charged to the acting user's AI allowance.",
- "ImagesNamespace.generate": "### generate()\n\n> **generate**(`options`): `Promise`\\<`GeneratedImage`\\>\n\nGenerate or edit an image with Google's Nano Banana model and store it as\na static file. Takes several seconds. Post it with\n`channel.send(text, { images: [image] })`; the returned width and height\nlet the message reserve space before the image loads.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `GenerateImageOptions` |\n\n#### Returns\n\n`Promise`\\<`GeneratedImage`\\>\n\n#### Example\n\n```ts\nconst image = await macro.images.generate({\n prompt: 'A watercolor lighthouse at dusk',\n aspectRatio: 'widescreen',\n});\nawait channel.send('Fresh off the press', { images: [image] });\n```",
- "GenerateImageOptions": "# Interface: GenerateImageOptions\n\nWhat image to generate.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-aspectratio\"></a> `aspectRatio?` | `GenerateImageAspectRatio` | Shape of the image: `square` (1:1, the default), `landscape` (4:3), `portrait` (3:4), `widescreen` (16:9, banners and slides) or `tall` (9:16, phone screens and stories). |\n| <a id=\"property-prompt\"></a> `prompt` | `string` | Description of the image: subject, style (photo, illustration, flat vector...), composition, colours, mood, and any text that must appear. |\n| <a id=\"property-referenceimages\"></a> `referenceImages?` | (`StaticImage` \\| `Document`)[] | Up to three images to edit or draw from, in the order the prompt refers to them (\"image 1\", \"image 2\"): image documents the caller can view, or static images such as an earlier generation or an attachment. |",
- "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. For their names, pass them to `macro.tasks.summaries` (one request) instead of calling `name()` on each. | - |",
- "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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `InitiativeDetail`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `InitiativeDetail` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe initiative's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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; find one by name with one\n`summaries()` call, not `name()` on each listed handle (one request each).",
- "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 as handles; use `summaries()` for their names.\n\n#### Returns\n\n`Promise`\\<`Initiative`[]\\>",
- "InitiativeNamespace.summaries": "### summaries()\n\n> **summaries**(): `Promise`\\<`InitiativeSummary`[]\\>\n\nEvery accessible initiative with its name, in one request.\n\n#### Returns\n\n`Promise`\\<`InitiativeSummary`[]\\>",
- "InitiativeSummary": "# Interface: InitiativeSummary\n\nAn initiative with the name and update time its listing already carries.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-initiative\"></a> `initiative` | `Initiative` |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` |",
- "MeNamespace": "# Class: MeNamespace\n\nThe authenticated user's own profile.",
- "MeNamespace.update": "### update()\n\n> **update**(`options`): `Promise`\\<`void`\\>\n\nSet your display name and profile picture. Agents should do this after\nsigning in, so teammates can tell who they are working with.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `UpdateMeOptions` |\n\n#### Returns\n\n`Promise`\\<`void`\\>\n\n#### Example\n\n```ts\nconst image = await macro.me.uploadProfilePicture(bytes, {\n fileName: 'avatar.png',\n contentType: 'image/png',\n});\nawait macro.me.update({ name: 'Research Agent', profilePicture: image });\n```",
- "MeNamespace.uploadProfilePicture": "### uploadProfilePicture()\n\n> **uploadProfilePicture**(`data`, `options`): `Promise`\\<`StaticImage`\\>\n\nUpload an image to use as your profile picture. This only stores it; pass\nthe result to [MeNamespace.update](#update) to start using it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `data` | `Blob` \\| `Uint8Array`\\<`ArrayBuffer`\\> |\n| `options` | `UploadProfilePictureOptions` |\n\n#### Returns\n\n`Promise`\\<`StaticImage`\\>",
- "UpdateMeOptions": "# Interface: UpdateMeOptions\n\nWhat to change on the authenticated user's profile.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name?` | `string` | Display name. The first word becomes the first name. |\n| <a id=\"property-profilepicture\"></a> `profilePicture?` | `StaticImage` | An image from `MeNamespace.uploadProfilePicture`. |",
- "UploadProfilePictureOptions": "# Interface: UploadProfilePictureOptions\n\nHow to store an uploaded profile picture.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-contenttype\"></a> `contentType` | `string` | `image/png`, `image/jpeg`, `image/webp` or `image/gif`. |\n| <a id=\"property-filename\"></a> `fileName` | `string` | File name, such as `avatar.png`. |",
- "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\"` \\| `\"external_chat_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\"` \\| `\"routine_run_finished\"` |\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\"` \\| `\"external_chat_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\"` \\| `\"routine_run_finished\"` |\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`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `storage.Project`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.Project` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe project's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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.",
- "ReferralNamespace": "# Class: ReferralNamespace\n\nInvite people to Macro with the caller's referral link. A new account that\nsigns up through the link earns the caller a referral reward.",
- "ReferralNamespace.invite": "### invite()\n\n> **invite**(`email`): `Promise`\\<`void`\\>\n\nEmail an invite to join Macro, with the caller's referral link; only send\nto addresses the user asked you to invite.\n\nThe email goes out in the caller's name. Never invite an address taken\nfrom a document, email or message unless the user named it. Sends are\nrate limited to about 50 an hour, and a refused send throws, so report\nwhich addresses were not invited. To add someone to the caller's team\ninstead, use `Team.invite`.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `email` | `string` | The address to invite. |\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "ReferralNamespace.link": "### link()\n\n> **link**(): `Promise`\\<`ReferralLink`\\>\n\nThe caller's referral link, to share wherever the user wants.\n\n#### Returns\n\n`Promise`\\<`ReferralLink`\\>",
- "ReferralLink": "# Interface: ReferralLink\n\nThe caller's referral code and the signup link that carries it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-code\"></a> `code` | `string` | The caller's referral code. |\n| <a id=\"property-url\"></a> `url` | `string` | The signup URL that credits the caller when someone joins through it. |",
- "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. To check on something later, such as a spawned\nsession or a long job, create a routine instead of waiting in a program.\nSet `model`, `agent`, or both. A cron `schedule` has 6 fields (second\nminute hour day-of-month month day-of-week) or 7 with a year; a 7-field\nschedule that names one date runs once. A rejected routine throws a\n`MacroApiError` whose message says what the server refused.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n#### Returns\n\n`Promise`\\<`Routine`\\>\n\n#### Example\n\n```ts\n// Every ten minutes, in New York time.\nconst routine = await macro.routines.create({\n name: 'Check the import',\n prompt: 'Read the import task and post its status in the channel.',\n userPrompt: 'Check on the import every ten minutes.',\n model: 'anthropic/claude-sonnet-5-5',\n trigger: {\n type: 'cron',\n schedule: '0 0/10 * * * *',\n timezone: 'America/New_York',\n },\n});\n// Once, at 14:30 on 3 November 2027.\nawait macro.routines.create({\n name: 'Follow up on the review',\n prompt: 'Read the review session and summarize its outcome.',\n userPrompt: 'Follow up on the review on 3 November 2027.',\n model: 'anthropic/claude-sonnet-5-5',\n trigger: { type: 'cron', schedule: '0 30 14 3 11 * 2027', timezone: 'UTC' },\n});\n```",
- "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-sourcetemplate\"></a> `sourceTemplate` | `readonly` | () => `Promise`\\<`Routine` \\| `undefined`\\> | The shared routine whose template this routine was activated from. | - |\n| <a id=\"property-trigger\"></a> `trigger` | `readonly` | () => `Promise`\\<`ActionTrigger`\\> | Configured triggers. | - |",
- "Routine.activateTemplate": "### activateTemplate()\n\n> **activateTemplate**(`options`): `Promise`\\<`Routine`\\>\n\nCreate the caller's own routine from this routine's shared template, with\nits references already filled in for them.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n#### Returns\n\n`Promise`\\<`Routine`\\>",
- "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.shareAsTemplate": "### shareAsTemplate()\n\n> **shareAsTemplate**(`options`): `Promise`\\<`RoutineTemplate`\\>\n\nShare this routine as a template, or update its shared snapshot. People\nget the template, never the routine, its runs or its results.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `options` | \\{ `description`: `string`; `variables`: `TemplateVariable`[]; \\} | - |\n| `options.description` | `string` | What the routine does for someone. |\n| `options.variables` | `TemplateVariable`[] | How each user-specific reference fills in when someone activates it. |\n\n#### Returns\n\n`Promise`\\<`RoutineTemplate`\\>",
- "Routine.stopSharingTemplate": "### stopSharingTemplate()\n\n> **stopSharingTemplate**(): `Promise`\\<`void`\\>\n\nStop sharing this routine. Routines already activated keep running.\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "Routine.template": "### template()\n\n> **template**(): `Promise`\\<`RoutineTemplate` \\| `undefined`\\>\n\nThis routine's shared template, or `undefined` when it isn't shared.\n\n#### Returns\n\n`Promise`\\<`RoutineTemplate` \\| `undefined`\\>",
- "Routine.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `ScheduledActionResponse`; `id`: `string`; `url`: `string`; \\}\n\nIdentity, loaded detail and [webUrl](#weburl), so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `ScheduledActionResponse`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `ScheduledActionResponse` |\n| `id` | `string` |\n| `url` | `string` |\n\n#### Overrides\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.webUrl": "### webUrl()\n\n> **webUrl**(): `string`\n\nThe routine's URL in the Macro web app; hand it to users as the link.\n\n#### Returns\n\n`string`",
- "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` | - |",
- "RoutineTemplate": "# Class: RoutineTemplate\n\nA routine shared as a template, which people activate as their own routine.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-author\"></a> `author` | `readonly` | `User` | Who shared it. |\n| <a id=\"property-record\"></a> `record` | `readonly` | `scheduled-action.RoutineTemplate` | Template snapshot. |\n| <a id=\"property-routine\"></a> `routine` | `readonly` | `Routine` | The shared routine. |",
- "RoutineTemplate.activate": "### activate()\n\n> **activate**(`options`): `Promise`\\<`Routine`\\>\n\nCreate the caller's own routine from this template, with its references\nalready filled in for them.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | `RoutineOptions` |\n\n#### Returns\n\n`Promise`\\<`Routine`\\>",
- "RoutineTemplate.toJSON": "### toJSON()\n\n> **toJSON**(): `scheduled-action.RoutineTemplate`\n\nSerialize without the authenticated client.\n\n#### Returns\n\n`scheduled-action.RoutineTemplate`",
- "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: a built-in agent, or one the caller owns or can use, including one on a self-hosted runtime. Access is checked on save and again on every run. Set `model`, `agent`, or both. |\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 to run the task, e.g. `anthropic/claude-sonnet-5-5`, or the model override for `agent`. Set `model`, `agent`, or both. |\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. A cron `schedule` has 6 or 7 fields: `sec min hour day-of-month month day-of-week [year]`. |\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.request": "### request()\n\n> **request**(`requestedLevel`): `Promise`\\<`AccessRequest`\\>\n\nAsk the item's reviewers for more access in the caller's name, as the Share\nmenu's Request access does, superseding the caller's latest request.\n\nAgents: call this only when the user asked for it or agreed after being\noffered it, typically after a write failed with `MacroForbiddenError`\nbecause the user can only view the item; never request access on your\nown. It never grants access: the request stays pending until a reviewer\ndecides. Tell the user it is pending and who reviews it (`state().owner`),\ndo not claim the failed write succeeded, check `state()` later (`mine`\nholds this request's `status()`), and retry the write only once\n`state().accessLevel` allows it.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `requestedLevel` | `\"view\"` \\| `\"comment\"` \\| `\"edit\"` |\n\n#### Returns\n\n`Promise`\\<`AccessRequest`\\>",
- "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\n\nTasks: one `create` call sets initiative, assignees and due date; one\n`summaries` call reads many names (`name()` loads each whole document).\nCreating a task needs only what the request states; don't research what it\ndescribes unless asked.",
- "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, with its initiative, assignees and due date in the same\nrequest. The task starts Not started.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `opts` | \\{ `assignees?`: `User`[]; `dueDate?`: `Date`; `initiative?`: `Initiative`; `markdown?`: `string`; `name`: `string`; `project?`: `Project`; `shareWithTeam?`: `boolean`; `team?`: `Team`; \\} | - |\n| `opts.assignees?` | `User`[] | Assignees; defaults to the creator. Pass `[]` to leave it unassigned. |\n| `opts.dueDate?` | `Date` | - |\n| `opts.initiative?` | `Initiative` | The initiative (shown as the task's Project in the app) it belongs to. |\n| `opts.markdown?` | `string` | - |\n| `opts.name` | `string` | - |\n| `opts.project?` | `Project` | Folder the task document is filed in; unrelated to `initiative`. |\n| `opts.shareWithTeam?` | `boolean` | Defaults to true. |\n| `opts.team?` | `Team` | Scopes the team task number; may be omitted when the creator belongs to exactly one team. |\n\n#### Returns\n\n`Promise`\\<`Task`\\>",
- "TaskNamespace.findSimilar": "### findSimilar()\n\n> **findSimilar**(`opts`): `Promise`\\<`SimilarTask`[]\\>\n\nExisting tasks of yours or your team's that look like the same work as a\ntask with this title and body, most similar first. Call it in the same\nprogram as `create`: create only when nothing is a likely duplicate, and\notherwise return the matches and ask the user instead of creating.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `opts` | \\{ `body?`: `string`; `title`: `string`; \\} |\n| `opts.body?` | `string` |\n| `opts.title` | `string` |\n\n#### Returns\n\n`Promise`\\<`SimilarTask`[]\\>",
- "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`\\>",
- "TaskNamespace.summaries": "### summaries()\n\n> **summaries**(`tasks`): `Promise`\\<`TaskSummary`[]\\>\n\nNames and state of many tasks in one request, in the order given. Tasks\nthat no longer exist are left out.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `tasks` | `Task`[] |\n\n#### Returns\n\n`Promise`\\<`TaskSummary`[]\\>",
- "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.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`; `url`: `string`; \\}\n\nIdentity, loaded detail and `Document.webUrl`, so serialized handles carry their link.\n\n#### Returns\n\n\\{ `detail?`: `DocumentMetadataWithContent`; `id`: `string`; `url`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `DocumentMetadataWithContent` |\n| `id` | `string` |\n| `url` | `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, with its initiative, assignees and due date in the same\nrequest. The task starts Not started.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `client` | `MacroClient` | - |\n| `opts` | \\{ `assignees?`: `User`[]; `dueDate?`: `Date`; `initiative?`: `Initiative`; `markdown?`: `string`; `name`: `string`; `project?`: `Project`; `shareWithTeam?`: `boolean`; `team?`: `Team`; \\} | - |\n| `opts.assignees?` | `User`[] | Assignees; defaults to the creator. Pass `[]` to leave it unassigned. |\n| `opts.dueDate?` | `Date` | - |\n| `opts.initiative?` | `Initiative` | The initiative (shown as the task's Project in the app) it belongs to. |\n| `opts.markdown?` | `string` | - |\n| `opts.name` | `string` | - |\n| `opts.project?` | `Project` | Folder the task document is filed in; unrelated to `initiative`. |\n| `opts.shareWithTeam?` | `boolean` | Defaults to true. |\n| `opts.team?` | `Team` | Scopes the team task number; may be omitted when the creator belongs to exactly one 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.findSimilar": "### findSimilar()\n\n> `static` **findSimilar**(`client`, `opts`): `Promise`\\<`SimilarTask`[]\\>\n\nExisting tasks of the caller or their team that look like the same work\nas a task with this title and body, most similar first. Creates and\nchanges nothing; check it before creating a task.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `opts` | \\{ `body?`: `string`; `title`: `string`; \\} |\n| `opts.body?` | `string` |\n| `opts.title` | `string` |\n\n#### Returns\n\n`Promise`\\<`SimilarTask`[]\\>",
- "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`",
- "Task.summaries": "### summaries()\n\n> `static` **summaries**(`client`, `tasks`): `Promise`\\<`TaskSummary`[]\\>\n\nNames and state of many tasks in one request, in the order given. Tasks\nthat no longer exist are left out.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `tasks` | `Task`[] |\n\n#### Returns\n\n`Promise`\\<`TaskSummary`[]\\>",
- "SimilarTask": "# Interface: SimilarTask\n\nAn existing task that looks like the same work as a proposed one.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-name\"></a> `name` | `string` | The existing task's name. |\n| <a id=\"property-similarity\"></a> `similarity` | `number` | Cosine similarity of the two tasks' embeddings, from 0 to 1. |\n| <a id=\"property-task\"></a> `task` | `Task` | The existing task. |",
- "TaskSummary": "# Interface: TaskSummary\n\nA task's name and state from one batched read, without its content.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-completed\"></a> `completed` | `boolean` |\n| <a id=\"property-name\"></a> `name` | `string` |\n| <a id=\"property-owner\"></a> `owner` | `User` |\n| <a id=\"property-task\"></a> `task` | `Task` |\n| <a id=\"property-updatedat\"></a> `updatedAt?` | `string` |",
- "TeamInvite": "# Class: TeamInvite\n\nA pending invite to the caller's current team. Reading and revoking invites\nrequires a team admin or owner; `Team.invite` sends new ones.\n\n## Extends\n\n- `MacroEntity`\\<`TeamInviteDetails`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-createdat\"></a> `createdAt` | `readonly` | () => `Promise`\\<`string`\\> | When the invite was created, as an ISO 8601 timestamp. | - |\n| <a id=\"property-email\"></a> `email` | `readonly` | () => `Promise`\\<`string`\\> | The invited email address. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-invitedby\"></a> `invitedBy` | `readonly` | () => `Promise`\\<`User`\\> | The member who sent the invite. | - |\n| <a id=\"property-lastsentat\"></a> `lastSentAt` | `readonly` | () => `Promise`\\<`string`\\> | When the invite email was last sent, as an ISO 8601 timestamp. | - |\n| <a id=\"property-role\"></a> `role` | `readonly` | () => `Promise`\\<`auth.TeamRole`\\> | The role the invitee gets when they join. | - |",
- "TeamInvite.revoke": "### revoke()\n\n> **revoke**(): `Promise`\\<`void`\\>\n\nRevoke this invite so it can no longer be accepted; only a team admin or\nowner may revoke.\n\n#### Returns\n\n`Promise`\\<`void`\\>",
- "TeamInvite.toJSON": "### toJSON()\n\n> **toJSON**(): \\{ `detail?`: `TeamInviteDetails`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `TeamInviteDetails`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `TeamInviteDetails` |\n| `id` | `string` |\n\n#### Inherited from\n\n`MacroEntity.toJSON`",
- "TeamInvite.byId": "### byId()\n\n> `static` **byId**(`client`, `id`): `TeamInvite`\n\nA handle to a pending team invite 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`TeamInvite`",
- "TeamInvite.from": "### from()\n\n> `static` **from**(`client`, `record`): `TeamInvite`\n\nBuild an invite from an already-fetched record (pre-seeded, no fetch).\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `record` | `TeamInviteDetails` |\n\n#### Returns\n\n`TeamInvite`",
- "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.invite": "### invite()\n\n> **invite**(`emails`, `options?`): `Promise`\\<`boolean`\\>\n\nInvite people to this team by email; only invite addresses the user asked\nyou to invite. Each new address is emailed an invite in the caller's name.\n\nJoining gives the invitee access to everything shared with the team, so\nnever invite an address taken from a document, email or message unless\nthe user named it. Addresses that are already members or already invited\nare skipped, and a repeated address, in any letter case, is sent once.\nOnly the caller's current team takes invites (see `Team.current`): the\nrequest names this team, and the API refuses it with a 409, sending\nnothing, when that is no longer the caller's team. A team that limits\ninviting to admins rejects other members, and teams without an\nenterprise plan accept a limited number of invites per day.\n\nPass `{ agent: true }` to invite the addresses as agents. An agent invite\nto an address with no account creates an agent account when that address\nsigns in: it skips onboarding, gets an SDK token, and joins this team, using\na paid seat when the team has a subscription. An existing account keeps its\ntype and accepts like any other invite.\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------ | ------ | ------ |\n| `emails` | `string` \\| readonly `string`[] | One address or a list of addresses to invite. |\n| `options?` | \\{ `agent?`: `boolean`; \\} | `agent` invites the addresses as agents. |\n| `options.agent?` | `boolean` | - |\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\n\n`true` when at least one new invite was sent, `false` when every\n address was already a member or already invited.",
- "Team.invites": "### invites()\n\n> **invites**(): `Promise`\\<`TeamInvite`[]\\>\n\nPending invites to this team; only a team admin or owner may list them.\nOnly the caller's current team lists invites (see `Team.current`); the\nAPI refuses any other team with a 409.\n\n#### Returns\n\n`Promise`\\<`TeamInvite`[]\\>",
- "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.isAgent": "### isAgent()\n\n> **isAgent**(): `Promise`\\<`boolean`\\>\n\nWhether this user is an agent account rather than a person.\n\n#### Returns\n\n`Promise`\\<`boolean`\\>\n\n`true` for an agent account.",
- "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`\\<`storage.WhatsAppAccount`\\>\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`\\<`WhatsAppAccountState`\\> | 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?`: `storage.WhatsAppAccount`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.WhatsAppAccount`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.WhatsAppAccount` |\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` | `storage.WhatsAppAccount` |\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`\\<`storage.WhatsAppChat`\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-added\"></a> `added` | `readonly` | () => `Promise`\\<`ExternalChat` \\| `undefined`\\> | The current user's own external chat for this chat, once added. | - |\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`\\<WhatsAppCannotAdd \\| 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-id\"></a> `id` | `public readonly` | `string` | - | `MacroEntity.id` |\n| <a id=\"property-kind\"></a> `kind` | `readonly` | () => `Promise`\\<`ExternalChatKind`\\> | `group` or `direct`. | - |\n| <a id=\"property-lastactivityat\"></a> `lastActivityAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Newest activity WhatsApp reported; unknown for saved contacts never written to. | - |\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-phonenumber\"></a> `phoneNumber` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | The other person's phone number (`+<digits>`) of a direct chat, when known. | - |\n| <a id=\"property-pinned\"></a> `pinned` | `readonly` | () => `Promise`\\<`boolean`\\> | Pinned in WhatsApp. | - |\n| <a id=\"property-shared\"></a> `shared` | `readonly` | () => `Promise`\\<`ExternalChat` \\| `undefined`\\> | Someone else's external chat for this chat, shared with the current user. | - |",
- "WhatsAppChat.add": "### add()\n\n> **add**(): `Promise`\\<`ExternalChat`\\>\n\nAdd the chat (a group or a direct chat) to Macro as the current user's\nown external chat; its earlier messages are imported from the phone.\nAdding it again returns the same chat. Only the owner sends in a direct\nchat.\n\n#### Returns\n\n`Promise`\\<`ExternalChat`\\>",
- "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?`: `storage.WhatsAppChat`; `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: `storage.WhatsAppChat`; `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | `storage.WhatsAppChat` |\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` | `storage.WhatsAppChat` |\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` | `ExternalChatCommunity` |\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. |",
- "WhatsAppNamespace": "# Class: WhatsAppNamespace\n\nThe current user's WhatsApp account, paired through the Macro app, and its\nchat list. Added chats are external chats: read and send in them through\n`macro.externalChats`.",
- "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.chats": "### chats()\n\n> **chats**(): `Promise`\\<`WhatsAppChat`[]\\>\n\nThe caller's WhatsApp chat list (groups and direct chats), newest\nactivity first: each chat says whether it is added, shared with the caller\nor addable, and `chat.add()` adds it.\n\n#### Returns\n\n`Promise`\\<`WhatsAppChat`[]\\>",
- "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-externalchats\"></a> `externalChats` | `readonly` | `ExternalChatsNamespace` | Chats from external providers (WhatsApp) added to Macro: read, share and send. |\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-images\"></a> `images` | `readonly` | `ImagesNamespace` | Generate images with AI and attach them to messages. |\n| <a id=\"property-initiatives\"></a> `initiatives` | `readonly` | `InitiativeNamespace` | initiatives resources and operations. |\n| <a id=\"property-me\"></a> `me` | `readonly` | `MeNamespace` | Your own profile: set your name and profile picture. |\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-referrals\"></a> `referrals` | `readonly` | `ReferralNamespace` | Share the caller's referral link and email invites to join Macro. |\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` | The current user's WhatsApp account and chat list; add chats from it. |",
- "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).\nThe message includes the server's explanation, such as a validation error,\nand `data` holds the parsed error body.\n\n## Extends\n\n- `MacroError`\n\n## Extended by\n\n- `MacroOpRefusedError`\n- `MacroForbiddenError`\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`",
- "MacroForbiddenError": "# Class: MacroForbiddenError\n\nA 403: the caller lacks the access the request needs. Most often the user\ncan view the item but not edit it.\n\nAgents: tell the user they can only view the item and offer to ask its owner\nfor edit access. Request it only with the user's go-ahead, by calling\n`access.request('edit')` on the item (for example\n`macro.initiatives.byId(id).access.request('edit')`); never request access\non your own. The request grants nothing: report that it is pending and who\nreviews it (`access.state()` returns the `owner`), and do not claim the\nwrite succeeded. Check `access.state()` later and retry the write only once\n`accessLevel` allows it.\n\nThe server does not say which item refused the write. A write that touches\ntwo items, such as setting a task's Project (or another property that\nreferences an item), needs edit access to both: read `access.state()` on\neach and request access on the one whose `accessLevel` is below `edit`.\n\n## Extends\n\n- `MacroApiError`\n\n## Properties\n\n| Property | Modifier | Type | Inherited from |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-data\"></a> `data` | `readonly` | `unknown` | `MacroApiError.data` |\n| <a id=\"property-status\"></a> `status` | `readonly` | `number` | `MacroApiError.status` |",
- "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 (MacroForbiddenError for a 403).\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.rs
index 59a9c38c72..1d1f4f8572 100644
--- a/crates/agent_code_mode/src/domain/documentation.rs
+++ b/crates/agent_code_mode/src/domain/documentation.rs
@@ -30,7 +30,7 @@ struct Generated {
}
static GENERATED: LazyLock<Generated> = LazyLock::new(|| {
- serde_json::from_str(include_str!("documentation.json"))
+ serde_json::from_str(code_mode_assets::DOCUMENTATION)
.expect("generated SDK documentation is valid")
});
diff --git a/crates/agent_code_mode/src/domain/operations.json b/crates/agent_code_mode/src/domain/operations.json
deleted file mode 100644
index 57a24a9761..0000000000
--- a/crates/agent_code_mode/src/domain/operations.json
+++ /dev/null
@@ -1,688 +0,0 @@
-{
- "agent-harness.getAgentAutoArchivePreferences": "Get Agent Auto Archive Preferences",
- "agent-harness.putAgentAutoArchivePreferences": "Put Agent Auto Archive Preferences",
- "agent-harness.discoverAgentCapabilitiesHandler": "Discover Agent Capabilities",
- "agent-harness.getAgentCodingPreferences": "Get Agent Coding Preferences",
- "agent-harness.putAgentCodingPreferences": "Put Agent Coding Preferences",
- "agent-harness.listAgentConversations": "List Agent Conversations",
- "agent-harness.startFreshAgentConversation": "Start Fresh Agent Conversation",
- "agent-harness.retryAgentConversationTurn": "Retry Agent Conversation Turn",
- "agent-harness.chooseAgentMode": "Choose Agent Mode",
- "agent-harness.loadAgentModelsHandler": "Load Agent Models",
- "agent-harness.listAgentRepositories": "List Agent Repositories",
- "agent-harness.listAgentRepositoryBranches": "List Agent Repository Branches",
- "agent-harness.getAgentSandboxSize": "Get Agent Sandbox Size",
- "agent-harness.putAgentSandboxSize": "Put Agent Sandbox Size",
- "agent-harness.createAgentSession": "Create Agent Session",
- "agent-harness.agentSessionsForPullRequest": "Agent Sessions For Pull Request",
- "agent-harness.agentSessionsForPullRequests": "Agent Sessions For Pull Requests",
- "agent-harness.previewAgentSessions": "Preview Agent Sessions",
- "agent-harness.warmAgentSessionHandler": "Warm Agent Session",
- "agent-harness.deleteAgentSession": "Delete Agent Session",
- "agent-harness.getAgentSession": "Get Agent Session",
- "agent-harness.reportAgentSessionAppConnected": "Report Agent Session App Connected",
- "agent-harness.setAgentSessionArchived": "Set Agent Session Archived",
- "agent-harness.getAgentSessionAutoArchive": "Get Agent Session Auto Archive",
- "agent-harness.putAgentSessionAutoArchive": "Put Agent Session Auto Archive",
- "agent-harness.getAgentSessionChanges": "Get Agent Session Changes",
- "agent-harness.getAgentSessionChangesPatch": "Get Agent Session Changes Patch",
- "agent-harness.refreshAgentSessionChanges": "Refresh Agent Session Changes",
- "agent-harness.getCodeExecution": "Get Code Execution",
- "agent-harness.listExecutionReviews": "List Execution Reviews",
- "agent-harness.controlAgentSession": "Control Agent Session",
- "agent-harness.getAgentSessionLog": "Get Agent Session Log",
- "agent-harness.getAgentSessionFoldedLog": "Get Agent Session Folded Log",
- "agent-harness.renameAgentSession": "Rename Agent Session",
- "agent-harness.getAgentSessionPermissions": "Get Agent Session Permissions",
- "agent-harness.updateAgentSessionPermissions": "Update Agent Session Permissions",
- "agent-harness.unlinkAgentSessionPullRequest": "Unlink Agent Session Pull Request",
- "agent-harness.listAgentSessionPullRequests": "List Agent Session Pull Requests",
- "agent-harness.linkAgentSessionPullRequest": "Link Agent Session Pull Request",
- "agent-harness.getAgentSessionQueue": "Get Agent Session Queue",
- "agent-harness.removeQueuedAction": "Remove Queued Action",
- "agent-harness.editQueuedAction": "Edit Queued Action",
- "agent-harness.steerQueuedAction": "Steer Queued Action",
- "agent-harness.createSessionReview": "Create Session Review",
- "agent-harness.getSessionReview": "Get Session Review",
- "agent-harness.decideSessionReview": "Decide Session Review",
- "agent-harness.putAgentSessionSandboxSize": "Put Agent Session Sandbox Size",
- "agent-harness.answerAgentSessionToolApproval": "Answer Agent Session Tool Approval",
- "agent-harness.presentSessionView": "Present Session View",
- "agent-harness.classify": "Classify",
- "agent-harness.extract": "Extract",
- "auth.deleteAgentApiKey": "Delete Agent Api Key",
- "auth.getAgentApiKey": "Get Agent Api Key",
- "auth.putAgentApiKey": "Put Agent Api Key",
- "auth.updateAiBillingAutoReload": "Update Ai Billing Auto Reload",
- "auth.createAiCreditCheckout": "Create Ai Credit Checkout",
- "auth.purchaseAiCredits": "Purchase Ai Credits",
- "auth.updateAiBillingOverage": "Update Ai Billing Overage",
- "auth.getAiBillingPlans": "Get Ai Billing Plans",
- "auth.getAiBillingSummary": "Get Ai Billing Summary",
- "auth.disconnectCodex": "Disconnect Codex",
- "auth.getCodexConnection": "Get Codex Connection",
- "auth.configureCodex": "Configure Codex",
- "auth.listCodexEnvironments": "List Codex Environments",
- "auth.startCodexLogin": "Start Codex Login",
- "auth.cancelCodexLogin": "Cancel Codex Login",
- "auth.pollCodexLogin": "Poll Codex Login",
- "auth.deleteCursorApiKey": "Delete Cursor Api Key",
- "auth.getCursorApiKey": "Get Cursor Api Key",
- "auth.putCursorApiKey": "Put Cursor Api Key",
- "auth.putCursorDefaultModel": "Put Cursor Default Model",
- "auth.listCursorModels": "List Cursor Models",
- "auth.verifyFusionauthUserEmail": "Verify Fusionauth User Email",
- "auth.resendFusionauthVerifyUserEmail": "Resend Fusionauth Verify User Email",
- "auth.generateEmailLink": "Generate Email Link",
- "auth.verifyEmailLink": "Verify Email Link",
- "auth.setGithubPullRequestDraft": "Set Github Pull Request Draft",
- "auth.enrichGithubPullRequests": "Enrich Github Pull Requests",
- "auth.mergeGithubPullRequest": "Merge Github Pull Request",
- "auth.getGithubPullRequestMergeability": "Get Github Pull Request Mergeability",
- "auth.setGithubPullRequestState": "Set Github Pull Request State",
- "auth.listGtmInviteLinks": "List Gtm Invite Links",
- "auth.createGtmInviteLink": "Create Gtm Invite Link",
- "auth.revokeGtmInviteLink": "Revoke Gtm Invite Link",
- "auth.getGtmInviteOffer": "Get Gtm Invite Offer",
- "auth.resolveGtmInviteLink": "Resolve Gtm Invite Link",
- "auth.redeemGtmInviteLink": "Redeem Gtm Invite Link",
- "auth.healthHandler": "Health",
- "auth.macroApiToken": "Macro Api Token",
- "auth.refresh": "Refresh",
- "auth.createInProgressLink": "Create In Progress Link",
- "auth.emailConnectionProviders": "Email Connection Providers",
- "auth.deleteGithubLink": "Delete Github Link",
- "auth.initGithubLink": "Init Github Link",
- "auth.checkGithubLinkStatus": "Check Github Link Status",
- "auth.initGmailLink": "Init Gmail Link",
- "auth.checkGmailLinkStatus": "Check Gmail Link Status",
- "auth.initOutlookLink": "Init Outlook Link",
- "auth.appleLogin": "Apple Login",
- "auth.passwordLogin": "Password Login",
- "auth.passwordlessLogin": "Passwordless Login",
- "auth.ssoLogin": "Sso Login",
- "auth.logout": "Logout",
- "auth.createMergeRequest": "Create Merge Request",
- "auth.verifyMergeRequest": "Verify Merge Request",
- "auth.sendMobileWelcomeEmail": "Send Mobile Welcome Email",
- "auth.passwordlessCallback": "Passwordless Callback",
- "auth.oauthRedirect": "Oauth Redirect",
- "auth.oauth2Callback": "Oauth2 Callback",
- "auth.getPermissions": "Get Permissions",
- "auth.getUserPermissions": "Get User Permissions",
- "auth.getReferralCode": "Get Referral Code",
- "auth.sendReferralCode": "Send Referral Code",
- "auth.sessionCreation": "Session Creation",
- "auth.sessionLogin": "Session Login",
- "auth.getSystemStatus": "Get System Status",
- "auth.setSystemStatus": "Set System Status",
- "auth.listSystemStatusHistory": "List System Status History",
- "auth.deleteTeam": "Delete Team",
- "auth.getTeam": "Get Team",
- "auth.patchTeam": "Patch Team",
- "auth.createTeam": "Create Team",
- "auth.toggleTeamAutoJoinDomain": "Toggle Team Auto Join Domain",
- "auth.patchTeamCrmSettings": "Patch Team Crm Settings",
- "auth.sendTeamDomainNotice": "Send Team Domain Notice",
- "auth.inviteToTeam": "Invite To Team",
- "auth.deleteTeamInviteLink": "Delete Team Invite Link",
- "auth.getTeamInviteLink": "Get Team Invite Link",
- "auth.createTeamInviteLink": "Create Team Invite Link",
- "auth.joinTeamByInviteLink": "Join Team By Invite Link",
- "auth.getTeamByInviteLink": "Get Team By Invite Link",
- "auth.deleteTeamInviteHandler": "Delete Team Invite",
- "auth.getTeamInvites": "Get Team Invites",
- "auth.rejectInvitation": "Reject Invitation",
- "auth.joinTeam": "Join Team",
- "auth.patchTeamMemberPlan": "Patch Team Member Plan",
- "auth.toggleTeamNonAdminInvites": "Toggle Team Non Admin Invites",
- "auth.removeUserFromTeam": "Remove User From Team",
- "auth.getUserTeams": "Get User Teams",
- "auth.getUserInvites": "Get User Invites",
- "auth.agentSetup": "Agent Setup",
- "auth.getUserNames": "Get User Names",
- "auth.getUserNamesWithEmail": "Get User Names With Email",
- "auth.patchUserGroup": "Patch User Group",
- "auth.getUserLanguage": "Get User Language",
- "auth.putUserLanguage": "Put User Language",
- "auth.getLegacyUserPermissions": "Get Legacy User Permissions",
- "auth.getUserLinkExists": "Get User Link Exists",
- "auth.deleteUser": "Delete User",
- "auth.getUserInfo": "Get User Info",
- "auth.getUserName": "Get User Name",
- "auth.putUserName": "Put User Name",
- "auth.patchUserOnboarding": "Patch User Onboarding",
- "auth.getUserOrganization": "Get User Organization",
- "auth.putProfilePicture": "Put Profile Picture",
- "auth.createProfilePictureUpload": "Create Profile Picture Upload",
- "auth.putProfilePictureFile": "Put Profile Picture File",
- "auth.postProfilePictures": "Post Profile Pictures",
- "auth.getUserQuota": "Get User Quota",
- "auth.createCheckoutSessionV2": "Create Checkout Session V2",
- "auth.getSubscriptionStatus": "Get Subscription Status",
- "auth.changePlan": "Change Plan",
- "auth.createPortalSession": "Create Portal Session",
- "auth.getTrialEligibility": "Get Trial Eligibility",
- "auth.patchUserTutorial": "Patch User Tutorial",
- "calendar.getAvailabilityCalendars": "Get Availability Calendars",
- "calendar.setAvailabilityCalendar": "Set Availability Calendar",
- "calendar.listCalendars": "List Calendars",
- "calendar.createCalendarEvent": "Create Calendar Event",
- "calendar.deleteCalendarEvent": "Delete Calendar Event",
- "calendar.updateCalendarEvent": "Update Calendar Event",
- "calendar.copyCalendarEvent": "Copy Calendar Event",
- "calendar.inviteCalendarEventGuests": "Invite Calendar Event Guests",
- "calendar.calendarEventProviderUrl": "Calendar Event Provider Url",
- "calendar.prepareCalendarReplacement": "Prepare Calendar Replacement",
- "calendar.rsvpCalendarEvent": "Rsvp Calendar Event",
- "calendar.healthHandler": "Health",
- "calendar.respondToJoinRequest": "Respond To Join Request",
- "calendar.discardCalendarReplacement": "Discard Calendar Replacement",
- "calendar.calendarReplacementStatus": "Calendar Replacement Status",
- "calendar.confirmCalendarReplacement": "Confirm Calendar Replacement",
- "calendar.getTeamSharing": "Get Team Sharing",
- "calendar.setTeamSharing": "Set Team Sharing",
- "cognition.setPricingHandler": "Set Pricing",
- "cognition.getUsageHandler": "Get Usage",
- "cognition.upsertAiProjection": "Upsert Ai Projection",
- "cognition.getChatsForAttachmentHandler": "Get Chats For Attachment",
- "cognition.deleteChat": "Delete Chat",
- "cognition.patchChat": "Patch Chat",
- "cognition.permanentlyDeleteChat": "Permanently Delete Chat",
- "cognition.createChat": "Create Chat",
- "cognition.getChatHistoryHandler": "Get Chat History",
- "cognition.getChatHistoryBatchMessagesHandler": "Get Chat History Batch Messages",
- "cognition.getChat": "Get Chat",
- "cognition.copyChat": "Copy Chat",
- "cognition.getChatPermissions": "Get Chat Permissions",
- "cognition.revertDeleteChat": "Revert Delete Chat",
- "cognition.callTool": "Call Tool",
- "cognition.rejectToolCall": "Reject Tool Call",
- "cognition.updateToolResponse": "Update Tool Response",
- "cognition.updateToolCall": "Update Tool Call",
- "cognition.getCitationHandler": "Get Citation",
- "cognition.generateDatabaseQuery": "Generate Database Query",
- "cognition.decisions": "Classify content",
- "cognition.healthHandler": "Health",
- "cognition.generateImage": "Generate Image",
- "cognition.notionReportHandler": "Notion Report",
- "cognition.cancelNotionHandler": "Cancel Notion",
- "cognition.runImportHandler": "Run Import",
- "cognition.discoverHandler": "Discover",
- "cognition.getStateHandler": "Get State",
- "cognition.workspaceReportHandler": "Workspace Report",
- "cognition.cancelWorkspaceHandler": "Cancel Workspace",
- "cognition.deleteMcpServer": "Delete Mcp Server",
- "cognition.listMcpServers": "List Mcp Servers",
- "cognition.addMcpServer": "Add Mcp Server",
- "cognition.updateMcpServer": "Update Mcp Server",
- "cognition.mcpAuthCallback": "Mcp Auth Callback",
- "cognition.mcpOauthClientMetadata": "Mcp Oauth Client Metadata",
- "cognition.startMcpAuth": "Start Mcp Auth",
- "cognition.getMemoryHandler": "Get Memory",
- "cognition.getStateHandler2": "Get State Handler2",
- "cognition.completeHandler": "Complete",
- "cognition.dismissedPromptsHandler": "Dismissed Prompts",
- "cognition.dismissPromptHandler": "Dismiss Prompt",
- "cognition.browsePipedreamMcpCatalog": "Browse Pipedream Mcp Catalog",
- "cognition.completePipedreamMcpConnection": "Complete Pipedream Mcp Connection",
- "cognition.completePipedreamMcpConnect": "Complete Pipedream Mcp Connect",
- "cognition.deletePipedreamMcpConnection": "Delete Pipedream Mcp Connection",
- "cognition.listPipedreamMcpConnections": "List Pipedream Mcp Connections",
- "cognition.updatePipedreamMcpConnection": "Update Pipedream Mcp Connection",
- "cognition.listPipedreamMcpOverlays": "List Pipedream Mcp Overlays",
- "cognition.recoverPipedreamMcpConnection": "Recover Pipedream Mcp Connection",
- "cognition.createPipedreamMcpToken": "Create Pipedream Mcp Token",
- "cognition.getBatchPreview": "Get Batch Preview",
- "cognition.sendChatMessage": "Send Chat Message",
- "cognition.stopChatStream": "Stop Chat Stream",
- "cognition.structuredCompletion": "Generate structured content",
- "contacts.getContacts": "Get Contacts",
- "contacts.addContact": "Add Contact",
- "email.getAttachment": "Get Attachment",
- "email.getAttachmentDocumentId": "Get Attachment Document Id",
- "email.cancelBackfillGmail": "Cancel Backfill Gmail",
- "email.listBackfillGmail": "List Backfill Gmail",
- "email.getBackfillGmailActive": "Get Backfill Gmail Active",
- "email.getBackfillGmail": "Get Backfill Gmail",
- "email.forwardCalendarEvent": "Forward Calendar Event",
- "email.listContacts": "List Contacts",
- "email.blockSender": "Block Sender",
- "email.listBlockedSenders": "List Blocked Senders",
- "email.unblockSender": "Unblock Sender",
- "email.recoverDraftTransfer": "Recover Draft Transfer",
- "email.createDraft": "Create Draft",
- "email.getScheduledMessages": "Get Scheduled Messages",
- "email.upsertScheduledMessage": "Upsert Scheduled Message",
- "email.deleteScheduledDraft": "Delete Scheduled Draft",
- "email.deleteDraft": "Delete Draft",
- "email.addDraftAttachment": "Add Draft Attachment",
- "email.removeDraftAttachment": "Remove Draft Attachment",
- "email.completeDraftAttachment": "Complete Draft Attachment",
- "email.addForwardedAttachment": "Add Forwarded Attachment",
- "email.removeForwardedAttachment": "Remove Forwarded Attachment",
- "email.messageOperationStatus": "Message Operation Status",
- "email.resolveMessageOperation": "Resolve Message Operation",
- "email.transferDraft": "Transfer Draft",
- "email.listEmailFilters": "List Email Filters",
- "email.upsertEmailFilter": "Upsert Email Filter",
- "email.deleteEmailFilter": "Delete Email Filter",
- "email.initUser": "Init User",
- "email.listLabels": "List Labels",
- "email.createLabel": "Create Label",
- "email.deleteLabel": "Delete Label",
- "email.listLinks": "List Links",
- "email.healthCheckLinks": "Health Check Links",
- "email.deleteLink": "Delete Link",
- "email.disableLinkCalendar": "Disable Link Calendar",
- "email.resyncLink": "Resync Link",
- "email.sendMessage": "Send Message",
- "email.getMessagesBatch": "Get Messages Batch",
- "email.addRemoveLabel": "Add Remove Label",
- "email.getMessage": "Get Message",
- "email.getMessageEml": "Get Message Eml",
- "email.patchSettings": "Patch Settings",
- "email.mailboxSettingsOperations": "Mailbox Settings Operations",
- "email.disableSync": "Disable Sync",
- "email.archiveThreads": "Archive Threads",
- "email.previewsInboxCursor": "Previews Inbox Cursor",
- "email.archiveThread": "Archive Thread",
- "email.addRemoveThreadLabel": "Add Remove Thread Label",
- "email.getThreadMessagesHandler": "Get Thread Messages",
- "email.threadOperations": "Thread Operations",
- "email.threadSeen": "Thread Seen",
- "email.updateThreadState": "Update Thread State",
- "email.getThread": "Get Thread",
- "email.getThreadCalendarInvitations": "Get Thread Calendar Invitations",
- "email.copyThreadCalendarInvitation": "Copy Thread Calendar Invitation",
- "email.updateThreadProject": "Update Thread Project",
- "email.getThreadReadReceipts": "Get Thread Read Receipts",
- "email.healthHandler": "Health",
- "email.getReadReceiptPixel": "Get Read Receipt Pixel",
- "notification.healthHandler": "Health",
- "notification.getUnsubscribes": "Get Unsubscribes",
- "notification.unsubscribeEmail": "Unsubscribe Email",
- "notification.removeUnsubscribeItem": "Remove Unsubscribe Item",
- "notification.unsubscribeItem": "Unsubscribe Item",
- "notification.removeUnsubscribeItems": "Remove Unsubscribe Items",
- "notification.unsubscribeItems": "Unsubscribe Items",
- "notification.removeUnsubscribeAll": "Remove Unsubscribe All",
- "notification.unsubscribeAll": "Unsubscribe All",
- "notification.listTypedNotifications": "List Typed Notifications",
- "notification.bulkGetTypedNotificationsByEventItemIds": "Bulk Get Typed Notifications By Event Item Ids",
- "notification.getTypedNotificationsByEventItemId": "Get Typed Notifications By Event Item Id",
- "notification.getNotificationTypePreferences": "Get Notification Type Preferences",
- "notification.disableNotificationType": "Disable Notification Type",
- "notification.enableNotificationType": "Enable Notification Type",
- "notification.getTypedNotificationById": "Get Typed Notification By Id",
- "notification.bulkDeleteUserNotificationsV2": "Bulk Delete User Notifications V2",
- "notification.bulkMarkNotificationsDone": "Bulk Mark Notifications Done",
- "notification.bulkMarkNotificationsSeen": "Bulk Mark Notifications Seen",
- "notification.bulkMarkNotificationsUndone": "Bulk Mark Notifications Undone",
- "notification.deleteUserNotificationV2": "Delete User Notification V2",
- "properties.listProperties": "List Properties",
- "properties.createPropertyDefinition": "Create Property Definition",
- "properties.deletePropertyDefinition": "Delete Property Definition",
- "properties.getPropertyDefinition": "Get Property Definition",
- "properties.getPropertyOptions": "Get Property Options",
- "properties.addPropertyOption": "Add Property Option",
- "properties.deletePropertyOption": "Delete Property Option",
- "properties.updatePropertyOption": "Update Property Option",
- "properties.getBulkEntityProperties": "Get Bulk Entity Properties",
- "properties.getEntityProperties": "Get Entity Properties",
- "properties.bulkUpdateEntityPropertyOptions": "Bulk Update Entity Property Options",
- "properties.setEntityProperty": "Set Entity Property",
- "properties.removeEntityPropertyOption": "Remove Entity Property Option",
- "properties.addEntityPropertyOption": "Add Entity Property Option",
- "properties.deleteEntityProperty": "Delete Entity Property",
- "properties.bulkUpdateEntitiesPropertyOptions": "Bulk Update Entities Property Options",
- "properties.listTags": "List Tags",
- "properties.ensureTagSet": "Ensure Tag Set",
- "properties.mergeTag": "Merge Tag",
- "properties.promoteTag": "Promote Tag",
- "search.unifiedSearch": "Search workspace",
- "search.simpleUnifiedSearch": "Search workspace",
- "scheduled-action.scheduledActionHealth": "Scheduled Action Health",
- "scheduled-action.listScheduledActions": "List Scheduled Actions",
- "scheduled-action.createScheduledAction": "Create Scheduled Action",
- "scheduled-action.deleteScheduledAction": "Delete Scheduled Action",
- "scheduled-action.getScheduledAction": "Get Scheduled Action",
- "scheduled-action.updateScheduledAction": "Update Scheduled Action",
- "scheduled-action.setScheduledActionEnabled": "Set Scheduled Action Enabled",
- "scheduled-action.executeScheduledActionNow": "Execute Scheduled Action Now",
- "scheduled-action.listScheduledActionHistory": "List Scheduled Action History",
- "scheduled-action.unshareScheduledActionTemplate": "Unshare Scheduled Action Template",
- "scheduled-action.getScheduledActionTemplate": "Get Scheduled Action Template",
- "scheduled-action.shareScheduledActionTemplate": "Share Scheduled Action Template",
- "scheduled-action.activateScheduledActionTemplate": "Activate Scheduled Action Template",
- "unfurl.proxyRequestHandler": "Proxy Request",
- "unfurl.getUnfurl": "Get Unfurl",
- "unfurl.getUnfurlBulk": "Get Unfurl Bulk",
- "storage.listAgents": "List Agents",
- "storage.createAgent": "Create Agent",
- "storage.updateAgent": "Update Agent",
- "storage.deleteAnchor": "Delete Anchor",
- "storage.editAnchor": "Edit Anchor",
- "storage.getDocumentAnchors": "Get Document Anchors",
- "storage.createAnchor": "Create Anchor",
- "storage.getSelfBot": "Get Self Bot",
- "storage.getBotOwnerProfiles": "Get Bot Owner Profiles",
- "storage.listBotChannels": "List Bot Channels",
- "storage.removeBotFromChannelByBot": "Remove Bot From Channel By Bot",
- "storage.listOccurrences": "List Occurrences",
- "storage.mentionPreviews": "Mention Previews",
- "storage.listTeamCalendar": "List Team Calendar",
- "storage.listTeamOutOfOffice": "List Team Out Of Office",
- "storage.eventIcs": "Event Ics",
- "storage.listJoinRequests": "List Join Requests",
- "storage.requestToJoin": "Request To Join",
- "storage.getActiveCalls": "Get Active Calls",
- "storage.guestCallChatRead": "Guest Call Chat Read",
- "storage.guestCallChatPost": "Guest Call Chat Post",
- "storage.meetingLookup": "Meeting Lookup",
- "storage.meetingGuestJoin": "Meeting Guest Join",
- "storage.meetingLeave": "Meeting Leave",
- "storage.meetingGuestParticipants": "Meeting Guest Participants",
- "storage.meetingList": "Meeting List",
- "storage.meetingCreate": "Meeting Create",
- "storage.meetingListActive": "Meeting List Active",
- "storage.meetingInvitePermissions": "Meeting Invite Permissions",
- "storage.meetingInvite": "Meeting Invite",
- "storage.meetingInviteUsers": "Meeting Invite Users",
- "storage.meetingJoin": "Meeting Join",
- "storage.meetingParticipants": "Meeting Participants",
- "storage.meetingPrepare": "Meeting Prepare",
- "storage.meetingCancelPreparation": "Meeting Cancel Preparation",
- "storage.meetingCancel": "Meeting Cancel",
- "storage.meetingUpdate": "Meeting Update",
- "storage.getBatchCallRecordPreview": "Get Batch Call Record Preview",
- "storage.deleteCallRecord": "Delete Call Record",
- "storage.getCallRecord": "Get Call Record",
- "storage.editCallRecord": "Edit Call Record",
- "storage.declineCall": "Decline Call",
- "storage.meetingShare": "Meeting Share",
- "storage.toggleShareWithTeam": "Toggle Share With Team",
- "storage.editCallTranscript": "Edit Call Transcript",
- "storage.getRingStatus": "Get Ring Status",
- "storage.declineRing": "Decline Ring",
- "storage.callWebhook": "Call Webhook",
- "storage.leaveOrEndCall": "Leave Or End Call",
- "storage.getOrCreateCall": "Get Or Create Call",
- "storage.checkActiveCall": "Check Active Call",
- "storage.ingestTranscript": "Ingest Transcript",
- "storage.listChannelLabels": "List Channel Labels",
- "storage.createChannelLabel": "Create Channel Label",
- "storage.setChannelLabel": "Set Channel Label",
- "storage.previewSmartTag": "Preview Smart Tag",
- "storage.deleteChannelLabel": "Delete Channel Label",
- "storage.renameChannelLabel": "Rename Channel Label",
- "storage.createChannel": "Create Channel",
- "storage.getActivity": "Get Activity",
- "storage.postActivity": "Post Activity",
- "storage.getAttachmentReferences": "Get Attachment References",
- "storage.getOrCreateDm": "Get Or Create Dm",
- "storage.getOrCreatePrivate": "Get Or Create Private",
- "storage.joinChannelByCode": "Join Channel By Code",
- "storage.createEntityMention": "Create Entity Mention",
- "storage.deleteEntityMention": "Delete Entity Mention",
- "storage.getBatchChannelPreview": "Get Batch Channel Preview",
- "storage.deleteChannel": "Delete Channel",
- "storage.getChannel": "Get Channel",
- "storage.patchChannel": "Patch Channel",
- "storage.getChannelAttachments": "Get Channel Attachments",
- "storage.createChannelScopedBot": "Create Channel Scoped Bot",
- "storage.joinChannel": "Join Channel",
- "storage.getChannelJoinLink": "Get Channel Join Link",
- "storage.leaveChannel": "Leave Channel",
- "storage.removeParticipants": "Remove Participants",
- "storage.getChannelParticipants": "Get Channel Participants",
- "storage.addParticipants": "Add Participants",
- "storage.setChannelPicture": "Set Channel Picture",
- "storage.postChannelBotWebhook": "Post Channel Bot Webhook",
- "storage.deleteCollabSurface": "Delete Collab Surface",
- "storage.getCollabSurface": "Get Collab Surface",
- "storage.ensureCollabSurface": "Ensure Collab Surface",
- "storage.createCollabSurfaceToken": "Create Collab Surface Token",
- "storage.getChannels": "Get Channels",
- "storage.listCrmBlockedDomains": "List Crm Blocked Domains",
- "storage.unblockCrmDomain": "Unblock Crm Domain",
- "storage.blockCrmDomain": "Block Crm Domain",
- "storage.createCrmCompany": "Create Crm Company",
- "storage.getCompany": "Get Company",
- "storage.listCompanyContacts": "List Company Contacts",
- "storage.createCrmContact": "Create Crm Contact",
- "storage.setEmailSync": "Set Email Sync",
- "storage.setCompanyHidden": "Set Company Hidden",
- "storage.setCrmCompanyName": "Set Crm Company Name",
- "storage.searchContacts": "Search Contacts",
- "storage.createCrmTeamContact": "Create Crm Team Contact",
- "storage.getContactByEmail": "Get Contact By Email",
- "storage.getContact": "Get Contact",
- "storage.setContactHidden": "Set Contact Hidden",
- "storage.setCrmContactName": "Set Crm Contact Name",
- "storage.listCrmPipelines": "List Crm Pipelines",
- "storage.createCrmPipeline": "Create Crm Pipeline",
- "storage.getCrmPipeline": "Get Crm Pipeline",
- "storage.renameCrmPipeline": "Rename Crm Pipeline",
- "storage.applyCrmPipelineOps": "Apply Crm Pipeline Ops",
- "storage.getCrmPipelinePermissions": "Get Crm Pipeline Permissions",
- "storage.updateCrmPipelinePermissions": "Update Crm Pipeline Permissions",
- "storage.getCrmPipelineRows": "Get Crm Pipeline Rows",
- "storage.queryCrmPipelineRows": "Query Crm Pipeline Rows",
- "storage.shareCrmPipeline": "Share Crm Pipeline",
- "storage.getCrmPipelineTable": "Get Crm Pipeline Table",
- "storage.trashCrmPipeline": "Trash Crm Pipeline",
- "storage.getCrmPipelineViewPositions": "Get Crm Pipeline View Positions",
- "storage.getCrmTeamSettings": "Get Crm Team Settings",
- "storage.putCrmTeamSettings": "Put Crm Team Settings",
- "storage.resetCrmTeamStages": "Reset Crm Team Stages",
- "storage.putCrmTeamStages": "Put Crm Team Stages",
- "storage.listDatabases": "List Databases",
- "storage.createDatabase": "Create Database",
- "storage.saveDatabaseQuery": "Save Database Query",
- "storage.getDatabaseQuery": "Get Database Query",
- "storage.queryDatabases": "Query Databases",
- "storage.ensureStarterHandler": "Ensure Starter",
- "storage.deliverDatabaseWebhook": "Deliver Database Webhook",
- "storage.getDatabase": "Get Database",
- "storage.shareDatabaseAwareness": "Share Database Awareness",
- "storage.undoDatabaseChange": "Undo Database Change",
- "storage.duplicateDatabase": "Duplicate Database",
- "storage.importDatabaseTable": "Import Database Table",
- "storage.applyDatabaseOps": "Apply Database Ops",
- "storage.getDatabasePermissions": "Get Database Permissions",
- "storage.updateDatabasePermissions": "Update Database Permissions",
- "storage.getDatabaseTableChanges": "Get Database Table Changes",
- "storage.listDatabaseColumnCasts": "List Database Column Casts",
- "storage.convertDatabaseColumn": "Convert Database Column",
- "storage.inferDatabaseColumnType": "Infer Database Column Type",
- "storage.getDatabaseRowHistory": "Get Database Row History",
- "storage.getDatabaseViewPositions": "Get Database View Positions",
- "storage.listDatabaseWebhooks": "List Database Webhooks",
- "storage.createDatabaseWebhook": "Create Database Webhook",
- "storage.deleteDatabaseWebhook": "Delete Database Webhook",
- "storage.transcribeDictation": "Transcribe Dictation",
- "storage.getUserDocumentsHandler": "List documents",
- "storage.createDocument": "Create Document",
- "storage.createCanvasHandler": "Create Canvas",
- "storage.createMarkdownHandler": "Create Markdown",
- "storage.createSkillHandler": "Create Skill",
- "storage.createSnippetHandler": "Create Snippet",
- "storage.createTaskHandler": "Create Task",
- "storage.getGithubPullRequestTasks": "Get Github Pull Request Tasks",
- "storage.initializeUserDocuments": "Initialize User Documents",
- "storage.getDocumentListHandler": "Get Document List",
- "storage.validateDocumentPermissionsToken": "Validate Document Permissions Token",
- "storage.getDocumentPermissionsToken": "Get Document Permissions Token",
- "storage.presaveDocumentHandler": "Presave Document",
- "storage.getBatchPreviewHandler": "Get Batch Preview",
- "storage.taskSimilaritySearchHandler": "Task Similarity Search",
- "storage.getDocumentByTeamSlug": "Get Document By Team Slug",
- "storage.handler": "Handler",
- "storage.getSystemSkillsHandler": "Get System Skills",
- "storage.deleteDocument": "Delete Document",
- "storage.getDocument": "Read document",
- "storage.editDocument": "Edit Document",
- "storage.saveDocumentHandler": "Save Document",
- "storage.getDocumentBranchName": "Get Document Branch Name",
- "storage.copyDocument": "Copy Document",
- "storage.exportDocument": "Export Document",
- "storage.getDocumentGithubPullRequests": "Get Document Github Pull Requests",
- "storage.getLocationHandler": "Get Location",
- "storage.getDocumentLocationV3": "Get Document Location V3",
- "storage.permanentlyDeleteDocument": "Permanently Delete Document",
- "storage.getDocumentProcessingResult": "Get Document Processing Result",
- "storage.jobProcessingResultHandler": "Job Processing Result",
- "storage.revertDeleteDocument": "Revert Delete Document",
- "storage.getDocumentShortId": "Get Document Short Id",
- "storage.simpleSave": "Simple Save",
- "storage.getDocumentTeamShare": "Get Document Team Share",
- "storage.setDocumentTeamShare": "Set Document Team Share",
- "storage.getDocumentTextContent": "Get Document Text Content",
- "storage.getDocumentViewsHandler": "Get Document Views",
- "storage.getDocumentVersion": "Get Document Version",
- "storage.accessRequestsState": "Access Requests State",
- "storage.accessRequestsCancel": "Access Requests Cancel",
- "storage.accessRequestsSubmit": "Access Requests Submit",
- "storage.accessRequestsResolve": "Access Requests Resolve",
- "storage.accessRequestsDirect": "Access Requests Direct",
- "storage.accessRequestsRemoveDirect": "Access Requests Remove Direct",
- "storage.accessRequestsSetDirect": "Access Requests Set Direct",
- "storage.getEntityPermission": "Get Entity Permission",
- "storage.externalChats": "External Chats",
- "storage.externalChatAdd": "External Chat Add",
- "storage.externalChatRemove": "External Chat Remove",
- "storage.externalChat": "External Chat",
- "storage.externalChatUpload": "External Chat Upload",
- "storage.externalChatDelivery": "External Chat Delivery",
- "storage.externalChatMessages": "External Chat Messages",
- "storage.externalChatMessageAttachments": "External Chat Message Attachments",
- "storage.externalChatMessage": "External Chat Message",
- "storage.externalChatPermissions": "External Chat Permissions",
- "storage.externalChatUpdatePermissions": "External Chat Update Permissions",
- "storage.externalChatRead": "External Chat Read",
- "storage.externalChatSends": "External Chat Sends",
- "storage.externalChatSend": "External Chat Send",
- "storage.listFavorites": "List Favorites",
- "storage.addFavorite": "Add Favorite",
- "storage.reorderFavorites": "Reorder Favorites",
- "storage.removeFavoriteByEntity": "Remove Favorite By Entity",
- "storage.getForeignEntityBySource": "Get Foreign Entity By Source",
- "storage.getForeignEntity": "Get Foreign Entity",
- "storage.listForms": "List Forms",
- "storage.createForm": "Create Form",
- "storage.listAccessibleForms": "List Accessible Forms",
- "storage.getForm": "Get Form",
- "storage.updateForm": "Update Form",
- "storage.collaborateForm": "Collaborate Form",
- "storage.putFormLayout": "Put Form Layout",
- "storage.getFormPermissions": "Get Form Permissions",
- "storage.updateFormPermissions": "Update Form Permissions",
- "storage.submitFormResponse": "Submit Form Response",
- "storage.getMyFormResponse": "Get My Form Response",
- "storage.editMyFormResponse": "Edit My Form Response",
- "storage.getFormResponseSummary": "Get Form Response Summary",
- "storage.getFormTally": "Get Form Tally",
- "storage.installSync": "Install Sync",
- "storage.getGithubPullRequestFacets": "Get Github Pull Request Facets",
- "storage.getGithubPullRequest": "Get Github Pull Request",
- "storage.getGithubPullRequestChanges": "Get Github Pull Request Changes",
- "storage.getGithubPullRequestChangesPatch": "Get Github Pull Request Changes Patch",
- "storage.createHarnessPairing": "Create Harness Pairing",
- "storage.getHarnessPairing": "Get Harness Pairing",
- "storage.approveHarnessPairing": "Approve Harness Pairing",
- "storage.claimHarnessPairing": "Claim Harness Pairing",
- "storage.listHarnesses": "List Harnesses",
- "storage.deleteSelfHarness": "Delete Self Harness",
- "storage.getSelfHarness": "Get Self Harness",
- "storage.listHarnessAgents": "List Harness Agents",
- "storage.listHarnessSessions": "List Harness Sessions",
- "storage.deleteHarness": "Delete Harness",
- "storage.healthHandler": "Health",
- "storage.getHistoryHandler": "Get History",
- "storage.deleteHistoryHandler": "Delete History",
- "storage.upsertHistoryHandler": "Upsert History",
- "storage.listInitiatives": "List Initiatives",
- "storage.createInitiative": "Create Initiative",
- "storage.deleteInitiative": "Delete Initiative",
- "storage.getInitiative": "Get Initiative",
- "storage.updateInitiative": "Update Initiative",
- "storage.getInstructionsHandler": "Get Instructions",
- "storage.createInstructionsHandler": "Create Instructions",
- "storage.getItemsSoup": "Get Items Soup",
- "storage.postItemsSoup": "Post Items Soup",
- "storage.postItemsSoupAst": "Browse workspace",
- "storage.postItemsSoupAstGrouped": "Browse workspace",
- "storage.messageTimeline": "Message Timeline",
- "storage.entityMessageCreate": "Entity Message Create",
- "storage.entityMessageDeleteMessage": "Entity Message Delete Message",
- "storage.entityMessageGetMessage": "Entity Message Get Message",
- "storage.entityMessageEdit": "Entity Message Edit",
- "storage.entityMessageReact": "Entity Message React",
- "storage.entityMessageLegacy": "Entity Message Legacy",
- "storage.entityMessageDeleteThread": "Entity Message Delete Thread",
- "storage.entityMessageGetThread": "Entity Message Get Thread",
- "storage.entityMessagePatchThread": "Entity Message Patch Thread",
- "storage.messageTimelineEntries": "Message Timeline Entries",
- "storage.entityMessageTyping": "Entity Message Typing",
- "storage.getPinsHandler": "Get Pins",
- "storage.reorderPinsHandler": "Reorder Pins",
- "storage.removePinHandler": "Remove Pin",
- "storage.addPinHandler": "Add Pin",
- "storage.getProjectsHandler": "Get Projects",
- "storage.createProjectHandler": "Create Project",
- "storage.getPendingProjectsHandler": "Get Pending Projects",
- "storage.getBatchProjectPreview": "Get Batch Project Preview",
- "storage.uploadFolderHandler": "Upload Folder",
- "storage.uploadExtractFolderHandler": "Upload Extract Folder",
- "storage.deleteProjectHandler": "Delete Project",
- "storage.getProjectHandler": "Get Project",
- "storage.getProjectUserAccessLevel": "Get Project User Access Level",
- "storage.getProjectContentHandler": "Get Project Content",
- "storage.permanentlyDeleteProject": "Permanently Delete Project",
- "storage.getProjectPermissionsV2": "Get Project Permissions V2",
- "storage.revertDeleteProject": "Revert Delete Project",
- "storage.recentlyDeleted": "Recently Deleted",
- "storage.listEmailReminders": "List Email Reminders",
- "storage.getEmailFollowup": "Get Email Followup",
- "storage.setEmailFollowup": "Set Email Followup",
- "storage.getViewsHandler": "Get Views",
- "storage.createViewHandler": "Create View",
- "storage.excludeDefaultViewHandler": "Exclude Default View",
- "storage.deleteViewHandler": "Delete View",
- "storage.patchViewHandler": "Patch View",
- "storage.listSlackImports": "List Slack Imports",
- "storage.createSlackImport": "Create Slack Import",
- "storage.getSlackImport": "Get Slack Import",
- "storage.cancelSlackImport": "Cancel Slack Import",
- "storage.finalizeSlackImport": "Finalize Slack Import",
- "storage.registerSlackImportUploads": "Register Slack Import Uploads",
- "storage.completeSlackImportUploads": "Complete Slack Import Uploads",
- "storage.bulkWakeupSyncServiceDocuments": "Bulk Wakeup Sync Service Documents",
- "storage.editThreadV2": "Edit Thread V2",
- "storage.listUserApiKeys": "List User Api Keys",
- "storage.createUserApiKey": "Create User Api Key",
- "storage.deleteUserApiKey": "Delete User Api Key",
- "storage.deleteUserDocumentViewLocation": "Delete User Document View Location",
- "storage.getUserDocumentViewLocation": "Get User Document View Location",
- "storage.upsertUserDocumentViewLocation": "Upsert User Document View Location",
- "storage.getDocumentPermissionsV2": "Get Document Permissions V2",
- "storage.editProjectV2": "Edit Project V2",
- "storage.streamEvents": "Stream Events",
- "storage.listWebhooks": "List Webhooks",
- "storage.createWebhook": "Create Webhook",
- "storage.deleteWebhook": "Delete Webhook",
- "storage.getWebhook": "Get Webhook",
- "storage.patchWebhook": "Patch Webhook",
- "storage.validateWebhook": "Validate Webhook",
- "storage.whatsappAccount": "Whatsapp Account",
- "storage.whatsappChats": "Whatsapp Chats",
- "storage.whatsappConnect": "Whatsapp Connect",
- "storage.whatsappDisconnect": "Whatsapp Disconnect",
- "storage.whatsappImportHistory": "Whatsapp Import History",
- "storage.whatsappStartLookup": "Whatsapp Start Lookup",
- "storage.whatsappLookup": "Whatsapp Lookup",
- "storage.whatsappCancelPairing": "Whatsapp Cancel Pairing",
- "storage.whatsappPairing": "Whatsapp Pairing",
- "storage.whatsappPasskey": "Whatsapp Passkey"
-}
diff --git a/crates/code_execution/AGENTS.md b/crates/code_execution/AGENTS.md
index 3f8d83d295..888f25c6d1 100644
--- a/crates/code_execution/AGENTS.md
+++ b/crates/code_execution/AGENTS.md
@@ -17,8 +17,8 @@ service. Session authentication, token issuance and execution storage belong to
The bundled public SDK makes ordinary HTTP requests. There is no tool-name
proxy or host-call bridge. Cancellation stops the process; it does not roll back
-completed API writes. SDK and Handlebars bundles are generated by
-`packages/code-mode-sdk`, never edited by hand.
+completed API writes. SDK and Handlebars bundles come from
+`crates/code_mode_assets`, generated from the public SDK at build time.
Authenticated SDK requests carry `x-macro-code-execution: 1`, the only mark a
run under a plain user token (public MCP) has. APIs that ask a program to
diff --git a/crates/code_execution/Cargo.toml b/crates/code_execution/Cargo.toml
index ca96485cd9..36369c3f5f 100644
--- a/crates/code_execution/Cargo.toml
+++ b/crates/code_execution/Cargo.toml
@@ -7,6 +7,7 @@ publish = false
[dependencies]
url = { workspace = true }
async-trait = { workspace = true }
+code_mode_assets = { path = "../code_mode_assets" }
futures = { workspace = true }
rootcause = { workspace = true }
serde = { workspace = true }
diff --git a/crates/code_execution/src/outbound/deno.rs b/crates/code_execution/src/outbound/deno.rs
index e96c8fd5a6..a3af1d9754 100644
--- a/crates/code_execution/src/outbound/deno.rs
+++ b/crates/code_execution/src/outbound/deno.rs
@@ -20,8 +20,6 @@ use tokio_util::{
};
const BOOTSTRAP: &str = include_str!("deno/bootstrap.mjs");
-const SDK: &str = include_str!("deno/sdk.mjs");
-const HANDLEBARS: &str = include_str!("deno/handlebars.mjs");
const TIMERS: &str = include_str!("deno/timers.mjs");
/// Runtime version pinned by the container and checked at startup.
pub const DENO_VERSION: &str = "2.9.6";
@@ -110,10 +108,10 @@ impl DenoRunner {
tokio::fs::write(&bootstrap, BOOTSTRAP)
.await
.map_err(internal)?;
- tokio::fs::write(root.join("sdk.mjs"), SDK)
+ tokio::fs::write(root.join("sdk.mjs"), code_mode_assets::SDK)
.await
.map_err(internal)?;
- tokio::fs::write(root.join("handlebars.mjs"), HANDLEBARS)
+ tokio::fs::write(root.join("handlebars.mjs"), code_mode_assets::HANDLEBARS)
.await
.map_err(internal)?;
tokio::fs::write(root.join("timers.mjs"), TIMERS)
diff --git a/crates/code_execution/src/outbound/deno/handlebars.mjs b/crates/code_execution/src/outbound/deno/handlebars.mjs
deleted file mode 100644
index 0c936c4908..0000000000
--- a/crates/code_execution/src/outbound/deno/handlebars.mjs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Generated by packages/code-mode-sdk/scripts/generate.ts.
-var YK=(D,G)=>()=>(G||D((G={exports:{}}).exports,G),G.exports);var JK=YK((n,a)=>{(function(G,Q){if(typeof n==="object"&&typeof a==="object")a.exports=Q();else if(typeof define==="function"&&define.amd)define([],Q);else if(typeof n==="object")n.Handlebars=Q();else G.Handlebars=Q()})(n,function(){return function(D){var G={};function Q(A){if(G[A])return G[A].exports;var F=G[A]={exports:{},id:A,loaded:!1};return D[A].call(F.exports,F,F.exports,Q),F.loaded=!0,F.exports}return Q.m=D,Q.c=G,Q.p="",Q(0)}([function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(2),W=A(F),O=Q(83),H=A(O),N=Q(84),z=Q(89),M=Q(90),E=A(M),X=Q(87),C=A(X),U=Q(82),J=A(U),Y=W.default.create;function K(){var V=Y();return V.compile=function(T,R){return z.compile(T,R,V)},V.precompile=function(T,R){return z.precompile(T,R,V)},V.AST=H.default,V.Compiler=z.Compiler,V.JavaScriptCompiler=E.default,V.Parser=N.parser,V.parse=N.parse,V.parseWithoutProcessing=N.parseWithoutProcessing,V}var Z=K();Z.create=K,J.default(Z),Z.Visitor=C.default,Z.default=Z,G.default=Z,D.exports=G.default},function(D,G){G.default=function(Q){return Q&&Q.__esModule?Q:{default:Q}},G.__esModule=!0},function(D,G,Q){var A=Q(3).default,F=Q(1).default;G.__esModule=!0;var W=Q(4),O=A(W),H=Q(76),N=F(H),z=Q(6),M=F(z),E=Q(5),X=A(E),C=Q(77),U=A(C),J=Q(82),Y=F(J);function K(){var V=new O.HandlebarsEnvironment;return X.extend(V,O),V.SafeString=N.default,V.Exception=M.default,V.Utils=X,V.escapeExpression=X.escapeExpression,V.VM=U,V.template=function(T){return U.template(T,V)},V}var Z=K();Z.create=K,Y.default(Z),Z.default=Z,G.default=Z,D.exports=G.default},function(D,G){G.default=function(Q){if(Q&&Q.__esModule)return Q;else{var A={};if(Q!=null){for(var F in Q)if(Object.prototype.hasOwnProperty.call(Q,F))A[F]=Q[F]}return A.default=Q,A}},G.__esModule=!0},function(D,G,Q){var A=Q(1).default;G.__esModule=!0,G.HandlebarsEnvironment=K;var F=Q(5),W=Q(6),O=A(W),H=Q(10),N=Q(70),z=Q(72),M=A(z),E=Q(73),X="4.7.9";G.VERSION=X;var C=8;G.COMPILER_REVISION=C;var U=7;G.LAST_COMPATIBLE_COMPILER_REVISION=U;var J={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};G.REVISION_CHANGES=J;var Y="[object Object]";function K(V,T,R){this.helpers=V||{},this.partials=T||{},this.decorators=R||{},H.registerDefaultHelpers(this),N.registerDefaultDecorators(this)}K.prototype={constructor:K,logger:M.default,log:M.default.log,registerHelper:function(T,R){if(F.toString.call(T)===Y){if(R)throw new O.default("Arg not supported with multiple helpers");F.extend(this.helpers,T)}else this.helpers[T]=R},unregisterHelper:function(T){delete this.helpers[T]},registerPartial:function(T,R){if(F.toString.call(T)===Y)F.extend(this.partials,T);else{if(typeof R>"u")throw new O.default('Attempting to register a partial called "'+T+'" as undefined');this.partials[T]=R}},unregisterPartial:function(T){delete this.partials[T]},registerDecorator:function(T,R){if(F.toString.call(T)===Y){if(R)throw new O.default("Arg not supported with multiple decorators");F.extend(this.decorators,T)}else this.decorators[T]=R},unregisterDecorator:function(T){delete this.decorators[T]},resetLoggedPropertyAccesses:function(){E.resetLoggedProperties()}};var Z=M.default.log;G.log=Z,G.createFrame=F.createFrame,G.logger=M.default},function(D,G){G.__esModule=!0,G.extend=O,G.indexOf=M,G.escapeExpression=E,G.isEmpty=X,G.createFrame=C,G.blockParams=U,G.appendContextPath=J;var Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},A=/[&<>"'`=]/g,F=/[&<>"'`=]/;function W(Y){return Q[Y]}function O(Y){for(var K=1;K<arguments.length;K++)for(var Z in arguments[K])if(Object.prototype.hasOwnProperty.call(arguments[K],Z))Y[Z]=arguments[K][Z];return Y}var H=Object.prototype.toString;G.toString=H;var N=function(K){return typeof K==="function"};if(N(/x/))G.isFunction=N=function(Y){return typeof Y==="function"&&H.call(Y)==="[object Function]"};G.isFunction=N;var z=Array.isArray||function(Y){return Y&&typeof Y==="object"?H.call(Y)==="[object Array]":!1};G.isArray=z;function M(Y,K){for(var Z=0,V=Y.length;Z<V;Z++)if(Y[Z]===K)return Z;return-1}function E(Y){if(typeof Y!=="string"){if(Y&&Y.toHTML)return Y.toHTML();else if(Y==null)return"";else if(!Y)return Y+"";Y=""+Y}if(!F.test(Y))return Y;return Y.replace(A,W)}function X(Y){if(!Y&&Y!==0)return!0;else if(z(Y)&&Y.length===0)return!0;else return!1}function C(Y){var K=O({},Y);return K._parent=Y,K}function U(Y,K){return Y.path=K,Y}function J(Y,K){return(Y?Y+".":"")+K}},function(D,G,Q){var A=Q(7).default;G.__esModule=!0;var F=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function W(O,H){var N=H&&H.loc,z=void 0,M=void 0,E=void 0,X=void 0;if(N)z=N.start.line,M=N.end.line,E=N.start.column,X=N.end.column,O+=" - "+z+":"+E;var C=Error.prototype.constructor.call(this,O);for(var U=0;U<F.length;U++)this[F[U]]=C[F[U]];if(Error.captureStackTrace)Error.captureStackTrace(this,W);try{if(N)if(this.lineNumber=z,this.endLineNumber=M,A)Object.defineProperty(this,"column",{value:E,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:X,enumerable:!0});else this.column=E,this.endColumn=X}catch(J){}}W.prototype=Error(),G.default=W,D.exports=G.default},function(D,G,Q){D.exports={default:Q(8),__esModule:!0}},function(D,G,Q){var A=Q(9);D.exports=function(W,O,H){return A.setDesc(W,O,H)}},function(D,G){var Q=Object;D.exports={create:Q.create,getProto:Q.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:Q.getOwnPropertyDescriptor,setDesc:Q.defineProperty,setDescs:Q.defineProperties,getKeys:Q.keys,getNames:Q.getOwnPropertyNames,getSymbols:Q.getOwnPropertySymbols,each:[].forEach}},function(D,G,Q){var A=Q(1).default;G.__esModule=!0,G.registerDefaultHelpers=Z,G.moveHelperToHooks=V;var F=Q(11),W=A(F),O=Q(12),H=A(O),N=Q(65),z=A(N),M=Q(66),E=A(M),X=Q(67),C=A(X),U=Q(68),J=A(U),Y=Q(69),K=A(Y);function Z(T){W.default(T),H.default(T),z.default(T),E.default(T),C.default(T),J.default(T),K.default(T)}function V(T,R,B){if(T.helpers[R]){if(T.hooks[R]=T.helpers[R],!B)T.helpers[R]=void 0}}},function(D,G,Q){G.__esModule=!0;var A=Q(5);G.default=function(F){F.registerHelper("blockHelperMissing",function(W,O){var{inverse:H,fn:N}=O;if(W===!0)return N(this);else if(W===!1||W==null)return H(this);else if(A.isArray(W))if(W.length>0){if(O.ids)O.ids=[O.name];return F.helpers.each(W,O)}else return H(this);else{if(O.data&&O.ids){var z=A.createFrame(O.data);z.contextPath=A.appendContextPath(O.data.contextPath,O.name),O={data:z}}return N(W,O)}})},D.exports=G.default},function(D,G,Q){var A=Q(13).default,F=Q(43).default,W=Q(55).default,O=Q(60).default,H=Q(1).default;G.__esModule=!0;var N=Q(5),z=Q(6),M=H(z);G.default=function(E){E.registerHelper("each",function(X,C){if(!C)throw new M.default("Must pass iterator to #each");var{fn:U,inverse:J}=C,Y=0,K="",Z=void 0,V=void 0;if(C.data&&C.ids)V=N.appendContextPath(C.data.contextPath,C.ids[0])+".";if(N.isFunction(X))X=X.call(this);if(C.data)Z=N.createFrame(C.data);function T(I,L,P){if(Z){if(Z.key=I,Z.index=L,Z.first=L===0,Z.last=!!P,V)Z.contextPath=V+I}K=K+U(X[I],{data:Z,blockParams:N.blockParams([X[I],I],[V+I,null])})}if(X&&typeof X==="object")if(N.isArray(X)){for(var R=X.length;Y<R;Y++)if(Y in X)T(Y,Y,Y===X.length-1)}else if(typeof A==="function"&&X[F]){var B=[],j=W(X);for(var k=j.next();!k.done;k=j.next())B.push(k.value);X=B;for(var R=X.length;Y<R;Y++)T(Y,Y,Y===X.length-1)}else(function(){var I=void 0;if(O(X).forEach(function(L){if(I!==void 0)T(I,Y-1);I=L,Y++}),I!==void 0)T(I,Y-1,!0)})();if(Y===0)K=J(this);return K})},D.exports=G.default},function(D,G,Q){D.exports={default:Q(14),__esModule:!0}},function(D,G,Q){Q(15),Q(42),D.exports=Q(21).Symbol},function(D,G,Q){var A=Q(9),F=Q(16),W=Q(17),O=Q(18),H=Q(20),N=Q(24),z=Q(19),M=Q(27),E=Q(28),X=Q(30),C=Q(29),U=Q(31),J=Q(36),Y=Q(37),K=Q(38),Z=Q(39),V=Q(32),T=Q(26),R=A.getDesc,B=A.setDesc,j=A.create,k=J.get,I=F.Symbol,L=F.JSON,P=L&&L.stringify,g=!1,v=C("_hidden"),x=A.isEnum,h=M("symbol-registry"),S=M("symbols"),q=typeof I=="function",w=Object.prototype,f=O&&z(function(){return j(B({},"a",{get:function(){return B(this,"a",{value:7}).a}})).a!=7})?function(y,b,u){var _=R(w,b);if(_)delete w[b];if(B(y,b,u),_&&y!==w)B(w,b,_)}:B,d=function(y){var b=S[y]=j(I.prototype);return b._k=y,O&&g&&f(w,y,{configurable:!0,set:function(u){if(W(this,v)&&W(this[v],y))this[v][y]=!1;f(this,y,T(1,u))}}),b},m=function(y){return typeof y=="symbol"},c=function(b,u,_){if(_&&W(S,u)){if(!_.enumerable){if(!W(b,v))B(b,v,T(1,{}));b[v][u]=!0}else{if(W(b,v)&&b[v][u])b[v][u]=!1;_=j(_,{enumerable:T(0,!1)})}return f(b,u,_)}return B(b,u,_)},p=function(b,u){Z(b);var _=Y(u=V(u)),l=0,$=_.length,s;while($>l)c(b,s=_[l++],u[s]);return b},r=function(b,u){return u===void 0?j(b):p(j(b),u)},o=function(b){var u=x.call(this,b);return u||!W(this,b)||!W(S,b)||W(this,v)&&this[v][b]?u:!0},t=function(b,u){var _=R(b=V(b),u);if(_&&W(S,u)&&!(W(b,v)&&b[v][u]))_.enumerable=!0;return _},e=function(b){var u=k(V(b)),_=[],l=0,$;while(u.length>l)if(!W(S,$=u[l++])&&$!=v)_.push($);return _},KK=function(b){var u=k(V(b)),_=[],l=0,$;while(u.length>l)if(W(S,$=u[l++]))_.push(S[$]);return _},UK=function(b){if(b===void 0||m(b))return;var u=[b],_=1,l=arguments,$,s;while(l.length>_)u.push(l[_++]);if($=u[1],typeof $=="function")s=$;if(s||!K($))$=function(ZK,i){if(s)i=s.call(this,ZK,i);if(!m(i))return i};return u[1]=$,P.apply(L,u)},XK=z(function(){var y=I();return P([y])!="[null]"||P({a:y})!="{}"||P(Object(y))!="{}"});if(!q){if(I=function(){if(m(this))throw TypeError("Symbol is not a constructor");return d(X(arguments.length>0?arguments[0]:void 0))},N(I.prototype,"toString",function(){return this._k}),m=function(y){return y instanceof I},A.create=r,A.isEnum=o,A.getDesc=t,A.setDesc=c,A.setDescs=p,A.getNames=J.get=e,A.getSymbols=KK,O&&!Q(41))N(w,"propertyIsEnumerable",o,!0)}var QK={for:function(y){return W(h,y+="")?h[y]:h[y]=I(y)},keyFor:function(b){return U(h,b)},useSetter:function(){g=!0},useSimple:function(){g=!1}};A.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(y){var b=C(y);QK[y]=q?b:d(b)}),g=!0,H(H.G+H.W,{Symbol:I}),H(H.S,"Symbol",QK),H(H.S+H.F*!q,"Object",{create:r,defineProperty:c,defineProperties:p,getOwnPropertyDescriptor:t,getOwnPropertyNames:e,getOwnPropertySymbols:KK}),L&&H(H.S+H.F*(!q||XK),"JSON",{stringify:UK}),E(I,"Symbol"),E(Math,"Math",!0),E(F.JSON,"JSON",!0)},function(D,G){var Q=D.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=Q},function(D,G){var Q={}.hasOwnProperty;D.exports=function(A,F){return Q.call(A,F)}},function(D,G,Q){D.exports=!Q(19)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(D,G){D.exports=function(Q){try{return!!Q()}catch(A){return!0}}},function(D,G,Q){var A=Q(16),F=Q(21),W=Q(22),O="prototype",H=function(N,z,M){var E=N&H.F,X=N&H.G,C=N&H.S,U=N&H.P,J=N&H.B,Y=N&H.W,K=X?F:F[z]||(F[z]={}),Z=X?A:C?A[z]:(A[z]||{})[O],V,T,R;if(X)M=z;for(V in M){if(T=!E&&Z&&V in Z,T&&V in K)continue;if(R=T?Z[V]:M[V],K[V]=X&&typeof Z[V]!="function"?M[V]:J&&T?W(R,A):Y&&Z[V]==R?function(B){var j=function(k){return this instanceof B?new B(k):B(k)};return j[O]=B[O],j}(R):U&&typeof R=="function"?W(Function.call,R):R,U)(K[O]||(K[O]={}))[V]=R}};H.F=1,H.G=2,H.S=4,H.P=8,H.B=16,H.W=32,D.exports=H},function(D,G){var Q=D.exports={version:"1.2.6"};if(typeof __e=="number")__e=Q},function(D,G,Q){var A=Q(23);D.exports=function(F,W,O){if(A(F),W===void 0)return F;switch(O){case 1:return function(H){return F.call(W,H)};case 2:return function(H,N){return F.call(W,H,N)};case 3:return function(H,N,z){return F.call(W,H,N,z)}}return function(){return F.apply(W,arguments)}}},function(D,G){D.exports=function(Q){if(typeof Q!="function")throw TypeError(Q+" is not a function!");return Q}},function(D,G,Q){D.exports=Q(25)},function(D,G,Q){var A=Q(9),F=Q(26);D.exports=Q(18)?function(W,O,H){return A.setDesc(W,O,F(1,H))}:function(W,O,H){return W[O]=H,W}},function(D,G){D.exports=function(Q,A){return{enumerable:!(Q&1),configurable:!(Q&2),writable:!(Q&4),value:A}}},function(D,G,Q){var A=Q(16),F="__core-js_shared__",W=A[F]||(A[F]={});D.exports=function(O){return W[O]||(W[O]={})}},function(D,G,Q){var A=Q(9).setDesc,F=Q(17),W=Q(29)("toStringTag");D.exports=function(O,H,N){if(O&&!F(O=N?O:O.prototype,W))A(O,W,{configurable:!0,value:H})}},function(D,G,Q){var A=Q(27)("wks"),F=Q(30),W=Q(16).Symbol;D.exports=function(O){return A[O]||(A[O]=W&&W[O]||(W||F)("Symbol."+O))}},function(D,G){var Q=0,A=Math.random();D.exports=function(F){return"Symbol(".concat(F===void 0?"":F,")_",(++Q+A).toString(36))}},function(D,G,Q){var A=Q(9),F=Q(32);D.exports=function(W,O){var H=F(W),N=A.getKeys(H),z=N.length,M=0,E;while(z>M)if(H[E=N[M++]]===O)return E}},function(D,G,Q){var A=Q(33),F=Q(35);D.exports=function(W){return A(F(W))}},function(D,G,Q){var A=Q(34);D.exports=Object("z").propertyIsEnumerable(0)?Object:function(F){return A(F)=="String"?F.split(""):Object(F)}},function(D,G){var Q={}.toString;D.exports=function(A){return Q.call(A).slice(8,-1)}},function(D,G){D.exports=function(Q){if(Q==null)throw TypeError("Can't call method on "+Q);return Q}},function(D,G,Q){var A=Q(32),F=Q(9).getNames,W={}.toString,O=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],H=function(N){try{return F(N)}catch(z){return O.slice()}};D.exports.get=function(z){if(O&&W.call(z)=="[object Window]")return H(z);return F(A(z))}},function(D,G,Q){var A=Q(9);D.exports=function(F){var W=A.getKeys(F),O=A.getSymbols;if(O){var H=O(F),N=A.isEnum,z=0,M;while(H.length>z)if(N.call(F,M=H[z++]))W.push(M)}return W}},function(D,G,Q){var A=Q(34);D.exports=Array.isArray||function(F){return A(F)=="Array"}},function(D,G,Q){var A=Q(40);D.exports=function(F){if(!A(F))throw TypeError(F+" is not an object!");return F}},function(D,G){D.exports=function(Q){return typeof Q==="object"?Q!==null:typeof Q==="function"}},function(D,G){D.exports=!0},function(D,G){},function(D,G,Q){D.exports={default:Q(44),__esModule:!0}},function(D,G,Q){Q(45),Q(51),D.exports=Q(29)("iterator")},function(D,G,Q){var A=Q(46)(!0);Q(48)(String,"String",function(F){this._t=String(F),this._i=0},function(){var F=this._t,W=this._i,O;if(W>=F.length)return{value:void 0,done:!0};return O=A(F,W),this._i+=O.length,{value:O,done:!1}})},function(D,G,Q){var A=Q(47),F=Q(35);D.exports=function(W){return function(O,H){var N=String(F(O)),z=A(H),M=N.length,E,X;if(z<0||z>=M)return W?"":void 0;return E=N.charCodeAt(z),E<55296||E>56319||z+1===M||(X=N.charCodeAt(z+1))<56320||X>57343?W?N.charAt(z):E:W?N.slice(z,z+2):(E-55296<<10)+(X-56320)+65536}}},function(D,G){var{ceil:Q,floor:A}=Math;D.exports=function(F){return isNaN(F=+F)?0:(F>0?A:Q)(F)}},function(D,G,Q){var A=Q(41),F=Q(20),W=Q(24),O=Q(25),H=Q(17),N=Q(49),z=Q(50),M=Q(28),E=Q(9).getProto,X=Q(29)("iterator"),C=!([].keys&&("next"in[].keys())),U="@@iterator",J="keys",Y="values",K=function(){return this};D.exports=function(Z,V,T,R,B,j,k){z(T,V,R);var I=function(f){if(!C&&f in v)return v[f];switch(f){case J:return function(){return new T(this,f)};case Y:return function(){return new T(this,f)}}return function(){return new T(this,f)}},L=V+" Iterator",P=B==Y,g=!1,v=Z.prototype,x=v[X]||v[U]||B&&v[B],h=x||I(B),S,q;if(x){var w=E(h.call(new Z));if(M(w,L,!0),!A&&H(v,U))O(w,X,K);if(P&&x.name!==Y)g=!0,h=function(){return x.call(this)}}if((!A||k)&&(C||g||!v[X]))O(v,X,h);if(N[V]=h,N[L]=K,B)if(S={values:P?h:I(Y),keys:j?h:I(J),entries:!P?h:I("entries")},k){for(q in S)if(!(q in v))W(v,q,S[q])}else F(F.P+F.F*(C||g),V,S);return S}},function(D,G){D.exports={}},function(D,G,Q){var A=Q(9),F=Q(26),W=Q(28),O={};Q(25)(O,Q(29)("iterator"),function(){return this}),D.exports=function(H,N,z){H.prototype=A.create(O,{next:F(1,z)}),W(H,N+" Iterator")}},function(D,G,Q){Q(52);var A=Q(49);A.NodeList=A.HTMLCollection=A.Array},function(D,G,Q){var A=Q(53),F=Q(54),W=Q(49),O=Q(32);D.exports=Q(48)(Array,"Array",function(H,N){this._t=O(H),this._i=0,this._k=N},function(){var H=this._t,N=this._k,z=this._i++;if(!H||z>=H.length)return this._t=void 0,F(1);if(N=="keys")return F(0,z);if(N=="values")return F(0,H[z]);return F(0,[z,H[z]])},"values"),W.Arguments=W.Array,A("keys"),A("values"),A("entries")},function(D,G){D.exports=function(){}},function(D,G){D.exports=function(Q,A){return{value:A,done:!!Q}}},function(D,G,Q){D.exports={default:Q(56),__esModule:!0}},function(D,G,Q){Q(51),Q(45),D.exports=Q(57)},function(D,G,Q){var A=Q(39),F=Q(58);D.exports=Q(21).getIterator=function(W){var O=F(W);if(typeof O!="function")throw TypeError(W+" is not iterable!");return A(O.call(W))}},function(D,G,Q){var A=Q(59),F=Q(29)("iterator"),W=Q(49);D.exports=Q(21).getIteratorMethod=function(O){if(O!=null)return O[F]||O["@@iterator"]||W[A(O)]}},function(D,G,Q){var A=Q(34),F=Q(29)("toStringTag"),W=A(function(){return arguments}())=="Arguments";D.exports=function(O){var H,N,z;return O===void 0?"Undefined":O===null?"Null":typeof(N=(H=Object(O))[F])=="string"?N:W?A(H):(z=A(H))=="Object"&&typeof H.callee=="function"?"Arguments":z}},function(D,G,Q){D.exports={default:Q(61),__esModule:!0}},function(D,G,Q){Q(62),D.exports=Q(21).Object.keys},function(D,G,Q){var A=Q(63);Q(64)("keys",function(F){return function(O){return F(A(O))}})},function(D,G,Q){var A=Q(35);D.exports=function(F){return Object(A(F))}},function(D,G,Q){var A=Q(20),F=Q(21),W=Q(19);D.exports=function(O,H){var N=(F.Object||{})[O]||Object[O],z={};z[O]=H(N),A(A.S+A.F*W(function(){N(1)}),"Object",z)}},function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(6),W=A(F);G.default=function(O){O.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new W.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(5),W=Q(6),O=A(W);G.default=function(H){H.registerHelper("if",function(N,z){if(arguments.length!=2)throw new O.default("#if requires exactly one argument");if(F.isFunction(N))N=N.call(this);if(!z.hash.includeZero&&!N||F.isEmpty(N))return z.inverse(this);else return z.fn(this)}),H.registerHelper("unless",function(N,z){if(arguments.length!=2)throw new O.default("#unless requires exactly one argument");return H.helpers.if.call(this,N,{fn:z.inverse,inverse:z.fn,hash:z.hash})})},D.exports=G.default},function(D,G){G.__esModule=!0,G.default=function(Q){Q.registerHelper("log",function(){var A=[void 0],F=arguments[arguments.length-1];for(var W=0;W<arguments.length-1;W++)A.push(arguments[W]);var O=1;if(F.hash.level!=null)O=F.hash.level;else if(F.data&&F.data.level!=null)O=F.data.level;A[0]=O,Q.log.apply(Q,A)})},D.exports=G.default},function(D,G){G.__esModule=!0,G.default=function(Q){Q.registerHelper("lookup",function(A,F,W){if(!A)return A;return W.lookupProperty(A,F)})},D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(5),W=Q(6),O=A(W);G.default=function(H){H.registerHelper("with",function(N,z){if(arguments.length!=2)throw new O.default("#with requires exactly one argument");if(F.isFunction(N))N=N.call(this);var M=z.fn;if(!F.isEmpty(N)){var E=z.data;if(z.data&&z.ids)E=F.createFrame(z.data),E.contextPath=F.appendContextPath(z.data.contextPath,z.ids[0]);return M(N,{data:E,blockParams:F.blockParams([N],[E&&E.contextPath])})}else return z.inverse(this)})},D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0,G.registerDefaultDecorators=O;var F=Q(71),W=A(F);function O(H){W.default(H)}},function(D,G,Q){G.__esModule=!0;var A=Q(5);G.default=function(F){F.registerDecorator("inline",function(W,O,H,N){var z=W;if(!O.partials)O.partials={},z=function(M,E){var X=H.partials;H.partials=A.extend({},X,O.partials);var C=W(M,E);return H.partials=X,C};return O.partials[N.args[0]]=N.fn,z})},D.exports=G.default},function(D,G,Q){G.__esModule=!0;var A=Q(5),F={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(O){if(typeof O==="string"){var H=A.indexOf(F.methodMap,O.toLowerCase());if(H>=0)O=H;else O=parseInt(O,10)}return O},log:function(O){if(O=F.lookupLevel(O),typeof console<"u"&&F.lookupLevel(F.level)<=O){var H=F.methodMap[O];if(!console[H])H="log";for(var N=arguments.length,z=Array(N>1?N-1:0),M=1;M<N;M++)z[M-1]=arguments[M];console[H].apply(console,z)}}};G.default=F,D.exports=G.default},function(D,G,Q){var A=Q(74).default,F=Q(60).default,W=Q(1).default;G.__esModule=!0,G.createProtoAccessControl=M,G.resultIsAllowed=E,G.resetLoggedProperties=U;var O=Q(5),H=Q(72),N=W(H),z=A(null);function M(J){var Y=A(null);Y.__proto__=!1,O.extend(Y,J.allowedProtoProperties);var K=A(null);return K.constructor=!1,K.__defineGetter__=!1,K.__defineSetter__=!1,K.__lookupGetter__=!1,K.__lookupSetter__=!1,O.extend(K,J.allowedProtoMethods),{properties:{whitelist:Y,defaultValue:J.allowProtoPropertiesByDefault},methods:{whitelist:K,defaultValue:J.allowProtoMethodsByDefault}}}function E(J,Y,K){if(typeof J==="function")return X(Y.methods,K);else return X(Y.properties,K)}function X(J,Y){if(J.whitelist[Y]!==void 0)return J.whitelist[Y]===!0;if(J.defaultValue!==void 0)return J.defaultValue;return C(Y),!1}function C(J){if(z[J]!==!0)z[J]=!0,N.default.log("error",'Handlebars: Access has been denied to resolve the property "'+J+`" because it is not an "own property" of its parent.
-You can add a runtime option to disable the check or this warning:
-See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function U(){F(z).forEach(function(J){delete z[J]})}},function(D,G,Q){D.exports={default:Q(75),__esModule:!0}},function(D,G,Q){var A=Q(9);D.exports=function(W,O){return A.create(W,O)}},function(D,G){G.__esModule=!0;function Q(A){this.string=A}Q.prototype.toString=Q.prototype.toHTML=function(){return""+this.string},G.default=Q,D.exports=G.default},function(D,G,Q){var A=Q(78).default,F=Q(60).default,W=Q(3).default,O=Q(1).default;G.__esModule=!0,G.checkRevision=J,G.template=Y,G.wrapProgram=K,G.resolvePartial=Z,G.invokePartial=V,G.noop=T;var H=Q(5),N=W(H),z=Q(6),M=O(z),E=Q(4),X=Q(10),C=Q(81),U=Q(73);function J(L){var P=L&&L[0]||1,g=E.COMPILER_REVISION;if(P>=E.LAST_COMPATIBLE_COMPILER_REVISION&&P<=E.COMPILER_REVISION)return;if(P<E.LAST_COMPATIBLE_COMPILER_REVISION){var v=E.REVISION_CHANGES[g],x=E.REVISION_CHANGES[P];throw new M.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+v+") or downgrade your runtime to an older version ("+x+").")}else throw new M.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+L[1]+").")}function Y(L,P){if(!P)throw new M.default("No environment passed to template");if(!L||!L.main)throw new M.default("Unknown template object: "+typeof L);L.main.decorator=L.main_d,P.VM.checkRevision(L.compiler);var g=L.compiler&&L.compiler[0]===7;function v(S,q,w){if(w.hash){if(q=N.extend({},q,w.hash),w.ids)w.ids[0]=!0}S=P.VM.resolvePartial.call(this,S,q,w),w.hooks=this.hooks,w.protoAccessControl=this.protoAccessControl;var f=P.VM.invokePartial.call(this,S,q,w);if(f==null&&P.compile)w.partials[w.name]=P.compile(S,L.compilerOptions,P),f=w.partials[w.name](q,w);if(f!=null){if(w.indent){var d=f.split(`
-`);for(var m=0,c=d.length;m<c;m++){if(!d[m]&&m+1===c)break;d[m]=w.indent+d[m]}f=d.join(`
-`)}return f}else throw new M.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var x={strict:function(q,w,f){if(!q||!(w in q))throw new M.default('"'+w+'" not defined in '+q,{loc:f});return x.lookupProperty(q,w)},lookupProperty:function(q,w){var f=q[w];if(f==null)return f;if(Object.prototype.hasOwnProperty.call(q,w))return f;if(U.resultIsAllowed(f,x.protoAccessControl,w))return f;return},lookup:function(q,w){var f=q.length;for(var d=0;d<f;d++){var m=q[d]&&x.lookupProperty(q[d],w);if(m!=null)return m}},lambda:function(q,w){return typeof q==="function"?q.call(w):q},escapeExpression:N.escapeExpression,invokePartial:v,fn:function(q){var w=L[q];return w.decorator=L[q+"_d"],w},programs:[],program:function(q,w,f,d,m){var c=this.programs[q],p=this.fn(q);if(w||m||d||f)c=K(this,q,p,w,f,d,m);else if(!c)c=this.programs[q]=K(this,q,p);return c},data:function(q,w){while(q&&w--)q=q._parent;return q},mergeIfNeeded:function(q,w){var f=q||w;if(q&&w&&q!==w)f=N.extend({},w,q);return f},nullContext:A({}),noop:P.VM.noop,compilerInfo:L.compiler};function h(S){var q=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=q.data;if(h._setup(q),!q.partial&&L.useData)w=B(S,w);var f=void 0,d=L.useBlockParams?[]:void 0;if(L.useDepths)if(q.depths)f=S!=q.depths[0]?[S].concat(q.depths):q.depths;else f=[S];function m(c){return""+L.main(x,c,x.helpers,x.partials,w,d,f)}return m=j(L.main,m,x,q.depths||[],w,d),m(S,q)}return h.isTop=!0,h._setup=function(S){if(!S.partial){var q={};if(k(q,P.helpers,x),k(q,S.helpers,x),x.helpers=q,L.usePartial)x.partials=x.mergeIfNeeded(S.partials,P.partials);if(L.usePartial||L.useDecorators)x.decorators=N.extend({},P.decorators,S.decorators);x.hooks={},x.protoAccessControl=U.createProtoAccessControl(S);var w=S.allowCallsToHelperMissing||g;X.moveHelperToHooks(x,"helperMissing",w),X.moveHelperToHooks(x,"blockHelperMissing",w)}else x.protoAccessControl=S.protoAccessControl,x.helpers=S.helpers,x.partials=S.partials,x.decorators=S.decorators,x.hooks=S.hooks},h._child=function(S,q,w,f){if(L.useBlockParams&&!w)throw new M.default("must pass block params");if(L.useDepths&&!f)throw new M.default("must pass parent depths");return K(x,S,L[S],q,0,w,f)},h}function K(L,P,g,v,x,h,S){function q(w){var f=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=S;if(S&&w!=S[0]&&!(w===L.nullContext&&S[0]===null))d=[w].concat(S);return g(L,w,L.helpers,L.partials,f.data||v,h&&[f.blockParams].concat(h),d)}return q=j(g,q,L,S,v,h),q.program=P,q.depth=S?S.length:0,q.blockParams=x||0,q}function Z(L,P,g){if(!L)if(g.name==="@partial-block")L=R(g.data,"partial-block");else L=R(g.partials,g.name);else if(!L.call&&!g.name)g.name=L,L=R(g.partials,L);return L}function V(L,P,g){var v=R(g.data,"partial-block");if(g.partial=!0,g.ids)g.data.contextPath=g.ids[0]||g.data.contextPath;var x=void 0;if(g.fn&&g.fn!==T)(function(){g.data=E.createFrame(g.data);var h=g.fn;if(x=g.data["partial-block"]=function(q){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=E.createFrame(w.data),w.data["partial-block"]=v,h(q,w)},h.partials)g.partials=N.extend({},g.partials,h.partials)})();if(L===void 0&&x)L=x;if(L===void 0)throw new M.default("The partial "+g.name+" could not be found");else if(L instanceof Function)return L(P,g)}function T(){return""}function R(L,P){if(L&&Object.prototype.hasOwnProperty.call(L,P))return L[P]}function B(L,P){if(!P||!("root"in P))P=P?E.createFrame(P):{},P.root=L;return P}function j(L,P,g,v,x,h){if(L.decorator){var S={};P=L.decorator(P,S,g,v&&v[0],x,h,v),N.extend(P,S)}return P}function k(L,P,g){if(!P)return;F(P).forEach(function(v){var x=P[v];L[v]=I(x,g)})}function I(L,P){var g=P.lookupProperty;return C.wrapHelper(L,function(v){return v.lookupProperty=g,v})}},function(D,G,Q){D.exports={default:Q(79),__esModule:!0}},function(D,G,Q){Q(80),D.exports=Q(21).Object.seal},function(D,G,Q){var A=Q(40);Q(64)("seal",function(F){return function(O){return F&&A(O)?F(O):O}})},function(D,G){G.__esModule=!0,G.wrapHelper=Q;function Q(A,F){if(typeof A!=="function")return A;var W=function(){var H=arguments[arguments.length-1];return arguments[arguments.length-1]=F(H),A.apply(this,arguments)};return W}},function(D,G){G.__esModule=!0,G.default=function(Q){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var A=globalThis.Handlebars;Q.noConflict=function(){if(globalThis.Handlebars===Q)globalThis.Handlebars=A;return Q}},D.exports=G.default},function(D,G){G.__esModule=!0;var Q={helpers:{helperExpression:function(F){return F.type==="SubExpression"||(F.type==="MustacheStatement"||F.type==="BlockStatement")&&!!(F.params&&F.params.length||F.hash)},scopedId:function(F){return/^\.|this\b/.test(F.original)},simpleId:function(F){return F.parts.length===1&&!Q.helpers.scopedId(F)&&!F.depth}}};G.default=Q,D.exports=G.default},function(D,G,Q){var A=Q(60).default,F=Q(1).default,W=Q(3).default;G.__esModule=!0,G.parseWithoutProcessing=Y,G.parse=K;var O=Q(85),H=F(O),N=Q(86),z=F(N),M=Q(88),E=W(M),X=Q(6),C=F(X),U=Q(5);G.parser=H.default;var J={};U.extend(J,E);function Y(R,B){if(R.type==="Program")return Z(R),R;H.default.yy=J,J.locInfo=function(k){return new J.SourceLocation(B&&B.srcName,k)};var j=H.default.parse(R);return j}function K(R,B){var j=Y(R,B),k=new z.default(B);return k.accept(j)}function Z(R){V(R)}function V(R){if(R==null)return;if(Array.isArray(R)){R.forEach(V);return}if(typeof R!=="object")return;if(R.type==="PathExpression"){if(!T(R.depth))throw new C.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(R.parts))throw new C.default("Invalid AST: PathExpression.parts must be an array");for(var B=0;B<R.parts.length;B++)if(typeof R.parts[B]!=="string")throw new C.default("Invalid AST: PathExpression.parts must only contain strings")}else if(R.type==="NumberLiteral"){if(typeof R.value!=="number"||!isFinite(R.value))throw new C.default("Invalid AST: NumberLiteral.value must be a number")}else if(R.type==="BooleanLiteral"){if(typeof R.value!=="boolean")throw new C.default("Invalid AST: BooleanLiteral.value must be a boolean")}A(R).forEach(function(j){if(j==="loc")return;V(R[j])})}function T(R){return typeof R==="number"&&isFinite(R)&&Math.floor(R)===R&&R>=0}},function(D,G){G.__esModule=!0;var Q=function(){var A={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(H,N,z,M,E,X,C){var U=X.length-1;switch(E){case 1:return X[U-1];case 2:this.$=M.prepareProgram(X[U]);break;case 3:this.$=X[U];break;case 4:this.$=X[U];break;case 5:this.$=X[U];break;case 6:this.$=X[U];break;case 7:this.$=X[U];break;case 8:this.$=X[U];break;case 9:this.$={type:"CommentStatement",value:M.stripComment(X[U]),strip:M.stripFlags(X[U],X[U]),loc:M.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:X[U],value:X[U],loc:M.locInfo(this._$)};break;case 11:this.$=M.prepareRawBlock(X[U-2],X[U-1],X[U],this._$);break;case 12:this.$={path:X[U-3],params:X[U-2],hash:X[U-1]};break;case 13:this.$=M.prepareBlock(X[U-3],X[U-2],X[U-1],X[U],!1,this._$);break;case 14:this.$=M.prepareBlock(X[U-3],X[U-2],X[U-1],X[U],!0,this._$);break;case 15:this.$={open:X[U-5],path:X[U-4],params:X[U-3],hash:X[U-2],blockParams:X[U-1],strip:M.stripFlags(X[U-5],X[U])};break;case 16:this.$={path:X[U-4],params:X[U-3],hash:X[U-2],blockParams:X[U-1],strip:M.stripFlags(X[U-5],X[U])};break;case 17:this.$={path:X[U-4],params:X[U-3],hash:X[U-2],blockParams:X[U-1],strip:M.stripFlags(X[U-5],X[U])};break;case 18:this.$={strip:M.stripFlags(X[U-1],X[U-1]),program:X[U]};break;case 19:var J=M.prepareBlock(X[U-2],X[U-1],X[U],X[U],!1,this._$),Y=M.prepareProgram([J],X[U-1].loc);Y.chained=!0,this.$={strip:X[U-2].strip,program:Y,chain:!0};break;case 20:this.$=X[U];break;case 21:this.$={path:X[U-1],strip:M.stripFlags(X[U-2],X[U])};break;case 22:this.$=M.prepareMustache(X[U-3],X[U-2],X[U-1],X[U-4],M.stripFlags(X[U-4],X[U]),this._$);break;case 23:this.$=M.prepareMustache(X[U-3],X[U-2],X[U-1],X[U-4],M.stripFlags(X[U-4],X[U]),this._$);break;case 24:this.$={type:"PartialStatement",name:X[U-3],params:X[U-2],hash:X[U-1],indent:"",strip:M.stripFlags(X[U-4],X[U]),loc:M.locInfo(this._$)};break;case 25:this.$=M.preparePartialBlock(X[U-2],X[U-1],X[U],this._$);break;case 26:this.$={path:X[U-3],params:X[U-2],hash:X[U-1],strip:M.stripFlags(X[U-4],X[U])};break;case 27:this.$=X[U];break;case 28:this.$=X[U];break;case 29:this.$={type:"SubExpression",path:X[U-3],params:X[U-2],hash:X[U-1],loc:M.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:X[U],loc:M.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:M.id(X[U-2]),value:X[U],loc:M.locInfo(this._$)};break;case 32:this.$=M.id(X[U-1]);break;case 33:this.$=X[U];break;case 34:this.$=X[U];break;case 35:this.$={type:"StringLiteral",value:X[U],original:X[U],loc:M.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(X[U]),original:Number(X[U]),loc:M.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:X[U]==="true",original:X[U]==="true",loc:M.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:M.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:M.locInfo(this._$)};break;case 40:this.$=X[U];break;case 41:this.$=X[U];break;case 42:this.$=M.preparePath(!0,X[U],this._$);break;case 43:this.$=M.preparePath(!1,X[U],this._$);break;case 44:X[U-2].push({part:M.id(X[U]),original:X[U],separator:X[U-1]}),this.$=X[U-2];break;case 45:this.$=[{part:M.id(X[U]),original:X[U]}];break;case 46:this.$=[];break;case 47:X[U-1].push(X[U]);break;case 48:this.$=[];break;case 49:X[U-1].push(X[U]);break;case 50:this.$=[];break;case 51:X[U-1].push(X[U]);break;case 58:this.$=[];break;case 59:X[U-1].push(X[U]);break;case 64:this.$=[];break;case 65:X[U-1].push(X[U]);break;case 70:this.$=[];break;case 71:X[U-1].push(X[U]);break;case 78:this.$=[];break;case 79:X[U-1].push(X[U]);break;case 82:this.$=[];break;case 83:X[U-1].push(X[U]);break;case 86:this.$=[];break;case 87:X[U-1].push(X[U]);break;case 90:this.$=[];break;case 91:X[U-1].push(X[U]);break;case 94:this.$=[];break;case 95:X[U-1].push(X[U]);break;case 98:this.$=[X[U]];break;case 99:X[U-1].push(X[U]);break;case 100:this.$=[X[U]];break;case 101:X[U-1].push(X[U]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(H,N){throw Error(H)},parse:function(H){var N=this,z=[0],M=[null],E=[],X=this.table,C="",U=0,J=0,Y=0,K=2,Z=1;if(this.lexer.setInput(H),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u")this.lexer.yylloc={};var V=this.lexer.yylloc;E.push(V);var T=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function R(f){z.length=z.length-2*f,M.length=M.length-f,E.length=E.length-f}function B(){var f=N.lexer.lex()||1;if(typeof f!=="number")f=N.symbols_[f]||f;return f}var j,k,I,L,P,g,v={},x,h,S,q;while(!0){if(I=z[z.length-1],this.defaultActions[I])L=this.defaultActions[I];else{if(j===null||typeof j>"u")j=B();L=X[I]&&X[I][j]}if(typeof L>"u"||!L.length||!L[0]){var w="";if(!Y){q=[];for(x in X[I])if(this.terminals_[x]&&x>2)q.push("'"+this.terminals_[x]+"'");if(this.lexer.showPosition)w="Parse error on line "+(U+1)+`:
-`+this.lexer.showPosition()+`
-Expecting `+q.join(", ")+", got '"+(this.terminals_[j]||j)+"'";else w="Parse error on line "+(U+1)+": Unexpected "+(j==1?"end of input":"'"+(this.terminals_[j]||j)+"'");this.parseError(w,{text:this.lexer.match,token:this.terminals_[j]||j,line:this.lexer.yylineno,loc:V,expected:q})}}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+j);switch(L[0]){case 1:if(z.push(j),M.push(this.lexer.yytext),E.push(this.lexer.yylloc),z.push(L[1]),j=null,!k){if(J=this.lexer.yyleng,C=this.lexer.yytext,U=this.lexer.yylineno,V=this.lexer.yylloc,Y>0)Y--}else j=k,k=null;break;case 2:if(h=this.productions_[L[1]][1],v.$=M[M.length-h],v._$={first_line:E[E.length-(h||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(h||1)].first_column,last_column:E[E.length-1].last_column},T)v._$.range=[E[E.length-(h||1)].range[0],E[E.length-1].range[1]];if(g=this.performAction.call(v,C,J,U,this.yy,L[1],M,E),typeof g<"u")return g;if(h)z=z.slice(0,-1*h*2),M=M.slice(0,-1*h),E=E.slice(0,-1*h);z.push(this.productions_[L[1]][0]),M.push(v.$),E.push(v._$),S=X[z[z.length-2]][z[z.length-1]],z.push(S);break;case 3:return!0}}return!0}},F=function(){var O={EOF:1,parseError:function(N,z){if(this.yy.parser)this.yy.parser.parseError(N,z);else throw Error(N)},setInput:function(N){if(this._input=N,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},input:function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var z=N.match(/(?:\r\n?|\n).*/g);if(z)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),N},unput:function(N){var z=N.length,M=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z-1),this.offset-=z;var E=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1)this.yylineno-=M.length-1;var X=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===E.length?this.yylloc.first_column:0)+E[E.length-M.length].length-M[0].length:this.yylloc.first_column-z},this.options.ranges)this.yylloc.range=[X[0],X[0]+this.yyleng-z];return this},more:function(){return this._more=!0,this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;if(N.length<20)N+=this._input.substr(0,20-N.length);return(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),z=Array(N.length+1).join("-");return N+this.upcomingInput()+`
-`+z+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var N,z,M,E,X,C;if(!this._more)this.yytext="",this.match="";var U=this._currentRules();for(var J=0;J<U.length;J++)if(M=this._input.match(this.rules[U[J]]),M&&(!z||M[0].length>z[0].length)){if(z=M,E=J,!this.options.flex)break}if(z){if(C=z[0].match(/(?:\r\n?|\n).*/g),C)this.yylineno+=C.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._input=this._input.slice(z[0].length),this.matched+=z[0],N=this.performAction.call(this,this.yy,this,U[E],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(N)return N;else return}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
-`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var N=this.next();if(typeof N<"u")return N;else return this.lex()},begin:function(N){this.conditionStack.push(N)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(N){this.begin(N)}};return O.options={},O.performAction=function(N,z,M,E){function X(U,J){return z.yytext=z.yytext.substring(U,z.yyleng-J+U)}var C=E;switch(M){case 0:if(z.yytext.slice(-2)==="\\\\")X(0,1),this.begin("mu");else if(z.yytext.slice(-1)==="\\")X(0,1),this.begin("emu");else this.begin("mu");if(z.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return X(5,9),"END_RAW_BLOCK";break;case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(z.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return z.yytext=X(1,2).replace(/\\"/g,'"'),80;break;case 32:return z.yytext=X(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return z.yytext=z.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},O.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],O.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},O}();A.lexer=F;function W(){this.yy={}}return W.prototype=A,A.Parser=W,new W}();G.default=Q,D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(87),W=A(F);function O(){var E=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=E}O.prototype=new W.default,O.prototype.Program=function(E){var X=!this.options.ignoreStandalone,C=!this.isRootSeen;this.isRootSeen=!0;var U=E.body;for(var J=0,Y=U.length;J<Y;J++){var K=U[J],Z=this.accept(K);if(!Z)continue;var V=H(U,J,C),T=N(U,J,C),R=Z.openStandalone&&V,B=Z.closeStandalone&&T,j=Z.inlineStandalone&&V&&T;if(Z.close)z(U,J,!0);if(Z.open)M(U,J,!0);if(X&&j){if(z(U,J),M(U,J)){if(K.type==="PartialStatement")K.indent=/([ \t]+$)/.exec(U[J-1].original)[1]}}if(X&&R)z((K.program||K.inverse).body),M(U,J);if(X&&B)z(U,J),M((K.inverse||K.program).body)}return E},O.prototype.BlockStatement=O.prototype.DecoratorBlock=O.prototype.PartialBlockStatement=function(E){this.accept(E.program),this.accept(E.inverse);var X=E.program||E.inverse,C=E.program&&E.inverse,U=C,J=C;if(C&&C.chained){U=C.body[0].program;while(J.chained)J=J.body[J.body.length-1].program}var Y={open:E.openStrip.open,close:E.closeStrip.close,openStandalone:N(X.body),closeStandalone:H((U||X).body)};if(E.openStrip.close)z(X.body,null,!0);if(C){var K=E.inverseStrip;if(K.open)M(X.body,null,!0);if(K.close)z(U.body,null,!0);if(E.closeStrip.open)M(J.body,null,!0);if(!this.options.ignoreStandalone&&H(X.body)&&N(U.body))M(X.body),z(U.body)}else if(E.closeStrip.open)M(X.body,null,!0);return Y},O.prototype.Decorator=O.prototype.MustacheStatement=function(E){return E.strip},O.prototype.PartialStatement=O.prototype.CommentStatement=function(E){var X=E.strip||{};return{inlineStandalone:!0,open:X.open,close:X.close}};function H(E,X,C){if(X===void 0)X=E.length;var U=E[X-1],J=E[X-2];if(!U)return C;if(U.type==="ContentStatement")return(J||!C?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(U.original)}function N(E,X,C){if(X===void 0)X=-1;var U=E[X+1],J=E[X+2];if(!U)return C;if(U.type==="ContentStatement")return(J||!C?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(U.original)}function z(E,X,C){var U=E[X==null?0:X+1];if(!U||U.type!=="ContentStatement"||!C&&U.rightStripped)return;var J=U.value;U.value=U.value.replace(C?/^\s+/:/^[ \t]*\r?\n?/,""),U.rightStripped=U.value!==J}function M(E,X,C){var U=E[X==null?E.length-1:X-1];if(!U||U.type!=="ContentStatement"||!C&&U.leftStripped)return;var J=U.value;return U.value=U.value.replace(C?/\s+$/:/[ \t]+$/,""),U.leftStripped=U.value!==J,U.leftStripped}G.default=O,D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0;var F=Q(6),W=A(F);function O(){this.parents=[]}O.prototype={constructor:O,mutating:!1,acceptKey:function(E,X){var C=this.accept(E[X]);if(this.mutating){if(C&&!O.prototype[C.type])throw new W.default('Unexpected node type "'+C.type+'" found when accepting '+X+" on "+E.type);E[X]=C}},acceptRequired:function(E,X){if(this.acceptKey(E,X),!E[X])throw new W.default(E.type+" requires "+X)},acceptArray:function(E){for(var X=0,C=E.length;X<C;X++)if(this.acceptKey(E,X),!E[X])E.splice(X,1),X--,C--},accept:function(E){if(!E)return;if(!this[E.type])throw new W.default("Unknown type: "+E.type,E);if(this.current)this.parents.unshift(this.current);this.current=E;var X=this[E.type](E);if(this.current=this.parents.shift(),!this.mutating||X)return X;else if(X!==!1)return E},Program:function(E){this.acceptArray(E.body)},MustacheStatement:H,Decorator:H,BlockStatement:N,DecoratorBlock:N,PartialStatement:z,PartialBlockStatement:function(E){z.call(this,E),this.acceptKey(E,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:H,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(E){this.acceptArray(E.pairs)},HashPair:function(E){this.acceptRequired(E,"value")}};function H(M){this.acceptRequired(M,"path"),this.acceptArray(M.params),this.acceptKey(M,"hash")}function N(M){H.call(this,M),this.acceptKey(M,"program"),this.acceptKey(M,"inverse")}function z(M){this.acceptRequired(M,"name"),this.acceptArray(M.params),this.acceptKey(M,"hash")}G.default=O,D.exports=G.default},function(D,G,Q){var A=Q(1).default;G.__esModule=!0,G.SourceLocation=H,G.id=N,G.stripFlags=z,G.stripComment=M,G.preparePath=E,G.prepareMustache=X,G.prepareRawBlock=C,G.prepareBlock=U,G.prepareProgram=J,G.preparePartialBlock=Y;var F=Q(6),W=A(F);function O(K,Z){if(Z=Z.path?Z.path.original:Z,K.path.original!==Z){var V={loc:K.path.loc};throw new W.default(K.path.original+" doesn't match "+Z,V)}}function H(K,Z){this.source=K,this.start={line:Z.first_line,column:Z.first_column},this.end={line:Z.last_line,column:Z.last_column}}function N(K){if(/^\[.*\]$/.test(K))return K.substring(1,K.length-1);else return K}function z(K,Z){return{open:K.charAt(2)==="~",close:Z.charAt(Z.length-3)==="~"}}function M(K){return K.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function E(K,Z,V){V=this.locInfo(V);var T=K?"@":"",R=[],B=0;for(var j=0,k=Z.length;j<k;j++){var I=Z[j].part,L=Z[j].original!==I;if(T+=(Z[j].separator||"")+I,!L&&(I===".."||I==="."||I==="this")){if(R.length>0)throw new W.default("Invalid path: "+T,{loc:V});else if(I==="..")B++}else R.push(I)}return{type:"PathExpression",data:K,depth:B,parts:R,original:T,loc:V}}function X(K,Z,V,T,R,B){var j=T.charAt(3)||T.charAt(2),k=j!=="{"&&j!=="&",I=/\*/.test(T);return{type:I?"Decorator":"MustacheStatement",path:K,params:Z,hash:V,escaped:k,strip:R,loc:this.locInfo(B)}}function C(K,Z,V,T){O(K,V),T=this.locInfo(T);var R={type:"Program",body:Z,strip:{},loc:T};return{type:"BlockStatement",path:K.path,params:K.params,hash:K.hash,program:R,openStrip:{},inverseStrip:{},closeStrip:{},loc:T}}function U(K,Z,V,T,R,B){if(T&&T.path)O(K,T);var j=/\*/.test(K.open);Z.blockParams=K.blockParams;var k=void 0,I=void 0;if(V){if(j)throw new W.default("Unexpected inverse block on decorator",V);if(V.chain)V.program.body[0].closeStrip=T.strip;I=V.strip,k=V.program}if(R)R=k,k=Z,Z=R;return{type:j?"DecoratorBlock":"BlockStatement",path:K.path,params:K.params,hash:K.hash,program:Z,inverse:k,openStrip:K.strip,inverseStrip:I,closeStrip:T&&T.strip,loc:this.locInfo(B)}}function J(K,Z){if(!Z&&K.length){var V=K[0].loc,T=K[K.length-1].loc;if(V&&T)Z={source:V.source,start:{line:V.start.line,column:V.start.column},end:{line:T.end.line,column:T.end.column}}}return{type:"Program",body:K,strip:{},loc:Z}}function Y(K,Z,V,T){return O(K,V),{type:"PartialBlockStatement",name:K.path,params:K.params,hash:K.hash,program:Z,openStrip:K.strip,closeStrip:V&&V.strip,loc:this.locInfo(T)}}},function(D,G,Q){var A=Q(74).default,F=Q(1).default;G.__esModule=!0,G.Compiler=E,G.precompile=X,G.compile=C;var W=Q(6),O=F(W),H=Q(5),N=Q(83),z=F(N),M=[].slice;function E(){}E.prototype={compiler:E,equals:function(K){var Z=this.opcodes.length;if(K.opcodes.length!==Z)return!1;for(var V=0;V<Z;V++){var T=this.opcodes[V],R=K.opcodes[V];if(T.opcode!==R.opcode||!U(T.args,R.args))return!1}Z=this.children.length;for(var V=0;V<Z;V++)if(!this.children[V].equals(K.children[V]))return!1;return!0},guid:0,compile:function(K,Z){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=Z,this.stringParams=Z.stringParams,this.trackIds=Z.trackIds,Z.blockParams=Z.blockParams||[],Z.knownHelpers=H.extend(A(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},Z.knownHelpers),this.accept(K)},compileProgram:function(K){var Z=new this.compiler,V=Z.compile(K,this.options),T=this.guid++;return this.usePartial=this.usePartial||V.usePartial,this.children[T]=V,this.useDepths=this.useDepths||V.useDepths,T},accept:function(K){if(!this[K.type])throw new O.default("Unknown type: "+K.type,K);this.sourceNode.unshift(K);var Z=this[K.type](K);return this.sourceNode.shift(),Z},Program:function(K){this.options.blockParams.unshift(K.blockParams);var Z=K.body,V=Z.length;for(var T=0;T<V;T++)this.accept(Z[T]);return this.options.blockParams.shift(),this.isSimple=V===1,this.blockParams=K.blockParams?K.blockParams.length:0,this},BlockStatement:function(K){J(K);var{program:Z,inverse:V}=K;Z=Z&&this.compileProgram(Z),V=V&&this.compileProgram(V);var T=this.classifySexpr(K);if(T==="helper")this.helperSexpr(K,Z,V);else if(T==="simple")this.simpleSexpr(K),this.opcode("pushProgram",Z),this.opcode("pushProgram",V),this.opcode("emptyHash"),this.opcode("blockValue",K.path.original);else this.ambiguousSexpr(K,Z,V),this.opcode("pushProgram",Z),this.opcode("pushProgram",V),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function(K){var Z=K.program&&this.compileProgram(K.program),V=this.setupFullMustacheParams(K,Z,void 0),T=K.path;this.useDecorators=!0,this.opcode("registerDecorator",V.length,T.original)},PartialStatement:function(K){this.usePartial=!0;var Z=K.program;if(Z)Z=this.compileProgram(K.program);var V=K.params;if(V.length>1)throw new O.default("Unsupported number of partial arguments: "+V.length,K);else if(!V.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else V.push({type:"PathExpression",parts:[],depth:0});var T=K.name.original,R=K.name.type==="SubExpression";if(R)this.accept(K.name);this.setupFullMustacheParams(K,Z,void 0,!0);var B=K.indent||"";if(this.options.preventIndent&&B)this.opcode("appendContent",B),B="";this.opcode("invokePartial",R,T,B),this.opcode("append")},PartialBlockStatement:function(K){this.PartialStatement(K)},MustacheStatement:function(K){if(this.SubExpression(K),K.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function(K){this.DecoratorBlock(K)},ContentStatement:function(K){if(K.value)this.opcode("appendContent",K.value)},CommentStatement:function(){},SubExpression:function(K){J(K);var Z=this.classifySexpr(K);if(Z==="simple")this.simpleSexpr(K);else if(Z==="helper")this.helperSexpr(K);else this.ambiguousSexpr(K)},ambiguousSexpr:function(K,Z,V){var T=K.path,R=T.parts[0],B=Z!=null||V!=null;this.opcode("getContext",T.depth),this.opcode("pushProgram",Z),this.opcode("pushProgram",V),T.strict=!0,this.accept(T),this.opcode("invokeAmbiguous",R,B)},simpleSexpr:function(K){var Z=K.path;Z.strict=!0,this.accept(Z),this.opcode("resolvePossibleLambda")},helperSexpr:function(K,Z,V){var T=this.setupFullMustacheParams(K,Z,V),R=K.path,B=R.parts[0];if(this.options.knownHelpers[B])this.opcode("invokeKnownHelper",T.length,B);else if(this.options.knownHelpersOnly)throw new O.default("You specified knownHelpersOnly, but used the unknown helper "+B,K);else R.strict=!0,R.falsy=!0,this.accept(R),this.opcode("invokeHelper",T.length,R.original,z.default.helpers.simpleId(R))},PathExpression:function(K){this.addDepth(K.depth),this.opcode("getContext",K.depth);var Z=K.parts[0],V=z.default.helpers.scopedId(K),T=!K.depth&&!V&&this.blockParamIndex(Z);if(T)this.opcode("lookupBlockParam",T,K.parts);else if(!Z)this.opcode("pushContext");else if(K.data)this.options.data=!0,this.opcode("lookupData",K.depth,K.parts,K.strict);else this.opcode("lookupOnContext",K.parts,K.falsy,K.strict,V)},StringLiteral:function(K){this.opcode("pushString",K.value)},NumberLiteral:function(K){this.opcode("pushLiteral",K.value)},BooleanLiteral:function(K){this.opcode("pushLiteral",K.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(K){var Z=K.pairs,V=0,T=Z.length;this.opcode("pushHash");for(;V<T;V++)this.pushParam(Z[V].value);while(V--)this.opcode("assignToHash",Z[V].key);this.opcode("popHash")},opcode:function(K){this.opcodes.push({opcode:K,args:M.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(K){if(!K)return;this.useDepths=!0},classifySexpr:function(K){var Z=z.default.helpers.simpleId(K.path),V=Z&&!!this.blockParamIndex(K.path.parts[0]),T=!V&&z.default.helpers.helperExpression(K),R=!V&&(T||Z);if(R&&!T){var B=K.path.parts[0],j=this.options;if(j.knownHelpers[B])T=!0;else if(j.knownHelpersOnly)R=!1}if(T)return"helper";else if(R)return"ambiguous";else return"simple"},pushParams:function(K){for(var Z=0,V=K.length;Z<V;Z++)this.pushParam(K[Z])},pushParam:function(K){var Z=K.value!=null?K.value:K.original||"";if(this.stringParams){if(Z.replace)Z=Z.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(K.depth)this.addDepth(K.depth);if(this.opcode("getContext",K.depth||0),this.opcode("pushStringParam",Z,K.type),K.type==="SubExpression")this.accept(K)}else{if(this.trackIds){var V=void 0;if(K.parts&&!z.default.helpers.scopedId(K)&&!K.depth)V=this.blockParamIndex(K.parts[0]);if(V){var T=K.parts.slice(1).join(".");this.opcode("pushId","BlockParam",V,T)}else{if(Z=K.original||Z,Z.replace)Z=Z.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",K.type,Z)}}this.accept(K)}},setupFullMustacheParams:function(K,Z,V,T){var R=K.params;if(this.pushParams(R),this.opcode("pushProgram",Z),this.opcode("pushProgram",V),K.hash)this.accept(K.hash);else this.opcode("emptyHash",T);return R},blockParamIndex:function(K){for(var Z=0,V=this.options.blockParams.length;Z<V;Z++){var T=this.options.blockParams[Z],R=T&&H.indexOf(T,K);if(T&&R>=0)return[Z,R]}}};function X(Y,K,Z){if(Y==null||typeof Y!=="string"&&Y.type!=="Program")throw new O.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+Y);if(K=K||{},!("data"in K))K.data=!0;if(K.compat)K.useDepths=!0;var V=Z.parse(Y,K),T=new Z.Compiler().compile(V,K);return new Z.JavaScriptCompiler().compile(T,K)}function C(Y,K,Z){if(K===void 0)K={};if(Y==null||typeof Y!=="string"&&Y.type!=="Program")throw new O.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+Y);if(K=H.extend({},K),!("data"in K))K.data=!0;if(K.compat)K.useDepths=!0;var V=void 0;function T(){var B=Z.parse(Y,K),j=new Z.Compiler().compile(B,K),k=new Z.JavaScriptCompiler().compile(j,K,void 0,!0);return Z.template(k)}function R(B,j){if(!V)V=T();return V.call(this,B,j)}return R._setup=function(B){if(!V)V=T();return V._setup(B)},R._child=function(B,j,k,I){if(!V)V=T();return V._child(B,j,k,I)},R}function U(Y,K){if(Y===K)return!0;if(H.isArray(Y)&&H.isArray(K)&&Y.length===K.length){for(var Z=0;Z<Y.length;Z++)if(!U(Y[Z],K[Z]))return!1;return!0}}function J(Y){if(!Y.path.parts){var K=Y.path;Y.path={type:"PathExpression",data:!1,depth:0,parts:[K.original+""],original:K.original+"",loc:K.loc}}}},function(D,G,Q){var A=Q(60).default,F=Q(1).default;G.__esModule=!0;var W=Q(4),O=Q(6),H=F(O),N=Q(5),z=Q(91),M=F(z);function E(U){this.value=U}function X(){}X.prototype={nameLookup:function(J,Y){return this.internalNameLookup(J,Y)},depthedLookup:function(J){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(J),")"]},compilerInfo:function(){var J=W.COMPILER_REVISION,Y=W.REVISION_CHANGES[J];return[J,Y]},appendToBuffer:function(J,Y,K){if(!N.isArray(J))J=[J];if(J=this.source.wrap(J,Y),this.environment.isSimple)return["return ",J,";"];else if(K)return["buffer += ",J,";"];else return J.appendToBuffer=!0,J},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(J,Y){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",J,",",JSON.stringify(Y),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(J,Y,K,Z){this.environment=J,this.options=Y,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!Z,this.name=this.environment.name,this.isChild=!!K,this.context=K||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(J,Y),this.useDepths=this.useDepths||J.useDepths||J.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||J.useBlockParams;var V=J.opcodes,T=void 0,R=void 0,B=void 0,j=void 0;for(B=0,j=V.length;B<j;B++)T=V[B],this.source.currentLocation=T.loc,R=R||T.loc,this[T.opcode].apply(this,T.args);if(this.source.currentLocation=R,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new H.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
-`]),this.decorators.push("return fn;"),Z)this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]);else this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
-`),this.decorators.push(`}
-`),this.decorators=this.decorators.merge();else this.decorators=void 0;var k=this.createFunctionContext(Z);if(!this.isChild){var I={compiler:this.compilerInfo(),main:k};if(this.decorators)I.main_d=this.decorators,I.useDecorators=!0;var L=this.context,P=L.programs,g=L.decorators;for(B=0,j=P.length;B<j;B++)if(I[B]=P[B],g[B])I[B+"_d"]=g[B],I.useDecorators=!0;if(this.environment.usePartial)I.usePartial=!0;if(this.options.data)I.useData=!0;if(this.useDepths)I.useDepths=!0;if(this.useBlockParams)I.useBlockParams=!0;if(this.options.compat)I.compat=!0;if(!Z)if(I.compiler=JSON.stringify(I.compiler),this.source.currentLocation={start:{line:1,column:0}},I=this.objectLiteral(I),Y.srcName)I=I.toStringWithSourceMap({file:Y.destName}),I.map=I.map&&I.map.toString();else I=I.toString();else I.compilerOptions=this.options;return I}else return k},preamble:function(){this.lastContext=0,this.source=new M.default(this.options.srcName),this.decorators=new M.default(this.options.srcName)},createFunctionContext:function(J){var Y=this,K="",Z=this.stackVars.concat(this.registers.list);if(Z.length>0)K+=", "+Z.join(", ");var V=0;if(A(this.aliases).forEach(function(B){var j=Y.aliases[B];if(j.children&&j.referenceCount>1)K+=", alias"+ ++V+"="+B,j.children[0]="alias"+V}),this.lookupPropertyFunctionIsUsed)K+=", "+this.lookupPropertyFunctionVarDeclaration();var T=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths)T.push("blockParams");if(this.useDepths)T.push("depths");var R=this.mergeSource(K);if(J)return T.push(R),Function.apply(this,T);else return this.source.wrap(["function(",T.join(","),`) {
- `,R,"}"])},mergeSource:function(J){var Y=this.environment.isSimple,K=!this.forceBuffer,Z=void 0,V=void 0,T=void 0,R=void 0;if(this.source.each(function(B){if(B.appendToBuffer){if(T)B.prepend(" + ");else T=B;R=B}else{if(T){if(!V)Z=!0;else T.prepend("buffer += ");R.add(";"),T=R=void 0}if(V=!0,!Y)K=!1}}),K){if(T)T.prepend("return "),R.add(";");else if(!V)this.source.push('return "";')}else if(J+=", buffer = "+(Z?"":this.initializeBuffer()),T)T.prepend("return buffer + "),R.add(";");else this.source.push("return buffer;");if(J)this.source.prepend("var "+J.substring(2)+(Z?"":`;
-`));return this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
- lookupProperty = container.lookupProperty || function(parent, propertyName) {
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
- return parent[propertyName];
- }
- return undefined
- }
- `.trim()},blockValue:function(J){var Y=this.aliasable("container.hooks.blockHelperMissing"),K=[this.contextName(0)];this.setupHelperArgs(J,0,K);var Z=this.popStack();K.splice(1,0,Z),this.push(this.source.functionCall(Y,"call",K))},ambiguousBlockValue:function(){var J=this.aliasable("container.hooks.blockHelperMissing"),Y=[this.contextName(0)];this.setupHelperArgs("",0,Y,!0),this.flushInline();var K=this.topStack();Y.splice(1,0,K),this.pushSource(["if (!",this.lastHelper,") { ",K," = ",this.source.functionCall(J,"call",Y),"}"])},appendContent:function(J){if(this.pendingContent)J=this.pendingContent+J;else this.pendingLocation=this.source.currentLocation;this.pendingContent=J},append:function(){if(this.isInline())this.replaceStack(function(Y){return[" != null ? ",Y,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var J=this.popStack();if(this.pushSource(["if (",J," != null) { ",this.appendToBuffer(J,void 0,!0)," }"]),this.environment.isSimple)this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(J){this.lastContext=J},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(J,Y,K,Z){var V=0;if(!Z&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(J[V++]));else this.pushContext();this.resolvePath("context",J,V,Y,K)},lookupBlockParam:function(J,Y){this.useBlockParams=!0,this.push(["blockParams[",J[0],"][",J[1],"]"]),this.resolvePath("context",Y,1)},lookupData:function(J,Y,K){if(!J)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+J+")");this.resolvePath("data",Y,0,!0,K)},resolvePath:function(J,Y,K,Z,V){var T=this;if(this.options.strict||this.options.assumeObjects){this.push(C(this.options.strict&&V,this,Y,K,J));return}var R=Y.length,B=function(k){T.replaceStack(function(I){var L=T.nameLookup(I,Y[k],J);if(!Z)return[" != null ? ",L," : ",I];else return[" && ",L]})};for(var j=K;j<R;j++)B(j)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(J,Y){if(this.pushContext(),this.pushString(Y),Y!=="SubExpression")if(typeof J==="string")this.pushString(J);else this.pushStackLiteral(J)},emptyHash:function(J){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(J?"undefined":"{}")},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var J=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(J.ids));if(this.stringParams)this.push(this.objectLiteral(J.contexts)),this.push(this.objectLiteral(J.types));this.push(this.objectLiteral(J.values))},pushString:function(J){this.pushStackLiteral(this.quotedString(J))},pushLiteral:function(J){this.pushStackLiteral(J)},pushProgram:function(J){if(J!=null)this.pushStackLiteral(this.programExpression(J));else this.pushStackLiteral(null)},registerDecorator:function(J,Y){var K=this.nameLookup("decorators",Y,"decorator"),Z=this.setupHelperArgs(Y,J);this.decorators.push(["var decorator = ",K,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+Y+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",Z])," || fn;"])},invokeHelper:function(J,Y,K){var Z=this.popStack(),V=this.setupHelper(J,Y),T=[];if(K)T.push(V.name);if(T.push(Z),!this.options.strict)T.push(this.aliasable("container.hooks.helperMissing"));var R=["(",this.itemsSeparatedBy(T,"||"),")"],B=this.source.functionCall(R,"call",V.callParams);this.push(B)},itemsSeparatedBy:function(J,Y){var K=[];K.push(J[0]);for(var Z=1;Z<J.length;Z++)K.push(Y,J[Z]);return K},invokeKnownHelper:function(J,Y){var K=this.setupHelper(J,Y);this.push(this.source.functionCall(K.name,"call",K.callParams))},invokeAmbiguous:function(J,Y){this.useRegister("helper");var K=this.popStack();this.emptyHash();var Z=this.setupHelper(0,J,Y),V=this.lastHelper=this.nameLookup("helpers",J,"helper"),T=["(","(helper = ",V," || ",K,")"];if(!this.options.strict)T[0]="(helper = ",T.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",T,Z.paramsInit?["),(",Z.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",Z.callParams)," : helper))"])},invokePartial:function(J,Y,K){var Z=[],V=this.setupParams(Y,1,Z);if(J)Y=this.popStack(),delete V.name;if(K)V.indent=JSON.stringify(K);if(V.helpers="helpers",V.partials="partials",V.decorators="container.decorators",!J)Z.unshift(this.nameLookup("partials",Y,"partial"));else Z.unshift(Y);if(this.options.compat)V.depths="depths";V=this.objectLiteral(V),Z.push(V),this.push(this.source.functionCall("container.invokePartial","",Z))},assignToHash:function(J){var Y=this.popStack(),K=void 0,Z=void 0,V=void 0;if(this.trackIds)V=this.popStack();if(this.stringParams)Z=this.popStack(),K=this.popStack();var T=this.hash;if(K)T.contexts[J]=K;if(Z)T.types[J]=Z;if(V)T.ids[J]=V;T.values[J]=Y},pushId:function(J,Y,K){if(J==="BlockParam")this.pushStackLiteral("blockParams["+Y[0]+"].path["+Y[1]+"]"+(K?" + "+JSON.stringify("."+K):""));else if(J==="PathExpression")this.pushString(Y);else if(J==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:X,compileChildren:function(J,Y){var K=J.children,Z=void 0,V=void 0;for(var T=0,R=K.length;T<R;T++){Z=K[T],V=new this.compiler;var B=this.matchExistingProgram(Z);if(B==null){var j=this.context.programs.push("")-1;Z.index=j,Z.name="program"+j,this.context.programs[j]=V.compile(Z,Y,this.context,!this.precompile),this.context.decorators[j]=V.decorators,this.context.environments[j]=Z,this.useDepths=this.useDepths||V.useDepths,this.useBlockParams=this.useBlockParams||V.useBlockParams,Z.useDepths=this.useDepths,Z.useBlockParams=this.useBlockParams}else Z.index=B.index,Z.name="program"+B.index,this.useDepths=this.useDepths||B.useDepths,this.useBlockParams=this.useBlockParams||B.useBlockParams}},matchExistingProgram:function(J){for(var Y=0,K=this.context.environments.length;Y<K;Y++){var Z=this.context.environments[Y];if(Z&&Z.equals(J))return Z}},programExpression:function(J){var Y=this.environment.children[J],K=[Y.index,"data",Y.blockParams];if(this.useBlockParams||this.useDepths)K.push("blockParams");if(this.useDepths)K.push("depths");return"container.program("+K.join(", ")+")"},useRegister:function(J){if(!this.registers[J])this.registers[J]=!0,this.registers.list.push(J)},push:function(J){if(!(J instanceof E))J=this.source.wrap(J);return this.inlineStack.push(J),J},pushStackLiteral:function(J){this.push(new E(J))},pushSource:function(J){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(J)this.source.push(J)},replaceStack:function(J){var Y=["("],K=void 0,Z=void 0,V=void 0;if(!this.isInline())throw new H.default("replaceStack on non-inline");var T=this.popStack(!0);if(T instanceof E)K=[T.value],Y=["(",K],V=!0;else{Z=!0;var R=this.incrStack();Y=["((",this.push(R)," = ",T,")"],K=this.topStack()}var B=J.call(this,K);if(!V)this.popStack();if(Z)this.stackSlot--;this.push(Y.concat(B,")"))},incrStack:function(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var J=this.inlineStack;this.inlineStack=[];for(var Y=0,K=J.length;Y<K;Y++){var Z=J[Y];if(Z instanceof E)this.compileStack.push(Z);else{var V=this.incrStack();this.pushSource([V," = ",Z,";"]),this.compileStack.push(V)}}},isInline:function(){return this.inlineStack.length},popStack:function(J){var Y=this.isInline(),K=(Y?this.inlineStack:this.compileStack).pop();if(!J&&K instanceof E)return K.value;else{if(!Y){if(!this.stackSlot)throw new H.default("Invalid stack pop");this.stackSlot--}return K}},topStack:function(){var J=this.isInline()?this.inlineStack:this.compileStack,Y=J[J.length-1];if(Y instanceof E)return Y.value;else return Y},contextName:function(J){if(this.useDepths&&J)return"depths["+J+"]";else return"depth"+J},quotedString:function(J){return this.source.quotedString(J)},objectLiteral:function(J){return this.source.objectLiteral(J)},aliasable:function(J){var Y=this.aliases[J];if(Y)return Y.referenceCount++,Y;return Y=this.aliases[J]=this.source.wrap(J),Y.aliasable=!0,Y.referenceCount=1,Y},setupHelper:function(J,Y,K){var Z=[],V=this.setupHelperArgs(Y,J,Z,K),T=this.nameLookup("helpers",Y,"helper"),R=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:Z,paramsInit:V,name:T,callParams:[R].concat(Z)}},setupParams:function(J,Y,K){var Z={},V=[],T=[],R=[],B=!K,j=void 0;if(B)K=[];if(Z.name=this.quotedString(J),Z.hash=this.popStack(),this.trackIds)Z.hashIds=this.popStack();if(this.stringParams)Z.hashTypes=this.popStack(),Z.hashContexts=this.popStack();var k=this.popStack(),I=this.popStack();if(I||k)Z.fn=I||"container.noop",Z.inverse=k||"container.noop";var L=Y;while(L--){if(j=this.popStack(),K[L]=j,this.trackIds)R[L]=this.popStack();if(this.stringParams)T[L]=this.popStack(),V[L]=this.popStack()}if(B)Z.args=this.source.generateArray(K);if(this.trackIds)Z.ids=this.source.generateArray(R);if(this.stringParams)Z.types=this.source.generateArray(T),Z.contexts=this.source.generateArray(V);if(this.options.data)Z.data="data";if(this.useBlockParams)Z.blockParams="blockParams";return Z},setupHelperArgs:function(J,Y,K,Z){var V=this.setupParams(J,Y,K);if(V.loc=JSON.stringify(this.source.currentLocation),V=this.objectLiteral(V),Z)return this.useRegister("options"),K.push("options"),["options=",V];else if(K)return K.push(V),"";else return V}},function(){var U="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),J=X.RESERVED_WORDS={};for(var Y=0,K=U.length;Y<K;Y++)J[U[Y]]=!0}(),X.isValidJavaScriptVariableName=function(U){return!X.RESERVED_WORDS[U]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(U)};function C(U,J,Y,K,Z){var V=J.popStack(),T=Y.length;if(U)T--;for(var R=K;R<T;R++)V=J.nameLookup(V,Y[R],Z);if(U)return[J.aliasable("container.strict"),"(",V,", ",J.quotedString(Y[T]),", ",JSON.stringify(J.source.currentLocation)," )"];else return V}G.default=X,D.exports=G.default},function(D,G,Q){var A=Q(60).default;G.__esModule=!0;var F=Q(5),W=void 0;try{if(!1)var O}catch(z){}if(!W)W=function(z,M,E,X){if(this.src="",X)this.add(X)},W.prototype={add:function(M){if(F.isArray(M))M=M.join("");this.src+=M},prepend:function(M){if(F.isArray(M))M=M.join("");this.src=M+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function H(z,M,E){if(F.isArray(z)){var X=[];for(var C=0,U=z.length;C<U;C++)X.push(M.wrap(z[C],E));return X}else if(typeof z==="boolean"||typeof z==="number")return z+"";return z}function N(z){this.srcFile=z,this.source=[]}N.prototype={isEmpty:function(){return!this.source.length},prepend:function(M,E){this.source.unshift(this.wrap(M,E))},push:function(M,E){this.source.push(this.wrap(M,E))},merge:function(){var M=this.empty();return this.each(function(E){M.add([" ",E,`
-`])}),M},each:function(M){for(var E=0,X=this.source.length;E<X;E++)M(this.source[E])},empty:function(){var M=this.currentLocation||{start:{}};return new W(M.start.line,M.start.column,this.srcFile)},wrap:function(M){var E=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(M instanceof W)return M;return M=H(M,this,E),new W(E.start.line,E.start.column,this.srcFile,M)},functionCall:function(M,E,X){return X=this.generateList(X),this.wrap([M,E?"."+E+"(":"(",X,")"])},quotedString:function(M){return'"'+(M+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(M){var E=this,X=[];A(M).forEach(function(U){var J=H(M[U],E);if(J!=="undefined")X.push([E.quotedString(U),":",J])});var C=this.generateList(X);return C.prepend("{"),C.add("}"),C},generateList:function(M){var E=this.empty();for(var X=0,C=M.length;X<C;X++){if(X)E.add(",");E.add(H(M[X],this))}return E},generateArray:function(M){var E=this.generateList(M);return E.prepend("["),E.add("]"),E}},G.default=N,D.exports=G.default}])})});export default JK();
diff --git a/crates/code_execution/src/outbound/deno/sdk.mjs b/crates/code_execution/src/outbound/deno/sdk.mjs
deleted file mode 100644
index 046a9df1fc..0000000000
--- a/crates/code_execution/src/outbound/deno/sdk.mjs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Generated by packages/code-mode-sdk/scripts/generate.ts.
-async function dO($,O,j){if(!Number.isInteger(O)||O<1)throw RangeError(`concurrency limit must be a positive integer, got ${O}`);let x=Array($.length),S=0,K=async()=>{while(S<$.length){let X=S;S+=1,x[X]=await j($[X])}},Z=Array.from({length:Math.min(O,$.length)},K);return await Promise.all(Z),x}class W${loader;value;inflight;constructor($,O){this.loader=$;this.value=O}get(){if(this.value!==void 0)return Promise.resolve(this.value);return this.inflight??=this.loader().then(($)=>{return this.value=$,$}),this.inflight}peek(){return this.value}clear(){this.value=void 0,this.inflight=void 0}}async function*c($){let O;do{let j=await $(O),x=j.nextCursor??void 0;if(O!==void 0&&x!==void 0&&JSON.stringify(x)===JSON.stringify(O))throw Error("Pagination cursor did not advance");yield*j.items,O=x}while(O!==void 0)}var X$=Symbol.for("@ts-pattern/matcher"),s1=Symbol.for("@ts-pattern/isVariadic");var d0=($)=>Boolean($&&typeof $=="object"),Lj=($)=>$&&!!$[X$],s=($,O,j)=>{if(Lj($)){let x=$[X$](),{matched:S,selections:K}=x.match(O);return S&&K&&Object.keys(K).forEach((Z)=>j(Z,K[Z])),S}if(d0($)){if(!d0(O))return!1;if(Array.isArray($)){if(!Array.isArray(O))return!1;let x=[],S=[],K=[];for(let Z of $.keys()){let X=$[Z];Lj(X)&&X[s1]?K.push(X):K.length?S.push(X):x.push(X)}if(K.length){if(K.length>1)throw Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(O.length<x.length+S.length)return!1;let Z=O.slice(0,x.length),X=S.length===0?[]:O.slice(-S.length),Q=O.slice(x.length,S.length===0?1/0:-S.length);return x.every((L,G)=>s(L,Z[G],j))&&S.every((L,G)=>s(L,X[G],j))&&(K.length===0||s(K[0],Q,j))}return $.length===O.length&&$.every((Z,X)=>s(Z,O[X],j))}return Reflect.ownKeys($).every((x)=>{let S=$[x];return((x in O)||Lj(K=S)&&K[X$]().matcherType==="optional")&&s(S,O[x],j);var K})}return Object.is(O,$)},Z$=($)=>{var O,j,x;return d0($)?Lj($)?(O=(j=(x=$[X$]()).getSelectionKeys)==null?void 0:j.call(x))!=null?O:[]:Array.isArray($)?lO($,Z$):lO(Object.values($),Z$):[]},lO=($,O)=>$.reduce((j,x)=>j.concat(O(x)),[]);function a7(...$){if($.length===1){let[O]=$;return(j)=>s(O,j,()=>{})}if($.length===2){let[O,j]=$;return s(O,j,()=>{})}throw Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${$.length}.`)}function e($){return Object.assign($,{optional:()=>p0($),and:(O)=>l($,O),or:(O)=>t1($,O),select:(O)=>O===void 0?rO($):rO(O,$)})}function l0($){return Object.assign(((O)=>Object.assign(O,{[Symbol.iterator](){let j=0,x=[{value:Object.assign(O,{[s1]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var S;return(S=x[j++])!=null?S:x.at(-1)}}}}))($),{optional:()=>l0(p0($)),select:(O)=>l0(O===void 0?rO($):rO(O,$))})}function p0($){return e({[X$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return O===void 0?(Z$($).forEach((S)=>x(S,void 0)),{matched:!0,selections:j}):{matched:s($,O,x),selections:j}},getSelectionKeys:()=>Z$($),matcherType:"optional"})})}var i7=($,O)=>{for(let j of $)if(!O(j))return!1;return!0},n7=($,O)=>{for(let[j,x]of $.entries())if(!O(x,j))return!1;return!0},s7=($,O)=>{let j=Reflect.ownKeys($);for(let x of j)if(!O(x,$[x]))return!1;return!0};function l(...$){return e({[X$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return{matched:$.every((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>lO($,Z$),matcherType:"and"})})}function t1(...$){return e({[X$]:()=>({match:(O)=>{let j={},x=(S,K)=>{j[S]=K};return lO($,Z$).forEach((S)=>x(S,void 0)),{matched:$.some((S)=>s(S,O,x)),selections:j}},getSelectionKeys:()=>lO($,Z$),matcherType:"or"})})}function u($){return{[X$]:()=>({match:(O)=>({matched:Boolean($(O))})})}}function rO(...$){let O=typeof $[0]=="string"?$[0]:void 0,j=$.length===2?$[1]:typeof $[0]=="string"?void 0:$[0];return e({[X$]:()=>({match:(x)=>{let S={[O!=null?O:"@ts-pattern/anonymous-select-key"]:x};return{matched:j===void 0||s(j,x,(K,Z)=>{S[K]=Z}),selections:S}},getSelectionKeys:()=>[O!=null?O:"@ts-pattern/anonymous-select-key"].concat(j===void 0?[]:Z$(j))})})}function e1($){return!0}function w$($){return typeof $=="number"}function i$($){return typeof $=="string"}function n$($){return typeof $=="bigint"}var o1=e(u(e1)),t7=e(u(e1)),e7=o1,s$=($)=>Object.assign(e($),{startsWith:(O)=>{return s$(l($,(j=O,u((x)=>i$(x)&&x.startsWith(j)))));var j},endsWith:(O)=>{return s$(l($,(j=O,u((x)=>i$(x)&&x.endsWith(j)))));var j},minLength:(O)=>s$(l($,((j)=>u((x)=>i$(x)&&x.length>=j))(O))),length:(O)=>s$(l($,((j)=>u((x)=>i$(x)&&x.length===j))(O))),maxLength:(O)=>s$(l($,((j)=>u((x)=>i$(x)&&x.length<=j))(O))),includes:(O)=>{return s$(l($,(j=O,u((x)=>i$(x)&&x.includes(j)))));var j},regex:(O)=>{return s$(l($,(j=O,u((x)=>i$(x)&&Boolean(x.match(j))))));var j}}),n1=s$(u(i$)),f$=($)=>Object.assign(e($),{between:(O,j)=>f$(l($,((x,S)=>u((K)=>w$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>f$(l($,((j)=>u((x)=>w$(x)&&x<j))(O))),gt:(O)=>f$(l($,((j)=>u((x)=>w$(x)&&x>j))(O))),lte:(O)=>f$(l($,((j)=>u((x)=>w$(x)&&x<=j))(O))),gte:(O)=>f$(l($,((j)=>u((x)=>w$(x)&&x>=j))(O))),int:()=>f$(l($,u((O)=>w$(O)&&Number.isInteger(O)))),finite:()=>f$(l($,u((O)=>w$(O)&&Number.isFinite(O)))),positive:()=>f$(l($,u((O)=>w$(O)&&O>0))),negative:()=>f$(l($,u((O)=>w$(O)&&O<0)))}),o7=f$(u(w$)),t$=($)=>Object.assign(e($),{between:(O,j)=>t$(l($,((x,S)=>u((K)=>n$(K)&&x<=K&&S>=K))(O,j))),lt:(O)=>t$(l($,((j)=>u((x)=>n$(x)&&x<j))(O))),gt:(O)=>t$(l($,((j)=>u((x)=>n$(x)&&x>j))(O))),lte:(O)=>t$(l($,((j)=>u((x)=>n$(x)&&x<=j))(O))),gte:(O)=>t$(l($,((j)=>u((x)=>n$(x)&&x>=j))(O))),positive:()=>t$(l($,u((O)=>n$(O)&&O>0))),negative:()=>t$(l($,u((O)=>n$(O)&&O<0)))}),$5=t$(u(n$)),O5=e(u(function($){return typeof $=="boolean"})),j5=e(u(function($){return typeof $=="symbol"})),x5=e(u(function($){return $==null})),S5=e(u(function($){return $!=null})),t={__proto__:null,matcher:X$,optional:p0,array:function(...$){return l0({[X$]:()=>({match:(O)=>{if(!Array.isArray(O))return{matched:!1};if($.length===0)return{matched:!0};let j=$[0],x={};if(O.length===0)return Z$(j).forEach((K)=>{x[K]=[]}),{matched:!0,selections:x};let S=(K,Z)=>{x[K]=(x[K]||[]).concat([Z])};return{matched:O.every((K)=>s(j,K,S)),selections:x}},getSelectionKeys:()=>$.length===0?[]:Z$($[0])})})},set:function(...$){return e({[X$]:()=>({match:(O)=>{if(!(O instanceof Set))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};if($.length===0)return{matched:!0};let x=(K,Z)=>{j[K]=(j[K]||[]).concat([Z])},S=$[0];return{matched:i7(O,(K)=>s(S,K,x)),selections:j}},getSelectionKeys:()=>$.length===0?[]:Z$($[0])})})},map:function(...$){return e({[X$]:()=>({match:(O)=>{if(!(O instanceof Map))return{matched:!1};let j={};if(O.size===0)return{matched:!0,selections:j};let x=(X,Q)=>{j[X]=(j[X]||[]).concat([Q])};if($.length===0)return{matched:!0};var S;if($.length===1)throw Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(S=$[0])==null?void 0:S.toString()}`);let[K,Z]=$;return{matched:n7(O,(X,Q)=>{let L=s(K,Q,x),G=s(Z,X,x);return L&&G}),selections:j}},getSelectionKeys:()=>$.length===0?[]:[...Z$($[0]),...Z$($[1])]})})},record:function(...$){return e({[X$]:()=>({match:(O)=>{if(O===null||typeof O!="object"||Array.isArray(O))return{matched:!1};var j;if($.length===0)throw Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(j=$[0])==null?void 0:j.toString()}`);let x={},S=(X,Q)=>{x[X]=(x[X]||[]).concat([Q])},[K,Z]=$.length===1?[n1,$[0]]:$;return{matched:s7(O,(X,Q)=>{let L=typeof X!="string"||Number.isNaN(Number(X))?null:Number(X),G=L!==null&&s(K,L,S),J=s(K,X,S),I=s(Z,Q,S);return(J||G)&&I}),selections:x}},getSelectionKeys:()=>$.length===0?[]:[...Z$($[0]),...Z$($[1])]})})},intersection:l,union:t1,not:function($){return e({[X$]:()=>({match:(O)=>({matched:!s($,O,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:u,select:rO,any:o1,unknown:t7,_:e7,string:n1,number:o7,bigint:$5,boolean:O5,symbol:j5,nullish:x5,nonNullable:S5,instanceOf:function($){return e(u(function(O){return(j)=>j instanceof O}($)))},shape:function($){return e(u(a7($)))}};class $2 extends Error{constructor($){let O;try{O=JSON.stringify($)}catch(j){O=$}super(`Pattern matching error: no pattern matches value ${O}`),this.input=void 0,this.input=$}}var r0={matched:!1,value:void 0};function k($){return new Nj($,r0)}class Nj{constructor($,O){this.input=void 0,this.state=void 0,this.input=$,this.state=O}with(...$){if(this.state.matched)return this;let O=$[$.length-1],j=[$[0]],x;$.length===3&&typeof $[1]=="function"?x=$[1]:$.length>2&&j.push(...$.slice(1,$.length-1));let S=!1,K={},Z=(Q,L)=>{S=!0,K[Q]=L},X=!j.some((Q)=>s(Q,this.input,Z))||x&&!Boolean(x(this.input))?r0:{matched:!0,value:O(S?"@ts-pattern/anonymous-select-key"in K?K["@ts-pattern/anonymous-select-key"]:K:this.input,this.input)};return new Nj(this.input,X)}when($,O){if(this.state.matched)return this;let j=Boolean($(this.input));return new Nj(this.input,j?{matched:!0,value:O(this.input,this.input)}:r0)}otherwise($){return this.state.matched?this.state.value:$(this.input)}exhaustive($=Z5){return this.state.matched?this.state.value:$(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function Z5($){throw new $2($)}class w extends Error{constructor($){super($);this.name="MacroError"}}var O2=500;function X5($){let O=k($).with(t.string,(j)=>j).with({message:t.string},({message:j})=>j).with({error:t.string},({error:j})=>j).otherwise(()=>"").trim();return O.length>O2?`${O.slice(0,O2)}…`:O}class e$ extends w{status;data;constructor($,O){let j=X5(O);super(j?`Macro API error ${$}: ${j}`:`Macro API error ${$}`);this.status=$;this.data=O;this.name="MacroApiError"}}class a0 extends e${constructor($){super(403,$);this.name="MacroForbiddenError"}}function K5($,O){return $===403?new a0(O):new e$($,O)}class E extends w{constructor($){super($);this.name="MacroNotFoundError"}}function Y($){if($.error!==void 0)throw K5($.response?.status??0,$.error);return $.data}class A{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new W$(()=>this.fetch(),j)}field($){return async()=>(await this.detail.get())[$]??void 0}mappedField($,O){return async()=>O((await this.detail.get())[$]??void 0)}toJSON(){let $=this.detail.peek();return $===void 0?{id:this.id}:{id:this.id,detail:$}}async mutate($){let O=Y(await $(this.client));return this.detail.clear(),O}}class H$ extends A{async permission(){return Y(await this.client.storage.getEntityPermission({path:{entity_type:this.entityType,entity_id:this.id}}))}async favorite(){return Y(await this.client.storage.addFavorite({body:{entityId:this.id,entityType:this.entityType}})),this}async unfavorite(){return Y(await this.client.storage.removeFavoriteByEntity({path:{entity_type:this.entityType,entity_id:this.id}})),this}}class K$ extends H${propertyReference(){return{entity_type:this.propertyEntityType,entity_id:this.id}}async properties($){let{properties:O}=Y(await this.client.properties.getEntityProperties({path:{entity_type:this.propertyEntityType,entity_id:this.id},query:$?.includeMetadata!==void 0?{include_metadata:$.includeMetadata}:void 0}));return O}async setProperty($,O){Y(await this.client.properties.setEntityProperty({path:{...this.propertyReference(),property_id:$.id},body:{value:O??null}}))}async updatePropertyOptions($){return Y(await this.client.properties.bulkUpdateEntityPropertyOptions({path:this.propertyReference(),body:{properties:$.map((O)=>({property_id:O.property.id,...O.add?{add_option_ids:O.add.map((j)=>j.id)}:{},...O.remove?{remove_option_ids:O.remove.map((j)=>j.id)}:{}}))}}))}async deleteProperty($){Y(await this.client.properties.deleteEntityProperty({path:{entity_property_id:$.property.id}}))}}var Q5={"<":"\\u003c",">":"\\u003e","&":"\\u0026"};function o$($,O){let j=JSON.stringify(O).replace(/[<>&]/g,(x)=>Q5[x]??x);return`<${$}>${j}</${$}>`}function Y5($){return typeof $==="object"&&$!==null&&typeof $.toMention==="function"}var G5={toMention:()=>({tag:o$("m-group-mention",{groupAlias:"here"}),mention:{entity_type:"group",entity_id:"here"}})};function J5($,...O){let j="",x=[];for(let[S,K]of $.entries()){j+=K;let Z=O[S];if(Z===void 0)continue;if(Y5(Z)){let X=Z.toMention();j+=X.tag,x.push(X.mention)}else j+=String(Z)}return{content:j,mentions:V5(x)}}function V5($){let O=new Set;return $.filter((j)=>{let x=`${j.entity_type}:${j.entity_id}`;if(O.has(x))return!1;return O.add(x),!0})}function O$($){return typeof $==="string"?{content:$,mentions:[]}:$}class B$ extends A{static byId($,O){return new B$($,O)}static from($,O){return new B$($,O.id,O)}async fetch(){let $=Y(await this.client.storage.listHarnesses()).find((O)=>O.id===this.id);if(!$)throw new E(`Harness ${this.id} is unavailable`);return $}name=this.field("name");connected=this.field("connected");kind=this.field("kind");async delete(){await this.mutate(($)=>$.storage.deleteHarness({path:{harness_id:this.id}}))}}class T$ extends A{static byId($,O){return new T$($,O)}static from($,O){return new T$($,O.bot.id,O)}async fetch(){let $=Y(await this.client.storage.listAgents()).find((O)=>O.bot.id===this.id);if(!$)throw new E(`Agent ${this.id} is unavailable`);return $}name=this.mappedField("bot",($)=>$.name);instructions=this.field("instructions");defaultModel=this.field("default_model");channels=this.mappedField("channel_ids",($)=>$.map((O)=>b.byId(this.client,O)));host=this.mappedField("harness_id",($)=>$?B$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.updateAgent({path:{agent_id:this.id},body:i0($)}))}}function i0($){let{channels:O,team:j,host:x,autoAcceptPermissions:S,avatarUrl:K,channelScope:Z,defaultModel:X,isCoding:Q,...L}=$;return{...L,channel_ids:O?.map((G)=>G.id),team_id:j?.id,harness_id:x?.id,auto_accept_permissions:S,avatar_url:K,channel_scope:Z,default_model:X,is_coding:Q}}async function Uj($,O,j,x=[]){let{channelId:S,thread:K}=B5(O);if(await L5($)){let{id:X}=Y(await $.storage.entityMessageCreate({path:{parent_type:"channel",parent_id:S},body:{content:j.content,mentions:j.mentions,attachments:x.map((Q)=>({entity_type:W5,entity_id:Q.id,width:Q.width??null,height:Q.height??null})),thread_id:K?.rootId??null,nonce:crypto.randomUUID()}}));return X}if(x.length>0)throw new w("a user-owned bot can only post via the channel webhook endpoint, which "+"does not support images — use a team-owned bot, or requestedAs(user), "+"to attach images");if(K)throw new w("a user-owned bot can only post via the channel webhook endpoint, which "+"does not support threads — use a team-owned bot, or requestedAs(user), "+"to reply in a thread");let{message_id:Z}=Y(await $.storage.postChannelBotWebhook({path:{channel_id:S},body:{content:j.content},headers:{"x-macro-bot-scope":"user"}}));return Z}var W5="static/image";function B5($){return"rootId"in $?{channelId:$.channelId,thread:$}:{channelId:$.id}}async function L5($){if($.authConfig.type!=="bot"||$.hasActingUser())return!0;let{owner:O}=await $.selfBot();return O?.type==="team"}class h${client;channelId;rootId;constructor($,O,j){this.client=$;this.channelId=O;this.rootId=j}toJSON(){return{channelId:this.channelId,rootId:this.rootId}}channel(){return b.byId(this.client,this.channelId)}root(){return o.byId(this.client,this.channelId,this.rootId)}async replies(){let{replies:$}=Y(await this.client.storage.entityMessageGetThread({path:{parent_type:"channel",parent_id:this.channelId,id:this.rootId}}));return $.map((O)=>o.from(this.client,this.channelId,O))}async reply($,O){let j=await Uj(this.client,this,O$($),O?.images);return o.byId(this.client,this.channelId,j)}}class o extends H${channelId;mentions;entityType="channel_message";constructor($,O,j,x=[],S){super($,j,S);this.channelId=O;this.mentions=x}get path(){return{parent_type:"channel",parent_id:this.channelId,id:this.id}}async fetch(){return Y(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j,x=[]){return new o($,O,j,x)}static from($,O,j){return new o($,O,j.id,j.mentions,j)}content=this.field("content");createdAt=this.field("created_at");editedAt=this.field("edited_at");updatedAt=this.field("updated_at");async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}channel(){return b.byId(this.client,this.channelId)}thread(){return new h$(this.client,this.channelId,this.id)}async react($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!0,emoji:$}})),this}async unreact($){return await this.mutate((O)=>O.storage.entityMessageReact({path:this.path,body:{add:!1,emoji:$}})),this}async edit($){let{content:O,mentions:j}=O$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}async reply($){return this.thread().reply($)}}class zj{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}agent(){return T$.byId(this.client,this.record.botId)}sessions(){return this.record.sessions.map(($)=>({session:d.byId(this.client,$.sessionId),isCurrent:$.isCurrent,createdAt:$.createdAt}))}turns(){return this.record.turns.map(($)=>new n0(this.client,this,$))}async startFresh($){Y(await this.client.agentHarness.startFreshAgentConversation({path:{channel_id:this.channel.id,bot_id:this.record.botId},body:{sessionId:$.id}}))}toJSON(){return{channelId:this.channel.id,agentId:this.record.botId}}}class n0{client;conversation;record;constructor($,O,j){this.client=$;this.conversation=O;this.record=j}source(){return o.byId(this.client,this.conversation.channel.id,this.record.sourceMessageId)}session(){return d.byId(this.client,this.record.sessionId)}async retry($){Y(await this.client.agentHarness.retryAgentConversationTurn({path:{channel_id:this.conversation.channel.id,bot_id:this.conversation.agent().id,source:this.record.sourceMessageId},body:{actionId:$}}))}toJSON(){return{channelId:this.conversation.channel.id,sourceMessageId:this.record.sourceMessageId}}}class L$ extends A{parent;toJSON(){return{...super.toJSON(),parentType:this.parent.type,parentId:this.parent.entity.id}}constructor($,O,j){super($,j);this.parent=O}static byId($,O,j){return new L$($,O,j)}get path(){return{parent_type:this.parent.type,parent_id:this.parent.entity.id,id:this.id}}async fetch(){return Y(await this.client.storage.entityMessageGetThread({path:this.path})).state}resolved=this.field("resolved");async update($){let O={resolved:$.resolved,detach_anchor:$.detachAnchor,nonce:$.nonce};await this.mutate((j)=>j.storage.entityMessagePatchThread({path:this.path,body:O}))}async delete($){await this.mutate((O)=>O.storage.entityMessageDeleteThread({path:this.path,query:{nonce:$}}))}}async function b$($,O,j,x){for(let K of[...x?.messages??[],...x?.around?[x.around]:[]]){let Z="channelId"in K?{type:"channel",id:K.channelId}:("documentId"in K)?{type:"document",id:K.documentId}:("callId"in K)?{type:"call",id:K.callId}:K.parent;if(Z.type!==O.type||Z.id!==O.entity.id)throw Error("Timeline message belongs to another resource")}let S=Y(await $.storage.messageTimelineEntries({path:{parent_type:O.type,parent_id:O.entity.id},query:{selection:x?JSON.stringify({cursor:x.cursor,around:x.around?.id,ids:x.messages?.map((K)=>K.id),activity_after:x.activityAfter,activity_before:x.activityBefore,anchored:x.anchored,direction:x.direction,include_deleted_threads:x.includeDeletedThreads,limit:x.limit}):void 0}}));return{entries:S.entries.map((K)=>{if(K.type==="activity")return{type:"activity",activity:{...K.activity,actor:M.byId($,K.activity.actor_id)}};return{type:"message",message:j(K.message)}}),nextCursor:S.next_cursor??void 0,previousCursor:S.previous_cursor??void 0}}var N5=50;function x$($){let{filters:O,type:j,make:x,includeCrm:S}=$;return(K,Z,X)=>{let Q=X?.searchOn??"name_content",L=X?.pageSize??N5;return c(async(G)=>{let{results:J,next_cursor:I}=Y(await K.search.unifiedSearch({body:{query:Z,match_type:"partial",search_on:Q,...O?{filters:O}:{},...S?{include_crm:!0}:{}},query:{page_size:L,...G?{cursor:G}:{}}}));return{items:J.filter((W)=>W.type===j).map((W)=>x(K,W)),nextCursor:I}})}}class GO{client;channel;record;constructor($,O,j){this.client=$;this.channel=O;this.record=j}get id(){return this.record.id}user(){return M.byId(this.client,this.record.user_id)}createdAt(){return this.record.created_at}async recordInteraction($){return new GO(this.client,this.channel,Y(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.channel.id}})))}toJSON(){return this.record}}class b extends K${async recordActivity($){return new GO(this.client,this,Y(await this.client.storage.postActivity({body:{activity_type:$,channel_id:this.id}})))}async setPicture($){await this.mutate((O)=>O.storage.setChannelPicture({path:{channel_id:this.id},body:{profile_picture_id:$?.id??null}}))}messageThreadById($){return L$.byId(this.client,{type:"channel",entity:this},$)}timelinePage($){return b$(this.client,{type:"channel",entity:this},(O)=>o.from(this.client,this.id,O),$)}async agentConversations(){return Y(await this.client.agentHarness.listAgentConversations({path:{channel_id:this.id}})).conversations.map(($)=>new zj(this.client,this,$))}entityType="channel";propertyEntityType="CHANNEL";async fetch(){return Y(await this.client.storage.getChannel({path:{channel_id:this.id}}))}static byId($,O){return new b($,O)}static async dm($,O){let{channel_id:j}=Y(await $.storage.getOrCreateDm({body:{recipient_id:O.id}}));return new b($,j)}static async private($,O){let{channel_id:j}=Y(await $.storage.getOrCreatePrivate({body:{recipients:O.map((x)=>x.id)}}));return new b($,j)}static async create($,O){let{id:j}=Y(await $.storage.createChannel({body:{channel_type:O.type,name:O.name??null,participants:(O.participants??[]).map((x)=>x.id),team_id:O.team?.id??null}}));return new b($,j)}name=this.field("channel_name");type=this.field("channel_type");async send($,O){let j=await Uj(this.client,O?.thread??this,O$($),O?.images);return o.byId(this.client,this.id,j)}messages($){return this.timeline({limit:$?.pageSize})}messagesAfter($,O){return this.timeline({activity_after:$ instanceof Date?$.toISOString():$,limit:O?.pageSize})}timeline($){return c(async(O)=>{let j=Y(await this.client.storage.messageTimeline({path:{parent_type:"channel",parent_id:this.id},query:{selection:JSON.stringify({...$,cursor:O})}}));return{items:j.items.map((x)=>o.from(this.client,this.id,x)),nextCursor:j.next_cursor}})}message($){return o.byId(this.client,this.id,$)}async rename($){await this.mutate((O)=>O.storage.patchChannel({path:{channel_id:this.id},body:{channel_name:$}}))}async delete(){await this.mutate(($)=>$.storage.deleteChannel({path:{channel_id:this.id}}))}async join(){await this.mutate(($)=>$.storage.joinChannel({path:{channel_id:this.id}}))}async joinCode(){let{join_code:$}=Y(await this.client.storage.getChannelJoinLink({path:{channel_id:this.id}}));return $}async leave(){await this.mutate(($)=>$.storage.leaveChannel({path:{channel_id:this.id}}))}async participants(){return Y(await this.client.storage.getChannelParticipants({path:{channel_id:this.id}}))}async addParticipants($){await this.mutate((O)=>O.storage.addParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async removeParticipants($){await this.mutate((O)=>O.storage.removeParticipants({path:{channel_id:this.id},body:{participants:$.map((j)=>j.id)}}))}async typing($,O){Y(await this.client.storage.entityMessageTyping({path:{parent_type:"channel",parent_id:this.id},body:{active:$==="start",thread_id:O?.thread?.rootId??null}}))}attachments($){return c(async(O)=>{let j=Y(await this.client.storage.getChannelAttachments({path:{channel_id:this.id},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.type?{attachment_type:$.type}:{},...O?{cursor:O}:{}}}));return{items:j.items,nextCursor:j.next_cursor}})}webUrl(){return`${this.client.webAppUrl}/app/channel/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static search=x$({type:"channel",make:($,O)=>new b($,O.channel_id)})}class M extends K${entityType="user";propertyEntityType="USER";async fetch(){let{names:$}=Y(await this.client.auth.getUserNamesWithEmail({body:{user_ids:[this.id]}})),O=$.find((j)=>j.id===this.id);if(!O)throw new E(`user ${this.id} not found`);return O}static byId($,O){return new M($,O)}static fromName($,O){return new M($,O.id,O)}static async me($){let{user_id:O}=Y(await $.auth.getUserInfo());return new M($,O)}async name(){let $=await this.detail.get();return[$.first_name,$.last_name].filter(Boolean).join(" ")||void 0}async isAgent(){return(await this.detail.get()).is_agent===!0}email(){let $=this.id.startsWith("macro|")?this.id.slice(6):void 0;return $?.includes("@")?$:void 0}dm(){return b.dm(this.client,this)}toMention(){return{tag:o$("m-user-mention",{userId:this.id}),mention:{entity_type:"user",entity_id:this.id}}}}class $${client;entityType;entity;constructor($,O,j){this.client=$;this.entityType=O;this.entity=j}get path(){return{entity_type:this.entityType,entity_id:this.entity.id}}async state($){let O=Y(await this.client.storage.accessRequestsState({path:this.path,query:{offset:$}}));return{accessLevel:O.accessLevel??void 0,canReview:O.canReview,owner:O.owner?M.byId(this.client,O.owner):void 0,pendingCount:O.pendingCount,supportedLevels:O.supportedLevels,nextOffset:O.nextOffset??void 0,mine:O.mine?IO.from(this.client,this,O.mine):void 0,requests:O.requests.map((j)=>IO.from(this.client,this,j))}}async request($){let{mine:O}=await this.state();return this.submit($,O?await O.revision():void 0)}async submit($,O){return IO.from(this.client,this,Y(await this.client.storage.accessRequestsSubmit({path:this.path,body:{requestedLevel:$,revision:O}})))}async cancel($){Y(await this.client.storage.accessRequestsCancel({path:this.path,query:{revision:$}}))}async direct(){return Y(await this.client.storage.accessRequestsDirect({path:this.path})).map(($)=>({user:M.byId(this.client,$.userId),accessLevel:$.accessLevel}))}async grant($,O){Y(await this.client.storage.accessRequestsSetDirect({path:{...this.path,user_id:$.id},body:{accessLevel:O}}))}async remove($){Y(await this.client.storage.accessRequestsRemoveDirect({path:{...this.path,user_id:$.id}}))}async resolve($,O){let j=$.access.toJSON();if(j.entity_type!==this.entityType||j.entity_id!==this.entity.id)throw Error("Access request belongs to another entity");return Y(await this.client.storage.accessRequestsResolve({path:{...this.path,request_id:$.id},body:O}))}toJSON(){return this.path}}class IO extends A{access;resolvedRecord;constructor($,O,j){super($,j.id,j);this.access=O}static from($,O,j){return new IO($,O,j)}async fetch(){if(this.resolvedRecord)return this.resolvedRecord;let $;do{let O=await this.access.state($),j=[O.mine,...O.requests].find((x)=>x?.id===this.id);if(j)return j.detail.get();$=O.nextOffset}while($!==void 0);throw new E(`Access request ${this.id} is unavailable`)}revision=this.field("revision");status=this.field("status");requestedLevel=this.field("requestedLevel");requester=this.mappedField("requesterId",($)=>M.byId(this.client,$));async resolve($){this.resolvedRecord=await this.access.resolve(this,{revision:await this.revision(),grantedLevel:$}),this.detail.clear()}}function $O($){return{...$,channelSharePermissions:$.channelSharePermissions===void 0||$.channelSharePermissions===null?$.channelSharePermissions:$.channelSharePermissions.map((O)=>({channelId:O.channel.id,accessLevel:O.accessLevel,operation:O.operation}))}}function s0($){return $}class N$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}static byId($,O,j){return new N$($,O,j)}static fromRecord($,O,j){return new N$($,O,j.id,j)}static async create($,O,j){return N$.createForSession($,O.session(),j,O)}static async createForSession($,O,j,x){let S=Y(await $.agentHarness.createSessionReview({path:{session_id:O.id},body:{...j,executionId:x?.id??null}}));return N$.fromRecord($,O,s0(S))}static async list($,O){return Y(await $.agentHarness.listExecutionReviews({path:{session_id:O.session().id,execution_id:O.id}})).map((x)=>N$.fromRecord($,O.session(),s0(x)))}async fetch(){return s0(Y(await this.client.agentHarness.getSessionReview({path:{session_id:this.parent.id,review_id:this.id}})))}title=this.field("title");kind=this.field("kind");session(){return this.parent}async reference(){return{kind:await this.kind(),id:this.id}}async items(){return(await this.detail.get()).items.map((j)=>new t0(j,{edit:(x)=>this.decide({action:"edit",item:j.id,draft:x}),submit:()=>this.decide({action:"submit",items:[j.id]}),dismiss:()=>this.decide({action:"dismiss",items:[j.id]})}))}async refresh(){return this.detail.clear(),await this.detail.get(),this}async submitAll(){await this.decide({action:"submit",items:[]})}async dismissAll(){await this.decide({action:"dismiss",items:[]})}async decide($){let O=(await this.detail.get()).revision;await this.mutate((j)=>j.agentHarness.decideSessionReview({path:{session_id:this.parent.id,review_id:this.id},body:{...$,revision:O}}))}}class t0{snapshot;actions;constructor($,O){this.snapshot=$;this.actions=O}get id(){return this.snapshot.id}get status(){return this.snapshot.status}get draft(){return this.snapshot.draft}get result(){return this.snapshot.result}async edit($){await this.actions.edit($)}async submit(){await this.actions.submit()}async dismiss(){await this.actions.dismiss()}}async function Ij($,O,j,x){Y(await $.agentHarness.presentSessionView({path:{session_id:O.id},body:{view:j,executionId:x?.id??null}}))}class pO extends A{parent;constructor($,O,j){super($,O);this.parent=j}static byId($,O,j){return new pO($,j,O)}async fetch(){return Y(await this.client.agentHarness.getCodeExecution({path:{session_id:this.parent.id,execution_id:this.id}}))}reviews={create:($)=>N$.create(this.client,this,$),list:()=>N$.list(this.client,this)};views={present:($)=>Ij(this.client,this.parent,$,this)};session(){return this.parent}status=this.field("status");source=this.field("source");calls=this.field("calls");error=this.field("error");async result(){return(await this.detail.get()).result}async refresh(){return this.detail.clear(),await this.detail.get(),this}}class Hj{client;sessionId;dto;constructor($,O,j){this.client=$;this.sessionId=O;this.dto=j}static from($,O,j){return new Hj($,O,j)}get actionId(){return this.dto.actionId}get kind(){return this.dto.kind}get prompt(){return this.dto.prompt??void 0}get attachments(){return this.dto.attachments??[]}get actorUserId(){return this.dto.actorUserId??void 0}get createdAt(){return this.dto.createdAt}async edit($){return Y(await this.client.agentHarness.editQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId},body:{prompt:$}})),this.dto={...this.dto,prompt:$},this}async steer(){Y(await this.client.agentHarness.steerQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}async remove(){Y(await this.client.agentHarness.removeQueuedAction({path:{session_id:this.sessionId,action_id:this.actionId}}))}}class aO{client;session;id;constructor($,O,j){this.client=$;this.session=O;this.id=j}static byId($,O,j){return new aO($,O,j)}async answer($){return Y(await this.client.agentHarness.answerAgentSessionToolApproval({path:{session_id:this.session.id,approval_id:this.id},body:{answer:$}}))}toJSON(){return{id:this.id,sessionId:this.session.id}}}class d extends A{access=new $$(this.client,"agent_session",this);toolApprovalById($){return aO.byId(this.client,this,$)}async sharePermissions(){return Y(await this.client.agentHarness.getAgentSessionPermissions({path:{session_id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.agentHarness.updateAgentSessionPermissions({path:{session_id:this.id},body:$O($)}))}webUrl(){return`${this.client.webAppUrl}/app/agent/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new d($,O)}static async createManaged($,O){let{session:j}=Y(await $.agentHarness.createAgentSession({body:{botId:O?.agent?.id,prompt:O?.prompt,instructions:O?.instructions,model:O?.model,repoUrl:O?.repoUrl,repoBranch:O?.repoBranch}}));return new d($,j.id,j)}static async repositories($){let{repositories:O}=Y(await $.agentHarness.listAgentRepositories());return O.map((j)=>({url:j.url,defaultBranch:j.defaultBranch??void 0}))}static async repositoryBranches($,O){let{branches:j}=Y(await $.agentHarness.listAgentRepositoryBranches({query:{repoUrl:O}}));return j}static async chooseMode($,O){let{mode:j}=Y(await $.agentHarness.chooseAgentMode({body:{prompt:O}}));return j}async fetch(){return Y(await this.client.agentHarness.getAgentSession({path:{session_id:this.id}}))}name=this.field("name");archivedBy=this.field("archivedBy");archivedAt=this.field("archivedAt");model=this.field("model");harness=this.field("harness");repoUrl=this.field("repoUrl");workspace=this.field("workspace");instructions=this.field("instructions");status=this.field("status");sandboxSize=this.field("sandboxSize");createdAt=this.field("createdAt");modifiedAt=this.field("modifiedAt");static async forPullRequest($,O){let{sessionIds:j}=Y(await $.agentHarness.agentSessionsForPullRequest({body:{url:O}}));return j.map((x)=>d.byId($,x))}async pullRequests(){let{pullRequests:$}=Y(await this.client.agentHarness.listAgentSessionPullRequests({path:{session_id:this.id}}));return $.map((O)=>({githubKey:O.githubKey,url:O.url,source:O.source,linkedBy:O.linkedBy?M.byId(this.client,O.linkedBy):void 0,createdAt:O.createdAt}))}async linkPullRequest($){Y(await this.client.agentHarness.linkAgentSessionPullRequest({path:{session_id:this.id},body:{url:$}}))}async unlinkPullRequest($){Y(await this.client.agentHarness.unlinkAgentSessionPullRequest({path:{session_id:this.id},query:{url:$}}))}async autoArchive(){let{overrides:$,defaults:O,autoArchivedAt:j}=Y(await this.client.agentHarness.getAgentSessionAutoArchive({path:{session_id:this.id}}));return{overrides:{onPullRequestMerged:$.onPullRequestMerged??void 0,onRuntimeClosed:$.onRuntimeClosed??void 0},defaults:O,autoArchivedAt:j??void 0}}async setAutoArchive($){Y(await this.client.agentHarness.putAgentSessionAutoArchive({path:{session_id:this.id},body:{onPullRequestMerged:$.onPullRequestMerged??null,onRuntimeClosed:$.onRuntimeClosed??null}}))}async rename($){await this.mutate((O)=>O.agentHarness.renameAgentSession({path:{session_id:this.id},body:{name:$}}))}async archive(){await this.setArchived(!0)}async unarchive(){await this.setArchived(!1)}async setArchived($){await this.mutate((O)=>O.agentHarness.setAgentSessionArchived({path:{session_id:this.id},body:{archived:$}}))}async setSandboxSize($){let{size:O}=await this.mutate((j)=>j.agentHarness.putAgentSessionSandboxSize({path:{session_id:this.id},body:{size:$}}));return O}static async defaultSandboxSize($){return Y(await $.agentHarness.getAgentSandboxSize()).size}static async setDefaultSandboxSize($,O){return Y(await $.agentHarness.putAgentSandboxSize({body:{size:O}})).size}static async codingPreferences($){return Y(await $.agentHarness.getAgentCodingPreferences())}static async autoArchivePreferences($){return Y(await $.agentHarness.getAgentAutoArchivePreferences())}static async setAutoArchivePreferences($,O){return Y(await $.agentHarness.putAgentAutoArchivePreferences({body:O}))}static async setCodingPreferences($,O){return Y(await $.agentHarness.putAgentCodingPreferences({body:O}))}async control($){return this.mutate((O)=>O.agentHarness.controlAgentSession({path:{session_id:this.id},body:$}))}prompt($,O){return this.control({type:"prompt",prompt:$,...O&&O.length>0?{attachments:O}:{}})}async queue(){let{entries:$}=Y(await this.client.agentHarness.getAgentSessionQueue({path:{session_id:this.id}}));return $.map((O)=>Hj.from(this.client,this.id,O))}async changes(){return Y(await this.client.agentHarness.getAgentSessionChanges({path:{session_id:this.id}}))}async changesPatch(){return Y(await this.client.agentHarness.getAgentSessionChangesPatch({path:{session_id:this.id}})).patch}async refreshChanges(){return this.mutate(($)=>$.agentHarness.refreshAgentSessionChanges({path:{session_id:this.id}}))}async foldedLog(){let{bot:$,messages:O}=Y(await this.client.agentHarness.getAgentSessionFoldedLog({path:{session_id:this.id}}));return{bot:$,messages:O}}async log(){return Y(await this.client.agentHarness.getAgentSessionLog({path:{session_id:this.id}}))}reviews={create:($)=>N$.createForSession(this.client,this,$),byId:($)=>N$.byId(this.client,this,$)};views={present:($)=>Ij(this.client,this,$)};codeExecutions={byId:($)=>pO.byId(this.client,this,$)};async delete(){await this.mutate(($)=>$.agentHarness.deleteAgentSession({path:{session_id:this.id}}))}}class e0{client;constructor($){this.client=$}byId($){return d.byId(this.client,$)}createManaged($){return d.createManaged(this.client,$)}chooseMode($){return d.chooseMode(this.client,$)}repositories(){return d.repositories(this.client)}repositoryBranches($){return d.repositoryBranches(this.client,$)}forPullRequest($){return d.forPullRequest(this.client,$)}defaultSandboxSize(){return d.defaultSandboxSize(this.client)}setDefaultSandboxSize($){return d.setDefaultSandboxSize(this.client,$)}codingPreferences(){return d.codingPreferences(this.client)}autoArchivePreferences(){return d.autoArchivePreferences(this.client)}setAutoArchivePreferences($){return d.setAutoArchivePreferences(this.client,$)}setCodingPreferences($){return d.setCodingPreferences(this.client,$)}}class o0{client;constructor($){this.client=$}byId($){return T$.byId(this.client,$)}async list(){return Y(await this.client.storage.listAgents()).map(($)=>T$.from(this.client,$))}async create($){return T$.from(this.client,Y(await this.client.storage.createAgent({body:i0($)})))}}class $x{client;async usage($={}){let{users:O,...j}=$;return Y(await this.client.cognition.getUsageHandler({body:{...j,include_users:O?.map((x)=>x.id)}}))}constructor($){this.client=$}async structuredCompletion($){return Y(await this.client.cognition.structuredCompletion({body:$}))}async decide($){return Y(await this.client.cognition.decisions({body:$}))}}class OO extends A{static byId($,O){return new OO($,O)}static from($,O){return new OO($,O.id,{id:O.id,name:O.name,createdAt:O.createdAt})}async fetch(){let $=Y(await this.client.storage.listUserApiKeys()).keys.find((O)=>O.id===this.id);if(!$)throw new E(`API key ${this.id} is unavailable`);return $}name=this.field("name");createdAt=this.field("createdAt");async delete(){await this.mutate(($)=>$.storage.deleteUserApiKey({path:{id:this.id}}))}}class Ox{client;constructor($){this.client=$}byId($){return OO.byId(this.client,$)}async list(){return Y(await this.client.storage.listUserApiKeys()).keys.map(($)=>OO.from(this.client,$))}async create($){let O=Y(await this.client.storage.createUserApiKey({body:{name:$}}));return{key:OO.from(this.client,O),secret:O.key}}async tokenForEmail($){return Y(await this.client.auth.macroApiToken({query:{email:$}}))}}class iO{client;constructor($){this.client=$}async me(){if(this.client.authConfig.type!=="bot")throw new w("bots.me() requires bot auth — a user API key has no bot identity");return Y(await this.client.storage.getSelfBot())}async channels(){if(this.client.authConfig.type!=="bot")throw new w("bots.channels() requires bot auth — a user API key has no bot identity");let $=await this.me();return Y(await this.client.storage.listBotChannels({path:{bot_id:$.id}}))}async myPrincipalId(){if(this.client.authConfig.type!=="bot")throw new w("bots.myPrincipalId() requires bot auth — a user API key has no bot identity");return this.client.myPrincipalId()}}class R$ extends A{async fetch(){let{links:$}=Y(await this.client.email.listLinks()),O=$.find((j)=>j.id===this.id);if(!O)throw new E(`email link ${this.id} not found`);return O}static byId($,O){return new R$($,O)}static async list($){let{links:O}=Y(await $.email.listLinks());return O.map((j)=>new R$($,j.id,j))}emailAddress=this.field("email_address");provider=this.field("provider");isPrimary=this.field("is_primary");isSyncActive=this.field("is_sync_active");syncStatus=this.field("sync_status");needsReauth=this.field("needs_reauth");photoUrl=this.field("photo_url");async settingsOperations(){return Y(await this.client.email.mailboxSettingsOperations({headers:{"X-Email-Link-Id":this.id}}))}}class m$ extends A{async setContributesToAvailability($){await this.mutate((O)=>O.calendar.setAvailabilityCalendar({path:{calendar_id:this.id},body:{contributesToAvailability:$}}))}async fetch(){let{calendars:$}=Y(await this.client.calendar.listCalendars()),O=$.find((j)=>j.id===this.id);if(!O)throw new E(`calendar ${this.id} not found`);return O}static byId($,O){return new m$($,O)}static async list($){let{calendars:O}=Y(await $.calendar.listCalendars());return O.map((j)=>new m$($,j.id,j))}name=this.field("name");emailAddress=this.field("emailAddress");isPrimary=this.field("isPrimary");isWritable=this.field("isWritable");contributesToAvailability=this.field("contributesToAvailability");isSubscription=this.field("isSubscription");color=this.field("color");syncError=this.field("syncError");emailLink=this.mappedField("emailLinkId",($)=>R$.byId(this.client,$))}class nO{client;id;constructor($,O){this.client=$;this.id=O}async status(){return Y(await this.client.calendar.calendarReplacementStatus({path:{operation_id:this.id}}))}async confirm(){return Y(await this.client.calendar.confirmCalendarReplacement({path:{operation_id:this.id}}))}async discard(){Y(await this.client.calendar.discardCalendarReplacement({path:{operation_id:this.id}}))}}class S$ extends A{async fetch(){throw new w(`calendar event ${this.id} has no fetch-by-id endpoint; read the record returned by calendar.createEvent / event.update / event.rsvp instead`)}static byId($,O){return new S$($,O)}static fromRecord($,O){return new S$($,O.id,O)}title=this.field("title");description=this.field("description");location=this.field("location");time=this.field("time");status=this.field("status");attendees=this.field("attendees");transparency=this.field("transparency");isReadOnly=this.field("isReadOnly");recurrenceLines=this.field("recurrenceLines");guestPolicy=this.field("guestPolicy");viewerCan=this.field("viewerCan");calendar=this.mappedField("calendarId",($)=>$?m$.byId(this.client,$):void 0);record(){return this.detail.get()}async update($){let O=await this.mutate((j)=>j.calendar.updateCalendarEvent({path:{event_id:this.id},body:U5($)}));return S$.fromRecord(this.client,O)}async delete($={}){await this.mutate((O)=>O.calendar.deleteCalendarEvent({path:{event_id:this.id},query:{calendarId:$.calendar?.id,scope:$.scope,recurrenceId:$.recurrenceId,inbox:$.inbox}}))}async prepareReplacement($){let O=Y(await this.client.calendar.prepareCalendarReplacement({path:{event_id:this.id},body:{removeConference:$.removeConference,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return new nO(this.client,O.operationId)}async providerUrl($={}){return Y(await this.client.calendar.calendarEventProviderUrl({path:{event_id:this.id},query:{recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}})).url??void 0}async inviteGuests($){let O=await this.mutate((j)=>j.calendar.inviteCalendarEventGuests({path:{event_id:this.id},body:{guests:$.guests,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id,inbox:$.inbox}}));return S$.fromRecord(this.client,O)}async addToCalendar($={}){let O=await this.mutate((j)=>j.calendar.copyCalendarEvent({path:{event_id:this.id},body:{calendarId:$.calendar?.id}}));return S$.fromRecord(this.client,O)}async ics(){return Y(await this.client.storage.eventIcs({path:{event_id:this.id}}))}async rsvp($){let O=await this.mutate((j)=>j.calendar.rsvpCalendarEvent({path:{event_id:this.id},body:{response:$.response,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id}}));return S$.fromRecord(this.client,O)}}function U5($){return{title:$.title,description:$.description,location:$.location,time:$.time,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,outOfOffice:$.outOfOffice,guestPolicy:$.guestPolicy,scope:$.scope,recurrenceId:$.recurrenceId,calendarId:$.calendar?.id,inbox:$.inbox}}class jx{client;async availabilityCalendars(){return Y(await this.client.calendar.getAvailabilityCalendars()).calendars.map(($)=>({calendar:m$.byId(this.client,$.calendarId),name:$.name,isPrimary:$.isPrimary,contributesToAvailability:$.contributesToAvailability}))}async teamSharing(){return Y(await this.client.calendar.getTeamSharing()).sharing}async setTeamSharing($){return Y(await this.client.calendar.setTeamSharing({body:{sharing:$}})).sharing}occurrences($){let O;return c(async(j)=>{let x=Y(await this.client.storage.listOccurrences({query:{...$,cursor:j}}));O??=I5(this.client);let S=await O;return{items:x.items.map((K)=>{let Z=K.event.calendarId?S.get(K.event.calendarId):void 0;return{event:S$.fromRecord(this.client,K.event),occurrence:K.occurrence,calendarName:Z?.name,contributesToAvailability:j2(K.event,S),inbox:Z?.emailAddress,role:H5(K.event,S)}}),nextCursor:x.nextCursor}})}async teamPage($){let O=Y(await this.client.storage.listTeamCalendar({query:$}));return{items:O.items.map(({ownerId:j,...x})=>({...x,owner:M.byId(this.client,j)})),members:O.members.map((j)=>({user:M.byId(this.client,j.userId),sharing:j.sharing,coverage:j.coverage})),nextCursor:O.nextCursor??void 0}}async teamOutOfOffice($){let O=Y(await this.client.storage.listTeamOutOfOffice({query:$}));return{items:O.items.map((j)=>({event:S$.byId(this.client,j.eventId),owner:M.byId(this.client,j.ownerId),occurrenceKey:j.occurrenceKey,time:j.time,title:j.title??void 0})),hasMore:O.hasMore}}constructor($){this.client=$}calendars(){return m$.list(this.client)}calendar($){return m$.byId(this.client,$)}event($){return S$.byId(this.client,$)}replacement($){return new nO(this.client,$)}async createEvent($){let O=Y(await this.client.calendar.createCalendarEvent({body:z5($)}));return S$.fromRecord(this.client,O)}}function z5($){return{title:$.title,time:$.time,description:$.description,location:$.location,attendees:$.attendees,recurrenceLines:$.recurrenceLines,visibility:$.visibility,transparency:$.transparency,reminders:$.reminders,conference:$.conference,macroCall:$.macroCall,outOfOffice:$.outOfOffice,guestPolicy:$.guestPolicy,calendarId:$.calendar?.id,emailLinkId:$.emailLink?.id}}async function I5($){let{calendars:O}=Y(await $.calendar.listCalendars());return new Map(O.map((j)=>[j.id,j]))}function j2($,O){let j=[$.calendarId,...($.sources??[]).map((x)=>x.calendarId)].flatMap((x)=>{let S=x?O.get(x):void 0;return S?[S.contributesToAvailability]:[]});if(j.some(Boolean))return!0;return j.length>0&&j.every((x)=>x===!1)?!1:void 0}function H5($,O){let j=$.attendees.find((S)=>S.isSelf);if(j?.isOrganizer)return $.isReadOnly?void 0:"organizer";let x=$.attendees.some((S)=>S.isOrganizer);if($.viewerCan.organize&&j2($,O)&&!x)return"organizer";return j?"guest":void 0}class D$ extends A{lookupToken;constructor($,O,j){super($,O,j);this.lookupToken=j?.shareToken}static byId($,O){return new D$($,O)}static from($,O){return new D$($,O.id,O)}async fetch(){if(this.lookupToken)return Y(await this.client.storage.meetingLookup({path:{token:this.lookupToken}}));let $=Y(await this.client.storage.meetingList()).meetings.find((O)=>O.id===this.id);if(!$)throw new E(`Meeting ${this.id} is unavailable`);return this.lookupToken=$.shareToken,$}title=this.field("title");scheduledStart=this.field("scheduledStart");scheduledEnd=this.field("scheduledEnd");channel=this.mappedField("channelId",($)=>$?b.byId(this.client,$):void 0);call=this.mappedField("callId",($)=>$?J$.byId(this.client,$):void 0);async update($){await this.mutate((O)=>O.storage.meetingUpdate({path:{meeting_id:this.id},body:$}))}async cancel(){await this.mutate(($)=>$.storage.meetingCancel({path:{meeting_id:this.id}}))}async invitePermissions(){return Y(await this.client.storage.meetingInvitePermissions({path:{token:(await this.detail.get()).shareToken}}))}async invite($){Y(await this.client.storage.meetingInvite({path:{token:(await this.detail.get()).shareToken},body:{email:$}}))}async inviteUsers($){Y(await this.client.storage.meetingInviteUsers({path:{token:(await this.detail.get()).shareToken},body:{userIds:$.map((O)=>O.id)}}))}async webUrl(){return`${this.client.webAppUrl}/app/meet/join/${encodeURIComponent((await this.detail.get()).shareToken)}`}}class u$ extends A{callId;constructor($,O,j,x){super($,j,x);this.callId=O}get path(){return{parent_type:"call",parent_id:this.callId,id:this.id}}async fetch(){return Y(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new u$($,O,j)}static from($,O,j){return new u$($,O,j.id,j)}content=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");call(){return J$.byId(this.client,this.callId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){let O=Y(await this.client.storage.entityMessageCreate({path:{parent_type:"call",parent_id:this.callId},body:{...O$($),thread_id:this.callId}}));return u$.from(this.client,this.callId,O)}async edit($){let{content:O,mentions:j}=O$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class J$ extends H${messageThreadById($){return L$.byId(this.client,{type:"call",entity:this},$)}timelinePage($){return b$(this.client,{type:"call",entity:this},(O)=>u$.from(this.client,this.id,O),$)}access=new $$(this.client,"call",this);async meeting(){return D$.from(this.client,Y(await this.client.storage.meetingShare({path:{call_id:this.id}})))}async editTranscript($){await this.mutate((O)=>O.storage.editCallTranscript({path:{call_id:this.id},body:{assignments:$}}))}async toggleTeamShare(){return this.mutate(($)=>$.storage.toggleShareWithTeam({path:{call_id:this.id}}))}entityType="call";async fetch(){return Y(await this.client.storage.getCallRecord({path:{call_id:this.id}}))}webUrl(){return`${this.client.webAppUrl}/app/call/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new J$($,O)}message($){return u$.byId(this.client,this.id,$)}name=this.field("customName");channel=this.mappedField("channelId",($)=>$?b.byId(this.client,$):void 0);channelName=this.field("channelName");creator=this.mappedField("createdBy",($)=>M.byId(this.client,$));isActive=this.field("isActive");status=this.field("status");roomName=this.field("roomName");startedAt=this.field("startedAt");endedAt=this.field("endedAt");durationMs=this.field("durationMs");summary=this.field("summary");transcript=this.field("transcript");participants=this.field("participants");guests=this.field("guests");teamShareAccessLevel=this.field("teamShareAccessLevel");shareWithTeam=this.field("shareWithTeam");recordingUrl=this.field("recordingUrl");recordingPreviewUrl=this.field("recordingPreviewUrl");recordingStartedAt=this.field("recordingStartedAt");async rename($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{customName:$??""}}))}async setTeamShare($){await this.mutate((O)=>O.storage.editCallRecord({path:{call_id:this.id},body:{sharePermission:{teamShareAccessLevel:$?"view":null}}}))}async delete(){await this.mutate(($)=>$.storage.deleteCallRecord({path:{call_id:this.id}}))}static search=x$({filters:{call_filters:{}},type:"call",make:($,O)=>new J$($,O.call_id)})}class xx{client;constructor($){this.client=$}byId($){return J$.byId(this.client,$)}search($,O){return J$.search(this.client,$,O)}}class Sx{client;constructor($){this.client=$}async list(){let{labels:$}=Y(await this.client.storage.listChannelLabels());return $}async create($,O=[]){return Y(await this.client.storage.createChannelLabel({body:{name:$,channelIds:O.map((j)=>j.id)}}))}async createSmartTag($,O){return Y(await this.client.storage.createChannelLabel({body:{name:$,rule:O}}))}async previewSmartTag($){return Y(await this.client.storage.previewSmartTag({body:$}))}async updateSmartTag($,O,j){return Y(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O,rule:j}}))}async rename($,O){return Y(await this.client.storage.renameChannelLabel({path:{label_id:$.id},body:{name:O}}))}async delete($){Y(await this.client.storage.deleteChannelLabel({path:{label_id:$.id}}))}async setLabel($,O){Y(await this.client.storage.setChannelLabel({path:{channel_id:$.id},body:{labelId:O?.id??null}}))}}var T5=100;class Zx{client;async activity(){return Y(await this.client.storage.getActivity()).map(($)=>new GO(this.client,b.byId(this.client,$.channel_id),$))}labels;constructor($){this.client=$;this.labels=new Sx($)}byId($){return b.byId(this.client,$)}async dm($){return b.dm(this.client,$)}async private($){return b.private(this.client,$)}async create($){return b.create(this.client,$)}async*list(){for await(let $ of this.records())yield b.byId(this.client,$.id)}async*search($,O){if(!O?.searchOn||O.searchOn==="name"){let j=$.toLowerCase();for await(let x of this.records())if(x.name?.toLowerCase().includes(j))yield b.byId(this.client,x.id)}else yield*b.search(this.client,$,O)}records(){return c(async($)=>{let O=Y(await this.client.storage.getChannels({query:{limit:T5,...$?{cursor:$}:{}}}));return{items:O.items,nextCursor:O.next_cursor}})}}class n extends K${async sharePermissions(){return Y(await this.client.storage.getProjectPermissionsV2({path:{id:this.id}}))}async accessLevel(){return Y(await this.client.storage.getProjectUserAccessLevel({path:{id:this.id}}))}access=new $$(this.client,"project",this);entityType="project";propertyEntityType="PROJECT";async fetch(){let{data:$}=Y(await this.client.storage.getProjectHandler({path:{id:this.id}}));return $.projectMetadata}webUrl(){return`${this.client.webAppUrl}/app/project/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new n($,O)}static async create($,O){let{data:j}=Y(await $.storage.createProjectHandler({body:{name:O.name,projectParentId:O.parent?.id??null}}));return new n($,j.id,j)}name=this.field("name");parent=this.mappedField("parentId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");async items(){let{data:$}=Y(await this.client.storage.getProjectContentHandler({path:{id:this.id}}));return $.map((O)=>O.item)}async rename($){await this.mutate((O)=>O.storage.editProjectV2({path:{id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteProject({path:{id:this.id}}):O.storage.deleteProjectHandler({path:{id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteProject({path:{id:this.id}}))}static search=x$({filters:{project_filters:{}},type:"project",make:($,O)=>new n($,O.id)})}class sO{client;chat;id;message;constructor($,O,j,x){this.client=$;this.chat=O;this.id=j;this.message=x}static byId($,O,j,x){return new sO($,O,j,x)}async stop(){Y(await this.client.cognition.stopChatStream({body:{chat_id:this.chat.id,stream_id:this.id}}))}toJSON(){return{id:this.id,chatId:this.chat.id,messageId:this.message.id}}}class tO extends A{chat;constructor($,O,j){super($,j);this.chat=O}static byId($,O,j){return new tO($,O,j)}async fetch(){let $=Y(await this.client.cognition.getChat({path:{chat_id:this.chat.id}})).chat.messages.find((O)=>O.id===this.id);if(!$)throw new E(`Chat message ${this.id} is not yet available`);return $}content=this.field("content");role=this.field("role");async refresh(){this.detail.clear(),await this.detail.get()}toJSON(){return{...super.toJSON(),chatId:this.chat.id}}}class Q$ extends K${async send($){let{attachments:O,additionalInstructions:j,...x}=$,S=await this.mutate((Z)=>Z.cognition.sendChatMessage({body:{...x,chat_id:this.id,additional_instructions:j,attachments:O?.map((X)=>({entity_id:X.entity.id,entity_type:X.type}))}})),K=Q$.byId(this.client,S.chat_id);return sO.byId(this.client,K,S.stream_id,tO.byId(this.client,K,S.message_id))}access=new $$(this.client,"chat",this);entityType="chat";propertyEntityType="CHAT";async fetch(){let{chat:$}=Y(await this.client.cognition.getChat({path:{chat_id:this.id}}));return $}static byId($,O){return new Q$($,O)}static async create($,O){let{id:j}=Y(await $.cognition.createChat({body:{name:O?.name??null,projectId:O?.project?.id??null}}));return new Q$($,j)}name=this.field("name");model=this.field("model");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");messages=this.field("messages");async rename($){await this.mutate((O)=>O.cognition.patchChat({path:{chat_id:this.id},body:{name:$}}))}async delete($){await this.mutate((O)=>$?.permanent?O.cognition.permanentlyDeleteChat({path:{chat_id:this.id}}):O.cognition.deleteChat({path:{chat_id:this.id}}))}async copy(){let{id:$}=await this.mutate((O)=>O.cognition.copyChat({path:{chat_id:this.id}}));return new Q$(this.client,$)}async restore(){await this.mutate(($)=>$.cognition.revertDeleteChat({path:{chat_id:this.id}}))}async history(){let{conversation:$}=Y(await this.client.cognition.getChatHistoryHandler({path:{chat_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/chat/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static search=x$({filters:{chat_filters:{}},type:"chat",make:($,O)=>new Q$($,O.chat_id)});toMention(){return{tag:o$("m-document-mention",{documentId:this.id,documentName:this.detail.peek()?.name??"",blockName:"chat",blockParams:{}}),mention:{entity_type:"chat",entity_id:this.id}}}}class Xx{client;constructor($){this.client=$}byId($){return Q$.byId(this.client,$)}create($){return Q$.create(this.client,$)}search($,O){return Q$.search(this.client,$,O)}}class HO extends A{static byId($,O){return new HO($,O)}static from($,O){return new HO($,O.id,O)}async fetch(){let $=Y(await this.client.auth.getTeamInvites()).invites.find((O)=>O.id===this.id);if(!$)throw new E(`team invite ${this.id} not found`);return $}email=this.field("email");role=this.field("team_role");invitedBy=this.mappedField("invited_by",($)=>M.byId(this.client,$));createdAt=this.field("created_at");lastSentAt=this.field("last_sent_at");async revoke(){await this.mutate(($)=>$.auth.deleteTeamInviteHandler({path:{team_invite_id:this.id}}))}}class _$ extends A{async fetch(){let O=Y(await this.client.auth.getUserTeams()).find((j)=>j.id===this.id);if(!O)throw new E(`team ${this.id} not found`);return O}static byId($,O){return new _$($,O)}static async current($){let O=Y(await $.auth.getTeam());if(!O?.team)throw new E("caller has no current team");return new _$($,O.team.id,O.team)}static async list($){return Y(await $.auth.getUserTeams()).map((j)=>new _$($,j.id,j))}name=this.field("name");slug=this.field("slug");defaultLinkShare=this.field("default_link_share");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));async members(){return(await this.requireCurrent("members")).members.map((O)=>({user:M.byId(this.client,O.user_id),role:O.role}))}async invite($,O){let j=[],x=new Set;for(let K of typeof $==="string"?[$]:$){let Z=K.trim(),X=Z.toLowerCase();if(Z&&!x.has(X))x.add(X),j.push(Z)}if(j.length===0)throw new w("invite needs at least one email address");let S=await this.client.auth.inviteToTeam({body:{invites:j.map((K)=>({email:K})),team_id:this.id,...O?.agent&&{is_agent:!0}}});if(S.response?.status===304)return!1;return Y(S),!0}async invites(){return Y(await this.client.auth.getTeamInvites({query:{team_id:this.id}})).invites.map(($)=>HO.from(this.client,$))}async requireCurrent($){let O=Y(await this.client.auth.getTeam());if(!O?.team||O.team.id!==this.id)throw new w(`${$} are only available for the current team (see Team.current)`);return O}}var R5=8;class A$ extends A{parent;constructor($,O,j,x){super($,j,x);this.parent=O}get path(){return{parent_type:this.parent.type,parent_id:this.parent.id,id:this.id}}async fetch(){return Y(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new A$($,O,j)}static from($,O,j){return new A$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");deletedAt=this.field("deleted_at");async threadId(){return(await this.detail.get()).thread_id??this.id}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return eO(this.client,this.parent,$,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=O$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}async function Tj($,O){let j={parent_type:O.type,parent_id:O.id},x=c(async(K)=>{let Z=Y(await $.storage.messageTimeline({path:j,query:{selection:JSON.stringify({limit:100,cursor:K})}}));return{items:Z.items,nextCursor:Z.next_cursor}}),S=[];for await(let K of x)S.push(K);return dO(S,R5,async(K)=>{let{state:Z,root:X,replies:Q}=Y(await $.storage.entityMessageGetThread({path:{...j,id:K.id}}));return{thread:Z,comments:[X,...Q].map((L)=>A$.from($,O,L))}})}async function eO($,O,j,x){let S=Y(await $.storage.entityMessageCreate({path:{parent_type:O.type,parent_id:O.id},body:{...O$(j),thread_id:x?.threadId??null}}));return A$.from($,O,S)}class P$ extends H${messageThreadById($){return L$.byId(this.client,{type:"crm_contact",entity:this},$)}timelinePage($){return b$(this.client,{type:"crm_contact",entity:this},(O)=>A$.from(this.client,{type:"crm_contact",id:this.id},O),$)}entityType="crm_contact";async fetch(){return Y(await this.client.storage.getContact({path:{contact_id:this.id}}))}static byId($,O){return new P$($,O)}static from($,O){return new P$($,O.id,O)}name=this.field("name");email=this.field("email");company=this.mappedField("companyId",($)=>$?k$.byId(this.client,$):void 0);hidden=this.field("hidden");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");firstInteraction=this.field("firstInteraction");lastInteraction=this.field("lastInteraction");async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setContactHidden({path:{contact_id:this.id},body:{hidden:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmContactName({path:{contact_id:this.id},body:{name:$}}))}get commentParent(){return{type:"crm_contact",id:this.id}}async comments(){return Tj(this.client,this.commentParent)}async comment($,O){return eO(this.client,this.commentParent,$,O)}commentById($){return A$.byId(this.client,this.commentParent,$)}}class k$ extends K${messageThreadById($){return L$.byId(this.client,{type:"crm_company",entity:this},$)}timelinePage($){return b$(this.client,{type:"crm_company",entity:this},(O)=>A$.from(this.client,{type:"crm_company",id:this.id},O),$)}entityType="crm_company";propertyEntityType="COMPANY";async fetch(){return Y(await this.client.storage.getCompany({path:{company_id:this.id}}))}static byId($,O){return new k$($,O)}static from($,O){return new k$($,O.id,O)}name=this.field("name");description=this.field("description");hidden=this.field("hidden");emailSync=this.field("emailSync");team=this.mappedField("teamId",($)=>_$.byId(this.client,$));createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async domain(){let{domains:$}=await this.detail.get();return $[0]?.domain}async domains(){let{domains:$}=await this.detail.get();return $.map((O)=>O.domain)}async contacts(){return Y(await this.client.storage.listCompanyContacts({path:{company_id:this.id}})).map((O)=>P$.from(this.client,O))}static search=x$({filters:{crm_company_filters:{}},type:"company",includeCrm:!0,make:($,O)=>new k$($,O.id)});async hide(){await this.setHidden(!0)}async unhide(){await this.setHidden(!1)}async setHidden($){await this.mutate((O)=>O.storage.setCompanyHidden({path:{company_id:this.id},body:{hidden:$}}))}async setEmailSync($){await this.mutate((O)=>O.storage.setEmailSync({path:{company_id:this.id},body:{email_sync:$}}))}async rename($){await this.mutate((O)=>O.storage.setCrmCompanyName({path:{company_id:this.id},body:{name:$}}))}async createContact($){let O=await this.mutate((j)=>j.storage.createCrmContact({path:{company_id:this.id},body:$}));return P$.from(this.client,O)}get commentParent(){return{type:"crm_company",id:this.id}}async comments(){return Tj(this.client,this.commentParent)}async comment($,O){return eO(this.client,this.commentParent,$,O)}commentById($){return A$.byId(this.client,this.commentParent,$)}}class jO extends A{tableDetail=new W$(async()=>Y(await this.client.storage.getCrmPipelineTable({path:{id:this.id}})));static byId($,O){return new jO($,O)}static from($,O){return new jO($,O.id,O)}async fetch(){return Y(await this.client.storage.getCrmPipeline({path:{id:this.id}}))}name=this.field("name");recordType=this.field("recordType");accessLevel=this.field("grant");sharing=this.field("sharing");owner=this.mappedField("userId",($)=>M.byId(this.client,$));team=this.mappedField("teamId",($)=>_$.byId(this.client,$));async rename($){await this.mutate((O)=>O.storage.renameCrmPipeline({path:{id:this.id},body:{name:$}}))}async setSharing($){if($===void 0)throw Error("Sharing is required");await this.mutate((O)=>O.storage.shareCrmPipeline({path:{id:this.id},body:{sharing:$}}))}async setTrashed($){await this.mutate((O)=>O.storage.trashCrmPipeline({path:{id:this.id},body:{trashed:$}}))}async sharePermissions(){return Y(await this.client.storage.getCrmPipelinePermissions({path:{id:this.id}}))}async updateSharePermissions($){return this.mutate((O)=>O.storage.updateCrmPipelinePermissions({path:{id:this.id},body:$O($)}))}async table(){return Rj.from(this.client,this,await this.tableRecord())}async viewPositions($){if($.table.pipeline.id!==this.id)throw Error("View belongs to another pipeline");return Y(await this.client.storage.getCrmPipelineViewPositions({path:{id:this.id,view:$.id}}))}tableRecord(){return this.tableDetail.get()}rows(){return c(async($)=>{let O=Y(await this.client.storage.getCrmPipelineRows({path:{id:this.id},query:{after:$}}));return{items:O.rows.map((j)=>JO.from(this.client,this,j)),nextCursor:O.next}})}queryRows($={}){if($.rows?.some((O)=>O.pipeline.id!==this.id))throw Error("Rows belong to another pipeline");return c(async(O)=>{let j=Y(await this.client.storage.queryCrmPipelineRows({path:{id:this.id},body:{after:O,query:$.query,rowIds:$.rows?.map((x)=>x.id)}}));return{items:j.rows.map((x)=>JO.from(this.client,this,x)),nextCursor:j.next}})}async applyOps($,O){if(O?.baseVersions?.some((S)=>S.table.pipeline.id!==this.id))throw Error("Table belongs to another pipeline");let j={ops:$,baseVersions:O?.baseVersions?Object.fromEntries(O.baseVersions.map((S)=>[S.table.id,S.version])):void 0},x=await this.mutate((S)=>S.storage.applyCrmPipelineOps({path:{id:this.id},body:j}));return this.tableDetail.clear(),x}}class Rj extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j){super($,j.table.id,j);this.pipeline=O}static from($,O,j){return new Rj($,O,j)}fetch(){return this.pipeline.tableRecord()}async columns(){return(await this.pipeline.tableRecord()).columns.map(($)=>_j.from(this.client,this,$))}async views(){return(await this.pipeline.tableRecord()).views.map(($)=>Dj.byId(this,$.id))}async version(){return(await this.pipeline.tableRecord()).table.version}rowById($){return JO.byId(this.client,this.pipeline,$)}rows(){return this.pipeline.rows()}}class Dj{table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new Dj($,O)}async detail(){let $=(await this.table.pipeline.tableRecord()).views.find((O)=>O.id===this.id);if(!$)throw new E(`view ${this.id} is not on table ${this.table.id}`);return $}positions(){return this.table.pipeline.viewPositions(this)}toJSON(){return{id:this.id,tableId:this.table.id,pipelineId:this.table.pipeline.id}}}class JO extends A{pipeline;toJSON(){return{...super.toJSON(),pipelineId:this.pipeline.id}}constructor($,O,j,x){super($,j,x);this.pipeline=O}static byId($,O,j){return new JO($,O,j)}static from($,O,j){return new JO($,O,j.rowId,j)}async fetch(){for await(let $ of this.pipeline.queryRows({rows:[this]}))if($.id===this.id)return $.detail.get();throw new E(`Pipeline row ${this.id} is unavailable`)}cells=this.field("cells");async refresh(){this.detail.clear(),await this.detail.get()}}class _j extends A{table;toJSON(){return{...super.toJSON(),pipelineId:this.table.pipeline.id,tableId:this.table.id}}constructor($,O,j){super($,j.column.id,j);this.table=O}static from($,O,j){return new _j($,O,j)}async fetch(){let $=(await this.table.pipeline.tableRecord()).columns.find((O)=>O.column.id===this.id);if(!$)throw new E(`Pipeline column ${this.id} is unavailable`);return $}async writable(){return(await this.fetch()).writable}async name(){return(await this.fetch()).column.display_name??(await this.fetch()).definition.definition.display_name}}class Kx{client;constructor($){this.client=$}byId($){return jO.byId(this.client,$)}async list(){return Y(await this.client.storage.listCrmPipelines()).map(($)=>jO.from(this.client,$))}async create($){return jO.from(this.client,Y(await this.client.storage.createCrmPipeline({body:$})))}}class Qx{client;pipelines;constructor($){this.client=$;this.pipelines=new Kx($)}companyById($){return k$.byId(this.client,$)}contactById($){return P$.byId(this.client,$)}async contactByEmail($){let{contact:O}=Y(await this.client.storage.getContactByEmail({query:{email:$}}));return O?P$.from(this.client,O):void 0}async searchContacts($,O={}){let{contacts:j}=Y(await this.client.storage.searchContacts({query:{query:$,limit:O.limit}}));return j.map((x)=>P$.from(this.client,x))}async createCompany($){return k$.from(this.client,Y(await this.client.storage.createCrmCompany({body:$})))}async createContact($){return P$.from(this.client,Y(await this.client.storage.createCrmTeamContact({body:$})))}async blockedDomains(){return Y(await this.client.storage.listCrmBlockedDomains()).map(($)=>$.domain)}async blockDomain($){Y(await this.client.storage.blockCrmDomain({path:{domain:$}}))}async unblockDomain($){Y(await this.client.storage.unblockCrmDomain({path:{domain:$}}))}async settings(){return Y(await this.client.storage.getCrmTeamSettings())}async updateSettings($){return Y(await this.client.storage.putCrmTeamSettings({body:$}))}async setStages($){return Y(await this.client.storage.putCrmTeamStages({body:$}))}async resetStages(){Y(await this.client.storage.resetCrmTeamStages())}searchCompanies($){return k$.search(this.client,$)}}var Yx,D5=new Uint8Array(16);function Cj(){if(!Yx){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Yx=crypto.getRandomValues.bind(crypto)}return Yx(D5)}var j$=[];for(let $=0;$<256;++$)j$.push(($+256).toString(16).slice(1));function x2($,O=0){return(j$[$[O+0]]+j$[$[O+1]]+j$[$[O+2]]+j$[$[O+3]]+"-"+j$[$[O+4]]+j$[$[O+5]]+"-"+j$[$[O+6]]+j$[$[O+7]]+"-"+j$[$[O+8]]+j$[$[O+9]]+"-"+j$[$[O+10]]+j$[$[O+11]]+j$[$[O+12]]+j$[$[O+13]]+j$[$[O+14]]+j$[$[O+15]]).toLowerCase()}var Gx={};function _5($,O,j){let x;if($)x=S2($.random??$.rng?.()??Cj(),$.msecs,$.seq,O,j);else{let S=Date.now(),K=Cj();C5(Gx,S,K),x=S2(K,Gx.msecs,Gx.seq,O,j)}return O??x2(x)}function C5($,O,j){if($.msecs??=-1/0,$.seq??=0,O>$.msecs)$.seq=j[6]<<23|j[7]<<16|j[8]<<8|j[9],$.msecs=O;else if($.seq=$.seq+1|0,$.seq===0)$.msecs++;return $}function S2($,O,j,x,S=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!x)x=new Uint8Array(16),S=0;else if(S<0||S+16>x.length)throw RangeError(`UUID byte range ${S}:${S+15} is out of buffer bounds`);return O??=Date.now(),j??=$[6]*127<<24|$[7]<<16|$[8]<<8|$[9],x[S++]=O/1099511627776&255,x[S++]=O/4294967296&255,x[S++]=O/16777216&255,x[S++]=O/65536&255,x[S++]=O/256&255,x[S++]=O&255,x[S++]=112|j>>>28&15,x[S++]=j>>>20&255,x[S++]=128|j>>>14&63,x[S++]=j>>>6&255,x[S++]=j<<2&255|$[10]&3,x[S++]=$[11],x[S++]=$[12],x[S++]=$[13],x[S++]=$[14],x[S++]=$[15],x}var c$=_5;class F${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new F$($,O)}async detail(){let{columns:$}=await this.table.detail(),O=$.find((j)=>j.column.id===this.id);if(!O)throw new E(`column ${this.id} is not on table ${this.table.id}`);return O}async name(){let $=await this.detail();return $.column.display_name??$.definition.definition.display_name}async rename($){return await this.table.database.renameColumn(this,$),this}async inferType($){return await this.table.database.inferColumnType(this,$),this}changeType($){return this.table.database.changeColumnType(this,$)}convertIntoNewColumn($){return this.table.database.convertColumnIntoNewColumn(this,$)}casts(){return this.table.database.columnCasts(this)}async delete(){await this.table.database.deleteColumn(this)}async dataType(){return(await this.detail()).definition.definition.data_type}async isMultiSelect(){return(await this.detail()).definition.definition.is_multi_select}async position(){return(await this.detail()).column.position}async definition(){return(await this.detail()).definition}async config(){return(await this.detail()).column.config??void 0}async addOptions($){return await this.table.database.addColumnOptions(this,$),this}toJSON(){return{id:this.id,tableId:this.table.id}}}class E${table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new E$($,O)}history(){return this.table.database.rowHistory(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class Mj{table;id;constructor($,O){this.table=$;this.id=O}static byId($,O){return new Mj($,O)}async detail(){let{views:$}=await this.table.detail(),O=$.find((j)=>j.id===this.id);if(!O)throw new E(`view ${this.id} is not on table ${this.table.id}`);return O}async name(){return(await this.detail()).name}async position(){return(await this.detail()).position}async layout(){return(await this.detail()).layout}async query(){return(await this.detail()).query}positions(){return this.table.database.viewPositions(this)}toJSON(){return{id:this.id,tableId:this.table.id}}}class V${database;id;constructor($,O){this.database=$;this.id=O}static byId($,O){return new V$($,O)}async detail(){let{tables:$}=await this.database.schema(),O=$.find((j)=>j.table.id===this.id);if(!O)throw new E(`table ${this.id} is not in database ${this.database.id}`);return O}async name(){return(await this.detail()).table.name}async rename($){return await this.database.renameTable(this,$),this}async version(){return(await this.detail()).table.version}async position(){return(await this.detail()).table.position}async columns(){let{columns:$}=await this.detail();return $.map((O)=>F$.byId(this,O.column.id))}addColumn($){return this.database.addColumn(this,$)}async reorderColumns($){return await this.database.reorderColumns(this,$),this}row($){return E$.byId(this,$)}async views(){let{views:$}=await this.detail();return $.map((O)=>Mj.byId(this,O.id))}createWebhook(){return this.database.createWebhook(this)}async delete(){await this.database.deleteTable(this)}toJSON(){return{id:this.id,databaseId:this.database.id}}}async function Aj($,O,j,x={}){let S=Y(await $.storage.queryDatabases({body:{sql:j,databaseId:x.database?.id,baseVersions:Object.fromEntries((x.baseVersions??[]).map(({table:G,version:J})=>[G.id,J]))}})),K=new Map;for(let G of[x.database,...(x.baseVersions??[]).map(({table:J})=>J.database)]){if(!G)continue;let J=K.get(G.id);if(J)J.add(G);else K.set(G.id,new Set([G]))}let Z=(G)=>{let J=K.get(G)?.values().next().value;if(J)return J;let I=O($,G);return K.set(G,new Set([I])),I},X=(G)=>{let J=S.tableDatabases[G];if(!J)throw Error(`SQL response is missing the owner of table ${G}`);return V$.byId(Z(J),G)},Q=new Set(Object.keys(S.newVersions).map((G)=>X(G).database.id));if(S.statement.kind==="schema")Q.add(S.statement.databaseId);for(let G of Q)for(let J of K.get(G)??[])J.invalidateSchema();let L=k(S.statement).with({kind:"select"},(G)=>G).with({kind:"schema"},({databaseId:G,summary:J})=>({kind:"schema",database:Z(G),summary:J})).with({kind:"insert"},{kind:"update"},{kind:"delete"},({kind:G,tableId:J,tableName:I})=>({kind:G,table:X(J),tableName:I})).with({kind:"alterColumnType"},({tableId:G,tableName:J,columnId:I,columnName:z,to:W})=>{let V=X(G);return{kind:"alterColumnType",table:V,tableName:J,column:F$.byId(V,I),columnName:z,to:W}}).exhaustive();return{result:S.result?M5(S.result,X,S.tableDatabases):void 0,changesApplied:S.changesApplied,insertedRows:L.kind==="insert"?S.insertedRowIds.map((G)=>E$.byId(L.table,G)):[],newVersions:Object.entries(S.newVersions).map(([G,J])=>({table:X(G),version:J})),readVersions:Object.entries(S.readVersions).map(([G,J])=>({table:X(G),version:J})),truncatedTables:S.truncatedTables,statement:L}}function M5($,O,j){let x=$.sourceTable&&j[$.sourceTable]?O($.sourceTable):void 0;return{columns:$.columns.map(({relatedTable:S,...K})=>({...K,relatedTable:S&&j[S]?O(S):void 0})),rows:$.rows,sourceTable:x,rowHandles:x?$.rowIds.map((S)=>E$.byId(x,S)):[]}}class Pj{table;id;createdBy;record;constructor($,O,j,x){this.table=$;this.id=O;this.createdBy=j;this.record=x}static fromRecord($,O,j){return new Pj($,j.id,O,j)}get tokenPrefix(){return this.record.tokenPrefix}get createdAt(){return this.record.createdAt}delete(){return this.table.database.deleteWebhook(this)}toJSON(){return{id:this.id,tableId:this.table.id,tokenPrefix:this.tokenPrefix}}}class Wx extends e${op;row;column;taken;constructor($,O){super($,O);this.name="MacroOpRefusedError",this.message=O.message,this.op=O.op,this.row=O.row,this.column=O.column,this.taken=O.taken}}function Fj($){return k($).with({type:"relation"},({table:O})=>({type:"relation",database:O.database.id,table:O.id})).with({type:t.not("relation")},(O)=>O).exhaustive()}var A5={USER:"People",DOCUMENT:"Documents",TASK:"Tasks",COMPANY:"Companies",CONTACT:"Contacts",CALL_RECORD:"Calls",CHANNEL:"Channels",CHAT:"Chats",PROJECT:"Projects",THREAD:"Emails",CALENDAR_EVENT:"Events",INITIATIVE:"Initiatives"};function P5($){return k($).with({type:"text"},()=>"Text").with({type:"number"},()=>"Number").with({type:"boolean"},()=>"Checkbox").with({type:"date"},()=>"Date").with({type:"date_range"},()=>"Time range").with({type:"link"},()=>"URL").with({type:"select",multi:!0},()=>"Multi-select").with({type:"select",multi:!1},()=>"Select").with({type:"select_number",multi:!0},()=>"Multi-number select").with({type:"select_number",multi:!1},()=>"Number select").with({type:"tag"},()=>"Tag").with({type:"entity"},({target:O})=>A5[O]).with({type:"relation"},()=>"Relation").exhaustive(()=>"Column")}function Jx($){return $.map((O)=>({id:c$(),label:O}))}function Z2($,O,j){return $?.kind===O&&"change"in $&&$.change.kind===j}function Vx($){return k($).with({kind:"reorder_tables"},({kind:O})=>O).with({kind:t.union("table","column","rows","view")},({kind:O,change:j})=>`${O}.${j.kind}`).exhaustive(()=>"unknown")}function d$($,O,j){let[x]=$;if($.length!==1||!Z2(x,O,j))throw new w(`expected one ${O}.${j} result, got ${$.map(Vx).join(", ")||"none"}`);return x}class Y$ extends A{access=new $$(this.client,"database",this);async fetch(){return Y(await this.client.storage.getDatabase({path:{id:this.id}}))}assertOwns($,O){if(O.id!==this.id)throw new w(`${$} does not belong to database ${this.id}`)}webUrl(){return`${this.client.webAppUrl}/app/database/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new Y$($,O)}static async create($,O){let j=Y(await $.storage.createDatabase({body:{name:O.name}}));return new Y$($,j.id)}async duplicate($){let O=Y(await this.client.storage.duplicateDatabase({path:{id:this.id},body:{name:$?.name}}));return new Y$(this.client,O.id)}static async list($){return Y(await $.storage.listDatabases()).map((j)=>new Y$($,j.database.id))}query($,O){return Aj(this.client,Y$.byId,$,{...O,database:this})}invalidateSchema(){this.detail.clear()}schema(){return this.detail.get()}name=this.mappedField("database",($)=>$.name);owner=this.mappedField("database",($)=>M.byId(this.client,$.owner_id));createdAt=this.mappedField("database",($)=>$.created_at);trashedAt=this.mappedField("database",($)=>$.trashed_at??void 0);grant=this.field("grant");tables=this.mappedField("tables",($)=>$.map((O)=>V$.byId(this,O.table.id)));async table($){let{tables:O}=await this.schema(),j=O.find((x)=>x.table.name===$);return j?V$.byId(this,j.table.id):void 0}async createTable($){let{table:O}=d$(await this.applyOps([{kind:"table",table:c$(),change:{kind:"create",name:$.name}}]),"table","created");return V$.byId(this,O)}async applyOps($,O={}){let j={ops:$};if(O.baseVersions!==void 0){for(let{table:S}of O.baseVersions)this.assertOwns(`table ${S.id}`,S.database);j.baseVersions=Object.fromEntries(O.baseVersions.map(({table:S,version:K})=>[S.id,K]))}let{results:x}=await this.mutate(async(S)=>{let K=await S.storage.applyDatabaseOps({path:{id:this.id},body:j});if(K.error!==void 0&&"op"in K.error)throw new Wx(K.response?.status??0,K.error);return K});return x}async reorderTables($){for(let x of $)this.assertOwns(`table ${x.id}`,x.database);let O=await this.applyOps([{kind:"reorder_tables",order:$.map((x)=>x.id)}]),[j]=O;if(O.length!==1||j?.kind!=="reorder_tables")throw new w(`expected one reorder_tables result, got ${O.map(Vx).join(", ")||"none"}`);return j.tables.map(({table:x})=>V$.byId(this,x))}async deleteTable($){this.assertOwns(`table ${$.id}`,$.database),d$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"delete"}}]),"table","deleted")}async columnCasts($){return this.assertOwns(`column ${$.id}`,$.table.database),Y(await this.client.storage.listDatabaseColumnCasts({path:{id:this.id,table_id:$.table.id,column_id:$.id}}))}async viewPositions($){this.assertOwns(`view ${$.id}`,$.table.database);let{positions:O}=Y(await this.client.storage.getDatabaseViewPositions({path:{id:this.id,view_id:$.id}}));return O}async rowHistory($){this.assertOwns(`row ${$.id}`,$.table.database);let{changes:O}=Y(await this.client.storage.getDatabaseRowHistory({path:{id:this.id,table_id:$.table.id,row_id:$.id}}));return O}async importTable($){let O=await this.mutate((j)=>j.storage.importDatabaseTable({path:{id:this.id},body:$}));return V$.byId(this,O.id)}webhookOf($){return Pj.fromRecord(V$.byId(this,$.tableId),M.byId(this.client,$.createdBy),$)}async webhooks(){let{webhooks:$}=Y(await this.client.storage.listDatabaseWebhooks({path:{id:this.id}}));return $.map((O)=>this.webhookOf(O))}async createWebhook($){this.assertOwns("table",$.database);let O=Y(await this.client.storage.createDatabaseWebhook({path:{id:this.id},body:{tableId:$.id}}));return{webhook:this.webhookOf(O.webhook),token:O.token}}async deleteWebhook($){this.assertOwns("webhook",$.table.database),Y(await this.client.storage.deleteDatabaseWebhook({path:{id:this.id,webhook_id:$.id}}))}async sharePermissions(){return Y(await this.client.storage.getDatabasePermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateDatabasePermissions({path:{id:this.id},body:$}))}async changeColumnType($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.table.version();return d$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"change_type",to:Fj(O.to)}}],{baseVersions:[{table:$.table,version:j}]}),"column","type_changed")}async columnConversion($,O){return this.assertOwns(`column ${$.id}`,$.table.database),Y(await this.client.storage.convertDatabaseColumn({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{to:Fj(O)}}))}async convertColumnIntoNewColumn($,O){let j=await this.columnConversion($,O.to),x=O.name??`${await $.name()} (${P5(O.to)})`,S=c$(),K=[{kind:"column",table:$.table.id,column:S,change:{kind:"create",definition:{source:"new",name:x,type:Fj(O.to),options:Jx(j.options)},after:$.id}}];if(j.cells.length>0)K.push({kind:"rows",table:$.table.id,change:{kind:"update",changes:{kind:"per_row",rows:j.cells.map(({row:X,value:Q})=>({row:X,cells:[{column:S,value:Q}]}))}}});let[Z]=await this.applyOps(K,{baseVersions:[{table:$.table,version:j.tableVersion}]});if(!Z2(Z,"column","created"))throw new w(`expected a column.created result, got ${Z?Vx(Z):"none"}`);return F$.byId($.table,Z.column)}async deleteColumn($){this.assertOwns(`column ${$.id}`,$.table.database);let O=await $.table.version(),{tableVersion:j}=d$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"delete"}}],{baseVersions:[{table:$.table,version:O}]}),"column","deleted");return j}async reorderColumns($,O){this.assertOwns(`table ${$.id}`,$.database);for(let S of O)if(S.table.id!==$.id)throw new w(`column ${S.id} does not belong to table ${$.id}`);let j=await $.version(),{tableVersion:x}=d$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"reorder_columns",order:O.map((S)=>S.id)}}],{baseVersions:[{table:$,version:j}]}),"table","columns_reordered");if(x===void 0)throw new w(`table ${$.id} reordered its columns without a version`);return x}async renameTable($,O){this.assertOwns(`table ${$.id}`,$.database);let j=await $.name(),{tableVersion:x}=d$(await this.applyOps([{kind:"table",table:$.id,change:{kind:"rename",name:O,previousName:j}}]),"table","renamed");if(x===void 0)throw new w(`table ${$.id} was renamed without a version`);return x}async renameColumn($,O){this.assertOwns(`column ${$.id}`,$.table.database);let j=await $.name(),{tableVersion:x}=d$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"rename",name:O,previousName:j}}]),"column","renamed");return x}async inferColumnType($,O){return this.assertOwns(`column ${$.id}`,$.table.database),this.mutate((j)=>j.storage.inferDatabaseColumnType({path:{id:this.id,table_id:$.table.id,column_id:$.id},body:{dataType:O.dataType,baseVersion:O.baseVersion,...O.specificEntityType!==void 0?{specificEntityType:O.specificEntityType}:{}}}))}async addColumn($,O){if(this.assertOwns(`table ${$.id}`,$.database),O.after!==void 0&&O.after.table.id!==$.id)throw new w(`column ${O.after.id} does not belong to table ${$.id}`);let j="property"in O?{source:"existing",property:O.property.id}:{source:"new",name:O.name,type:Fj(O.type),...O.options!==void 0?{options:Jx(O.options)}:{},...O.inferType!==void 0?{inferType:O.inferType}:{}},{column:x}=d$(await this.applyOps([{kind:"column",table:$.id,column:c$(),change:{kind:"create",definition:j,...O.after!==void 0?{after:O.after.id}:{}}}]),"column","created");return F$.byId($,x)}async addColumnOptions($,O){return this.assertOwns(`column ${$.id}`,$.table.database),d$(await this.applyOps([{kind:"column",table:$.table.id,column:$.id,change:{kind:"add_options",options:Jx(O)}}]),"column","options_added")}}class Bx{client;constructor($){this.client=$}query($,O){return Aj(this.client,Y$.byId,$,O)}byId($){return Y$.byId(this.client,$)}create($){return Y$.create(this.client,$)}list(){return Y$.list(this.client)}}class VO extends A{document;toJSON(){return{...super.toJSON(),documentId:this.document.id}}constructor($,O,j,x){super($,j,x);this.document=O}static byId($,O,j){return new VO($,O,j)}static from($,O,j){return new VO($,O,j.uuid,j)}async fetch(){let $=Y(await this.client.storage.getDocumentAnchors({path:{document_id:this.document.id}})).data.find((O)=>O.uuid===this.id);if(!$)throw new E(`Annotation ${this.id} is unavailable`);return $}kind=this.field("anchorType");page=this.field("page");async edit($){if(await this.kind()!=="placeable")throw Error("Only placeable comment annotations can be edited");await this.mutate((O)=>O.storage.editAnchor({body:{...$,uuid:this.id,anchorType:"free-comment",fileType:"pdf"}}))}async delete(){if(await this.kind()!=="highlight")throw Error("Only standalone highlights can be deleted with this endpoint");await this.mutate(($)=>$.storage.deleteAnchor({body:{uuid:this.id,anchorType:"highlight",fileType:"pdf"}}))}}class l$ extends A{documentId;constructor($,O,j,x){super($,j,x);this.documentId=O}get path(){return{parent_type:"document",parent_id:this.documentId,id:this.id}}async fetch(){return Y(await this.client.storage.entityMessageGetMessage({path:this.path}))}static byId($,O,j){return new l$($,O,j)}static from($,O,j){return new l$($,O,j.id,j)}text=this.field("content");createdAt=this.field("created_at");updatedAt=this.field("updated_at");async threadId(){return(await this.detail.get()).thread_id??this.id}document(){return f.byId(this.client,this.documentId)}async author(){return M.byId(this.client,(await this.detail.get()).sender_id)}async reply($){return this.document().comment($,{threadId:await this.threadId()})}async edit($){let{content:O,mentions:j}=O$($);return await this.mutate((x)=>x.storage.entityMessageEdit({path:this.path,body:{content:O,mentions:j}})),this}async delete(){await this.mutate(($)=>$.storage.entityMessageDeleteMessage({path:this.path}))}}class oO{client;document;id;detail;constructor($,O,j){this.client=$;this.document=O;this.id=j;this.detail=new W$(async()=>Y(await this.client.storage.getDocumentVersion({path:{document_id:O.id,document_version_id:j}})).data)}static byId($,O,j){return new oO($,O,j)}read(){return this.detail.get()}toJSON(){return{id:this.id,documentId:this.document.id}}}var F5=8;class f extends K${async anchors(){return Y(await this.client.storage.getDocumentAnchors({path:{document_id:this.id}})).data.map(($)=>VO.from(this.client,this,$))}async createHighlight($){return VO.from(this.client,this,Y(await this.client.storage.createAnchor({path:{document_id:this.id},body:{...$,fileType:"pdf",anchorType:"highlight"}})))}version($){return oO.byId(this.client,this,$)}async sharePermissions(){return Y(await this.client.storage.getDocumentPermissionsV2({path:{document_id:this.id}})).documentPermissions}async permissionsToken(){return Y(await this.client.storage.getDocumentPermissionsToken({path:{document_id:this.id}})).token}async prepareSave($){return Y(await this.client.storage.presaveDocumentHandler({path:{document_id:this.id},body:{newBom:$}})).data}async save($){return(await this.mutate((O)=>O.storage.saveDocumentHandler({path:{document_id:this.id},body:$}))).data}async simpleSave(){return(await this.mutate(($)=>$.storage.simpleSave({path:{document_id:this.id}}))).data}messageThreadById($){return L$.byId(this.client,{type:"document",entity:this},$)}timelinePage($){return b$(this.client,{type:"document",entity:this},(O)=>l$.from(this.client,this.id,O),$)}access=new $$(this.client,"document",this);async fetch(){let{data:$}=Y(await this.client.storage.getDocument({path:{document_id:this.id}}));return $.documentMetadata}static byId($,O){return new f($,O)}static async create($,O){let{documentId:j}=Y(await $.storage.createMarkdownHandler({body:{documentName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new f($,j)}static async createSnippet($,O){let{documentId:j}=Y(await $.storage.createSnippetHandler({body:{snippetName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new f($,j)}static async createSkill($,O){let{documentId:j}=Y(await $.storage.createSkillHandler({body:{skillName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null}}));return new f($,j)}static recent($,O){let j=O?.pageSize??50;return c(async(x)=>{let S=Y(await $.storage.getUserDocumentsHandler({query:{limit:j,offset:x?Number(x):0,...O?.fileType!==void 0?{file_type:O.fileType}:{}}})),K=S.data?.next_offset;return{items:(S.data?.documents??[]).map((Z)=>new f($,Z.documentId)),nextCursor:K!=null?String(K):null}})}static async recentlyDeleted($){let{data:O}=Y(await $.storage.recentlyDeleted({}));return O.items.filter((j)=>j.type==="document").map((j)=>new f($,j.id))}entityType="document";propertyEntityType="DOCUMENT";name=this.field("documentName");fileType=this.field("fileType");project=this.mappedField("projectId",($)=>$?n.byId(this.client,$):void 0);owner=this.mappedField("owner",($)=>M.byId(this.client,$));branchedFrom=this.mappedField("branchedFromId",($)=>$?f.byId(this.client,$):void 0);createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");deletedAt=this.field("deletedAt");async content(){let{text:$}=Y(await this.client.storage.getDocumentTextContent({path:{document_id:this.id}}));if($!==null)return $;let{presigned_url:O}=Y(await this.client.storage.exportDocument({path:{document_id:this.id}})),j=await fetch(O);if(!j.ok)throw new e$(j.status,{message:"failed to download document content"});return j.text()}async rename($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{documentName:$}}))}async move($){await this.mutate((O)=>O.storage.editDocument({path:{document_id:this.id},body:{projectId:$?.id??""}}))}async delete($){await this.mutate((O)=>$?.permanent?O.storage.permanentlyDeleteDocument({path:{document_id:this.id}}):O.storage.deleteDocument({path:{document_id:this.id}}))}async restore(){await this.mutate(($)=>$.storage.revertDeleteDocument({path:{document_id:this.id}}))}async copy($){let{data:O}=Y(await this.client.storage.copyDocument({path:{document_id:this.id},query:$.versionId!==void 0?{version_id:$.versionId}:void 0,body:{documentName:$.name}}));return new f(this.client,O.documentMetadata.documentId)}async comments(){let $={parent_type:"document",parent_id:this.id},O=c(async(x)=>{let S=Y(await this.client.storage.messageTimeline({path:$,query:{selection:JSON.stringify({limit:100,cursor:x})}}));return{items:S.items,nextCursor:S.next_cursor}}),j=[];for await(let x of O)j.push(x);return dO(j,F5,async(x)=>{let{state:S,root:K,replies:Z}=Y(await this.client.storage.entityMessageGetThread({path:{...$,id:x.id}}));return{thread:S,comments:[K,...Z].map((X)=>l$.from(this.client,this.id,X))}})}async comment($,O){let j=await this.mutate((x)=>x.storage.entityMessageCreate({path:{parent_type:"document",parent_id:this.id},body:{...O$($),thread_id:O?.threadId??null}}));return l$.from(this.client,this.id,j)}async shortId(){return Y(await this.client.storage.getDocumentShortId({path:{document_id:this.id}}))}async teamShare(){return Y(await this.client.storage.getDocumentTeamShare({path:{document_id:this.id}}))}async setTeamShare($){await this.mutate((O)=>O.storage.setDocumentTeamShare({path:{document_id:this.id},body:{shareWithTeam:$}}))}async githubPullRequests(){let{pullRequests:$}=Y(await this.client.storage.getDocumentGithubPullRequests({path:{document_id:this.id}}));return $}async branchName(){let{branchName:$}=Y(await this.client.storage.getDocumentBranchName({path:{document_id:this.id}}));return $}webUrl(){return`${this.client.webAppUrl}/app/md/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static search=x$({filters:{document_filters:{}},type:"document",make:($,O)=>new f($,O.document_id)});toMention(){let $=this.detail.peek();return{tag:o$("m-document-mention",{documentId:this.id,documentName:$?.documentName??"",blockName:$?.fileType??"md"}),mention:{entity_type:"document",entity_id:this.id}}}}class Ej{id;name;constructor($,O){this.id=$;this.name=O}static async list($){let{skills:O}=Y(await $.storage.getSystemSkillsHandler());return O.map((j)=>new Ej(j.id,j.name))}}class Lx{client;async byTeamSlug($){let O=Y(await this.client.storage.getDocumentByTeamSlug({path:{slug:$}}));if(typeof O!=="object"||O===null||!("data"in O)||typeof O.data!=="object"||O.data===null||!("documentMetadata"in O.data)||typeof O.data.documentMetadata!=="object"||O.data.documentMetadata===null||!("documentId"in O.data.documentMetadata)||typeof O.data.documentMetadata.documentId!=="string")throw Error("Invalid team task document response");return f.byId(this.client,O.data.documentMetadata.documentId)}async validatePermissionsToken($){let O=Y(await this.client.storage.validateDocumentPermissionsToken({body:{token:$}}));return{document:f.byId(this.client,O.document_id),user:O.user_id?M.byId(this.client,O.user_id):void 0,accessLevel:O.access_level,expiresAt:O.exp,issuer:O.iss}}async createUpload($){let O={documentName:$.name,sha:$.sha,fileType:$.fileType,mimeType:$.mimeType,projectId:$.project?.id,teamId:$.team?.id,branchedFromId:$.branchedFrom?.id,emailAttachmentId:$.attachment?.id,isTask:$.isTask},j=Y(await this.client.storage.createDocument({body:O})).data;return{document:f.byId(this.client,j.documentMetadata.documentId),uploadUrl:j.presignedUrl??void 0,contentType:j.contentType,content:j.documentMetadata.content}}constructor($){this.client=$}byId($){return f.byId(this.client,$)}create($){return f.create(this.client,$)}async createCanvas($){let O=Y(await this.client.storage.createCanvasHandler({body:{documentName:$.name,projectId:$.project?.id}}));return f.byId(this.client,O.documentId)}createSnippet($){return f.createSnippet(this.client,$)}createSkill($){return f.createSkill(this.client,$)}systemSkills(){return Ej.list(this.client)}search($,O){return f.search(this.client,$,O)}recent($){return f.recent(this.client,$)}recentlyDeleted(){return f.recentlyDeleted(this.client)}}class WO extends A{async fetch(){let{attachment:$}=Y(await this.client.email.getAttachment({path:{id:this.id}}));return $}static byId($,O){return new WO($,O)}static from($,O){return new WO($,O.db_id,O)}filename=this.field("filename");mimeType=this.field("mime_type");size=this.field("size_bytes");dataUrl=this.field("data_url");sfsId=this.field("sfs_id");contentId=this.field("content_id");async toDocument(){let{document_id:$}=Y(await this.client.email.getAttachmentDocumentId({path:{id:this.id}}));return f.byId(this.client,$)}}class z$ extends K${access=new $$(this.client,"email_thread",this);async followup(){return Y(await this.client.storage.getEmailFollowup({path:{thread_id:this.id}}))}async setFollowup($){return Y(await this.client.storage.setEmailFollowup({path:{thread_id:this.id},body:$}))}async calendarInvitations(){return Y(await this.client.email.getThreadCalendarInvitations({path:{thread_id:this.id}}))}async addEventToCalendar($,O,j={}){let x=Y(await this.client.email.copyThreadCalendarInvitation({path:{thread_id:this.id,message_id:$.id,invitation_id:O.id},body:{calendarId:j.calendar?.id}}));return S$.fromRecord(this.client,x)}async readReceipts(){let{receipts:$}=Y(await this.client.email.getThreadReadReceipts({path:{thread_id:this.id}}));return $.map((O)=>({message:U$.byId(this.client,O.message_id),openCount:O.open_count,firstOpenedAt:O.first_opened_at??void 0,lastOpenedAt:O.last_opened_at??void 0}))}async update($){await this.mutate((O)=>O.storage.editThreadV2({path:{thread_id:this.id},body:{projectId:$.project===void 0?void 0:$.project?.id??null,sharePermission:$.sharePermission?$O($.sharePermission):void 0}}))}entityType="email_thread";propertyEntityType="THREAD";async fetch(){let{thread:$}=Y(await this.client.email.getThread({path:{thread_id:this.id},query:{limit:100}}));return $}webUrl(){return`${this.client.webAppUrl}/app/mail/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new z$($,O)}createdAt=this.field("created_at");updatedAt=this.field("updated_at");isRead=this.field("is_read");inboxVisible=this.field("inbox_visible");accessLevel=this.field("access_level");providerId=this.field("provider_id");link=this.mappedField("link_id",($)=>R$.byId(this.client,$));project=this.mappedField("project_id",($)=>$?n.byId(this.client,$):void 0);latestInboundAt=this.field("latest_inbound_message_ts");latestOutboundAt=this.field("latest_outbound_message_ts");latestNonSpamAt=this.field("latest_non_spam_message_ts");async subject(){let{messages:$}=await this.detail.get();for(let O of $)if(O.subject)return O.subject;return}async participants(){let{messages:$}=await this.detail.get(),O=new Map;for(let j of $)for(let x of[j.from,...j.to,...j.cc,...j.bcc])if(x&&!O.has(x.email))O.set(x.email,x);return[...O.values()]}async messages($){return Y(await this.client.email.getThreadMessagesHandler({path:{id:this.id},query:{...$?.since?{since:$.since}:{},...$?.limit?{limit:$.limit}:{}}})).map((j)=>U$.from(this.client,j))}async attachments(){let{messages:$}=await this.detail.get();return $.flatMap((O)=>O.attachments.map((j)=>WO.from(this.client,j)))}async reply($){let O=$.subject??await this.subject()??"",{message:j}=await this.mutate((x)=>x.email.sendMessage({body:{message:{thread_db_id:this.id,replying_to_id:$.replyingTo?.id??null,to:$.to,cc:$.cc??null,bcc:$.bcc??null,subject:O,body_text:$.bodyText}}}));return j.db_id?U$.byId(this.client,j.db_id):void 0}async archive($=!0){await this.mutate((O)=>O.email.archiveThread({path:{id:this.id},body:{value:$}}))}static async archiveMany($,O,j=!0){let x=[];for(let S=0;S<O.length;S+=100){let K=O.slice(S,S+100),Z=Y(await $.email.archiveThreads({body:{thread_ids:K.map((Q)=>Q.id),value:j}})),X=new Set(Z.failed_thread_ids);for(let Q of K)if(Q.detail.clear(),X.has(Q.id))x.push(Q)}return x}async updateState($){await this.mutate((O)=>O.email.updateThreadState({path:{id:this.id},body:$}))}async operations(){return Y(await this.client.email.threadOperations({path:{id:this.id}}))}async markSeen(){await this.mutate(($)=>$.email.threadSeen({path:{id:this.id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveThreadLabel({path:{id:this.id},body:{label_id:$.id,value:!1}}))}async moveToProject($){await this.mutate((O)=>O.email.updateThreadProject({path:{thread_id:this.id},body:{projectId:$?.id??null}}))}static search=x$({filters:{email_filters:{}},type:"email",make:($,O)=>new z$($,O.thread_id)})}class U$ extends A{async fetch(){return Y(await this.client.email.getMessage({path:{id:this.id}}))}static byId($,O){return new U$($,O)}static from($,O){return new U$($,O.db_id,O)}static async send($,O){let{message:j}=Y(await $.email.sendMessage({body:{message:{to:O.to,cc:O.cc??null,bcc:O.bcc??null,subject:O.subject,body_text:O.bodyText}}}));return j.db_id?U$.byId($,j.db_id):void 0}subject=this.field("subject");from=this.field("from");to=this.field("to");cc=this.field("cc");bcc=this.field("bcc");body=this.field("body_parsed");sentAt=this.field("internal_date_ts");labels=this.field("labels");link=this.mappedField("link_id",($)=>R$.byId(this.client,$));async operationStatus(){return Y(await this.client.email.messageOperationStatus({path:{id:this.id}}))}async resolveOperation($){await this.mutate((O)=>O.email.resolveMessageOperation({path:{id:this.id},body:$}))}async completeDraftAttachment($,O=0){let j=await this.link();await this.mutate((x)=>x.email.completeDraftAttachment({path:{id:this.id,attachment_id:$},query:{draft_generation:O},headers:{"X-Email-Link-Id":j.id}}))}async transferDraft($){let O=await this.detail.get();return this.mutate((j)=>j.email.transferDraft({path:{id:this.id},body:{...$,draft_generation:$.draft_generation??O.draft_generation??0},headers:{"X-Email-Link-Id":O.link_id}}))}async addLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!0}}))}async removeLabel($){await this.mutate((O)=>O.email.addRemoveLabel({body:{label_id:$.id,message_ids:[this.id],value:!1}}))}async thread(){return z$.byId(this.client,(await this.detail.get()).thread_db_id)}async downloadEml(){return Y(await this.client.email.getMessageEml({path:{id:this.id},parseAs:"blob"}))}}class BO extends U${async draftContext(){let $=await this.detail.get();return{headers:{"X-Email-Link-Id":$.link_id},query:{draft_generation:$.draft_generation??0}}}static byId($,O){return new BO($,O)}draftGeneration=this.field("draft_generation");async update($){let{headers:O,query:j}=await this.draftContext();await this.mutate((x)=>x.email.createDraft({headers:O,body:{draft:{...Nx($),db_id:this.id,draft_generation:$.draftGeneration??j.draft_generation}}}))}async delete(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteDraft({path:{id:this.id},headers:$,query:O}))}async schedule($,O){let{headers:j,query:x}=await this.draftContext();await this.mutate((S)=>S.email.upsertScheduledMessage({path:{id:this.id},headers:j,query:x,body:{send_time:$,include_signature:O?.includeSignature}}))}async unschedule(){let{headers:$,query:O}=await this.draftContext();await this.mutate((j)=>j.email.deleteScheduledDraft({path:{message_id:this.id},headers:$,query:O}))}async addAttachment($){let O={file_name:$.fileName,sha:$.sha,size:$.size,upload_id:$.uploadId},{headers:j,query:x}=await this.draftContext(),S=await this.mutate((K)=>K.email.addDraftAttachment({path:{id:this.id},headers:j,query:x,body:O}));return{attachment:$j.byId(this.client,this,S.attachment_id,!1,x.draft_generation),uploadUrl:S.upload_url,contentType:S.content_type}}async forwardAttachment($){let{headers:O,query:j}=await this.draftContext(),x=await this.mutate((S)=>S.email.addForwardedAttachment({path:{id:this.id},headers:O,query:j,body:{attachment_id:$.id}}));return $j.byId(this.client,this,x.attachment_id,!0,j.draft_generation)}async removeAttachment($){if($.draft.id!==this.id)throw Error("Attachment belongs to another draft");let{headers:O}=await this.draftContext(),j={draft_generation:$.draftGeneration};if($.forwarded)await this.mutate((x)=>x.email.removeForwardedAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}));else await this.mutate((x)=>x.email.removeDraftAttachment({path:{id:this.id,attachment_id:$.id},headers:O,query:j}))}async verifyAttachment($){if($.draft.id!==this.id||$.forwarded)throw Error("Expected an uploaded attachment on this draft");await this.completeDraftAttachment($.id,$.draftGeneration)}}class $j{draft;id;forwarded;draftGeneration;constructor($,O,j,x){this.draft=$;this.id=O;this.forwarded=j;this.draftGeneration=x}static byId($,O,j,x=!1,S=0){return new $j(O,j,x,S)}complete(){return this.draft.verifyAttachment(this)}remove(){return this.draft.removeAttachment(this)}toJSON(){return{id:this.id,draftId:this.draft.id,forwarded:this.forwarded,draftGeneration:this.draftGeneration}}}function Nx($){let{bodyText:O,bodyHtml:j,bodyMacro:x,headers:S,includeSignature:K,draftGeneration:Z,thread:X,replyingTo:Q,...L}=$;return{...L,body_text:O,body_html:j===void 0?void 0:btoa(Array.from(new TextEncoder().encode(j),(G)=>String.fromCharCode(G)).join("")).replaceAll("+","-").replaceAll("/","_").replaceAll("=",""),body_macro:x,headers_json:S,include_signature:K,draft_generation:Z,thread_db_id:X?.id,replying_to_id:Q?.id}}class LO extends A{inbox;constructor($,O,j,x){super($,O,j);this.inbox=x}get headers(){return this.inbox?{"X-Email-Link-Id":this.inbox.id}:void 0}static byId($,O,j){return new LO($,O,void 0,j)}static from($,O,j){return new LO($,O.id,O,j)}async fetch(){let $=Y(await this.client.email.listEmailFilters({headers:this.headers})).filters.find((O)=>O.id===this.id);if(!$)throw new E(`Email filter ${this.id} is unavailable`);return $}emailAddress=this.field("email_address");emailDomain=this.field("email_domain");isImportant=this.field("is_important");async setImportant($){let O=await this.detail.get();await this.mutate((j)=>j.email.upsertEmailFilter({headers:this.headers,body:{email_address:O.email_address,email_domain:O.email_domain,is_important:$}}))}async delete(){await this.mutate(($)=>$.email.deleteEmailFilter({path:{id:this.id},headers:this.headers}))}}class xO extends A{async fetch(){let{labels:$}=Y(await this.client.email.listLabels()),O=$.find((j)=>j.id===this.id);if(!O)throw new E(`label ${this.id} not found`);return O}static byId($,O){return new xO($,O)}static async list($){let{labels:O}=Y(await $.email.listLabels());return O.map((j)=>new xO($,j.id,j))}static async create($,O){let{label:j}=Y(await $.email.createLabel({body:{label_name:O}}));if(!j.id)throw new w("created label has no id");return new xO($,j.id)}async delete(){Y(await this.client.email.deleteLabel({path:{id:this.id}}))}name=this.field("name");linkId=this.field("linkId");type=this.field("type");createdAt=this.field("createdAt");labelListVisibility=this.field("labelListVisibility");messageListVisibility=this.field("messageListVisibility")}class Ux{client;async createDraft($,O){let j=Y(await this.client.email.createDraft({body:{draft:Nx($)},headers:O?{"X-Email-Link-Id":O.id}:void 0}));if(!j.draft.db_id)throw Error("Draft response has no message id");return BO.byId(this.client,j.draft.db_id)}draftById($){return BO.byId(this.client,$)}async*scheduled($){let O=$?.pageSize??100;if(!Number.isInteger(O)||O<1)throw Error("pageSize must be positive");let j=Math.min(O,1000);for(let x=0;;x+=j){let S=Y(await this.client.email.getScheduledMessages({query:{offset:x,limit:j},headers:$?.inbox?{"X-Email-Link-Id":$.inbox.id}:void 0}));for(let K of S.messages)yield BO.byId(this.client,K.db_id);if(S.messages.length<j)return}}async filters($){return Y(await this.client.email.listEmailFilters({headers:$?{"X-Email-Link-Id":$.id}:void 0})).filters.map((O)=>LO.from(this.client,O,$))}async upsertFilter($,O){return LO.from(this.client,Y(await this.client.email.upsertEmailFilter({headers:O?{"X-Email-Link-Id":O.id}:void 0,body:{email_address:$.emailAddress,email_domain:$.emailDomain,is_important:$.isImportant}})).filter,O)}async contacts(){return Y(await this.client.email.listContacts()).contacts}reminders($){let{inboxes:O,...j}=$??{};return c(async(x)=>{let S=Y(await this.client.storage.listEmailReminders({query:{...j,inboxIds:O?.map((K)=>K.id),cursor:x}}));return{items:S.items.map(({threadId:K,...Z})=>({...Z,thread:z$.byId(this.client,K)})),nextCursor:S.nextCursor}})}constructor($){this.client=$}byId($){return z$.byId(this.client,$)}message($){return U$.byId(this.client,$)}attachment($){return WO.byId(this.client,$)}link($){return R$.byId(this.client,$)}links(){return R$.list(this.client)}async connectionProviders(){return Y(await this.client.auth.emailConnectionProviders())}async recoverDraftTransfer($){return Y(await this.client.email.recoverDraftTransfer({path:{id:$}}))}send($){return U$.send(this.client,$)}search($,O){return z$.search(this.client,$,O)}inbox($){return c(async(O)=>{let j=Y(await this.client.email.previewsInboxCursor({path:{view:"inbox"},query:{...$?.pageSize?{limit:$.pageSize}:{},...$?.sort?{sort_method:$.sort}:{},...O?{cursor:O}:{}}}));return{items:j.items.map((x)=>z$.byId(this.client,x.id)),nextCursor:j.next_cursor}})}label($){return xO.byId(this.client,$)}labels(){return xO.list(this.client)}createLabel($){return xO.create(this.client,$)}archive($,O=!0){return z$.archiveMany(this.client,$,O)}async deleteLabel($){Y(await this.client.email.deleteLabel({path:{id:$.id}}))}async blockSender($){Y(await this.client.email.blockSender({body:{email_address:$}}))}async unblockSender($){Y(await this.client.email.unblockSender({body:{email_address:$}}))}async blockedSenders(){return Y(await this.client.email.listBlockedSenders()).blocked_emails}}class TO{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new TO($,O)}async delete(){Y(await this.client.storage.deleteEntityMention({path:{mention_id:this.id}}))}toJSON(){return{id:this.id}}}class zx{client;constructor($){this.client=$}byId($){return TO.byId(this.client,$)}async create($,O){let j=Y(await this.client.storage.createEntityMention({body:{source_entity_id:$.entity.id,source_entity_type:$.type,entity_id:O.entity.id,entity_type:O.type}}));return TO.byId(this.client,j.id)}}function Ix($,O){return{chat:NO.byId($,O.id),name:O.name,announcements:O.announcements}}class NO extends A{static byId($,O){return new NO($,O)}static from($,O){return new NO($,O.jid,O)}async fetch(){let{chats:$}=Y(await this.client.storage.whatsappChats()),O=$.find((j)=>j.jid===this.id);if(!O)throw new E("WhatsApp chat is not available");return O}kind=this.field("kind");name=this.field("name");phoneNumber=this.field("phoneNumber");lastActivityAt=this.field("lastActivityAt");archived=this.field("archived");pinned=this.field("pinned");canAdd=this.field("canAdd");cannotAddReason=this.field("cannotAddReason");community=this.mappedField("community",($)=>$?Ix(this.client,$):void 0);added=this.mappedField("added",($)=>$?g$.byId(this.client,$.id):void 0);shared=this.mappedField("shared",($)=>$?g$.byId(this.client,$.id):void 0);async add(){let $=await this.kind(),O=await this.mutate((j)=>j.storage.externalChatAdd({body:{provider:"whatsapp",remoteId:this.id,kind:$}}));return g$.byId(this.client,O.chatId)}async refresh(){return this.detail.clear(),await this.detail.get(),this}}class C$ extends A{chat;constructor($,O,j,x){super($,j,x);this.chat=O}static byId($,O,j){return new C$($,O,j)}static from($,O,j){return new C$($,O,j.id,j)}async fetch(){return Y(await this.client.storage.externalChatMessage({path:{chat_id:this.chat.id,message_id:this.id}}))}body=this.field("body");sender=this.field("sender");sentAt=this.field("sentAt");editedAt=this.field("editedAt");deleted=this.field("deleted");reactions=this.field("reactions");deliveryState=this.field("deliveryState");kind=this.field("kind");forwarded=this.field("forwarded");viewOnce=this.field("viewOnce");mentions=this.field("mentions");rich=this.field("rich");replyTo=this.mappedField("replyTo",($)=>$?C$.byId(this.client,this.chat,$):void 0);attachments=this.mappedField("attachments",($)=>$.map((O)=>({ordinal:O.ordinal,state:O.state,fileName:O.fileName,mime:O.mime,size:O.size,width:O.width??void 0,height:O.height??void 0,durationSeconds:O.durationSeconds??void 0,presentation:O.presentation??void 0,url:O.fileId?`${this.client.hosts["static-files"]}/file/${O.fileId}`:void 0})))}class SO{chat;id;record;constructor($,O,j){this.chat=$;this.id=O;this.record=j}static byId($,O){return new SO($,O)}static from($,O){return new SO($,O.jid,O)}get displayName(){return this.record?.displayName??void 0}get mentionToken(){return this.id.split("@")[0]??this.id}get admin(){return this.record?.admin}toJSON(){return{id:this.id,chat:this.chat.id,displayName:this.displayName,admin:this.admin}}}class ZO{id;chat;filename;kind;constructor($,O,j,x){this.id=$;this.chat=O;this.filename=j;this.kind=x}static byId($,O){return new ZO(O,$)}static from($,O){return new ZO(O.uploadId,$,O.filename,O.kind)}toJSON(){return{id:this.id,chat:this.chat.id,filename:this.filename,kind:this.kind}}}class XO extends A{chat;constructor($,O,j,x){super($,j,x);this.chat=O}static byId($,O,j){return new XO($,O,j)}static from($,O,j){return new XO($,O,j.id,j)}async fetch(){let O=Y(await this.client.storage.externalChatDelivery({path:{chat_id:this.chat.id},body:[this.id]})).find((j)=>j.id===this.id);if(!O)throw new E("External chat send is not available");return O}state=this.field("state");errorCode=this.field("errorCode");createdAt=this.field("createdAt");message=this.mappedField("messageId",($)=>$?C$.byId(this.client,this.chat,$):void 0);async request(){let{payload:$}=await this.detail.get(),O=$.message,j=k(O).returnType().with({type:"media"},(x)=>({type:"media",upload:ZO.byId(this.chat,x.uploadId),caption:x.caption??void 0})).with({type:"mutation"},(x)=>({type:"mutation",message:C$.byId(this.client,this.chat,x.messageId),operation:x.operation,text:x.text??void 0})).with({type:"text"},(x)=>({type:"text",text:x.text,mentions:(x.mentions??[]).map((S)=>SO.byId(this.chat,S))})).exhaustive();return{idempotencyKey:$.idempotencyKey,message:j,replyTo:$.replyTo?C$.byId(this.client,this.chat,$.replyTo):void 0}}async refresh(){return this.detail.clear(),await this.detail.get(),this}}class g$ extends H${entityType="external_chat";static byId($,O){return new g$($,O)}async fetch(){return Y(await this.client.storage.externalChat({path:{chat_id:this.id}}))}provider=this.field("provider");name=this.field("name");kind=this.field("kind");canSend=this.field("canSend");sendReason=this.field("sendReason");sendingIdentity=this.field("sendingIdentity");unreadCount=this.field("unreadCount");backfill=this.field("backfill");limits=this.field("limits");members=this.field("members");participants=this.mappedField("members",($)=>($?.participants??[]).map((O)=>SO.from(this,O)));disappearingSeconds=this.field("disappearingSeconds");owner=this.mappedField("userId",($)=>M.byId(this.client,$));async community(){let{provider:$,community:O}=await this.detail.get();if(!O)return;return k($).with("whatsapp",()=>Ix(this.client,O)).exhaustive()}async*messages($={}){yield*c(async(O)=>{let j=Y(await this.client.storage.externalChatMessages({path:{chat_id:this.id},query:{before:O,limit:$.limit}}));return{items:j.messages.map((x)=>C$.from(this.client,this,x)),nextCursor:j.nextCursor}})}async markRead($){this.assertChat($.chat),await this.mutate((O)=>O.storage.externalChatRead({path:{chat_id:this.id},body:{messageId:$.id}}))}async permissions(){return Y(await this.client.storage.externalChatPermissions({path:{chat_id:this.id}}))}async updatePermissions($){await this.mutate((O)=>O.storage.externalChatUpdatePermissions({path:{chat_id:this.id},body:$}))}async remove(){await this.mutate(($)=>$.storage.externalChatRemove({path:{chat_id:this.id}}))}async upload($){let O=Y(await this.client.storage.externalChatUpload({path:{chat_id:this.id},body:{file:$}}));return ZO.from(this,O)}async send($,O){if(O.replyTo)this.assertChat(O.replyTo.chat);let j=k($).returnType().with({type:"text"},(S)=>{let K=S.mentions??[];for(let Z of K)this.assertChat(Z.chat);return{type:"text",text:S.text,mentions:K.map((Z)=>Z.id)}}).with({type:"media"},(S)=>{return this.assertChat(S.upload.chat),{type:"media",uploadId:S.upload.id,caption:S.caption}}).with({type:"mutation"},(S)=>{return this.assertChat(S.message.chat),{type:"mutation",messageId:S.message.id,operation:S.operation,text:S.text}}).exhaustive(),x=await this.mutate((S)=>S.storage.externalChatSend({path:{chat_id:this.id},body:{idempotencyKey:O.idempotencyKey,message:j,replyTo:O.replyTo?.id}}));return XO.from(this.client,this,x)}async sends(){return Y(await this.client.storage.externalChatSends({path:{chat_id:this.id}})).map(($)=>XO.from(this.client,this,$))}async delivery($){for(let O of $)this.assertChat(O.chat);return Y(await this.client.storage.externalChatDelivery({path:{chat_id:this.id},body:$.map((O)=>O.id)})).map((O)=>XO.from(this.client,this,O))}async messageAttachments($){for(let O of $)this.assertChat(O.chat);return Y(await this.client.storage.externalChatMessageAttachments({path:{chat_id:this.id},body:$.map((O)=>O.id)})).map((O)=>({message:C$.byId(this.client,this,O.messageId),attachments:O.attachments.map((j)=>({ordinal:j.ordinal,state:j.state,fileName:j.fileName,mime:j.mime,size:j.size,url:j.fileId?`${this.client.hosts["static-files"]}/file/${j.fileId}`:void 0}))}))}async refresh(){return this.detail.clear(),await this.detail.get(),this}assertChat($){if($.id!==this.id)throw Error("External chat reference belongs to another chat")}}class Hx{client;constructor($){this.client=$}async list(){return Y(await this.client.storage.externalChats()).map(($)=>g$.byId(this.client,$.id))}byId($){return g$.byId(this.client,$)}}class Tx{client;constructor($){this.client=$}async list($={}){let{favorites:O}=Y(await this.client.storage.listFavorites({query:{entityType:$.entityTypes,entityId:$.entityIds}}));return O}async add($){return Y(await this.client.storage.addFavorite({body:{entityId:$.id,entityType:$.entityType}}))}async remove($){Y(await this.client.storage.removeFavoriteByEntity({path:{entity_type:$.entityType,entity_id:$.id}}))}async reorder($){Y(await this.client.storage.reorderFavorites({body:{favorites:$}}))}}class KO extends H${entityType="foreign_entity";async fetch(){return Y(await this.client.storage.getForeignEntity({path:{id:this.id}}))}static byId($,O){return new KO($,O)}static fromRecord($,O){return new KO($,O.id,O)}foreignEntityId=this.field("foreignEntityId");source=this.field("foreignEntitySource");storedForId=this.field("storedForId");storedForAuthEntity=this.field("storedForAuthEntity");createdAt=this.field("createdAt");updatedAt=this.field("updatedAt");async metadata(){return(await this.detail.get()).metadata}}function X2({login:$,...O}){return{...O,login:$??void 0}}class Rx{client;constructor($){this.client=$}byId($){return KO.byId(this.client,$)}async bySource($,O){return KO.fromRecord(this.client,Y(await this.client.storage.getForeignEntityBySource({path:{source:$,foreign_entity_id:O}})))}async githubPullRequestFacets(){let{repositories:$,authors:O,assignees:j,labels:x}=Y(await this.client.storage.getGithubPullRequestFacets());return{repositories:$,authors:O.map(X2),assignees:j.map(X2),labels:x.map(({color:S,...K})=>({...K,color:S??void 0}))}}}class r${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new r$($,O)}async detail(){let O=(await this.form.schema()).sections.flatMap((j)=>j.kind==="questions"?j.questions:[]).find((j)=>j.id===this.id);if(!O)throw new E(`question ${this.id} is not on form ${this.form.id}`);return O}async title(){return(await this.detail()).title}async column(){return F$.byId(await this.form.table(),(await this.detail()).column)}async options(){return(await this.detail()).options.map(($)=>UO.byId(this,$.id))}}class UO{question;id;constructor($,O){this.question=$;this.id=O}static byId($,O){return new UO($,O)}async detail(){let $=(await this.question.detail()).options.find((O)=>O.id===this.id);if(!$)throw new E(`option ${this.id} is not on question ${this.question.id}`);return $}async label(){return(await this.detail()).label}async color(){return(await this.detail()).color??void 0}}class RO{form;id;detail;constructor($,O,j){this.form=$;this.id=O;this.detail=new W$(()=>this.load(),j)}async load(){let $=await this.form.myResponse();if($.kind==="anonymous"||$.response.id!==this.id)throw new E(`response ${this.id} is not your current response`);return $}static byId($,O,j){return new RO($,O,j)}async status(){return(await this.detail.get()).status}async row(){return(await this.detail.get()).row}async answers(){return(await this.detail.get()).answers}async booking(){return(await this.detail.get()).booking}async refresh(){let $=await this.load();return this.detail=new W$(()=>this.load(),$),this}}class p${form;id;constructor($,O){this.form=$;this.id=O}static byId($,O){return new p$($,O)}async detail(){let $=(await this.form.schema()).sections.find((O)=>O.id===this.id);if(!$)throw new E(`section ${this.id} is not on form ${this.form.id}`);return $}async title(){return(await this.detail()).title}async questions(){let $=await this.detail();return $.kind==="questions"?$.questions.map((O)=>r$.byId(this.form,O.id)):[]}}class qj{entityType;id;constructor($,O){this.entityType=$;this.id=O}static byId($,O){return new qj($,O)}}class y$ extends A{async fetch(){return Y(await this.client.storage.getForm({path:{id:this.id}}))}static byId($,O){return new y$($,O)}static async create($,O){let j=Y(await $.storage.createForm({body:{name:O.name,source:O.table?{kind:"table",databaseId:O.table.database.id,tableId:O.table.id}:{kind:"new"}}}));return new y$($,j.form.id,j)}static async list($,O){if(!O)return Y(await $.storage.listAccessibleForms()).map(({form:S})=>new y$($,S.id));return Y(await $.storage.listForms({query:{databaseId:O.id}})).map((x)=>new y$($,x.id))}schema(){return this.detail.get()}name=this.mappedField("form",($)=>$.name);description=this.mappedField("form",($)=>$.description);owner=this.mappedField("form",($)=>M.byId(this.client,$.ownerId));database=this.mappedField("form",($)=>Y$.byId(this.client,$.databaseId));table=this.mappedField("form",($)=>V$.byId(Y$.byId(this.client,$.databaseId),$.tableId));audience=this.mappedField("form",($)=>$.audience);status=this.mappedField("form",($)=>$.status);closesAt=this.mappedField("form",($)=>$.closesAt??void 0);access=this.field("access");async sections(){return(await this.detail.get()).sections.map(($)=>p$.byId(this,$.id))}async questions(){return(await this.detail.get()).sections.flatMap(($)=>$.kind==="questions"?$.questions.map((O)=>r$.byId(this,O.id)):[])}async update($){return await this.mutate((O)=>O.storage.updateForm({path:{id:this.id},body:$})),this}assertOwns($){if($.form.id!==this.id)throw new w(`question or section does not belong to form ${this.id}`)}async replaceLayout($){let O=await this.table(),j=(Z)=>{if(Z.table.id!==O.id||Z.table.database.id!==O.database.id)throw new w(`column does not belong to form ${this.id}'s table`);return Z.id},x=(Z)=>({conjunction:Z.conjunction,conditions:Z.conditions.map((X)=>k(X).with({kind:"group"},(Q)=>({kind:"group",...x(Q)})).with({kind:"condition"},(Q)=>({kind:"condition",column:j(Q.column),test:k(Q.test).with({kind:"options"},(L)=>({...L,options:L.options.map((G)=>G.id)})).with({kind:"entities"},(L)=>({...L,entities:L.entities.map((G)=>G.id)})).with({kind:t.union("presence","text","number","date","dateRange","checkbox")},(L)=>L).exhaustive()})).exhaustive())}),S={sections:$.map((Z)=>{if(Z.section)this.assertOwns(Z.section);let X={id:Z.section?.id??c$(),title:Z.title,description:Z.description??""};return k(Z).with({kind:"booking"},(Q)=>({...X,kind:"booking",target:Q.target})).with({kind:"gate"},(Q)=>({...X,kind:"gate",rules:x(Q.rules),message:Q.message})).with({kind:"questions"},(Q)=>({...X,kind:"questions",questions:Q.questions.map((L)=>{if(L.question)this.assertOwns(L.question);return{id:L.question?.id??c$(),column:j(L.column),helpText:L.helpText??"",required:L.required??!1,widget:L.widget??null}})})).exhaustive()})},K=await this.mutate((Z)=>Z.storage.putFormLayout({path:{id:this.id},body:S}));return{form:this,publicationError:K.publicationError}}wireAnswers($){return $.map(({question:O,value:j})=>{this.assertOwns(O);let x=k(j).with({type:"rows"},(S)=>({type:"rows",value:S.value.map((K)=>K.id)})).with({type:"options"},(S)=>({type:"options",value:S.value.map((K)=>{if(K.question.id!==O.id||K.question.form.id!==this.id)throw new w("option does not belong to the answered question");return{id:K.id}})})).with({type:"entities"},(S)=>({type:"entities",value:S.value.map(({entityType:K,entity:Z})=>({entityType:K,entityId:Z.id}))})).with({type:t.union("text","number","boolean","date","date_range","link","clear")},(S)=>S).exhaustive();return{question:O.id,value:x}})}unlockedBooking($){return $?{...$,section:p$.byId(this,$.section)}:void 0}async outcome($,O){return k($).with({outcome:"stopped"},(j)=>({...j,section:p$.byId(this,j.section)})).with({outcome:"submitted"},async(j)=>{let x=E$.byId(await this.table(),j.row),S=this.unlockedBooking(j.booking);return{outcome:"submitted",response:RO.byId(this,j.response,{status:"submitted",row:x,answers:O,booking:S}),row:x,...S?{booking:S}:{}}}).exhaustive()}async submit($){let O={answers:this.wireAnswers($)};return this.outcome(Y(await this.client.storage.submitFormResponse({path:{id:this.id},body:O})),$)}async editResponse($){let O={answers:this.wireAnswers($)};return this.outcome(Y(await this.client.storage.editMyFormResponse({path:{id:this.id},body:O})),$)}async myResponse(){let $=Y(await this.client.storage.getMyFormResponse({path:{id:this.id}}));if($.kind==="anonymous")return{kind:"anonymous"};let O=await this.table(),j=await Promise.all($.answers.map(async(K)=>{let Z=r$.byId(this,K.question),X=await k(K.value).with({type:"options"},(Q)=>({type:"options",value:Q.value.map((L)=>{if(!("id"in L))throw new w("stored form answers must reference options by id");return UO.byId(Z,L.id)})})).with({type:"entities"},(Q)=>({type:"entities",value:Q.value.map((L)=>({entityType:L.entityType,entity:qj.byId(L.entityType,L.entityId)}))})).with({type:"rows"},async(Q)=>{let L=await Z.detail();if(L.kind.type!=="relation")throw new w("row answer requires a relation question");let G=V$.byId(Y$.byId(this.client,L.kind.database),L.kind.table);return{type:"rows",value:Q.value.map((J)=>E$.byId(G,J))}}).with({type:t.union("text","number","boolean","date","date_range","link","clear")},(Q)=>Q).exhaustive(()=>{throw new w(`answer to question ${Z.id} has a type this SDK doesn't know`)});return{question:Z,value:X}})),x=$.response.row?E$.byId(O,$.response.row):void 0,S=this.unlockedBooking($.booking);return{kind:"saved",...S?{booking:S}:{},response:RO.byId(this,$.response.id,{status:$.response.status,row:x,answers:j,booking:S}),status:$.response.status,stoppedAtSection:$.response.stoppedAtSection?p$.byId(this,$.response.stoppedAtSection):void 0,row:x,submittedAt:$.response.submittedAt,updatedAt:$.response.updatedAt,answers:j}}async responseSummary(){let $=Y(await this.client.storage.getFormResponseSummary({path:{id:this.id}}));return{...$,stoppedBySection:$.stoppedBySection.map((O)=>({section:p$.byId(this,O.section),count:O.count}))}}async tally(){return Y(await this.client.storage.getFormTally({path:{id:this.id}})).questions.map((O)=>{let j=r$.byId(this,O.question);return{question:j,responses:O.responses,buckets:O.buckets.flatMap((x)=>k(x.value).with({kind:"option"},(S)=>[{count:x.count,value:{kind:"option",option:UO.byId(j,S.option)}}]).with({kind:"checkbox"},(S)=>[{count:x.count,value:S}]).exhaustive((S)=>{return console.warn("macro sdk: unknown form tally bucket",S),[]}))}})}async sharePermissions(){return Y(await this.client.storage.getFormPermissions({path:{id:this.id}}))}updateSharePermissions($){return this.mutate((O)=>O.storage.updateFormPermissions({path:{id:this.id},body:$}))}webUrl(){return`${this.client.webAppUrl}/app/form/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}respondUrl(){return`${this.client.webAppUrl}/app/form/${this.id}/respond`}}class Dx{client;constructor($){this.client=$}byId($){return y$.byId(this.client,$)}create($){return y$.create(this.client,$)}list($){return y$.list(this.client,$)}}class DO extends A{static byId($,O){return new DO($,O)}async fetch(){return Y(await this.client.storage.getGithubPullRequest({path:{id:this.id}}))}title=this.field("title");url=this.field("url");status=this.field("status");async changes(){let $=Y(await this.client.storage.getGithubPullRequestChanges({path:{id:this.id}}));return{changeset:$.changeset?new _x(this.client,this,$.changeset):void 0,error:$.error??void 0}}}class _x{client;pullRequest;record;constructor($,O,j){this.client=$;this.pullRequest=O;this.record=j}get id(){return this.record.id}async patch(){return Y(await this.client.storage.getGithubPullRequestChangesPatch({path:{id:this.pullRequest.id},query:{changeset:this.id}})).patch}toJSON(){return{pullRequestId:this.pullRequest.id,...this.record}}}class Cx{client;constructor($){this.client=$}byId($){return DO.byId(this.client,$)}forEntity($){return DO.byId(this.client,$.id)}}class _O extends A{static byId($,O){return new _O($,O)}async fetch(){return Y(await this.client.storage.getHarnessPairing({path:{code:this.id}}))}name=this.field("requested_name");expiresAt=this.field("expires_at");async approve($){let O={name:$?.name,team_id:$?.team?.id,allow_permission_bypass:$?.allowPermissionBypass};return B$.from(this.client,await this.mutate((j)=>j.storage.approveHarnessPairing({path:{code:this.id},body:O})))}}class Oj{client;id;constructor($,O){this.client=$;this.id=O}static byId($,O){return new Oj($,O)}async claim($){let O=Y(await this.client.storage.claimHarnessPairing({path:{pairing_id:this.id},body:{device_secret:$}}));return"harness"in O?{harness:B$.from(this.client,O.harness),token:O.token}:void 0}toJSON(){return{id:this.id}}}class Mx{client;constructor($){this.client=$}byId($){return B$.byId(this.client,$)}async list(){return Y(await this.client.storage.listHarnesses()).map(($)=>B$.from(this.client,$))}async me(){return B$.from(this.client,Y(await this.client.storage.getSelfHarness()))}async deleteSelf(){Y(await this.client.storage.deleteSelfHarness())}async agents(){return Y(await this.client.storage.listHarnessAgents()).map(($)=>T$.byId(this.client,$.bot_id))}async sessions(){return Y(await this.client.storage.listHarnessSessions()).map(($)=>d.byId(this.client,$.session_id))}pairing($){return _O.byId(this.client,$)}async createPairing($){let O=Y(await this.client.storage.createHarnessPairing({body:$}));return{pairing:_O.byId(this.client,O.code),device:Oj.byId(this.client,O.pairing_id),deviceSecret:O.device_secret,expiresAt:O.expires_at,pollIntervalSeconds:O.poll_interval_seconds}}}class CO{id;url;width;height;constructor($,O,j,x){this.id=$;this.url=O;this.width=j;this.height=x}static byId($,O,j){return new CO(O,`${$.hosts["static-files"]}/file/${O}`,j?.width,j?.height)}toJSON(){return{id:this.id,url:this.url,width:this.width,height:this.height}}}class wj extends CO{width;height;mimeType;sizeBytes;note;constructor($,O,j,x,S,K,Z){super($,O,j,x);this.width=j;this.height=x;this.mimeType=S;this.sizeBytes=K;this.note=Z}toJSON(){return{...super.toJSON(),mimeType:this.mimeType,sizeBytes:this.sizeBytes,note:this.note}}}class Ax{client;constructor($){this.client=$}async generate($){let O=Y(await this.client.cognition.generateImage({body:{prompt:$.prompt,aspectRatio:$.aspectRatio??null,referenceImages:($.referenceImages??[]).map(E5)}}));return new wj(O.staticFileId,O.url,O.width,O.height,O.mimeType,O.sizeBytes,O.note??void 0)}}function E5($){return $ instanceof f?{type:"document",id:$.id}:{type:"staticFile",id:$.id}}var q5="00000001-0000-0000-0000-000000000001",K2="00000001-0000-0000-0000-000000000002",w5="00000001-0000-0000-0000-000000000004",f5="00000001-0000-0000-0000-000000000014",b5="00000001-0000-0000-0002-000000000001",k5="00000001-0000-0000-0002-000000000004";function g5($){let O=$.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/([1-9][0-9]*)\/?(?:[?#].*)?$/i);if(!O)throw Error(`Expected a GitHub pull request URL like https://github.com/owner/repo/pull/1, got ${$}`);return`${O[1]}/${O[2]}/pull/${O[3]}`}class G$ extends f{static byId($,O){return new G$($,O)}static async create($,O){let{documentId:j}=Y(await $.storage.createTaskHandler({body:{taskName:O.name,markdown:O.markdown??null,projectId:O.project?.id??null,teamId:O.team?.id??null,shareWithTeam:O.shareWithTeam??!0,propertyValues:await y5($,O)}}));return new G$($,j)}static async summaries($,O){if(O.length===0)return[];let{previews:j}=Y(await $.storage.getBatchPreviewHandler({body:{document_ids:O.map((S)=>S.id)}})),x=new Map(j.flatMap((S)=>S.type==="access"?[[S.document_id,S]]:[]));return O.flatMap((S)=>{let K=x.get(S.id);if(!K)return[];return[{task:S,name:K.document_name,owner:M.byId($,K.owner),updatedAt:K.updated_at??void 0,completed:K.sub_type?.type==="task"&&K.sub_type.is_completed}]})}static async findSimilar($,O){let{results:j}=Y(await $.storage.taskSimilaritySearchHandler({body:{taskName:O.title,markdown:O.body??null}}));return j.map((x)=>({task:new G$($,x.taskId),name:x.taskName,similarity:x.vectorScore}))}static async forPullRequest($,O){let j=g5(O),{pullRequests:x}=Y(await $.storage.getGithubPullRequestTasks({body:{githubKeys:[j]}}));return(x[0]?.taskIds??[]).map((S)=>new G$($,S))}async completed(){let{subType:$}=await this.detail.get();if($!=="task")return;let j=(await this.properties()).find((x)=>x.definition.id===K2)?.value;return j?.type==="SelectOption"&&j.value.includes(k5)}webUrl(){return`${this.client.webAppUrl}/app/task/${this.id}`}static search=x$({filters:{document_filters:{sub_types:["task"],task_filters:{}}},type:"document",make:($,O)=>new G$($,O.document_id)})}async function y5($,O){if(!O.initiative&&!O.assignees&&!O.dueDate)return null;let j=O.assignees??[await M.me($)],x=[{propertyId:K2,value:{type:"select_option",option_id:b5}}];if(j.length>0)x.push({propertyId:q5,value:{type:"multi_entity_reference",references:j.map((S)=>({entity_id:S.id,entity_type:"USER"}))}});if(O.initiative)x.push({propertyId:f5,value:{type:"entity_reference",reference:{entity_id:O.initiative.id,entity_type:"INITIATIVE"}}});if(O.dueDate)x.push({propertyId:w5,value:{type:"date",value:O.dueDate.toISOString()}});return x}class a$ extends A{access=new $$(this.client,"initiative",this);webUrl(){return`${this.client.webAppUrl}/app/initiative/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new a$($,O)}static from($,O){return new a$($,O.id,O)}async fetch(){return Y(await this.client.storage.getInitiative({path:{initiative_id:this.id}}))}name=this.field("name");owner=this.mappedField("ownerId",($)=>M.byId(this.client,$));members=this.mappedField("memberIds",($)=>$.map((O)=>M.byId(this.client,O)));tasks=this.mappedField("taskIds",($)=>$.map((O)=>G$.byId(this.client,O)));accessLevel=this.field("userAccessLevel");sharePermissions=this.field("sharePermission");async update($){await this.mutate((O)=>O.storage.updateInitiative({path:{initiative_id:this.id},body:{name:$.name,memberIds:$.members?.map((j)=>j.id),sharePermission:$.sharePermission?$O($.sharePermission):void 0}}))}async delete(){await this.mutate(($)=>$.storage.deleteInitiative({path:{initiative_id:this.id}}))}}class Px{client;constructor($){this.client=$}byId($){return a$.byId(this.client,$)}async list(){return Y(await this.client.storage.listInitiatives()).initiatives.map(($)=>a$.byId(this.client,$.id))}async summaries(){return Y(await this.client.storage.listInitiatives()).initiatives.map(($)=>({initiative:a$.byId(this.client,$.id),name:$.name,updatedAt:$.updatedAt}))}async create($){return a$.from(this.client,Y(await this.client.storage.createInitiative({body:{name:$.name,description:$.description,memberIds:$.members?.map((O)=>O.id),shareWithTeam:$.shareWithTeam,propertyValues:$.propertyValues}})))}}var v5=16000000;class fj{client;constructor($){this.client=$}async uploadProfilePicture($,O){if(($ instanceof Blob?$.size:$.byteLength)>v5)throw new w("profile picture is larger than 16 MB");let{file_id:x,upload_url:S}=Y(await this.client.auth.createProfilePictureUpload({body:{file_name:O.fileName,content_type:O.contentType}})),K=await fetch(S,{method:"PUT",headers:{"Content-Type":O.contentType},body:$});if(!K.ok)throw new w(`image upload failed with ${K.status}`);return CO.byId(this.client,x)}async update($){if($.profilePicture)Y(await this.client.auth.putProfilePictureFile({body:{file_id:$.profilePicture.id}}));let O=$.name?.trim();if(O){let[j,...x]=O.split(/\s+/);Y(await this.client.auth.putUserName({query:{first_name:j,last_name:x.join(" ")}}))}}}class Fx{client;constructor($){this.client=$}byId($){return D$.byId(this.client,$)}async create($){return D$.from(this.client,Y(await this.client.storage.meetingCreate({body:$})))}async list(){return Y(await this.client.storage.meetingList()).meetings.map(($)=>D$.from(this.client,$))}async active(){return Y(await this.client.storage.meetingListActive()).meetings.map(($)=>D$.from(this.client,$))}async lookup($){return D$.from(this.client,Y(await this.client.storage.meetingLookup({path:{token:$}})))}}class zO extends A{async fetch(){return Y(await this.client.notification.getTypedNotificationById({path:{notification_id:this.id}}))}static byId($,O){return new zO($,O)}static from($,O){return new zO($,O.id,O)}static list($,O){return c(async(j)=>{let x=Y(await $.notification.listTypedNotifications({query:{...O?.pageSize?{limit:O.pageSize}:{},...O?.states!==void 0?{states:O.states.join(",")}:{},...j?{cursor:j}:{}}}));return{items:x.items.map((S)=>zO.from($,S)),nextCursor:x.next_cursor}})}type=this.field("notification_event_type");createdAt=this.field("created_at");updatedAt=this.field("updated_at");state=this.field("state");done=this.mappedField("state",($)=>$==="done");sent=this.field("sent");viewedAt=this.field("viewed_at");deletedAt=this.field("deleted_at");owner=this.mappedField("owner_id",($)=>M.byId(this.client,$));sender=this.mappedField("sender_id",($)=>$?M.byId(this.client,$):void 0);metadata=this.field("notification_metadata");async seen(){return await this.state()!=="unseen"}async markSeen(){await this.mutate(($)=>$.notification.bulkMarkNotificationsSeen({body:{notificationIds:[this.id]}}))}async markDone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsDone({body:{notificationIds:[this.id]}}))}async markUndone(){await this.mutate(($)=>$.notification.bulkMarkNotificationsUndone({body:{notificationIds:[this.id]}}))}async delete(){await this.mutate(($)=>$.notification.deleteUserNotificationV2({path:{notification_id:this.id}}))}}class Ex{client;constructor($){this.client=$}byId($){return zO.byId(this.client,$)}list($){return zO.list(this.client,$)}async markSeen($){Y(await this.client.notification.bulkMarkNotificationsSeen({body:{notificationIds:$}}))}async markDone($){Y(await this.client.notification.bulkMarkNotificationsDone({body:{notificationIds:$}}))}async delete($){Y(await this.client.notification.bulkDeleteUserNotificationsV2({body:{notificationIds:$}}))}async preferences(){return Y(await this.client.notification.getNotificationTypePreferences())}async enableType($){Y(await this.client.notification.enableNotificationType({path:{notification_event_type:$}}))}async disableType($){Y(await this.client.notification.disableNotificationType({path:{notification_event_type:$}}))}}class qx{client;constructor($){this.client=$}async list(){let{data:$}=Y(await this.client.storage.getPinsHandler({}));return $?.recent??[]}async add($,O){Y(await this.client.storage.addPinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType,pinIndex:O.index}}))}async remove($){Y(await this.client.storage.removePinHandler({path:{pinned_item_id:$.id},body:{pinType:$.entityType}}))}async reorder($){Y(await this.client.storage.reorderPinsHandler({body:$}))}}class wx{client;constructor($){this.client=$}byId($){return n.byId(this.client,$)}create($){return n.create(this.client,$)}search($,O){return n.search(this.client,$,O)}}class MO{client;definitionId;id;record;constructor($,O,j,x){this.client=$;this.definitionId=O;this.id=j;this.record=x}static from($,O,j){return new MO($,O,j.id,j)}get value(){return this.record.value}get color(){return this.record.color??void 0}get displayOrder(){return this.record.display_order}get createdAt(){return this.record.created_at}get updatedAt(){return this.record.updated_at}async update($){return this.record=Y(await this.client.properties.updatePropertyOption({path:{definition_id:this.definitionId,option_id:this.id},body:$})),this}async delete(){Y(await this.client.properties.deletePropertyOption({path:{definition_id:this.definitionId,option_id:this.id}}))}}class QO{client;id;detail;constructor($,O,j){this.client=$;this.id=O;this.detail=new W$(()=>this.fetch(),j)}async fetch(){return Y(await this.client.properties.getPropertyDefinition({path:{definition_id:this.id}}))}static async create($,O){let j=Y(await $.properties.createPropertyDefinition({body:{display_name:O.displayName,scope:O.scope,data_type:O.dataType}}));return new QO($,j.id,j)}static byId($,O){return new QO($,O)}static fromRecord($,O){return new QO($,O.id,O)}get displayName(){return this.detail.get().then(($)=>$.display_name)}get dataType(){return this.detail.get().then(($)=>$.data_type)}get owner(){return this.detail.get().then(($)=>$.owner)}get isSystem(){return this.detail.get().then(($)=>$.is_system)}get isMultiSelect(){return this.detail.get().then(($)=>$.is_multi_select)}get createdAt(){return this.detail.get().then(($)=>$.created_at)}get updatedAt(){return this.detail.get().then(($)=>$.updated_at)}async delete(){return Y(await this.client.properties.deletePropertyDefinition({path:{definition_id:this.id}}))}async options(){return Y(await this.client.properties.getPropertyOptions({path:{definition_id:this.id}})).map((O)=>MO.from(this.client,this.id,O))}async addOption($){let O=Y(await this.client.properties.addPropertyOption({path:{definition_id:this.id},body:$}));return MO.from(this.client,this.id,O)}async updateOption($,O){let j=Y(await this.client.properties.updatePropertyOption({path:{definition_id:this.id,option_id:$.id},body:O}));return MO.from(this.client,this.id,j)}async deleteOption($){return Y(await this.client.properties.deletePropertyOption({path:{definition_id:this.id,option_id:$.id}}))}}class fx{client;constructor($){this.client=$}async list($){return Y(await this.client.properties.listProperties({query:{scope:$?.scope??"all",...$?.forEntityType!==void 0?{for_entity_type:$.forEntityType}:{}}})).map((j)=>{let x="definition"in j?j.definition:j;return QO.fromRecord(this.client,x)})}create($){return QO.create(this.client,$)}definition($){return QO.byId(this.client,$)}async bulkEntityProperties($){return Y(await this.client.properties.getBulkEntityProperties({body:$}))}async updateEntityPropertyOptions($,O){return Y(await this.client.properties.bulkUpdateEntitiesPropertyOptions({body:{entities:$.map((x)=>x.propertyReference()),property_id:O.property.id,...O.add?{add_option_ids:O.add.map((x)=>x.id)}:{},...O.remove?{remove_option_ids:O.remove.map((x)=>x.id)}:{}}})).results}async addEntityPropertyOption($){return Y(await this.client.properties.addEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async removeEntityPropertyOption($){return Y(await this.client.properties.removeEntityPropertyOption({path:{...$.entity.propertyReference(),property_id:$.property.id,option_id:$.option.id}}))}async tags(){return Y(await this.client.properties.listTags({}))}}class bx{client;constructor($){this.client=$}async link(){let $=Y(await this.client.auth.getReferralCode()),O=new URL("/app/signup",this.client.webAppUrl);return O.searchParams.set("referral_code",$),{code:$,url:O.toString()}}async invite($){let O=$.trim();if(!O)throw new w("invite needs an email address");Y(await this.client.auth.sendReferralCode({body:{recipient:O}}))}}function kx($){return k($).with({type:"cron"},(O)=>O).with({type:"events"},(O)=>({type:"events",filters:O.filters.map(({entities:j,...x})=>({...x,ids:j?.map((S)=>S.entity.id)}))})).exhaustive()}function h5($){return k($).with({type:"multiple"},(O)=>({type:"multiple",triggers:O.triggers.map(kx)})).with({type:"cron"},kx).with({type:"events"},kx).exhaustive()}class v$ extends A{webUrl(){return`${this.client.webAppUrl}/app/routines/${this.id}`}toJSON(){return{...super.toJSON(),url:this.webUrl()}}static byId($,O){return new v$($,O)}static from($,O){if(!O.id)throw Error("Routine response has no id");return new v$($,O.id,O)}async fetch(){return Y(await this.client.scheduledAction.getScheduledAction({path:{id:this.id}}))}name=this.field("name");trigger=this.field("trigger");enabled=this.field("enabled");runVisibility=this.field("run_visibility");nextRunAt=this.field("next_run_at");revision=this.field("configuration_revision");owner=this.mappedField("owner",($)=>M.byId(this.client,$));sourceTemplate=this.mappedField("template_id",($)=>$?v$.byId(this.client,$):void 0);async template(){let $=await this.client.scheduledAction.getScheduledActionTemplate({path:{id:this.id}});if($.response?.status===404)return;return this.toTemplate(Y($))}async shareAsTemplate($){return this.toTemplate(Y(await this.client.scheduledAction.shareScheduledActionTemplate({path:{id:this.id},body:$})))}async activateTemplate($){return v$.from(this.client,Y(await this.client.scheduledAction.activateScheduledActionTemplate({path:{id:this.id},body:{...bj($),enabled:$.enabled??!0}})))}toTemplate($){return new Q2(this,M.byId(this.client,$.author),$)}async stopSharingTemplate(){Y(await this.client.scheduledAction.unshareScheduledActionTemplate({path:{id:this.id}}))}async update($){await this.mutate((O)=>O.scheduledAction.updateScheduledAction({path:{id:this.id},body:bj($)}))}async setEnabled($){await this.mutate((O)=>O.scheduledAction.setScheduledActionEnabled({path:{id:this.id},body:{enabled:$}}))}async execute(){let $=Y(await this.client.scheduledAction.executeScheduledActionNow({path:{id:this.id}}));if($.resource)return k($.resource).with({type:"agent"},(O)=>d.byId(this.client,O.id)).with({type:"chat"},(O)=>Q$.byId(this.client,O.id)).exhaustive();return $.chat_id?Q$.byId(this.client,$.chat_id):void 0}async history(){return Y(await this.client.scheduledAction.listScheduledActionHistory({path:{id:this.id}})).map(($)=>new gx(this,$))}async delete(){await this.mutate(($)=>$.scheduledAction.deleteScheduledAction({path:{id:this.id}}))}}class Q2{routine;author;record;constructor($,O,j){this.routine=$;this.author=O;this.record=j}activate($){return this.routine.activateTemplate($)}toJSON(){return this.record}}class gx{routine;record;constructor($,O){this.routine=$;this.record=O}get id(){return this.record.id??void 0}toJSON(){return{routine:this.routine.id,...this.record}}}function bj($){let O={prompt:$.prompt,user_prompt:$.userPrompt,model:$.model,agent:$.agent?{bot_id:$.agent.id}:void 0};return{kind:"Agent",name:$.name,enabled:$.enabled,run_visibility:$.runVisibility,trigger:h5($.trigger),task:{...O}}}class yx{client;constructor($){this.client=$}byId($){return v$.byId(this.client,$)}async create($){return v$.from(this.client,Y(await this.client.scheduledAction.createScheduledAction({body:{...bj($),enabled:$.enabled??!0}})))}async list($){return Y(await this.client.scheduledAction.listScheduledActions({query:{include_events:$?.includeEvents}})).map((O)=>v$.from(this.client,O))}}class vx{client;constructor($){this.client=$}byId($){return G$.byId(this.client,$)}create($){return G$.create(this.client,$)}summaries($){return G$.summaries(this.client,$)}findSimilar($){return G$.findSimilar(this.client,$)}forPullRequest($){return G$.forPullRequest(this.client,$)}search($,O){return G$.search(this.client,$,O)}}class hx{client;constructor($){this.client=$}byId($){return _$.byId(this.client,$)}current(){return _$.current(this.client)}list(){return _$.list(this.client)}}class mx{client;constructor($){this.client=$}async get($){return Y(await this.client.unfurl.getUnfurl({query:{url:$}}))}async bulk($){return Y(await this.client.unfurl.getUnfurlBulk({body:{url_list:$}}))}}class ux{client;constructor($){this.client=$}byId($){return M.byId(this.client,$)}me(){return M.me(this.client)}async search($){let O=$.trim().toLocaleLowerCase();if(!O)throw Error("A person search needs a name or email.");let j=await this.client.contacts.getContacts();if(j.response?.status===404)return[];let{contacts:x}=Y(j),S=[...new Set(x)],K=[];for(let Z=0;Z<S.length;Z+=100){let X=S.slice(Z,Z+100),{names:Q}=Y(await this.client.auth.getUserNamesWithEmail({body:{user_ids:X}})),L=new Map(Q.map((G)=>[G.id,G]));for(let G of X){let J=L.get(G)??{id:G};if(`${[J.first_name,J.last_name].filter(Boolean).join(" ")} ${G}`.toLocaleLowerCase().includes(O))K.push(M.fromName(this.client,J))}}return K}}class YO extends A{signingSecret;constructor($,O,j,x){super($,O,j);this.signingSecret=x}async fetch(){return Y(await this.client.storage.getWebhook({path:{webhook_id:this.id}}))}static async create($,O){let j=Y(await $.storage.createWebhook({body:{endpoint_url:O.url,namespace:O.namespace,name:O.name,filters:O.filters,scope:O.scope??"user",...O.headers!==void 0?{headers:O.headers}:{}}}));return new YO($,j.id,j,j.signing_secret)}static byId($,O){return new YO($,O)}static fromRecord($,O){return new YO($,O.id,O)}name=this.field("name");namespace=this.field("namespace");endpointUrl=this.field("endpoint_url");status=this.field("status");isValid=this.field("is_valid");filters=this.field("filters");createdAt=this.field("created_at");workspaceId=this.field("workspace_id");createdBy=this.mappedField("created_by_user_id",($)=>M.byId(this.client,$));async scope(){let $=await this.detail.get();return $.workspace_id===$.created_by_user_id?"user":"team"}async update($){await this.mutate((O)=>O.storage.patchWebhook({path:{webhook_id:this.id},body:$}))}async rename($){await this.update({name:$})}async setUrl($){await this.update({endpoint_url:$})}async setFilters($){await this.update({filters:$})}async pause(){await this.update({status:"paused"})}async resume(){await this.update({status:"active"})}async delete(){await this.mutate(($)=>$.storage.deleteWebhook({path:{webhook_id:this.id}}))}async validate(){return this.mutate(($)=>$.storage.validateWebhook({path:{webhook_id:this.id}}))}}class cx{client;constructor($){this.client=$}create($){return YO.create(this.client,$)}byId($){return YO.byId(this.client,$)}async list(){let{webhooks:$}=Y(await this.client.storage.listWebhooks());return $.map((O)=>YO.fromRecord(this.client,O))}}class AO extends A{static byId($,O){return new AO($,O)}static from($,O){return new AO($,O.id,O)}async fetch(){let{account:$}=Y(await this.client.storage.whatsappAccount());if($?.id!==this.id)throw new E("WhatsApp account is not available");return $}state=this.field("state");identity=this.field("identityJid");owner=this.mappedField("userId",($)=>M.byId(this.client,$));async refresh(){return this.detail.clear(),await this.detail.get(),this}}class dx{client;constructor($){this.client=$}async account(){let{account:$}=Y(await this.client.storage.whatsappAccount());return $?AO.from(this.client,$):void 0}async chats(){return Y(await this.client.storage.whatsappChats()).chats.map(($)=>NO.from(this.client,$))}}function lx($){if("properties"in $.data)return $.data.properties;if($.tag==="calendarEvent")return $.data.extra.properties;return[]}function Y2($,O,j){let x=[];for(let S of lx(O)){if(S.definition.data_type!=="TAG"||S.value?.type!=="SelectOption")continue;for(let K of S.value.value){let Z=j.get(K);if(Z&&!x.some((X)=>X.label===Z.label&&X.scope===Z.scope))x.push(Z)}}switch(O.tag){case"document":return{type:"document",id:O.data.id,entity:f.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name,fileType:O.data.fileType,subType:O.data.subType?.type};case"chat":return{type:"ai_chat",id:O.data.id,entity:Q$.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"project":return{type:"project",id:O.data.id,entity:n.byId($,O.data.id),snapshot:O,tags:x,name:O.data.name};case"emailThread":return{type:"email",id:O.data.id,entity:z$.byId($,O.data.id),snapshot:O,tags:x,subject:O.data.name,snippet:O.data.snippet,senderName:O.data.senderName,senderEmail:O.data.senderEmail,inboxVisible:O.data.inboxVisible,isRead:O.data.isRead,isDraft:O.data.isDraft};case"channel":return{type:"channel",id:O.data.channel.id,entity:b.byId($,O.data.channel.id),snapshot:O,tags:x,name:O.data.channel.name};case"channelThread":return{type:"channel_thread",id:O.data.id,entity:new h$($,O.data.channel_id,O.data.id),snapshot:O,tags:x,channelId:O.data.channel_id};case"call":return{type:"call",id:O.data.callId,entity:J$.byId($,O.data.callId),snapshot:O,tags:x,createdBy:O.data.createdBy};case"calendarEvent":return{type:"calendar_event",id:O.data.id,entity:S$.byId($,O.data.id),snapshot:O,tags:x,title:O.data.title,status:O.data.status,location:O.data.location,conferenceUrl:O.data.conferenceUrl,conferenceProvider:O.data.conferenceProvider,time:O.data.time};case"foreignEntity":return{type:"foreign_entity",id:O.data.id,entity:KO.byId($,O.data.id),snapshot:O,tags:x,foreignEntityId:O.data.foreignEntityId,foreignEntitySource:O.data.foreignEntitySource,metadata:O.data.metadata};default:throw Error(`Unexpected workspace entity type: ${O.tag}`)}}var G2="00000000-0000-0000-0000-000000000000",rx={document:["df","id"],project:["pf","pid"],ai_chat:["cf","cid"],email:["ef","ThreadId"],channel:["chanf","ChannelId"],channel_thread:["cthf","ThreadId"],call:["callf","CallId"],calendar_event:["calf","id"],foreign_entity:["fef","id"]},kj=($)=>$.replace(/[A-Z]/g,(O)=>O.toLowerCase()),J2=($,O)=>$==null?O:{"&":[$,O]};function px($,O){if(!$||typeof $!=="object"||Array.isArray($))throw Error(`Invalid workspace ${O}: expected a filter expression.`);let j=Object.entries($),x=j[0];if(j.length!==1||x===void 0)throw Error(`Invalid workspace ${O}: use exactly one of l, &, |, !.`);let[S,K]=x;if(S==="l")return;if(S==="!"){px(K,`${O}.!`);return}if(S!=="&"&&S!=="|")throw Error(`Invalid workspace ${O}: use l, &, | or !.`);if(!Array.isArray(K)||K.length!==2)throw Error(`Invalid workspace ${O}.${S}: expected exactly two expressions. Use {l: {...}} for a single condition; nest binary operators for three or more.`);K.forEach((Z,X)=>{px(Z,`${O}.${S}[${X}]`)})}class gj{client;tagSets;constructor($){this.client=$}sets(){return this.tagSets??=this.client.properties.listTags({}).then(Y),this.tagSets}async tagMap(){let $=new Map;for(let O of await this.sets())for(let j of O.options)if(j.value.type==="string")$.set(j.id,{label:j.value.value,scope:O.scope==="user"?"personal":"team"});return $}async body($){for(let[S,K,Z]of[["sortBy",$.sortBy,["recently_viewed","recently_updated","recently_created"]],["emailPreset",$.emailPreset,["signal"]],["tagsMatch",$.tagsMatch,["any","all"]]])if(K!==void 0&&!Z.includes(K))throw Error(`Invalid workspace ${S}: ${K}`);if($.includeTypes!==void 0&&(!Array.isArray($.includeTypes)||$.includeTypes.some((S)=>!Object.hasOwn(rx,S))))throw Error(`Invalid workspace includeTypes. Supported values: ${Object.keys(rx).join(", ")}. Tasks use document with df: {l: {dst: 'task'}}.`);for(let S of["df","pf","cf","ef","chanf","cthf","callf","fef","calf","propf"])if($[S]!=null)px($[S],S);if($.tags?.some((S)=>S.scope!==void 0&&S.scope!=="personal"&&S.scope!=="team"))throw Error("Invalid workspace tag scope");if($.limit!==void 0&&!Number.isFinite($.limit))throw Error("Workspace limit must be finite");let O={df:$.df,pf:$.pf,cf:$.cf,ef:$.ef,chanf:$.chanf,cthf:$.cthf,callf:$.callf,fef:$.fef,calf:$.calf,propf:$.propf,ccf:{l:{id:G2}},favorites_only:$.favoritesOnly,expand:!0,limit:Math.max(1,Math.min(500,Math.trunc($.limit??50))),sort_method:$.sortBy==="recently_viewed"?"viewed_at":$.sortBy==="recently_created"?"created_at":"updated_at",sort_direction:"desc",emailView:$.emailView??"inbox"};if($.emailPreset==="signal")O.ef={"&":[{l:{Importance:!0}},{l:{Shared:"exclude"}}]};let j=$.inbox?.trim();if(j){let{links:S}=Y(await this.client.email.listLinks()),K=S.filter((X)=>kj(X.email_address)===kj(j)),Z=K[0];if(!Z)throw Error(`No connected inbox matches "${j}". Connected inboxes: ${S.map((X)=>X.email_address).join(", ")}.`);if(K.length>1)throw Error(`Multiple connected inboxes match "${j}"; cannot pick one.`);O.ef=J2(O.ef,{l:{Owner:Z.id}})}let x=$.includeTypes??($.emailPreset==="signal"?["email"]:void 0);if(x?.length){for(let[S,[K,Z]]of Object.entries(rx))if(!x.includes(S))O[K]={l:{[Z]:G2}}}if($.tags?.length){let S=(await this.sets()).flatMap((Q)=>{let L=Q.definition;if(!L)return[];return Q.options.flatMap((G)=>G.value.type==="string"?[{id:G.id,definitionId:L.id,label:G.value.value,scope:Q.scope==="user"?"personal":"team"}]:[])}),K=new Map;for(let Q of $.tags){let L=S.filter((G)=>kj(G.label)===kj(Q.label.trim())&&(!Q.scope||G.scope===Q.scope));if(!L.length)throw Error(`Unknown tag "${Q.label}". Available tags: ${S.map((G)=>`${G.label} (${G.scope})`).join(", ")}.`);if($.tagsMatch==="all"&&L.length>1)throw Error(`Tag "${Q.label}" is ambiguous; specify personal or team scope.`);for(let G of L)K.set(G.id,G)}let X=[...K.values()].map((Q)=>({l:{pd:Q.definitionId,v:{so:Q.id}}})).reduce((Q,L)=>Q===void 0?L:{[$.tagsMatch==="all"?"&":"|"]:[Q,L]},void 0);O.propf=J2(O.propf,X)}return O}}class ax{client;constructor($){this.client=$}async page($={}){let O=new gj(this.client);return this.fetch(O,await O.body($),$.cursor)}async*list($={}){let O=new gj(this.client),j=await O.body($);yield*c((x)=>this.fetch(O,j,x))}async fetch($,O,j){let x=Y(await this.client.storage.postItemsSoupAst({body:O,query:j?{cursor:j}:void 0})),K=x.items.some((Z)=>lx(Z).some((X)=>X.definition.data_type==="TAG"))?await $.tagMap():new Map;return{items:x.items.map((Z)=>Y2(this.client,Z,K)),nextCursor:x.next_cursor,hasMore:x.next_cursor!=null}}}function V2({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var m5=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},u5=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},c5=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},yj=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(u5(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=m5(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return PO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},PO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},vj=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=c5(x),X=Object.entries(S).map(([Q,L])=>PO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var d5=/\{[^{}]+\}/g,l5=({path:$,url:O})=>{let j=O,x=O.match(d5);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,yj({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,vj({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${PO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},W2=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=l5({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function ix($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var B2=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var L2={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var N2=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=yj({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=vj({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=PO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},U2=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},r5=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function z2($){for(let O of $.security??[]){if(r5($,O.name))continue;let j=await B2(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var nx=($)=>W2({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:N2($.querySerializer),url:$.url}),sx=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=mj($.headers,O.headers),j},p5=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},mj=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?p5(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class hj{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var I2=()=>({error:new hj,request:new hj,response:new hj}),a5=N2({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),i5={"Content-Type":"application/json"},jj=($={})=>({...L2,headers:i5,parseAs:"auto",querySerializer:a5,...$});var tx=($={})=>{let O=sx(jj(),$),j=()=>({...O}),x=(G)=>{return O=sx(O,G),j()},S=I2(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:mj(O.headers,G.headers),serializedBody:void 0};if(J.security)await z2(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=nx(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:ix(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?U2(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return V2({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:ix(I),url:z})};return{buildUrl:(G)=>nx({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var H2=tx(jj());class T2{client;constructor($){this.client=$?.client??H2}}class R2{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class uj extends T2{static __registry=new R2;constructor($){super($);uj.__registry.set(this,$?.key)}getAgentAutoArchivePreferences($){return($?.client??this.client).get({url:"/agent-auto-archive-preferences",...$})}putAgentAutoArchivePreferences($){return($.client??this.client).put({url:"/agent-auto-archive-preferences",...$,headers:{"Content-Type":"application/json",...$.headers}})}discoverAgentCapabilitiesHandler($){return($.client??this.client).post({security:[{scheme:"bearer",type:"http"}],url:"/agent-capabilities/discover",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentCodingPreferences($){return($?.client??this.client).get({url:"/agent-coding-preferences",...$})}putAgentCodingPreferences($){return($.client??this.client).put({url:"/agent-coding-preferences",...$,headers:{"Content-Type":"application/json",...$.headers}})}listAgentConversations($){return($.client??this.client).get({security:[{scheme:"bearer",type:"http"}],url:"/agent-conversations/{channel_id}",...$})}startFreshAgentConversation($){return($.client??this.client).post({security:[{scheme:"bearer",type:"http"}],url:"/agent-conversations/{channel_id}/{bot_id}/start-fresh",...$,headers:{"Content-Type":"application/json",...$.headers}})}retryAgentConversationTurn($){return($.client??this.client).post({security:[{scheme:"bearer",type:"http"}],url:"/agent-conversations/{channel_id}/{bot_id}/turns/{source}/retry",...$,headers:{"Content-Type":"application/json",...$.headers}})}chooseAgentMode($){return($.client??this.client).post({security:[{scheme:"bearer",type:"http"}],url:"/agent-mode-choice",...$,headers:{"Content-Type":"application/json",...$.headers}})}loadAgentModelsHandler($){return($.client??this.client).post({security:[{scheme:"bearer",type:"http"}],url:"/agent-models/load",...$,headers:{"Content-Type":"application/json",...$.headers}})}listAgentRepositories($){return($?.client??this.client).get({security:[{scheme:"bearer",type:"http"}],url:"/agent-repositories",...$})}listAgentRepositoryBranches($){return($.client??this.client).get({security:[{scheme:"bearer",type:"http"}],url:"/agent-repositories/branches",...$})}getAgentSandboxSize($){return($?.client??this.client).get({url:"/agent-sandbox-size",...$})}putAgentSandboxSize($){return($.client??this.client).put({url:"/agent-sandbox-size",...$,headers:{"Content-Type":"application/json",...$.headers}})}createAgentSession($){return($.client??this.client).post({url:"/agent-sessions",...$,headers:{"Content-Type":"application/json",...$.headers}})}agentSessionsForPullRequest($){return($.client??this.client).post({url:"/agent-sessions/by-pull-request",...$,headers:{"Content-Type":"application/json",...$.headers}})}agentSessionsForPullRequests($){return($.client??this.client).post({url:"/agent-sessions/by-pull-requests",...$,headers:{"Content-Type":"application/json",...$.headers}})}previewAgentSessions($){return($.client??this.client).post({url:"/agent-sessions/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}warmAgentSessionHandler($){return($.client??this.client).post({url:"/agent-sessions/warm",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteAgentSession($){return($.client??this.client).delete({url:"/agent-sessions/{session_id}",...$})}getAgentSession($){return($.client??this.client).get({url:"/agent-sessions/{session_id}",...$})}reportAgentSessionAppConnected($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/app-connections",...$,headers:{"Content-Type":"application/json",...$.headers}})}setAgentSessionArchived($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/archived",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentSessionAutoArchive($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/auto-archive",...$})}putAgentSessionAutoArchive($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/auto-archive",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentSessionChanges($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/changes",...$})}getAgentSessionChangesPatch($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/changes/patch",...$})}refreshAgentSessionChanges($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/changes/refresh",...$})}getCodeExecution($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/code-executions/{execution_id}",...$})}listExecutionReviews($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/code-executions/{execution_id}/reviews",...$})}controlAgentSession($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/control",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentSessionLog($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/log",...$})}getAgentSessionFoldedLog($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/log/folded",...$})}renameAgentSession($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentSessionPermissions($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/permissions",...$})}updateAgentSessionPermissions($){return($.client??this.client).patch({url:"/agent-sessions/{session_id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}unlinkAgentSessionPullRequest($){return($.client??this.client).delete({url:"/agent-sessions/{session_id}/pull-requests",...$})}listAgentSessionPullRequests($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/pull-requests",...$})}linkAgentSessionPullRequest($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/pull-requests",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAgentSessionQueue($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/queue",...$})}removeQueuedAction($){return($.client??this.client).delete({url:"/agent-sessions/{session_id}/queue/{action_id}",...$})}editQueuedAction($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/queue/{action_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}steerQueuedAction($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/queue/{action_id}/steer",...$})}createSessionReview($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/reviews",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSessionReview($){return($.client??this.client).get({url:"/agent-sessions/{session_id}/reviews/{review_id}",...$})}decideSessionReview($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/reviews/{review_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}putAgentSessionSandboxSize($){return($.client??this.client).put({url:"/agent-sessions/{session_id}/sandbox-size",...$,headers:{"Content-Type":"application/json",...$.headers}})}answerAgentSessionToolApproval($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/tool-approvals/{approval_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}presentSessionView($){return($.client??this.client).post({url:"/agent-sessions/{session_id}/views",...$,headers:{"Content-Type":"application/json",...$.headers}})}classify($){return($.client??this.client).post({url:"/universal_input/classify",...$,headers:{"Content-Type":"application/json",...$.headers}})}extract($){return($.client??this.client).post({url:"/universal_input/extract",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function D2({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var n5=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},s5=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},t5=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},cj=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(s5(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=n5(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return FO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},FO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},dj=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=t5(x),X=Object.entries(S).map(([Q,L])=>FO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var e5=/\{[^{}]+\}/g,o5=({path:$,url:O})=>{let j=O,x=O.match(e5);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,cj({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,dj({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${FO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},_2=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=o5({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function ex($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var C2=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var M2={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var A2=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=cj({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=dj({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=FO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},P2=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},$S=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function F2($){for(let O of $.security??[]){if($S($,O.name))continue;let j=await C2(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var ox=($)=>_2({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:A2($.querySerializer),url:$.url}),$1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=rj($.headers,O.headers),j},OS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},rj=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?OS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class lj{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var E2=()=>({error:new lj,request:new lj,response:new lj}),jS=A2({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),xS={"Content-Type":"application/json"},xj=($={})=>({...M2,headers:xS,parseAs:"auto",querySerializer:jS,...$});var O1=($={})=>{let O=$1(xj(),$),j=()=>({...O}),x=(G)=>{return O=$1(O,G),j()},S=E2(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:rj(O.headers,G.headers),serializedBody:void 0};if(J.security)await F2(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=ox(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:ex(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?P2(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return D2({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:ex(I),url:z})};return{buildUrl:(G)=>ox({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var q2=O1(xj());class w2{client;constructor($){this.client=$?.client??q2}}class f2{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class pj extends w2{static __registry=new f2;constructor($){super($);pj.__registry.set(this,$?.key)}deleteAgentApiKey($){return($.client??this.client).delete({url:"/agents/{agent_id}/api-key",...$})}getAgentApiKey($){return($.client??this.client).get({url:"/agents/{agent_id}/api-key",...$})}putAgentApiKey($){return($.client??this.client).put({url:"/agents/{agent_id}/api-key",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateAiBillingAutoReload($){return($.client??this.client).patch({url:"/ai-billing/auto-reload",...$,headers:{"Content-Type":"application/json",...$.headers}})}createAiCreditCheckout($){return($.client??this.client).post({url:"/ai-billing/credits/checkout",...$,headers:{"Content-Type":"application/json",...$.headers}})}purchaseAiCredits($){return($.client??this.client).post({url:"/ai-billing/credits/purchase",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateAiBillingOverage($){return($.client??this.client).patch({url:"/ai-billing/overage",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAiBillingPlans($){return($?.client??this.client).get({url:"/ai-billing/plans",...$})}getAiBillingSummary($){return($?.client??this.client).get({url:"/ai-billing/summary",...$})}disconnectCodex($){return($?.client??this.client).delete({url:"/codex",...$})}getCodexConnection($){return($?.client??this.client).get({url:"/codex",...$})}configureCodex($){return($.client??this.client).put({url:"/codex/config",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCodexEnvironments($){return($?.client??this.client).get({url:"/codex/environments",...$})}startCodexLogin($){return($?.client??this.client).post({url:"/codex/login",...$})}cancelCodexLogin($){return($.client??this.client).delete({url:"/codex/login/{attempt_id}",...$})}pollCodexLogin($){return($.client??this.client).get({url:"/codex/login/{attempt_id}",...$})}deleteCursorApiKey($){return($?.client??this.client).delete({url:"/cursor-api-key",...$})}getCursorApiKey($){return($?.client??this.client).get({url:"/cursor-api-key",...$})}putCursorApiKey($){return($.client??this.client).put({url:"/cursor-api-key",...$,headers:{"Content-Type":"application/json",...$.headers}})}putCursorDefaultModel($){return($.client??this.client).put({url:"/cursor-api-key/default-model",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCursorModels($){return($?.client??this.client).get({url:"/cursor-api-key/models",...$})}verifyFusionauthUserEmail($){return($.client??this.client).get({url:"/email/fusionauth/verify/{verification_id}",...$})}resendFusionauthVerifyUserEmail($){return($.client??this.client).post({url:"/email/fusionauth_resend",...$,headers:{"Content-Type":"application/json",...$.headers}})}generateEmailLink($){return($.client??this.client).post({url:"/email/generate/link",...$,headers:{"Content-Type":"application/json",...$.headers}})}verifyEmailLink($){return($.client??this.client).get({url:"/email/verify/{verification_id}",...$})}setGithubPullRequestDraft($){return($.client??this.client).post({url:"/github_pull_requests/draft",...$,headers:{"Content-Type":"application/json",...$.headers}})}enrichGithubPullRequests($){return($.client??this.client).post({url:"/github_pull_requests/enrich",...$,headers:{"Content-Type":"application/json",...$.headers}})}mergeGithubPullRequest($){return($.client??this.client).post({url:"/github_pull_requests/merge",...$,headers:{"Content-Type":"application/json",...$.headers}})}getGithubPullRequestMergeability($){return($.client??this.client).post({url:"/github_pull_requests/mergeability",...$,headers:{"Content-Type":"application/json",...$.headers}})}setGithubPullRequestState($){return($.client??this.client).post({url:"/github_pull_requests/state",...$,headers:{"Content-Type":"application/json",...$.headers}})}listGtmInviteLinks($){return($?.client??this.client).get({url:"/gtm-invite/links",...$})}createGtmInviteLink($){return($.client??this.client).post({url:"/gtm-invite/links",...$,headers:{"Content-Type":"application/json",...$.headers}})}revokeGtmInviteLink($){return($.client??this.client).delete({url:"/gtm-invite/links/{id}",...$})}getGtmInviteOffer($){return($?.client??this.client).get({url:"/gtm-invite/offer",...$})}resolveGtmInviteLink($){return($.client??this.client).get({url:"/gtm-invite/public/{token}",...$})}redeemGtmInviteLink($){return($.client??this.client).post({url:"/gtm-invite/redeem",...$,headers:{"Content-Type":"application/json",...$.headers}})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}macroApiToken($){return($.client??this.client).get({url:"/jwt/macro_api_token",...$})}refresh($){return($?.client??this.client).post({url:"/jwt/refresh",...$})}createInProgressLink($){return($?.client??this.client).post({url:"/link",...$})}emailConnectionProviders($){return($?.client??this.client).get({url:"/link/email/providers",...$})}deleteGithubLink($){return($?.client??this.client).delete({url:"/link/github",...$})}initGithubLink($){return($.client??this.client).post({url:"/link/github",...$})}checkGithubLinkStatus($){return($?.client??this.client).get({url:"/link/github/status",...$})}initGmailLink($){return($.client??this.client).post({url:"/link/gmail",...$})}checkGmailLinkStatus($){return($?.client??this.client).get({url:"/link/gmail/status",...$})}initOutlookLink($){return($?.client??this.client).post({url:"/link/outlook",...$})}appleLogin($){return($.client??this.client).post({url:"/login/apple",...$,headers:{"Content-Type":"application/json",...$.headers}})}passwordLogin($){return($.client??this.client).post({url:"/login/password",...$,headers:{"Content-Type":"application/json",...$.headers}})}passwordlessLogin($){return($.client??this.client).post({url:"/login/passwordless",...$,headers:{"Content-Type":"application/json",...$.headers}})}ssoLogin($){return($.client??this.client).get({url:"/login/sso",...$})}logout($){return($?.client??this.client).post({url:"/logout",...$})}createMergeRequest($){return($.client??this.client).post({url:"/merge",...$,headers:{"Content-Type":"application/json",...$.headers}})}verifyMergeRequest($){return($.client??this.client).get({url:"/merge/verify/{code}",...$})}sendMobileWelcomeEmail($){return($.client??this.client).post({url:"/mobile-welcome-email",...$,headers:{"Content-Type":"application/json",...$.headers}})}passwordlessCallback($){return($.client??this.client).get({url:"/oauth/passwordless/{code}",...$})}oauthRedirect($){return($?.client??this.client).get({url:"/oauth/redirect",...$})}oauth2Callback($){return($.client??this.client).get({url:"/oauth2/{provider}/callback",...$})}getPermissions($){return($?.client??this.client).get({url:"/permissions",...$})}getUserPermissions($){return($?.client??this.client).get({url:"/permissions/me",...$})}getReferralCode($){return($?.client??this.client).get({url:"/referral/code",...$})}sendReferralCode($){return($.client??this.client).post({url:"/referral/send",...$,headers:{"Content-Type":"application/json",...$.headers}})}sessionCreation($){return($?.client??this.client).post({url:"/session",...$})}sessionLogin($){return($.client??this.client).get({url:"/session/login/{session_code}",...$})}getSystemStatus($){return($?.client??this.client).get({url:"/system-status",...$})}setSystemStatus($){return($.client??this.client).post({url:"/system-status",...$,headers:{"Content-Type":"application/json",...$.headers}})}listSystemStatusHistory($){return($?.client??this.client).get({url:"/system-status/history",...$})}deleteTeam($){return($?.client??this.client).delete({url:"/team",...$})}getTeam($){return($?.client??this.client).get({url:"/team",...$})}patchTeam($){return($.client??this.client).patch({url:"/team",...$,headers:{"Content-Type":"application/json",...$.headers}})}createTeam($){return($.client??this.client).post({url:"/team",...$,headers:{"Content-Type":"application/json",...$.headers}})}toggleTeamAutoJoinDomain($){return($?.client??this.client).post({url:"/team/auto-join-domain/toggle",...$})}patchTeamCrmSettings($){return($.client??this.client).patch({url:"/team/crm",...$,headers:{"Content-Type":"application/json",...$.headers}})}sendTeamDomainNotice($){return($?.client??this.client).post({url:"/team/domain-notice",...$})}inviteToTeam($){return($.client??this.client).post({url:"/team/invite",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteTeamInviteLink($){return($?.client??this.client).delete({url:"/team/invite-link",...$})}getTeamInviteLink($){return($?.client??this.client).get({url:"/team/invite-link",...$})}createTeamInviteLink($){return($?.client??this.client).post({url:"/team/invite-link",...$})}joinTeamByInviteLink($){return($.client??this.client).post({url:"/team/invite-link/join",...$,headers:{"Content-Type":"application/json",...$.headers}})}getTeamByInviteLink($){return($.client??this.client).post({url:"/team/invite-link/team",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteTeamInviteHandler($){return($.client??this.client).delete({url:"/team/invite/{team_invite_id}",...$})}getTeamInvites($){return($?.client??this.client).get({url:"/team/invites",...$})}rejectInvitation($){return($.client??this.client).delete({url:"/team/join/{team_invite_id}",...$})}joinTeam($){return($.client??this.client).get({url:"/team/join/{team_invite_id}",...$})}patchTeamMemberPlan($){return($.client??this.client).patch({url:"/team/members/{member_user_id}/plan",...$,headers:{"Content-Type":"application/json",...$.headers}})}toggleTeamNonAdminInvites($){return($?.client??this.client).post({url:"/team/non-admin-invites/toggle",...$})}removeUserFromTeam($){return($.client??this.client).delete({url:"/team/remove/{remove_user_id}",...$})}getUserTeams($){return($?.client??this.client).get({url:"/team/user",...$})}getUserInvites($){return($?.client??this.client).get({url:"/team/user/invites",...$})}agentSetup($){return($?.client??this.client).post({url:"/user/agent_setup",...$})}getUserNames($){return($.client??this.client).post({url:"/user/get_names",...$,headers:{"Content-Type":"application/json",...$.headers}})}getUserNamesWithEmail($){return($.client??this.client).post({url:"/user/get_names_with_email",...$,headers:{"Content-Type":"application/json",...$.headers}})}patchUserGroup($){return($.client??this.client).patch({url:"/user/group",...$,headers:{"Content-Type":"application/json",...$.headers}})}getUserLanguage($){return($?.client??this.client).get({url:"/user/language",...$})}putUserLanguage($){return($.client??this.client).put({url:"/user/language",...$,headers:{"Content-Type":"application/json",...$.headers}})}getLegacyUserPermissions($){return($?.client??this.client).get({url:"/user/legacy_user_permissions",...$})}getUserLinkExists($){return($.client??this.client).get({url:"/user/link_exists",...$})}deleteUser($){return($?.client??this.client).delete({url:"/user/me",...$})}getUserInfo($){return($?.client??this.client).get({url:"/user/me",...$})}getUserName($){return($?.client??this.client).get({url:"/user/name",...$})}putUserName($){return($?.client??this.client).put({url:"/user/name",...$})}patchUserOnboarding($){return($.client??this.client).patch({url:"/user/onboarding",...$,headers:{"Content-Type":"application/json",...$.headers}})}getUserOrganization($){return($?.client??this.client).get({url:"/user/organization",...$})}putProfilePicture($){return($.client??this.client).put({url:"/user/profile_picture",...$})}createProfilePictureUpload($){return($.client??this.client).post({url:"/user/profile_picture/file",...$,headers:{"Content-Type":"application/json",...$.headers}})}putProfilePictureFile($){return($.client??this.client).put({url:"/user/profile_picture/file",...$,headers:{"Content-Type":"application/json",...$.headers}})}postProfilePictures($){return($.client??this.client).post({url:"/user/profile_pictures",...$,headers:{"Content-Type":"application/json",...$.headers}})}getUserQuota($){return($?.client??this.client).get({url:"/user/quota",...$})}createCheckoutSessionV2($){return($.client??this.client).post({url:"/user/stripe/checkoutv2",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSubscriptionStatus($){return($?.client??this.client).get({url:"/user/stripe/plan",...$})}changePlan($){return($.client??this.client).post({url:"/user/stripe/plan",...$,headers:{"Content-Type":"application/json",...$.headers}})}createPortalSession($){return($.client??this.client).post({url:"/user/stripe/portal",...$,headers:{"Content-Type":"application/json",...$.headers}})}getTrialEligibility($){return($?.client??this.client).get({url:"/user/stripe/trial_eligibility",...$})}patchUserTutorial($){return($.client??this.client).patch({url:"/user/tutorial",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function b2({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var SS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ZS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},XS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},aj=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(ZS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=SS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return EO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},EO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},ij=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=XS(x),X=Object.entries(S).map(([Q,L])=>EO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var KS=/\{[^{}]+\}/g,QS=({path:$,url:O})=>{let j=O,x=O.match(KS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,aj({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,ij({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${EO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},k2=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=QS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function j1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var g2=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var y2={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var v2=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=aj({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=ij({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=EO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},h2=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},YS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function m2($){for(let O of $.security??[]){if(YS($,O.name))continue;let j=await g2(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var x1=($)=>k2({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:v2($.querySerializer),url:$.url}),S1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=sj($.headers,O.headers),j},GS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},sj=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?GS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class nj{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var u2=()=>({error:new nj,request:new nj,response:new nj}),JS=v2({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),VS={"Content-Type":"application/json"},Sj=($={})=>({...y2,headers:VS,parseAs:"auto",querySerializer:JS,...$});var Z1=($={})=>{let O=S1(Sj(),$),j=()=>({...O}),x=(G)=>{return O=S1(O,G),j()},S=u2(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:sj(O.headers,G.headers),serializedBody:void 0};if(J.security)await m2(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=x1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:j1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?h2(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return b2({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:j1(I),url:z})};return{buildUrl:(G)=>x1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var c2=Z1(Sj());class d2{client;constructor($){this.client=$?.client??c2}}class l2{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class tj extends d2{static __registry=new l2;constructor($){super($);tj.__registry.set(this,$?.key)}getAvailabilityCalendars($){return($?.client??this.client).get({url:"/availability-calendars",...$})}setAvailabilityCalendar($){return($.client??this.client).put({url:"/availability-calendars/{calendar_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCalendars($){return($?.client??this.client).get({url:"/calendars",...$})}createCalendarEvent($){return($.client??this.client).post({url:"/events",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCalendarEvent($){return($.client??this.client).delete({url:"/events/{event_id}",...$})}updateCalendarEvent($){return($.client??this.client).patch({url:"/events/{event_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}copyCalendarEvent($){return($.client??this.client).post({url:"/events/{event_id}/copy",...$,headers:{"Content-Type":"application/json",...$.headers}})}inviteCalendarEventGuests($){return($.client??this.client).post({url:"/events/{event_id}/guests",...$,headers:{"Content-Type":"application/json",...$.headers}})}calendarEventProviderUrl($){return($.client??this.client).get({url:"/events/{event_id}/provider-url",...$})}prepareCalendarReplacement($){return($.client??this.client).post({url:"/events/{event_id}/replacement",...$,headers:{"Content-Type":"application/json",...$.headers}})}rsvpCalendarEvent($){return($.client??this.client).put({url:"/events/{event_id}/rsvp",...$,headers:{"Content-Type":"application/json",...$.headers}})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}respondToJoinRequest($){return($.client??this.client).put({url:"/join-requests/{request_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}discardCalendarReplacement($){return($.client??this.client).delete({url:"/replacements/{operation_id}",...$})}calendarReplacementStatus($){return($.client??this.client).get({url:"/replacements/{operation_id}",...$})}confirmCalendarReplacement($){return($.client??this.client).post({url:"/replacements/{operation_id}/confirm",...$})}getTeamSharing($){return($?.client??this.client).get({url:"/team-sharing",...$})}setTeamSharing($){return($.client??this.client).put({url:"/team-sharing",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function r2({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var WS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},BS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},LS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ej=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(BS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=WS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return qO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},qO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},oj=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=LS(x),X=Object.entries(S).map(([Q,L])=>qO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var NS=/\{[^{}]+\}/g,US=({path:$,url:O})=>{let j=O,x=O.match(NS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,ej({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,oj({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${qO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},p2=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=US({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function X1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var a2=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var i2={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var n2=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=ej({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=oj({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=qO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},s2=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},zS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function t2($){for(let O of $.security??[]){if(zS($,O.name))continue;let j=await a2(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var K1=($)=>p2({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:n2($.querySerializer),url:$.url}),Q1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=O0($.headers,O.headers),j},IS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},O0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?IS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class $0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var e2=()=>({error:new $0,request:new $0,response:new $0}),HS=n2({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),TS={"Content-Type":"application/json"},Zj=($={})=>({...i2,headers:TS,parseAs:"auto",querySerializer:HS,...$});var Y1=($={})=>{let O=Q1(Zj(),$),j=()=>({...O}),x=(G)=>{return O=Q1(O,G),j()},S=e2(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:O0(O.headers,G.headers),serializedBody:void 0};if(J.security)await t2(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=K1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:X1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?s2(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return r2({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:X1(I),url:z})};return{buildUrl:(G)=>K1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var o2=Y1(Zj());class $6{client;constructor($){this.client=$?.client??o2}}class O6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class j0 extends $6{static __registry=new O6;constructor($){super($);j0.__registry.set(this,$?.key)}setPricingHandler($){return($.client??this.client).post({url:"/ai-cost/pricing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getUsageHandler($){return($.client??this.client).post({url:"/ai-cost/usage",...$,headers:{"Content-Type":"application/json",...$.headers}})}upsertAiProjection($){return($.client??this.client).post({url:"/ai-projections",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChatsForAttachmentHandler($){return($.client??this.client).get({url:"/attachments/{attachment_id}/chats",...$})}deleteChat($){return($.client??this.client).delete({url:"/chat/{chat_id}",...$})}patchChat($){return($.client??this.client).patch({url:"/chat/{chat_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}permanentlyDeleteChat($){return($.client??this.client).delete({url:"/chat/{chat_id}/permanent",...$})}createChat($){return($.client??this.client).post({url:"/chats",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChatHistoryHandler($){return($.client??this.client).get({url:"/chats/history/{chat_id}",...$})}getChatHistoryBatchMessagesHandler($){return($.client??this.client).post({url:"/chats/history_batch_messages",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChat($){return($.client??this.client).get({url:"/chats/{chat_id}",...$})}copyChat($){return($.client??this.client).post({url:"/chats/{chat_id}/copy",...$})}getChatPermissions($){return($.client??this.client).get({url:"/chats/{chat_id}/permissions",...$})}revertDeleteChat($){return($.client??this.client).put({url:"/chats/{chat_id}/revert_delete",...$})}callTool($){return($.client??this.client).post({url:"/chats/{chat_id}/tool/call",...$,headers:{"Content-Type":"application/json",...$.headers}})}rejectToolCall($){return($.client??this.client).post({url:"/chats/{chat_id}/tool/reject",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateToolResponse($){return($.client??this.client).post({url:"/chats/{chat_id}/tool/response/update",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateToolCall($){return($.client??this.client).post({url:"/chats/{chat_id}/tool/update",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCitationHandler($){return($.client??this.client).get({url:"/citations/{id}",...$})}generateDatabaseQuery($){return($.client??this.client).post({url:"/database-query",...$,headers:{"Content-Type":"application/json",...$.headers}})}decisions($){return($.client??this.client).post({url:"/decisions",...$,headers:{"Content-Type":"application/json",...$.headers}})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}generateImage($){return($.client??this.client).post({url:"/images/generate",...$,headers:{"Content-Type":"application/json",...$.headers}})}notionReportHandler($){return($?.client??this.client).get({url:"/import/notion",...$})}cancelNotionHandler($){return($?.client??this.client).post({url:"/import/notion/cancel",...$})}runImportHandler($){return($.client??this.client).post({url:"/import/run",...$,headers:{"Content-Type":"application/json",...$.headers}})}discoverHandler($){return($.client??this.client).post({url:"/import/runs/{source}/discover",...$})}getStateHandler($){return($?.client??this.client).get({url:"/import/state",...$})}workspaceReportHandler($){return($.client??this.client).get({url:"/import/workspaces/{source}",...$})}cancelWorkspaceHandler($){return($.client??this.client).post({url:"/import/workspaces/{source}/cancel",...$})}deleteMcpServer($){return($.client??this.client).delete({url:"/mcp/servers",...$})}listMcpServers($){return($?.client??this.client).get({url:"/mcp/servers",...$})}addMcpServer($){return($.client??this.client).post({url:"/mcp/servers",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateMcpServer($){return($.client??this.client).put({url:"/mcp/servers",...$,headers:{"Content-Type":"application/json",...$.headers}})}mcpAuthCallback($){return($?.client??this.client).get({url:"/mcp/servers/auth/callback",...$})}mcpOauthClientMetadata($){return($?.client??this.client).get({url:"/mcp/servers/auth/client-metadata",...$})}startMcpAuth($){return($.client??this.client).post({url:"/mcp/servers/auth/start",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMemoryHandler($){return($?.client??this.client).get({url:"/memory",...$})}getStateHandler2($){return($?.client??this.client).get({url:"/onboarding",...$})}completeHandler($){return($.client??this.client).post({url:"/onboarding/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}dismissedPromptsHandler($){return($?.client??this.client).get({url:"/onboarding/prompts",...$})}dismissPromptHandler($){return($.client??this.client).post({url:"/onboarding/prompts/{prompt_id}/dismiss",...$})}browsePipedreamMcpCatalog($){return($?.client??this.client).get({url:"/pipedream/mcp/catalog",...$})}completePipedreamMcpConnection($){return($.client??this.client).post({url:"/pipedream/mcp/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}completePipedreamMcpConnect($){return($.client??this.client).post({url:"/pipedream/mcp/connect/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}deletePipedreamMcpConnection($){return($.client??this.client).delete({url:"/pipedream/mcp/connections",...$})}listPipedreamMcpConnections($){return($?.client??this.client).get({url:"/pipedream/mcp/connections",...$})}updatePipedreamMcpConnection($){return($.client??this.client).put({url:"/pipedream/mcp/connections",...$,headers:{"Content-Type":"application/json",...$.headers}})}listPipedreamMcpOverlays($){return($?.client??this.client).get({url:"/pipedream/mcp/overlays",...$})}recoverPipedreamMcpConnection($){return($.client??this.client).post({url:"/pipedream/mcp/recover",...$,headers:{"Content-Type":"application/json",...$.headers}})}createPipedreamMcpToken($){return($?.client??this.client).post({url:"/pipedream/mcp/token",...$,headers:{"Content-Type":"application/json",...$?.headers}})}getBatchPreview($){return($.client??this.client).post({url:"/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}sendChatMessage($){return($.client??this.client).post({url:"/stream/chat/message",...$,headers:{"Content-Type":"application/json",...$.headers}})}stopChatStream($){return($.client??this.client).post({url:"/stream/chat/message/stop",...$,headers:{"Content-Type":"application/json",...$.headers}})}structuredCompletion($){return($.client??this.client).post({url:"/structured-completion",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function j6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var RS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},DS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},_S=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},x0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(DS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=RS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return wO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},wO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},S0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=_S(x),X=Object.entries(S).map(([Q,L])=>wO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var CS=/\{[^{}]+\}/g,MS=({path:$,url:O})=>{let j=O,x=O.match(CS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,x0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,S0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${wO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},x6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=MS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function G1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var S6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var Z6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var X6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=x0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=S0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=wO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},K6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},AS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function Q6($){for(let O of $.security??[]){if(AS($,O.name))continue;let j=await S6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var J1=($)=>x6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:X6($.querySerializer),url:$.url}),V1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=X0($.headers,O.headers),j},PS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},X0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?PS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class Z0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var Y6=()=>({error:new Z0,request:new Z0,response:new Z0}),FS=X6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),ES={"Content-Type":"application/json"},Xj=($={})=>({...Z6,headers:ES,parseAs:"auto",querySerializer:FS,...$});var W1=($={})=>{let O=V1(Xj(),$),j=()=>({...O}),x=(G)=>{return O=V1(O,G),j()},S=Y6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:X0(O.headers,G.headers),serializedBody:void 0};if(J.security)await Q6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=J1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:G1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?K6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return j6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:G1(I),url:z})};return{buildUrl:(G)=>J1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var G6=W1(Xj());class J6{client;constructor($){this.client=$?.client??G6}}class V6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class K0 extends J6{static __registry=new V6;constructor($){super($);K0.__registry.set(this,$?.key)}getContacts($){return($?.client??this.client).get({url:"/contacts",...$})}addContact($){return($.client??this.client).post({url:"/contacts",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function W6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var qS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},wS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},fS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Q0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(wS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=qS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return fO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},fO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},Y0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=fS(x),X=Object.entries(S).map(([Q,L])=>fO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var bS=/\{[^{}]+\}/g,kS=({path:$,url:O})=>{let j=O,x=O.match(bS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,Q0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,Y0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${fO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},B6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=kS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function B1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var L6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var N6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var U6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=Q0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=Y0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=fO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},z6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},gS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function I6($){for(let O of $.security??[]){if(gS($,O.name))continue;let j=await L6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var L1=($)=>B6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:U6($.querySerializer),url:$.url}),N1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=J0($.headers,O.headers),j},yS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},J0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?yS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class G0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var H6=()=>({error:new G0,request:new G0,response:new G0}),vS=U6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),hS={"Content-Type":"application/json"},Kj=($={})=>({...N6,headers:hS,parseAs:"auto",querySerializer:vS,...$});var U1=($={})=>{let O=N1(Kj(),$),j=()=>({...O}),x=(G)=>{return O=N1(O,G),j()},S=H6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:J0(O.headers,G.headers),serializedBody:void 0};if(J.security)await I6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=L1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:B1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?z6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return W6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:B1(I),url:z})};return{buildUrl:(G)=>L1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var T6=U1(Kj());class R6{client;constructor($){this.client=$?.client??T6}}class D6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class V0 extends R6{static __registry=new D6;constructor($){super($);V0.__registry.set(this,$?.key)}getAttachment($){return($.client??this.client).get({url:"/email/attachments/{id}",...$})}getAttachmentDocumentId($){return($.client??this.client).get({url:"/email/attachments/{id}/document_id",...$})}cancelBackfillGmail($){return($.client??this.client).delete({url:"/email/backfill/gmail",...$,headers:{"Content-Type":"application/json",...$.headers}})}listBackfillGmail($){return($?.client??this.client).get({url:"/email/backfill/gmail",...$})}getBackfillGmailActive($){return($?.client??this.client).get({url:"/email/backfill/gmail/active",...$})}getBackfillGmail($){return($.client??this.client).get({url:"/email/backfill/gmail/{id}",...$})}forwardCalendarEvent($){return($.client??this.client).post({url:"/email/calendar-events/{event_id}/forward",...$,headers:{"Content-Type":"application/json",...$.headers}})}listContacts($){return($?.client??this.client).get({url:"/email/contacts",...$})}blockSender($){return($.client??this.client).post({url:"/email/contacts/block",...$,headers:{"Content-Type":"application/json",...$.headers}})}listBlockedSenders($){return($?.client??this.client).get({url:"/email/contacts/blocked",...$})}unblockSender($){return($.client??this.client).post({url:"/email/contacts/unblock",...$,headers:{"Content-Type":"application/json",...$.headers}})}recoverDraftTransfer($){return($.client??this.client).post({url:"/email/draft-transfers/{id}/recover",...$})}createDraft($){return($.client??this.client).post({url:"/email/drafts",...$,headers:{"Content-Type":"application/json",...$.headers}})}getScheduledMessages($){return($?.client??this.client).get({url:"/email/drafts/scheduled",...$})}upsertScheduledMessage($){return($.client??this.client).put({url:"/email/drafts/scheduled/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteScheduledDraft($){return($.client??this.client).delete({url:"/email/drafts/scheduled/{message_id}",...$})}deleteDraft($){return($.client??this.client).delete({url:"/email/drafts/{id}",...$})}addDraftAttachment($){return($.client??this.client).post({url:"/email/drafts/{id}/attachments",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeDraftAttachment($){return($.client??this.client).delete({url:"/email/drafts/{id}/attachments/{attachment_id}",...$})}completeDraftAttachment($){return($.client??this.client).post({url:"/email/drafts/{id}/attachments/{attachment_id}/complete",...$})}addForwardedAttachment($){return($.client??this.client).post({url:"/email/drafts/{id}/forwarded-attachments",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeForwardedAttachment($){return($.client??this.client).delete({url:"/email/drafts/{id}/forwarded-attachments/{attachment_id}",...$})}messageOperationStatus($){return($.client??this.client).get({url:"/email/drafts/{id}/operation",...$})}resolveMessageOperation($){return($.client??this.client).post({url:"/email/drafts/{id}/resolve",...$,headers:{"Content-Type":"application/json",...$.headers}})}transferDraft($){return($.client??this.client).post({url:"/email/drafts/{id}/transfer",...$,headers:{"Content-Type":"application/json",...$.headers}})}listEmailFilters($){return($?.client??this.client).get({url:"/email/filters",...$})}upsertEmailFilter($){return($.client??this.client).put({url:"/email/filters",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteEmailFilter($){return($.client??this.client).delete({url:"/email/filters/{id}",...$})}initUser($){return($?.client??this.client).post({url:"/email/init",...$})}listLabels($){return($?.client??this.client).get({url:"/email/labels",...$})}createLabel($){return($.client??this.client).post({url:"/email/labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteLabel($){return($.client??this.client).delete({url:"/email/labels/{id}",...$})}listLinks($){return($?.client??this.client).get({url:"/email/links",...$})}healthCheckLinks($){return($?.client??this.client).post({url:"/email/links/health-check",...$})}deleteLink($){return($.client??this.client).delete({url:"/email/links/{link_id}",...$})}disableLinkCalendar($){return($.client??this.client).delete({url:"/email/links/{link_id}/calendar",...$})}resyncLink($){return($.client??this.client).post({url:"/email/links/{link_id}/resync",...$})}sendMessage($){return($.client??this.client).post({url:"/email/messages",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMessagesBatch($){return($.client??this.client).post({url:"/email/messages/batch",...$,headers:{"Content-Type":"application/json",...$.headers}})}addRemoveLabel($){return($.client??this.client).patch({url:"/email/messages/labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMessage($){return($.client??this.client).get({url:"/email/messages/{id}",...$})}getMessageEml($){return($.client??this.client).get({url:"/email/messages/{id}/eml",...$})}patchSettings($){return($.client??this.client).patch({url:"/email/settings",...$,headers:{"Content-Type":"application/json",...$.headers}})}mailboxSettingsOperations($){return($?.client??this.client).get({url:"/email/settings/operations",...$})}disableSync($){return($?.client??this.client).delete({url:"/email/sync",...$})}archiveThreads($){return($.client??this.client).patch({url:"/email/threads/archived",...$,headers:{"Content-Type":"application/json",...$.headers}})}previewsInboxCursor($){return($.client??this.client).get({url:"/email/threads/previews/cursor/{view}",...$})}archiveThread($){return($.client??this.client).patch({url:"/email/threads/{id}/archived",...$,headers:{"Content-Type":"application/json",...$.headers}})}addRemoveThreadLabel($){return($.client??this.client).patch({url:"/email/threads/{id}/labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}getThreadMessagesHandler($){return($.client??this.client).get({url:"/email/threads/{id}/messages",...$})}threadOperations($){return($.client??this.client).get({url:"/email/threads/{id}/operations",...$})}threadSeen($){return($.client??this.client).post({url:"/email/threads/{id}/seen",...$})}updateThreadState($){return($.client??this.client).patch({url:"/email/threads/{id}/state",...$,headers:{"Content-Type":"application/json",...$.headers}})}getThread($){return($.client??this.client).get({url:"/email/threads/{thread_id}",...$})}getThreadCalendarInvitations($){return($.client??this.client).get({url:"/email/threads/{thread_id}/calendar-invitations",...$})}copyThreadCalendarInvitation($){return($.client??this.client).post({url:"/email/threads/{thread_id}/messages/{message_id}/calendar-invitations/{invitation_id}/copy",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateThreadProject($){return($.client??this.client).patch({url:"/email/threads/{thread_id}/project",...$,headers:{"Content-Type":"application/json",...$.headers}})}getThreadReadReceipts($){return($.client??this.client).get({url:"/email/threads/{thread_id}/read-receipts",...$})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getReadReceiptPixel($){return($.client??this.client).get({url:"/opens/{token}",...$})}}function _6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var mS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},uS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},cS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},W0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(uS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=mS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return bO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},bO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},B0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=cS(x),X=Object.entries(S).map(([Q,L])=>bO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var dS=/\{[^{}]+\}/g,lS=({path:$,url:O})=>{let j=O,x=O.match(dS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,W0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,B0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${bO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},C6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=lS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function z1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var M6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var A6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var P6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=W0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=B0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=bO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},F6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},rS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function E6($){for(let O of $.security??[]){if(rS($,O.name))continue;let j=await M6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var I1=($)=>C6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:P6($.querySerializer),url:$.url}),H1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=N0($.headers,O.headers),j},pS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},N0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?pS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class L0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var q6=()=>({error:new L0,request:new L0,response:new L0}),aS=P6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),iS={"Content-Type":"application/json"},Qj=($={})=>({...A6,headers:iS,parseAs:"auto",querySerializer:aS,...$});var T1=($={})=>{let O=H1(Qj(),$),j=()=>({...O}),x=(G)=>{return O=H1(O,G),j()},S=q6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:N0(O.headers,G.headers),serializedBody:void 0};if(J.security)await E6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=I1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:z1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?F6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return _6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:z1(I),url:z})};return{buildUrl:(G)=>I1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var w6=T1(Qj());class f6{client;constructor($){this.client=$?.client??w6}}class b6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class U0 extends f6{static __registry=new b6;constructor($){super($);U0.__registry.set(this,$?.key)}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getUnsubscribes($){return($?.client??this.client).get({url:"/unsubscribe",...$})}unsubscribeEmail($){return($?.client??this.client).post({url:"/unsubscribe/email",...$})}removeUnsubscribeItem($){return($.client??this.client).delete({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}unsubscribeItem($){return($.client??this.client).post({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}removeUnsubscribeItems($){return($.client??this.client).delete({url:"/unsubscribe/items",...$,headers:{"Content-Type":"application/json",...$.headers}})}unsubscribeItems($){return($.client??this.client).post({url:"/unsubscribe/items",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeUnsubscribeAll($){return($?.client??this.client).delete({url:"/unsubscribe/mute",...$})}unsubscribeAll($){return($?.client??this.client).post({url:"/unsubscribe/mute",...$})}listTypedNotifications($){return($?.client??this.client).get({url:"/v1/user_notifications",...$})}bulkGetTypedNotificationsByEventItemIds($){return($.client??this.client).post({url:"/v1/user_notifications/item/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}getTypedNotificationsByEventItemId($){return($.client??this.client).get({url:"/v1/user_notifications/item/{event_item_id}",...$})}getNotificationTypePreferences($){return($?.client??this.client).get({url:"/v1/user_notifications/preferences",...$})}disableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/disable",...$})}enableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/enable",...$})}getTypedNotificationById($){return($.client??this.client).get({url:"/v1/user_notifications/{notification_id}",...$})}bulkDeleteUserNotificationsV2($){return($.client??this.client).delete({url:"/v2/user_notifications/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsDone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/done",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsSeen($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/seen",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsUndone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/undone",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserNotificationV2($){return($.client??this.client).delete({url:"/v2/user_notifications/{notification_id}",...$})}}function k6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var nS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},sS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},tS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(sS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=nS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return kO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},kO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},I0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=tS(x),X=Object.entries(S).map(([Q,L])=>kO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var eS=/\{[^{}]+\}/g,oS=({path:$,url:O})=>{let j=O,x=O.match(eS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,z0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,I0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${kO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},g6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=oS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function R1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var y6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var v6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var h6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=z0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=I0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=kO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},m6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},$9=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function u6($){for(let O of $.security??[]){if($9($,O.name))continue;let j=await y6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var D1=($)=>g6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:h6($.querySerializer),url:$.url}),_1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=T0($.headers,O.headers),j},O9=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},T0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?O9(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class H0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var c6=()=>({error:new H0,request:new H0,response:new H0}),j9=h6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),x9={"Content-Type":"application/json"},Yj=($={})=>({...v6,headers:x9,parseAs:"auto",querySerializer:j9,...$});var C1=($={})=>{let O=_1(Yj(),$),j=()=>({...O}),x=(G)=>{return O=_1(O,G),j()},S=c6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:T0(O.headers,G.headers),serializedBody:void 0};if(J.security)await u6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=D1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:R1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?m6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return k6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:R1(I),url:z})};return{buildUrl:(G)=>D1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var d6=C1(Yj());class l6{client;constructor($){this.client=$?.client??d6}}class r6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class R0 extends l6{static __registry=new r6;constructor($){super($);R0.__registry.set(this,$?.key)}listProperties($){return($.client??this.client).get({url:"/properties/definitions",...$})}createPropertyDefinition($){return($.client??this.client).post({url:"/properties/definitions",...$,headers:{"Content-Type":"application/json",...$.headers}})}deletePropertyDefinition($){return($.client??this.client).delete({url:"/properties/definitions/{definition_id}",...$})}getPropertyDefinition($){return($.client??this.client).get({url:"/properties/definitions/{definition_id}",...$})}getPropertyOptions($){return($.client??this.client).get({url:"/properties/definitions/{definition_id}/options",...$})}addPropertyOption($){return($.client??this.client).post({url:"/properties/definitions/{definition_id}/options",...$,headers:{"Content-Type":"application/json",...$.headers}})}deletePropertyOption($){return($.client??this.client).delete({url:"/properties/definitions/{definition_id}/options/{option_id}",...$})}updatePropertyOption($){return($.client??this.client).patch({url:"/properties/definitions/{definition_id}/options/{option_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBulkEntityProperties($){return($.client??this.client).post({url:"/properties/entities/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}getEntityProperties($){return($.client??this.client).get({url:"/properties/entities/{entity_type}/{entity_id}",...$})}bulkUpdateEntityPropertyOptions($){return($.client??this.client).post({url:"/properties/entities/{entity_type}/{entity_id}/options/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}setEntityProperty($){return($.client??this.client).put({url:"/properties/entities/{entity_type}/{entity_id}/{property_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeEntityPropertyOption($){return($.client??this.client).delete({url:"/properties/entities/{entity_type}/{entity_id}/{property_id}/options/{option_id}",...$})}addEntityPropertyOption($){return($.client??this.client).post({url:"/properties/entities/{entity_type}/{entity_id}/{property_id}/options/{option_id}",...$})}deleteEntityProperty($){return($.client??this.client).delete({url:"/properties/entity_properties/{entity_property_id}",...$})}bulkUpdateEntitiesPropertyOptions($){return($.client??this.client).post({url:"/properties/options/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}listTags($){return($?.client??this.client).get({url:"/properties/tags",...$})}ensureTagSet($){return($.client??this.client).post({url:"/properties/tags",...$,headers:{"Content-Type":"application/json",...$.headers}})}mergeTag($){return($.client??this.client).post({url:"/properties/tags/merge",...$,headers:{"Content-Type":"application/json",...$.headers}})}promoteTag($){return($.client??this.client).post({url:"/properties/tags/promote",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function p6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var S9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Z9=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},X9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},D0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(Z9(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=S9(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return gO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},gO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},_0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=X9(x),X=Object.entries(S).map(([Q,L])=>gO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var K9=/\{[^{}]+\}/g,Q9=({path:$,url:O})=>{let j=O,x=O.match(K9);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,D0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,_0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${gO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},a6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=Q9({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function M1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var i6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var n6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var s6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=D0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=_0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=gO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},t6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},Y9=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function e6($){for(let O of $.security??[]){if(Y9($,O.name))continue;let j=await i6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var A1=($)=>a6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:s6($.querySerializer),url:$.url}),P1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=M0($.headers,O.headers),j},G9=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},M0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?G9(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class C0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var o6=()=>({error:new C0,request:new C0,response:new C0}),J9=s6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),V9={"Content-Type":"application/json"},Gj=($={})=>({...n6,headers:V9,parseAs:"auto",querySerializer:J9,...$});var F1=($={})=>{let O=P1(Gj(),$),j=()=>({...O}),x=(G)=>{return O=P1(O,G),j()},S=o6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:M0(O.headers,G.headers),serializedBody:void 0};if(J.security)await e6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=A1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:M1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?t6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return p6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:M1(I),url:z})};return{buildUrl:(G)=>A1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var $7=F1(Gj());class O7{client;constructor($){this.client=$?.client??$7}}class j7{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class A0 extends O7{static __registry=new j7;constructor($){super($);A0.__registry.set(this,$?.key)}scheduledActionHealth($){return($?.client??this.client).get({url:"/health",...$})}listScheduledActions($){return($?.client??this.client).get({url:"/scheduled-actions",...$})}createScheduledAction($){return($.client??this.client).post({url:"/scheduled-actions",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteScheduledAction($){return($.client??this.client).delete({url:"/scheduled-actions/{id}",...$})}getScheduledAction($){return($.client??this.client).get({url:"/scheduled-actions/{id}",...$})}updateScheduledAction($){return($.client??this.client).put({url:"/scheduled-actions/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}setScheduledActionEnabled($){return($.client??this.client).put({url:"/scheduled-actions/{id}/enabled",...$,headers:{"Content-Type":"application/json",...$.headers}})}executeScheduledActionNow($){return($.client??this.client).post({url:"/scheduled-actions/{id}/execute",...$})}listScheduledActionHistory($){return($.client??this.client).get({url:"/scheduled-actions/{id}/history",...$})}unshareScheduledActionTemplate($){return($.client??this.client).delete({url:"/scheduled-actions/{id}/template",...$})}getScheduledActionTemplate($){return($.client??this.client).get({url:"/scheduled-actions/{id}/template",...$})}shareScheduledActionTemplate($){return($.client??this.client).put({url:"/scheduled-actions/{id}/template",...$,headers:{"Content-Type":"application/json",...$.headers}})}activateScheduledActionTemplate($){return($.client??this.client).post({url:"/scheduled-actions/{id}/template/activate",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function x7({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var W9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},B9=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},L9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(B9(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=W9(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return yO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},yO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},F0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=L9(x),X=Object.entries(S).map(([Q,L])=>yO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var N9=/\{[^{}]+\}/g,U9=({path:$,url:O})=>{let j=O,x=O.match(N9);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,P0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,F0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${yO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},S7=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=U9({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function E1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var Z7=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var X7={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var K7=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=P0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=F0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=yO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},Q7=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},z9=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function Y7($){for(let O of $.security??[]){if(z9($,O.name))continue;let j=await Z7(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var q1=($)=>S7({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:K7($.querySerializer),url:$.url}),w1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=q0($.headers,O.headers),j},I9=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},q0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?I9(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class E0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var G7=()=>({error:new E0,request:new E0,response:new E0}),H9=K7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),T9={"Content-Type":"application/json"},Jj=($={})=>({...X7,headers:T9,parseAs:"auto",querySerializer:H9,...$});var f1=($={})=>{let O=w1(Jj(),$),j=()=>({...O}),x=(G)=>{return O=w1(O,G),j()},S=G7(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:q0(O.headers,G.headers),serializedBody:void 0};if(J.security)await Y7(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=q1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:E1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?Q7(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return x7({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:E1(I),url:z})};return{buildUrl:(G)=>q1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var J7=f1(Jj());class V7{client;constructor($){this.client=$?.client??J7}}class W7{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class w0 extends V7{static __registry=new W7;constructor($){super($);w0.__registry.set(this,$?.key)}unifiedSearch($){return($.client??this.client).post({url:"/search",...$,headers:{"Content-Type":"application/json",...$.headers}})}simpleUnifiedSearch($){return($.client??this.client).post({url:"/search/simple",...$,headers:{"Content-Type":"application/json",...$.headers}})}}var B7=($,O,j)=>{if(typeof j==="string"||j instanceof Blob)$.append(O,j);else if(j instanceof Date)$.append(O,j.toISOString());else $.append(O,JSON.stringify(j))};var b1={bodySerializer:($)=>{let O=new FormData;return Object.entries($).forEach(([j,x])=>{if(x===void 0||x===null)return;if(Array.isArray(x))x.forEach((S)=>B7(O,j,S));else B7(O,j,x)}),O}},k1={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};function L7({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var R9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},D9=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},_9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},f0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(D9(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=R9(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return vO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},vO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},b0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=_9(x),X=Object.entries(S).map(([Q,L])=>vO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var C9=/\{[^{}]+\}/g,M9=({path:$,url:O})=>{let j=O,x=O.match(C9);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,f0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,b0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${vO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},N7=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=M9({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function g1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var U7=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var z7=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=f0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=b0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=vO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},I7=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},A9=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function H7($){for(let O of $.security??[]){if(A9($,O.name))continue;let j=await U7(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var y1=($)=>N7({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:z7($.querySerializer),url:$.url}),v1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=g0($.headers,O.headers),j},P9=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},g0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?P9(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class k0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var T7=()=>({error:new k0,request:new k0,response:new k0}),F9=z7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),E9={"Content-Type":"application/json"},Vj=($={})=>({...k1,headers:E9,parseAs:"auto",querySerializer:F9,...$});var Wj=($={})=>{let O=v1(Vj(),$),j=()=>({...O}),x=(G)=>{return O=v1(O,G),j()},S=T7(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:g0(O.headers,G.headers),serializedBody:void 0};if(J.security)await H7(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=y1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:g1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?I7(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return L7({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:g1(I),url:z})};return{buildUrl:(G)=>y1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var R7=Wj(Vj());class D7{client;constructor($){this.client=$?.client??R7}}class _7{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class y0 extends D7{static __registry=new _7;constructor($){super($);y0.__registry.set(this,$?.key)}listAgents($){return($?.client??this.client).get({url:"/agents",...$})}createAgent($){return($.client??this.client).post({url:"/agents",...$,headers:{"Content-Type":"application/json",...$.headers}})}updateAgent($){return($.client??this.client).put({url:"/agents/{agent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteAnchor($){return($.client??this.client).delete({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}editAnchor($){return($.client??this.client).patch({url:"/annotations/anchors",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentAnchors($){return($.client??this.client).get({url:"/annotations/anchors/document/{document_id}",...$})}createAnchor($){return($.client??this.client).post({url:"/annotations/anchors/document/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSelfBot($){return($?.client??this.client).get({url:"/bots/me",...$})}getBotOwnerProfiles($){return($?.client??this.client).get({url:"/bots/profiles",...$})}listBotChannels($){return($.client??this.client).get({url:"/bots/{bot_id}/channels",...$})}removeBotFromChannelByBot($){return($.client??this.client).delete({url:"/bots/{bot_id}/channels/{channel_id}",...$})}listOccurrences($){return($.client??this.client).get({url:"/calendar-events",...$})}mentionPreviews($){return($.client??this.client).post({url:"/calendar-events/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}listTeamCalendar($){return($.client??this.client).get({url:"/calendar-events/team",...$})}listTeamOutOfOffice($){return($.client??this.client).get({url:"/calendar-events/team-out-of-office",...$})}eventIcs($){return($.client??this.client).get({url:"/calendar-events/{event_id}/ics",...$})}listJoinRequests($){return($.client??this.client).get({url:"/calendar-events/{event_id}/join-requests",...$})}requestToJoin($){return($.client??this.client).post({url:"/calendar-events/{event_id}/join-requests",...$})}getActiveCalls($){return($?.client??this.client).get({url:"/call/active",...$})}guestCallChatRead($){return($.client??this.client).get({url:"/call/guest-chat/{call_id}",...$})}guestCallChatPost($){return($.client??this.client).post({url:"/call/guest-chat/{call_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingLookup($){return($.client??this.client).get({url:"/call/join/{token}",...$})}meetingGuestJoin($){return($.client??this.client).post({url:"/call/join/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingLeave($){return($.client??this.client).post({url:"/call/join/{token}/leave",...$})}meetingGuestParticipants($){return($.client??this.client).get({url:"/call/join/{token}/participants",...$})}meetingList($){return($?.client??this.client).get({url:"/call/meetings",...$})}meetingCreate($){return($.client??this.client).post({url:"/call/meetings",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingListActive($){return($?.client??this.client).get({url:"/call/meetings/active",...$})}meetingInvitePermissions($){return($.client??this.client).get({url:"/call/meetings/invite/{token}",...$})}meetingInvite($){return($.client??this.client).post({url:"/call/meetings/invite/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingInviteUsers($){return($.client??this.client).post({url:"/call/meetings/invite/{token}/users",...$,headers:{"Content-Type":"application/json",...$.headers}})}meetingJoin($){return($.client??this.client).post({url:"/call/meetings/join/{token}",...$})}meetingParticipants($){return($.client??this.client).get({url:"/call/meetings/join/{token}/participants",...$})}meetingPrepare($){return($?.client??this.client).post({url:"/call/meetings/prepare",...$})}meetingCancelPreparation($){return($.client??this.client).delete({url:"/call/meetings/prepare/{preparation_id}",...$})}meetingCancel($){return($.client??this.client).delete({url:"/call/meetings/{meeting_id}",...$})}meetingUpdate($){return($.client??this.client).patch({url:"/call/meetings/{meeting_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchCallRecordPreview($){return($.client??this.client).post({url:"/call/record/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCallRecord($){return($.client??this.client).delete({url:"/call/record/{call_id}",...$})}getCallRecord($){return($.client??this.client).get({url:"/call/record/{call_id}",...$})}editCallRecord($){return($.client??this.client).patch({url:"/call/record/{call_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}declineCall($){return($.client??this.client).post({url:"/call/record/{call_id}/decline",...$})}meetingShare($){return($.client??this.client).post({url:"/call/record/{call_id}/link",...$})}toggleShareWithTeam($){return($.client??this.client).post({url:"/call/record/{call_id}/share-with-team/toggle",...$})}editCallTranscript($){return($.client??this.client).patch({url:"/call/record/{call_id}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}getRingStatus($){return($.client??this.client).get({url:"/call/ring-status/{call_id}",...$})}declineRing($){return($.client??this.client).post({url:"/call/ring-status/{call_id}/decline",...$})}callWebhook($){return($?.client??this.client).post({url:"/call/webhook",...$})}leaveOrEndCall($){return($.client??this.client).delete({url:"/call/{channel_id}",...$})}getOrCreateCall($){return($.client??this.client).get({url:"/call/{channel_id}",...$})}checkActiveCall($){return($.client??this.client).get({url:"/call/{channel_id}/active",...$})}ingestTranscript($){return($.client??this.client).post({url:"/call/{room_name}/transcript",...$,headers:{"Content-Type":"application/json",...$.headers}})}listChannelLabels($){return($?.client??this.client).get({url:"/channel-labels",...$})}createChannelLabel($){return($.client??this.client).post({url:"/channel-labels",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelLabel($){return($.client??this.client).put({url:"/channel-labels/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}previewSmartTag($){return($.client??this.client).post({url:"/channel-labels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannelLabel($){return($.client??this.client).delete({url:"/channel-labels/{label_id}",...$})}renameChannelLabel($){return($.client??this.client).patch({url:"/channel-labels/{label_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createChannel($){return($.client??this.client).post({url:"/channels",...$,headers:{"Content-Type":"application/json",...$.headers}})}getActivity($){return($?.client??this.client).get({url:"/channels/activity",...$})}postActivity($){return($.client??this.client).post({url:"/channels/activity",...$,headers:{"Content-Type":"application/json",...$.headers}})}getAttachmentReferences($){return($.client??this.client).get({url:"/channels/attachments/{entity_type}/{entity_id}/references",...$})}getOrCreateDm($){return($.client??this.client).post({url:"/channels/get_or_create_dm",...$,headers:{"Content-Type":"application/json",...$.headers}})}getOrCreatePrivate($){return($.client??this.client).post({url:"/channels/get_or_create_private",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannelByCode($){return($.client??this.client).post({url:"/channels/join/{join_code}",...$})}createEntityMention($){return($.client??this.client).post({url:"/channels/mentions",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteEntityMention($){return($.client??this.client).delete({url:"/channels/mentions/{mention_id}",...$})}getBatchChannelPreview($){return($.client??this.client).post({url:"/channels/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteChannel($){return($.client??this.client).delete({url:"/channels/{channel_id}",...$})}getChannel($){return($.client??this.client).get({url:"/channels/{channel_id}",...$})}patchChannel($){return($.client??this.client).patch({url:"/channels/{channel_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelAttachments($){return($.client??this.client).get({url:"/channels/{channel_id}/attachments",...$})}createChannelScopedBot($){return($.client??this.client).post({url:"/channels/{channel_id}/bots/scoped",...$,headers:{"Content-Type":"application/json",...$.headers}})}joinChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/join",...$})}getChannelJoinLink($){return($.client??this.client).get({url:"/channels/{channel_id}/join-link",...$})}leaveChannel($){return($.client??this.client).post({url:"/channels/{channel_id}/leave",...$})}removeParticipants($){return($.client??this.client).delete({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}getChannelParticipants($){return($.client??this.client).get({url:"/channels/{channel_id}/participants",...$})}addParticipants($){return($.client??this.client).post({url:"/channels/{channel_id}/participants",...$,headers:{"Content-Type":"application/json",...$.headers}})}setChannelPicture($){return($.client??this.client).put({url:"/channels/{channel_id}/profile_picture",...$,headers:{"Content-Type":"application/json",...$.headers}})}postChannelBotWebhook($){return($.client??this.client).post({url:"/channels/{channel_id}/webhook",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteCollabSurface($){return($.client??this.client).delete({url:"/collab_surfaces/{id}",...$})}getCollabSurface($){return($.client??this.client).get({url:"/collab_surfaces/{id}",...$})}ensureCollabSurface($){return($.client??this.client).put({url:"/collab_surfaces/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}createCollabSurfaceToken($){return($.client??this.client).post({url:"/collab_surfaces/{id}/token",...$})}getChannels($){return($?.client??this.client).get({url:"/comms/channels",...$})}listCrmBlockedDomains($){return($?.client??this.client).get({url:"/crm/blocked-domains",...$})}unblockCrmDomain($){return($.client??this.client).delete({url:"/crm/blocked-domains/{domain}",...$})}blockCrmDomain($){return($.client??this.client).put({url:"/crm/blocked-domains/{domain}",...$})}createCrmCompany($){return($.client??this.client).post({url:"/crm/companies",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCompany($){return($.client??this.client).get({url:"/crm/companies/{company_id}",...$})}listCompanyContacts($){return($.client??this.client).get({url:"/crm/companies/{company_id}/contacts",...$})}createCrmContact($){return($.client??this.client).post({url:"/crm/companies/{company_id}/contacts",...$,headers:{"Content-Type":"application/json",...$.headers}})}setEmailSync($){return($.client??this.client).put({url:"/crm/companies/{company_id}/email-sync",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCompanyHidden($){return($.client??this.client).put({url:"/crm/companies/{company_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmCompanyName($){return($.client??this.client).put({url:"/crm/companies/{company_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}searchContacts($){return($?.client??this.client).get({url:"/crm/contacts",...$})}createCrmTeamContact($){return($.client??this.client).post({url:"/crm/contacts",...$,headers:{"Content-Type":"application/json",...$.headers}})}getContactByEmail($){return($.client??this.client).get({url:"/crm/contacts/by-email",...$})}getContact($){return($.client??this.client).get({url:"/crm/contacts/{contact_id}",...$})}setContactHidden($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/hidden",...$,headers:{"Content-Type":"application/json",...$.headers}})}setCrmContactName($){return($.client??this.client).put({url:"/crm/contacts/{contact_id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}listCrmPipelines($){return($?.client??this.client).get({url:"/crm/pipelines",...$})}createCrmPipeline($){return($.client??this.client).post({url:"/crm/pipelines",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipeline($){return($.client??this.client).get({url:"/crm/pipelines/{id}",...$})}renameCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/name",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyCrmPipelineOps($){return($.client??this.client).post({url:"/crm/pipelines/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelinePermissions($){return($.client??this.client).get({url:"/crm/pipelines/{id}/permissions",...$})}updateCrmPipelinePermissions($){return($.client??this.client).patch({url:"/crm/pipelines/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineRows($){return($.client??this.client).get({url:"/crm/pipelines/{id}/rows",...$})}queryCrmPipelineRows($){return($.client??this.client).post({url:"/crm/pipelines/{id}/rows",...$,headers:{"Content-Type":"application/json",...$.headers}})}shareCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/sharing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineTable($){return($.client??this.client).get({url:"/crm/pipelines/{id}/table",...$})}trashCrmPipeline($){return($.client??this.client).put({url:"/crm/pipelines/{id}/trash",...$,headers:{"Content-Type":"application/json",...$.headers}})}getCrmPipelineViewPositions($){return($.client??this.client).get({url:"/crm/pipelines/{id}/views/{view}/positions",...$})}getCrmTeamSettings($){return($?.client??this.client).get({url:"/crm/settings",...$})}putCrmTeamSettings($){return($.client??this.client).put({url:"/crm/settings",...$,headers:{"Content-Type":"application/json",...$.headers}})}resetCrmTeamStages($){return($?.client??this.client).delete({url:"/crm/stages",...$})}putCrmTeamStages($){return($.client??this.client).put({url:"/crm/stages",...$,headers:{"Content-Type":"application/json",...$.headers}})}listDatabases($){return($?.client??this.client).get({url:"/databases",...$})}createDatabase($){return($.client??this.client).post({url:"/databases",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDatabaseQuery($){return($.client??this.client).post({url:"/databases/queries",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseQuery($){return($.client??this.client).get({url:"/databases/queries/{query_id}",...$})}queryDatabases($){return($.client??this.client).post({url:"/databases/query",...$,headers:{"Content-Type":"application/json",...$.headers}})}ensureStarterHandler($){return($?.client??this.client).post({url:"/databases/starter",...$})}deliverDatabaseWebhook($){return($.client??this.client).post({url:"/databases/webhooks/{token}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabase($){return($.client??this.client).get({url:"/databases/{id}",...$})}shareDatabaseAwareness($){return($.client??this.client).put({url:"/databases/{id}/awareness",...$,headers:{"Content-Type":"application/json",...$.headers}})}undoDatabaseChange($){return($.client??this.client).post({url:"/databases/{id}/changes/{change}/undo",...$})}duplicateDatabase($){return($.client??this.client).post({url:"/databases/{id}/duplicate",...$,headers:{"Content-Type":"application/json",...$.headers}})}importDatabaseTable($){return($.client??this.client).post({url:"/databases/{id}/import",...$,headers:{"Content-Type":"application/json",...$.headers}})}applyDatabaseOps($){return($.client??this.client).post({url:"/databases/{id}/ops",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabasePermissions($){return($.client??this.client).get({url:"/databases/{id}/permissions",...$})}updateDatabasePermissions($){return($.client??this.client).patch({url:"/databases/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseTableChanges($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/changes",...$})}listDatabaseColumnCasts($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/casts",...$})}convertDatabaseColumn($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/conversion",...$,headers:{"Content-Type":"application/json",...$.headers}})}inferDatabaseColumnType($){return($.client??this.client).post({url:"/databases/{id}/tables/{table_id}/columns/{column_id}/infer-type",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDatabaseRowHistory($){return($.client??this.client).get({url:"/databases/{id}/tables/{table_id}/rows/{row_id}/history",...$})}getDatabaseViewPositions($){return($.client??this.client).get({url:"/databases/{id}/views/{view_id}/positions",...$})}listDatabaseWebhooks($){return($.client??this.client).get({url:"/databases/{id}/webhooks",...$})}createDatabaseWebhook($){return($.client??this.client).post({url:"/databases/{id}/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteDatabaseWebhook($){return($.client??this.client).delete({url:"/databases/{id}/webhooks/{webhook_id}",...$})}transcribeDictation($){return($.client??this.client).post({bodySerializer:null,url:"/dictation/transcribe",...$,headers:{"Content-Type":"audio/webm",...$.headers}})}getUserDocumentsHandler($){return($.client??this.client).get({url:"/documents",...$})}createDocument($){return($.client??this.client).post({url:"/documents",...$,headers:{"Content-Type":"application/json",...$.headers}})}createCanvasHandler($){return($.client??this.client).post({url:"/documents/create_canvas",...$,headers:{"Content-Type":"application/json",...$.headers}})}createMarkdownHandler($){return($.client??this.client).post({url:"/documents/create_markdown",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSkillHandler($){return($.client??this.client).post({url:"/documents/create_skill",...$,headers:{"Content-Type":"application/json",...$.headers}})}createSnippetHandler($){return($.client??this.client).post({url:"/documents/create_snippet",...$,headers:{"Content-Type":"application/json",...$.headers}})}createTaskHandler($){return($.client??this.client).post({url:"/documents/create_task",...$,headers:{"Content-Type":"application/json",...$.headers}})}getGithubPullRequestTasks($){return($.client??this.client).post({url:"/documents/github_prs/tasks",...$,headers:{"Content-Type":"application/json",...$.headers}})}initializeUserDocuments($){return($?.client??this.client).post({url:"/documents/initialize_user_documents",...$})}getDocumentListHandler($){return($?.client??this.client).get({url:"/documents/list",...$})}validateDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/validate",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsToken($){return($.client??this.client).post({url:"/documents/permissions_token/{document_id}",...$})}presaveDocumentHandler($){return($.client??this.client).put({url:"/documents/presave/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getBatchPreviewHandler($){return($.client??this.client).post({url:"/documents/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}taskSimilaritySearchHandler($){return($.client??this.client).post({url:"/documents/similarity_search",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentByTeamSlug($){return($.client??this.client).get({url:"/documents/slug/{slug}",...$})}handler($){return($?.client??this.client).get({url:"/documents/starter_docs",...$})}getSystemSkillsHandler($){return($?.client??this.client).get({url:"/documents/system_skills",...$})}deleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}",...$})}getDocument($){return($.client??this.client).get({url:"/documents/{document_id}",...$})}editDocument($){return($.client??this.client).patch({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}saveDocumentHandler($){return($.client??this.client).put({url:"/documents/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentBranchName($){return($.client??this.client).get({url:"/documents/{document_id}/branch_name",...$})}copyDocument($){return($.client??this.client).post({url:"/documents/{document_id}/copy",...$,headers:{"Content-Type":"application/json",...$.headers}})}exportDocument($){return($.client??this.client).get({url:"/documents/{document_id}/export",...$})}getDocumentGithubPullRequests($){return($.client??this.client).get({url:"/documents/{document_id}/github_prs",...$})}getLocationHandler($){return($.client??this.client).get({url:"/documents/{document_id}/location",...$})}getDocumentLocationV3($){return($.client??this.client).get({url:"/documents/{document_id}/location_v3",...$})}permanentlyDeleteDocument($){return($.client??this.client).delete({url:"/documents/{document_id}/permanent",...$})}getDocumentProcessingResult($){return($.client??this.client).get({url:"/documents/{document_id}/processing",...$})}jobProcessingResultHandler($){return($.client??this.client).get({url:"/documents/{document_id}/processing/{job_id}",...$})}revertDeleteDocument($){return($.client??this.client).put({url:"/documents/{document_id}/revert_delete",...$})}getDocumentShortId($){return($.client??this.client).get({url:"/documents/{document_id}/short_id",...$})}simpleSave($){return($.client??this.client).put({url:"/documents/{document_id}/simple_save",...$})}getDocumentTeamShare($){return($.client??this.client).get({url:"/documents/{document_id}/team_share",...$})}setDocumentTeamShare($){return($.client??this.client).put({url:"/documents/{document_id}/team_share",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentTextContent($){return($.client??this.client).get({url:"/documents/{document_id}/text-content",...$})}getDocumentViewsHandler($){return($.client??this.client).get({url:"/documents/{document_id}/views",...$})}getDocumentVersion($){return($.client??this.client).get({url:"/documents/{document_id}/{document_version_id}",...$})}accessRequestsState($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/access-requests",...$})}accessRequestsCancel($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$})}accessRequestsSubmit($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/access-requests/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsResolve($){return($.client??this.client).post({url:"/entities/{entity_type}/{entity_id}/access-requests/{request_id}/resolve",...$,headers:{"Content-Type":"application/json",...$.headers}})}accessRequestsDirect($){return($.client??this.client).get({url:"/entities/{entity_type}/{entity_id}/direct-access",...$})}accessRequestsRemoveDirect($){return($.client??this.client).delete({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$})}accessRequestsSetDirect($){return($.client??this.client).put({url:"/entities/{entity_type}/{entity_id}/direct-access/{user_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getEntityPermission($){return($.client??this.client).get({url:"/entity/{entity_type}/{entity_id}/permissions",...$})}externalChats($){return($?.client??this.client).get({url:"/external-chats",...$})}externalChatAdd($){return($.client??this.client).post({url:"/external-chats",...$,headers:{"Content-Type":"application/json",...$.headers}})}externalChatRemove($){return($.client??this.client).delete({url:"/external-chats/{chat_id}",...$})}externalChat($){return($.client??this.client).get({url:"/external-chats/{chat_id}",...$})}externalChatUpload($){return($.client??this.client).post({...b1,url:"/external-chats/{chat_id}/attachments",...$,headers:{"Content-Type":null,...$.headers}})}externalChatDelivery($){return($.client??this.client).post({url:"/external-chats/{chat_id}/delivery",...$,headers:{"Content-Type":"application/json",...$.headers}})}externalChatMessages($){return($.client??this.client).get({url:"/external-chats/{chat_id}/messages",...$})}externalChatMessageAttachments($){return($.client??this.client).post({url:"/external-chats/{chat_id}/messages/attachments",...$,headers:{"Content-Type":"application/json",...$.headers}})}externalChatMessage($){return($.client??this.client).get({url:"/external-chats/{chat_id}/messages/{message_id}",...$})}externalChatPermissions($){return($.client??this.client).get({url:"/external-chats/{chat_id}/permissions",...$})}externalChatUpdatePermissions($){return($.client??this.client).patch({url:"/external-chats/{chat_id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}externalChatRead($){return($.client??this.client).post({url:"/external-chats/{chat_id}/read",...$,headers:{"Content-Type":"application/json",...$.headers}})}externalChatSends($){return($.client??this.client).get({url:"/external-chats/{chat_id}/sends",...$})}externalChatSend($){return($.client??this.client).post({url:"/external-chats/{chat_id}/sends",...$,headers:{"Content-Type":"application/json",...$.headers}})}listFavorites($){return($?.client??this.client).get({url:"/favorites",...$})}addFavorite($){return($.client??this.client).post({url:"/favorites",...$,headers:{"Content-Type":"application/json",...$.headers}})}reorderFavorites($){return($.client??this.client).patch({url:"/favorites/reorder",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeFavoriteByEntity($){return($.client??this.client).delete({url:"/favorites/{entity_type}/{entity_id}",...$})}getForeignEntityBySource($){return($.client??this.client).get({url:"/foreign_entity/by_source/{source}/{foreign_entity_id}",...$})}getForeignEntity($){return($.client??this.client).get({url:"/foreign_entity/{id}",...$})}listForms($){return($.client??this.client).get({url:"/forms",...$})}createForm($){return($.client??this.client).post({url:"/forms",...$,headers:{"Content-Type":"application/json",...$.headers}})}listAccessibleForms($){return($?.client??this.client).get({url:"/forms/accessible",...$})}getForm($){return($.client??this.client).get({url:"/forms/{id}",...$})}updateForm($){return($.client??this.client).patch({url:"/forms/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}collaborateForm($){return($.client??this.client).post({url:"/forms/{id}/collaboration",...$})}putFormLayout($){return($.client??this.client).put({url:"/forms/{id}/layout",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormPermissions($){return($.client??this.client).get({url:"/forms/{id}/permissions",...$})}updateFormPermissions($){return($.client??this.client).patch({url:"/forms/{id}/permissions",...$,headers:{"Content-Type":"application/json",...$.headers}})}submitFormResponse($){return($.client??this.client).post({url:"/forms/{id}/responses",...$,headers:{"Content-Type":"application/json",...$.headers}})}getMyFormResponse($){return($.client??this.client).get({url:"/forms/{id}/responses/mine",...$})}editMyFormResponse($){return($.client??this.client).put({url:"/forms/{id}/responses/mine",...$,headers:{"Content-Type":"application/json",...$.headers}})}getFormResponseSummary($){return($.client??this.client).get({url:"/forms/{id}/responses/summary",...$})}getFormTally($){return($.client??this.client).get({url:"/forms/{id}/tally",...$})}installSync($){return($?.client??this.client).get({url:"/github/install-sync",...$})}getGithubPullRequestFacets($){return($?.client??this.client).get({url:"/github_pull_requests/facets",...$})}getGithubPullRequest($){return($.client??this.client).get({url:"/github_pull_requests/{id}",...$})}getGithubPullRequestChanges($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes",...$})}getGithubPullRequestChangesPatch($){return($.client??this.client).get({url:"/github_pull_requests/{id}/changes/patch",...$})}createHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings",...$,headers:{"Content-Type":"application/json",...$.headers}})}getHarnessPairing($){return($.client??this.client).get({url:"/harness-pairings/{code}",...$})}approveHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{code}/approve",...$,headers:{"Content-Type":"application/json",...$.headers}})}claimHarnessPairing($){return($.client??this.client).post({url:"/harness-pairings/{pairing_id}/claim",...$,headers:{"Content-Type":"application/json",...$.headers}})}listHarnesses($){return($?.client??this.client).get({url:"/harnesses",...$})}deleteSelfHarness($){return($?.client??this.client).delete({url:"/harnesses/me",...$})}getSelfHarness($){return($?.client??this.client).get({url:"/harnesses/me",...$})}listHarnessAgents($){return($?.client??this.client).get({url:"/harnesses/me/agents",...$})}listHarnessSessions($){return($?.client??this.client).get({url:"/harnesses/me/sessions",...$})}deleteHarness($){return($.client??this.client).delete({url:"/harnesses/{harness_id}",...$})}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getHistoryHandler($){return($?.client??this.client).get({url:"/history",...$})}deleteHistoryHandler($){return($.client??this.client).delete({url:"/history/{item_type}/{item_id}",...$})}upsertHistoryHandler($){return($.client??this.client).post({url:"/history/{item_type}/{item_id}",...$})}listInitiatives($){return($?.client??this.client).get({url:"/initiatives",...$})}createInitiative($){return($.client??this.client).post({url:"/initiatives",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteInitiative($){return($.client??this.client).delete({url:"/initiatives/{initiative_id}",...$})}getInitiative($){return($.client??this.client).get({url:"/initiatives/{initiative_id}",...$})}updateInitiative($){return($.client??this.client).patch({url:"/initiatives/{initiative_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getInstructionsHandler($){return($?.client??this.client).get({url:"/instructions",...$})}createInstructionsHandler($){return($?.client??this.client).post({url:"/instructions",...$})}getItemsSoup($){return($?.client??this.client).get({url:"/items/soup",...$})}postItemsSoup($){return($.client??this.client).post({url:"/items/soup",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAst($){return($.client??this.client).post({url:"/items/soup/ast",...$,headers:{"Content-Type":"application/json",...$.headers}})}postItemsSoupAstGrouped($){return($.client??this.client).post({url:"/items/soup/ast/grouped",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimeline($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}",...$})}entityMessageCreate($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageDeleteMessage($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageGetMessage($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$})}entityMessageEdit($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/items/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageReact($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/items/{id}/reactions",...$,headers:{"Content-Type":"application/json",...$.headers}})}entityMessageLegacy($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/legacy/{legacy_id}",...$})}entityMessageDeleteThread($){return($.client??this.client).delete({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessageGetThread($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$})}entityMessagePatchThread($){return($.client??this.client).patch({url:"/messages/{parent_type}/{parent_id}/threads/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}messageTimelineEntries($){return($.client??this.client).get({url:"/messages/{parent_type}/{parent_id}/timeline",...$})}entityMessageTyping($){return($.client??this.client).post({url:"/messages/{parent_type}/{parent_id}/typing",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPinsHandler($){return($?.client??this.client).get({url:"/pins",...$})}reorderPinsHandler($){return($.client??this.client).patch({url:"/pins",...$,headers:{"Content-Type":"application/json",...$.headers}})}removePinHandler($){return($.client??this.client).delete({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}addPinHandler($){return($.client??this.client).post({url:"/pins/{pinned_item_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getProjectsHandler($){return($?.client??this.client).get({url:"/projects",...$})}createProjectHandler($){return($.client??this.client).post({url:"/projects",...$,headers:{"Content-Type":"application/json",...$.headers}})}getPendingProjectsHandler($){return($?.client??this.client).get({url:"/projects/pending",...$})}getBatchProjectPreview($){return($.client??this.client).post({url:"/projects/preview",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadFolderHandler($){return($.client??this.client).post({url:"/projects/upload",...$,headers:{"Content-Type":"application/json",...$.headers}})}uploadExtractFolderHandler($){return($.client??this.client).post({url:"/projects/upload_extract",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteProjectHandler($){return($.client??this.client).delete({url:"/projects/{id}",...$})}getProjectHandler($){return($.client??this.client).get({url:"/projects/{id}",...$})}getProjectUserAccessLevel($){return($.client??this.client).get({url:"/projects/{id}/access_level",...$})}getProjectContentHandler($){return($.client??this.client).get({url:"/projects/{id}/content",...$})}permanentlyDeleteProject($){return($.client??this.client).delete({url:"/projects/{id}/permanent",...$})}getProjectPermissionsV2($){return($.client??this.client).get({url:"/projects/{id}/permissions",...$})}revertDeleteProject($){return($.client??this.client).put({url:"/projects/{id}/revert_delete",...$})}recentlyDeleted($){return($?.client??this.client).get({url:"/recents/deleted",...$})}listEmailReminders($){return($?.client??this.client).get({url:"/reminders/email/collection",...$})}getEmailFollowup($){return($.client??this.client).get({url:"/reminders/email/{thread_id}",...$})}setEmailFollowup($){return($.client??this.client).put({url:"/reminders/email/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getViewsHandler($){return($?.client??this.client).get({url:"/saved_views",...$})}createViewHandler($){return($.client??this.client).post({url:"/saved_views",...$,headers:{"Content-Type":"application/json",...$.headers}})}excludeDefaultViewHandler($){return($.client??this.client).post({url:"/saved_views/exclude_default",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteViewHandler($){return($.client??this.client).delete({url:"/saved_views/{saved_view_id}",...$})}patchViewHandler($){return($.client??this.client).patch({url:"/saved_views/{saved_view_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listSlackImports($){return($?.client??this.client).get({url:"/slack/imports",...$})}createSlackImport($){return($.client??this.client).post({url:"/slack/imports",...$,headers:{"Content-Type":"application/json",...$.headers}})}getSlackImport($){return($.client??this.client).get({url:"/slack/imports/{job_id}",...$})}cancelSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/cancel",...$})}finalizeSlackImport($){return($.client??this.client).post({url:"/slack/imports/{job_id}/finalize",...$})}registerSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads",...$,headers:{"Content-Type":"application/json",...$.headers}})}completeSlackImportUploads($){return($.client??this.client).post({url:"/slack/imports/{job_id}/uploads/complete",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkWakeupSyncServiceDocuments($){return($.client??this.client).post({url:"/sync_service/wakeup",...$,headers:{"Content-Type":"application/json",...$.headers}})}editThreadV2($){return($.client??this.client).patch({url:"/threads/{thread_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}listUserApiKeys($){return($?.client??this.client).get({url:"/user-api-keys",...$})}createUserApiKey($){return($.client??this.client).post({url:"/user-api-keys",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserApiKey($){return($.client??this.client).delete({url:"/user-api-keys/{id}",...$})}deleteUserDocumentViewLocation($){return($.client??this.client).delete({url:"/user_document_view_location/{document_id}",...$})}getUserDocumentViewLocation($){return($.client??this.client).get({url:"/user_document_view_location/{document_id}",...$})}upsertUserDocumentViewLocation($){return($.client??this.client).post({url:"/user_document_view_location/{document_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}getDocumentPermissionsV2($){return($.client??this.client).get({url:"/v2/documents/{document_id}/permissions",...$})}editProjectV2($){return($.client??this.client).patch({url:"/v2/projects/{id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}streamEvents($){return($.client??this.client).sse.get({url:"/webhook/events/stream",...$})}listWebhooks($){return($?.client??this.client).get({url:"/webhook/webhooks",...$})}createWebhook($){return($.client??this.client).post({url:"/webhook/webhooks",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteWebhook($){return($.client??this.client).delete({url:"/webhook/webhooks/{webhook_id}",...$})}getWebhook($){return($.client??this.client).get({url:"/webhook/webhooks/{webhook_id}",...$})}patchWebhook($){return($.client??this.client).patch({url:"/webhook/webhooks/{webhook_id}",...$,headers:{"Content-Type":"application/json",...$.headers}})}validateWebhook($){return($.client??this.client).post({url:"/webhook/webhooks/{webhook_id}/validate",...$})}whatsappAccount($){return($?.client??this.client).get({url:"/whatsapp/account",...$})}whatsappChats($){return($?.client??this.client).get({url:"/whatsapp/chats",...$})}whatsappConnect($){return($.client??this.client).post({url:"/whatsapp/connect",...$,headers:{"Content-Type":"application/json",...$.headers}})}whatsappDisconnect($){return($.client??this.client).post({url:"/whatsapp/disconnect",...$,headers:{"Content-Type":"application/json",...$.headers}})}whatsappImportHistory($){return($?.client??this.client).post({url:"/whatsapp/history-import",...$})}whatsappStartLookup($){return($.client??this.client).post({url:"/whatsapp/lookups",...$,headers:{"Content-Type":"application/json",...$.headers}})}whatsappLookup($){return($.client??this.client).get({url:"/whatsapp/lookups/{id}",...$})}whatsappCancelPairing($){return($.client??this.client).delete({url:"/whatsapp/pairing/{id}",...$})}whatsappPairing($){return($.client??this.client).get({url:"/whatsapp/pairing/{id}",...$})}whatsappPasskey($){return($.client??this.client).post({url:"/whatsapp/pairing/{id}/passkey",...$,headers:{"Content-Type":"application/json",...$.headers}})}}function C7({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Q,url:L,...G}){let J,I=Q??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let P=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)P.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:P,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`
-`);let y=U.split(`
-
-`);U=y.pop()??"";for(let a of y){let i=a.split(`
-`),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let C,h=!1;if(F.length){let R=F.join(`
-`);try{C=JSON.parse(R),h=!0}catch{C=R}}if(h){if(S)await S(C);if(x)C=await x(C)}if(j?.({data:C,event:v,id:J,retry:V}),F.length)yield C}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var q9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},w9=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},f9=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},v0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Q)=>encodeURIComponent(Q))).join(w9(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=q9(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return hO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},hO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},h0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Q=[];Object.entries(S).forEach(([G,J])=>{Q=[...Q,G,$?J:encodeURIComponent(J)]});let L=Q.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=f9(x),X=Object.entries(S).map(([Q,L])=>hO({allowReserved:$,name:x==="deepObject"?`${j}[${Q}]`:Q,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var b9=/\{[^{}]+\}/g,k9=({path:$,url:O})=>{let j=O,x=O.match(b9);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Q=$[Z];if(Q===void 0||Q===null)continue;if(Array.isArray(Q)){j=j.replace(S,v0({explode:K,name:Z,style:X,value:Q}));continue}if(typeof Q==="object"){j=j.replace(S,h0({explode:K,name:Z,style:X,value:Q,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${hO({name:Z,value:Q})}`);continue}let L=encodeURIComponent(X==="label"?`.${Q}`:Q);j=j.replace(S,L)}return j},M7=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=k9({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function h1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var A7=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var P7={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var F7=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Q=v0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Q)S.push(Q)}else if(typeof Z==="object"){let Q=h0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Q)S.push(Q)}else{let Q=hO({allowReserved:X.allowReserved,name:K,value:Z});if(Q)S.push(Q)}}return S.join("&")}},E7=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},g9=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function q7($){for(let O of $.security??[]){if(g9($,O.name))continue;let j=await A7(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var m1=($)=>M7({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:F7($.querySerializer),url:$.url}),u1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=u0($.headers,O.headers),j},y9=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},u0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?y9(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class m0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var w7=()=>({error:new m0,request:new m0,response:new m0}),v9=F7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),h9={"Content-Type":"application/json"},Bj=($={})=>({...P7,headers:h9,parseAs:"auto",querySerializer:v9,...$});var c1=($={})=>{let O=u1(Bj(),$),j=()=>({...O}),x=(G)=>{return O=u1(O,G),j()},S=w7(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:u0(O.headers,G.headers),serializedBody:void 0};if(J.security)await q7(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=m1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:h1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let P=V.fetch;W=await P(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?E7(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Q=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return C7({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:h1(I),url:z})};return{buildUrl:(G)=>m1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Q("CONNECT"),delete:Q("DELETE"),get:Q("GET"),head:Q("HEAD"),options:Q("OPTIONS"),patch:Q("PATCH"),post:Q("POST"),put:Q("PUT"),trace:Q("TRACE")},trace:X("TRACE")}};var f7=c1(Bj());class b7{client;constructor($){this.client=$?.client??f7}}class k7{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class c0 extends b7{static __registry=new k7;constructor($){super($);c0.__registry.set(this,$?.key)}proxyRequestHandler($){return($.client??this.client).get({url:"/proxy",...$})}getUnfurl($){return($.client??this.client).get({url:"/unfurl",...$})}getUnfurlBulk($){return($.client??this.client).post({url:"/unfurl/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}}var g7={dev:"https://dev.macro.com",prod:"https://macro.com",local:"http://localhost:3000"},d1={dev:{"agent-harness":"https://dev-gateway.macro.com/agent-harness",storage:"https://dev-gateway.macro.com/dss",auth:"https://dev-gateway.macro.com/auth",email:"https://dev-gateway.macro.com/email",calendar:"https://dev-gateway.macro.com/calendar",cognition:"https://dev-gateway.macro.com/cognition",notification:"https://dev-gateway.macro.com/notification",properties:"https://dev-gateway.macro.com/dss",search:"https://dev-gateway.macro.com/dss","scheduled-action":"https://dev-gateway.macro.com/scheduled-action","static-files":"https://static-file-service-dev.macro.com",connection:"https://dev-gateway.macro.com/connection-gateway",contacts:"https://dev-gateway.macro.com/contacts",unfurl:"https://dev-gateway.macro.com/unfurl"},prod:{"agent-harness":"https://gateway.macro.com/agent-harness",storage:"https://gateway.macro.com/dss",auth:"https://gateway.macro.com/auth",email:"https://gateway.macro.com/email",calendar:"https://gateway.macro.com/calendar",cognition:"https://gateway.macro.com/cognition",notification:"https://gateway.macro.com/notification",properties:"https://gateway.macro.com/dss",search:"https://gateway.macro.com/dss","scheduled-action":"https://gateway.macro.com/scheduled-action","static-files":"https://static-file-service.macro.com",connection:"https://gateway.macro.com/connection-gateway",contacts:"https://gateway.macro.com/contacts",unfurl:"https://gateway.macro.com/unfurl"},local:{"agent-harness":"http://localhost:8101",storage:"http://localhost:8086",auth:"http://localhost:8080",email:"http://localhost:8087",calendar:"http://localhost:8088/calendar",cognition:"http://localhost:8101/cognition",notification:"http://localhost:8089",properties:"http://localhost:8086",search:"http://localhost:8086","scheduled-action":"http://localhost:8101/scheduled-action","static-files":"http://localhost:8100",connection:"http://localhost:8082",contacts:"http://localhost:8083",unfurl:"http://localhost:8095"}};function m9($,O){let j=O?.channel_id;return O&&j?{channel:b.byId($,j),thread:new h$($,j,O.thread_id)}:{channel:void 0,thread:void 0}}function q$($,O){return{session:d.byId($,O.session_id),owner:M.byId($,O.owner_id),...m9($,O.origin)}}function mO($,O,j){let x=O.origin?.channel_id;return x&&j?o.byId($,x,j):void 0}function uO($,O){return O?M.byId($,O):void 0}function y7($,O){return k(O).with({event_type:"agent_session.opened"},({metadata:j})=>({event_type:"agent_session.opened",metadata:j,...q$($,j.identity)})).with({event_type:"agent_session.turn_started"},({metadata:j})=>({event_type:"agent_session.turn_started",metadata:j,...q$($,j.identity),actor:uO($,j.actor),announcement:mO($,j.identity,j.announcement_message_id)})).with({event_type:"agent_session.turn_ended"},({metadata:j})=>({event_type:"agent_session.turn_ended",metadata:j,...q$($,j.identity),actor:uO($,j.actor),announcement:mO($,j.identity,j.announcement_message_id)})).with({event_type:"agent_session.command_rejected"},({metadata:j})=>({event_type:"agent_session.command_rejected",metadata:j,...q$($,j.identity),actor:uO($,j.actor),announcement:mO($,j.identity,j.announcement_message_id)})).with({event_type:"agent_session.settled"},({metadata:j})=>({event_type:"agent_session.settled",metadata:j,...q$($,j.identity),actor:uO($,j.last_turn?.actor),announcement:mO($,j.identity,j.last_turn?.announcement_message_id)})).with({event_type:"agent_session.waiting_for_input"},({metadata:j})=>({event_type:"agent_session.waiting_for_input",metadata:j,...q$($,j.identity),announcement:mO($,j.identity,j.announcement_message_id)})).with({event_type:"agent_session.input_received"},({metadata:j})=>({event_type:"agent_session.input_received",metadata:j,...q$($,j.identity)})).with({event_type:"agent_session.mentioned"},({metadata:j})=>({event_type:"agent_session.mentioned",metadata:j,...q$($,j.identity),mentionedBy:uO($,j.mentioned_by),mentioned:j.mentioned.map((x)=>M.byId($,x))})).with({event_type:"agent_session.stopped"},({metadata:j})=>({event_type:"agent_session.stopped",metadata:j,...q$($,j.identity),actor:uO($,j.turn_in_flight?.actor),announcement:mO($,j.identity,j.turn_in_flight?.announcement_message_id)})).with({event_type:"agent_session.renamed"},({metadata:j})=>({event_type:"agent_session.renamed",metadata:j,...q$($,j.identity)})).with({event_type:"agent_session.deleted"},({metadata:j})=>({event_type:"agent_session.deleted",metadata:j,...q$($,j.identity)})).exhaustive((j)=>{console.warn("macro sdk: unknown agent session event",j);return})}var v7="macro|";function M$($,O){return O.startsWith(v7)&&O.length>v7.length?M.byId($,O.toLowerCase()):void 0}function h7($,O){return k(O).with({event_type:"channel.created"},({metadata:j})=>({event_type:"channel.created",metadata:j,channel:b.byId($,j.channel_id),actor:M$($,j.actor),participants:j.participant_user_ids.map((x)=>M.byId($,x))})).with({event_type:"channel.updated"},({metadata:j})=>({event_type:"channel.updated",metadata:j,channel:b.byId($,j.channel_id),actor:M$($,j.actor)})).with({event_type:"channel.deleted"},({metadata:j})=>({event_type:"channel.deleted",metadata:j,channel:b.byId($,j.channel_id),actor:M$($,j.actor)})).with({event_type:"channel.picture_changed"},({metadata:j})=>({event_type:"channel.picture_changed",metadata:j,channel:b.byId($,j.channel_id),actor:M$($,j.actor)})).with({event_type:"channel.participant_added"},({metadata:j})=>({event_type:"channel.participant_added",metadata:j,channel:b.byId($,j.channel_id),addedBy:M$($,j.added_by),addedUsers:j.added_user_ids.map((x)=>M.byId($,x))})).with({event_type:"channel.participant_removed"},({metadata:j})=>({event_type:"channel.participant_removed",metadata:j,channel:b.byId($,j.channel_id),removedBy:M.byId($,j.removed_by),removedUsers:j.removed_user_ids.map((x)=>M.byId($,x))})).exhaustive((j)=>{console.warn("macro sdk: unknown channel event",j);return})}function m7($,O){return k(O).with({event_type:"document.created"},({metadata:j})=>({event_type:"document.created",metadata:j,document:f.byId($,j.document_id),owner:M.byId($,j.owner),project:j.project_id?n.byId($,j.project_id):void 0})).with({event_type:"document.updated"},({metadata:j})=>({event_type:"document.updated",metadata:j,document:f.byId($,j.document_id),owner:M.byId($,j.owner),actor:j.actor_user_id?M.byId($,j.actor_user_id):void 0,project:j.project_id?n.byId($,j.project_id):void 0,previousProject:j.previous_project_id?n.byId($,j.previous_project_id):void 0})).with({event_type:"document.deleted"},({metadata:j})=>({event_type:"document.deleted",metadata:j,document:f.byId($,j.document_id),actor:j.actor_user_id?M.byId($,j.actor_user_id):void 0,project:j.project_id?n.byId($,j.project_id):void 0})).with({event_type:"document.content_uploaded"},({metadata:j})=>({event_type:"document.content_uploaded",metadata:j,document:f.byId($,j.document_id),owner:M.byId($,j.owner)})).with({event_type:"document.sync_content_updated"},({metadata:j})=>({event_type:"document.sync_content_updated",metadata:j,document:f.byId($,j.document_id)})).with({event_type:"document.purged"},({metadata:j})=>({event_type:"document.purged",metadata:j,document:f.byId($,j.document_id)})).with({event_type:"document.copied"},({metadata:j})=>({event_type:"document.copied",metadata:j,document:f.byId($,j.document_id),sourceDocument:f.byId($,j.source_document_id),owner:M.byId($,j.owner),project:j.project_id?n.byId($,j.project_id):void 0})).with({event_type:"document.interaction"},({metadata:j})=>({event_type:"document.interaction",metadata:j,document:f.byId($,j.document_id)})).exhaustive((j)=>{console.warn("macro sdk: unknown document event",j);return})}function cO($,O,j=[]){let x=O.parent;if(x.type==="call")return{type:"call",call:J$.byId($,x.id),message:u$.byId($,x.id,O.message_id),threadId:x.id};if(x.type==="channel")return{type:"channel",channel:b.byId($,x.id),message:o.byId($,x.id,O.message_id,j),thread:O.thread_id?new h$($,x.id,O.thread_id):void 0};return{type:"document",document:f.byId($,x.id),comment:l$.byId($,x.id,O.message_id),threadId:O.root_id}}function u7($,O){return k(O).with({event_type:"message.posted"},({metadata:j})=>({event_type:"message.posted",metadata:j,target:cO($,j,j.mentions),sender:M$($,j.sender)})).with({event_type:"message.mentioned"},({metadata:j})=>({event_type:"message.mentioned",metadata:j,target:cO($,j),sender:M$($,j.sender)})).with({event_type:"message.patched"},({metadata:j})=>({event_type:"message.patched",metadata:j,target:cO($,j),actor:M$($,j.actor)})).with({event_type:"message.deleted"},({metadata:j})=>({event_type:"message.deleted",metadata:j,target:cO($,j),actor:M$($,j.actor)})).with({event_type:"message.attachment_created"},({metadata:j})=>({event_type:"message.attachment_created",metadata:j,target:cO($,j),actor:M$($,j.actor)})).with({event_type:"message.attachment_removed"},({metadata:j})=>({event_type:"message.attachment_removed",metadata:j,target:cO($,j),actor:M$($,j.actor)})).exhaustive((j)=>{console.warn("macro sdk: unknown message event",j);return})}async function c7($){let O=new TextEncoder,j=await crypto.subtle.importKey("raw",O.encode($.secret),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),x=await crypto.subtle.sign("HMAC",j,O.encode(`${$.timestamp}.${$.rawBody}`));return`v1=${new Uint8Array(x).toHex()}`===$.signature}var u9="webhook.validation.test";function c9($,O){return k(O).with({event_type:t.string.startsWith("document.")},(j)=>m7($,j)).with({event_type:t.string.startsWith("channel.")},(j)=>h7($,j)).with({event_type:t.string.startsWith("message.")},(j)=>u7($,j)).with({event_type:t.string.startsWith("agent_session.")},(j)=>y7($,j)).otherwise(()=>{return})}class l1{client;secret;handlers=new Map;constructor($,O){this.client=$;this.secret=O}on($,O){let j=this.handlers.get($)??new Set;return j.add(O),this.handlers.set($,j),()=>j.delete(O)}onSelfMention($){return this.on("message.mentioned",async(O)=>{if(O.metadata.mentioned.entity_id.toLowerCase()!==(await this.client.myPrincipalId()).toLowerCase())return;await $(O)})}async listen($={}){let O=$.filters??this.filtersFromHandlers();if(O.length===0||O.every((K)=>K.events.length===0))throw new w("listen() needs filters — pass filters or register handlers with .on() first");let j=new AbortController;if($.signal)if($.signal.aborted)j.abort();else $.signal.addEventListener("abort",()=>j.abort(),{once:!0});let{stream:x}=await this.client.storage.streamEvents({query:{scope:$.scope??"user",filters:JSON.stringify(O)},signal:j.signal});return(async()=>{try{for await(let K of x)await this.dispatchEvent(K)}catch{if(j.signal.aborted)return;throw new w("event stream failed")}})().catch(()=>{}),()=>{j.abort()}}async handle($,O){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");if(!await c7({secret:this.secret,timestamp:O.timestamp??"",rawBody:$,signature:O.signature??""}))throw new w("invalid webhook signature");if(O.event===u9)return;await this.dispatchEvent(JSON.parse($))}webhook(){if(!this.secret)throw new w("webhookSecret is required to verify incoming webhook deliveries");return async($)=>{return await this.handle(await $.text(),{event:$.headers.get("x-macro-event")??void 0,eventId:$.headers.get("x-macro-event-id")??void 0,timestamp:$.headers.get("x-macro-timestamp")??void 0,signature:$.headers.get("x-macro-signature")??void 0}),new Response("ok")}}filtersFromHandlers(){let $=[...this.handlers.entries()].filter(([,O])=>O.size>0).map(([O])=>O);return $.length>0?[{events:$}]:[]}async dispatchEvent($){let O=typeof $==="string"?JSON.parse($):$;if(O===null||typeof O!=="object"||!("event_type"in O))return;let j=O,x=this.handlers.get(j.event_type);if(!x||x.size===0)return;let S=c9(this.client,j);if(!S)return;await Promise.all([...x].map((K)=>K(S)))}}function d7(){return}var d9=0,r1;function l9($){r1=$}function I$($,O,j){if(!j&&!r1)return $;let x=(S)=>{for(let K of[r1,j])try{Promise.resolve(K?.(S)).catch(()=>{})}catch{}};return new Proxy($,{get(S,K,Z){let X=Reflect.get(S,K,Z);if(typeof K!=="string"||typeof X!=="function")return X;return async(...Q)=>{let L={id:++d9,service:O,operation:K};x({...L,status:"started"});try{let G=await Reflect.apply(X,S,Q),J=G!==null&&typeof G==="object"&&"error"in G&&G.error!=null;return x({...L,status:J?"failed":"completed"}),G}catch(G){throw x({...L,status:"failed"}),G}}}})}var r7="x-macro-user-api-key",r9="mak_",p1="mbot_";function p9($){return k($).with(t.string.startsWith(p1),()=>{throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.")}).with(t.string.startsWith(r9),(O)=>[r7,O]).otherwise((O)=>["Authorization",`Bearer ${O}`])}async function l7($){return typeof $==="function"?await $():$}async function a9($,O,j){return k($).with({type:"bot"},async(x)=>{let S=await l7(x.token);if(!S.startsWith(p1))throw Error("user API key passed as a bot token. Use auth: { type: 'user', apiKey } or MACRO_API_KEY.");let K=[["x-macro-bot-token",S]];if(!j?.hasBotScope)K.push(["x-macro-bot-scope",x.scope??(O?"user":"team")]);if(O)K.push(["x-macro-bot-for-macro-user-id",O]);return K}).with({type:"user",apiKey:t.string},({apiKey:x})=>{if(x.startsWith(p1))throw Error("bot token passed as a user credential. Use auth: { type: 'bot', token } or MACRO_BOT_TOKEN.");return[[r7,x]]}).with({type:"user"},async({token:x})=>{return[p9(await l7(x))]}).exhaustive()}class a1{scheduledAction;unfurl;agentHarness;auth;calendar;cognition;contacts;email;notification;properties;search;storage;webAppUrl;wsVerify;events;authConfig;hosts;localPortmap;requestedAs;selfBotRecord;selfPrincipal;constructor($){let O=i9($),j=O==="local"?d7():void 0,x={...d1[O],...j?.hosts,...$.hosts};this.hosts=x,this.localPortmap=j;let S=typeof process<"u"?{}.MACRO_WEB_URL:void 0;if(this.webAppUrl=$.webAppUrl??S??j?.webAppUrl??g7[O],this.authConfig=n9($),this.requestedAs=$.requestedAs,this.requestedAs&&this.authConfig.type!=="bot")throw Error("requestedAs() requires bot auth — a user token always acts as its own user");this.wsVerify=$.wsVerify,this.scheduledAction=I$(new A0({client:this.makeClient(x["scheduled-action"])}),"scheduled-action",$.onRequest),this.unfurl=I$(new c0({client:this.makeClient(x.unfurl)}),"unfurl",$.onRequest),this.agentHarness=I$(new uj({client:this.makeClient(x["agent-harness"])}),"agent-harness",$.onRequest),this.auth=I$(new pj({client:this.makeClient(x.auth)}),"auth",$.onRequest),this.calendar=I$(new tj({client:this.makeClient(x.calendar)}),"calendar",$.onRequest),this.cognition=I$(new j0({client:this.makeClient(x.cognition)}),"cognition",$.onRequest),this.contacts=I$(new K0({client:this.makeClient(x.contacts)}),"contacts",$.onRequest),this.email=I$(new V0({client:this.makeClient(x.email)}),"email",$.onRequest),this.notification=I$(new U0({client:this.makeClient(x.notification)}),"notification",$.onRequest),this.properties=I$(new R0({client:this.makeClient(x.properties)}),"properties",$.onRequest),this.search=I$(new w0({client:this.makeClient(x.search)}),"search",$.onRequest),this.storage=I$(new y0({client:this.makeClient(x.storage)}),"storage",$.onRequest);let K=typeof process<"u"?{}.MACRO_WEBHOOK_SECRET:void 0,Z=$.webhookSecret??K;this.events=new l1(this,Z)}hasActingUser(){return this.authConfig.type==="user"||this.requestedAs!==void 0}selfBot(){return this.selfBotRecord??=new iO(this).me().catch(($)=>{throw this.selfBotRecord=void 0,$}),this.selfBotRecord}myPrincipalId(){return this.selfPrincipal??=(this.authConfig.type==="bot"?this.selfBot().then(($)=>`bot|${$.id}`):M.me(this).then(($)=>$.id)).catch(($)=>{throw this.selfPrincipal=void 0,$}),this.selfPrincipal}makeClient($){let O=Wj({baseUrl:$});return O.interceptors.request.use(async(j)=>{let x=await a9(this.authConfig,this.requestedAs,{hasBotScope:j.headers.has("x-macro-bot-scope")});for(let[S,K]of x)j.headers.set(S,K);return j}),O}}function i9($){if($.env)return $.env;let O=typeof process<"u"?{}.MACRO_ENV:void 0;if(!O)return"prod";if(!(O in d1))throw Error(`invalid MACRO_ENV "${O}" — expected local, dev, or prod`);return O}function n9($){if($.auth)return $.auth;if($.token)return{type:"user",token:$.token};let O=typeof process<"u"?{}.MACRO_API_KEY:void 0,j=typeof process<"u"?{}.MACRO_BOT_TOKEN:void 0;if(O&&j)throw Error("both MACRO_API_KEY and MACRO_BOT_TOKEN are set — pass auth to new Macro() to pick one");if(j)return{type:"bot",token:j};return{type:"user",token:O??(()=>{throw Error("no Macro credential. Set MACRO_API_KEY (API key or bearer token) or MACRO_BOT_TOKEN, or pass token/auth to new Macro().")})}}class i1{id;constructor($){this.id=$}static byId($){return new i1($)}toJSON(){return{id:this.id}}}class p7{routines;unfurls;agents;initiatives;apiKeys;harnesses;meetings;githubPullRequests;entityMentions;agentSessions;ai;bots;calendar;calls;channels;externalChats;whatsapp;chats;crm;databases;documents;email;favorites;foreignEntities;forms;images;me;notifications;pins;projects;properties;referrals;tasks;teams;users;webhooks;workspace;events;webAppUrl;_client;opts;constructor($){this.opts=$;let O=new a1($);this._client=O,this.routines=new yx(O),this.unfurls=new mx(O),this.agents=new o0(O),this.initiatives=new Px(O),this.apiKeys=new Ox(O),this.me=new fj(O),this.harnesses=new Mx(O),this.meetings=new Fx(O),this.githubPullRequests=new Cx(O),this.entityMentions=new zx(O),this.agentSessions=new e0(O),this.ai=new $x(O),this.bots=new iO(O),this.calendar=new jx(O),this.calls=new xx(O),this.channels=new Zx(O),this.externalChats=new Hx(O),this.whatsapp=new dx(O),this.chats=new Xx(O),this.crm=new Qx(O),this.databases=new Bx(O),this.documents=new Lx(O),this.email=new Ux(O),this.favorites=new Tx(O),this.foreignEntities=new Rx(O),this.forms=new Dx(O),this.images=new Ax(O),this.notifications=new Ex(O),this.pins=new qx(O),this.projects=new wx(O),this.properties=new fx(O),this.referrals=new bx(O),this.tasks=new vx(O),this.teams=new hx(O),this.users=new ux(O),this.webhooks=new cx(O),this.workspace=new ax(O),this.events=O.events,this.webAppUrl=O.webAppUrl}myPrincipalId(){return this._client.myPrincipalId()}requestedAs($){return new p7({...this.opts,requestedAs:$.id})}}export{o$ as wrapXml,O$ as toBody,l9 as observeRequests,J5 as msg,G5 as here,NO as WhatsAppChat,AO as WhatsAppAccount,OO as UserApiKey,aO as ToolApproval,HO as TeamInvite,CO as StaticImage,N$ as SessionReview,gx as RoutineExecution,v$ as Routine,t0 as ReviewItem,_x as PullRequestChangeset,Dj as PipelineView,Rj as PipelineTable,JO as PipelineRow,_j as PipelineColumn,L$ as MessageThread,D$ as Meeting,fj as MeNamespace,Wx as MacroOpRefusedError,p7 as Macro,a$ as Initiative,_O as HarnessPairing,B$ as Harness,DO as GithubPullRequest,wj as GeneratedImage,p$ as FormSection,RO as FormResponse,qj as FormReference,r$ as FormQuestion,UO as FormOption,y$ as Form,ZO as ExternalChatUpload,XO as ExternalChatSend,SO as ExternalChatParticipant,C$ as ExternalChatMessage,g$ as ExternalChat,TO as EntityMention,$$ as EntityAccess,LO as EmailFilter,BO as EmailDraft,$j as DraftAttachment,oO as DocumentVersion,VO as DocumentAnchor,Oj as DevicePairing,jO as CrmPipeline,n0 as ConversationTurn,pO as CodeExecution,tO as ChatMessage,sO as ChatGeneration,i1 as ChannelPicture,GO as ChannelActivity,zj as AgentConversation,T$ as Agent,IO as AccessRequest};
diff --git a/crates/code_mode_assets/AGENTS.md b/crates/code_mode_assets/AGENTS.md
new file mode 100644
index 0000000000..a1e26326c4
--- /dev/null
+++ b/crates/code_mode_assets/AGENTS.md
@@ -0,0 +1,40 @@
+# code_mode_assets
+
+## What it is
+
+Agent code mode's generated assets: the public SDK and Handlebars bundled for
+Deno, the agent SDK documentation catalog, and the SDK operation labels. They are
+built from `packages/sdk` when this crate compiles and are never committed.
+
+## How it works
+
+`build.rs` takes the assets from exactly one place:
+
+- `CODE_MODE_ASSETS_DIR` set (Nix builds and Rust CI): that directory, built by
+ the `code-mode-assets` flake package from the Nix `node_modules`.
+- Unset (local cargo): it runs `packages/code-mode-sdk/scripts/generate.ts` with
+ `bun` into `OUT_DIR`, rerunning when SDK, generator or lockfile sources change.
+
+A failed run or a missing file fails the build; there is no stale fallback.
+
+## Scope
+
+- Owns: building and embedding the assets.
+- Not here: the generator (`packages/code-mode-sdk`), process isolation
+ (`crates/code_execution`), documentation selection (`crates/agent_code_mode`).
+
+## Checks
+
+- `cargo build -p code_mode_assets` after `bun install --frozen-lockfile` at the
+ repository root and in `packages/sdk`.
+- `nix build --no-link .#code-mode-assets` after changing the generator's inputs
+ or `nix/cloud-storage.nix`.
+
+## Gotchas
+
+- A new generator input outside `GENERATOR_INPUTS` in `build.rs` or the
+ `codeModeAssetsSrc` filter in `nix/cloud-storage.nix` leaves cargo or Nix
+ builds stale; add it to both.
+- Compiling this crate (and every dependent, including DSS and the agent
+ harness) needs bun and both `node_modules` installs unless
+ `CODE_MODE_ASSETS_DIR` is set.
diff --git a/crates/code_mode_assets/CLAUDE.md b/crates/code_mode_assets/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/crates/code_mode_assets/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/crates/code_mode_assets/Cargo.toml b/crates/code_mode_assets/Cargo.toml
new file mode 100644
index 0000000000..2ff0971802
--- /dev/null
+++ b/crates/code_mode_assets/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "code_mode_assets"
+version = "0.1.0"
+edition = "2024"
+publish = false
+description = "The Deno SDK bundles and agent documentation code mode embeds, generated from the public SDK at build time."
+
+[dependencies]
+workspace-hack = { version = "0.1", path = "../workspace-hack" }
diff --git a/crates/code_mode_assets/build.rs b/crates/code_mode_assets/build.rs
new file mode 100644
index 0000000000..d2eaf1d5de
--- /dev/null
+++ b/crates/code_mode_assets/build.rs
@@ -0,0 +1,84 @@
+//! Supplies the code-mode assets from exactly one place per build: the
+//! directory in `CODE_MODE_ASSETS_DIR` when the build provides them prebuilt
+//! (Nix and CI), otherwise a fresh run of `packages/code-mode-sdk`'s generator
+//! into `OUT_DIR`. A failed run or a missing asset fails the build.
+
+use std::env;
+use std::io;
+use std::path::PathBuf;
+use std::process::{Command, Stdio};
+
+const PREBUILT: &str = "CODE_MODE_ASSETS_DIR";
+
+const GENERATOR: &str = "packages/code-mode-sdk/scripts/generate.ts";
+
+/// Everything the generator reads, relative to the repository root. TypeDoc
+/// compiles every file `packages/sdk/tsconfig.json` includes.
+const GENERATOR_INPUTS: [&str; 17] = [
+ "bun.lock",
+ "package.json",
+ "packages/code-mode-sdk/package.json",
+ "packages/code-mode-sdk/scripts",
+ "packages/code-mode-sdk/src",
+ "packages/sdk-docs/package.json",
+ "packages/sdk-docs/pages",
+ "packages/sdk-docs/src",
+ "packages/sdk/bun.lock",
+ "packages/sdk/generated",
+ "packages/sdk/openapi-ts.config.ts",
+ "packages/sdk/package.json",
+ "packages/sdk/scripts",
+ "packages/sdk/services.ts",
+ "packages/sdk/src",
+ "packages/sdk/tests",
+ "packages/sdk/tsconfig.json",
+];
+
+fn main() {
+ println!("cargo::rerun-if-env-changed={PREBUILT}");
+
+ let directory = match env::var_os(PREBUILT) {
+ Some(directory) => PathBuf::from(directory),
+ None => generate(),
+ };
+
+ // `include_str!` resolves a relative path against `src/`, not the caller.
+ assert!(
+ directory.is_absolute(),
+ "{PREBUILT} must be an absolute path, got {}",
+ directory.display()
+ );
+
+ println!("cargo::rustc-env=CODE_MODE_ASSETS={}", directory.display());
+}
+
+fn generate() -> PathBuf {
+ let manifest =
+ PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").expect("cargo sets CARGO_MANIFEST_DIR"));
+ let root = manifest.join("../..");
+ let output = PathBuf::from(env::var_os("OUT_DIR").expect("cargo sets OUT_DIR"));
+
+ for input in GENERATOR_INPUTS {
+ println!("cargo::rerun-if-changed={}", root.join(input).display());
+ }
+
+ // Cargo reads build script stdout as directives, so the generator logs to stderr.
+ let status = Command::new("bun")
+ .arg(GENERATOR)
+ .arg(&output)
+ .current_dir(&root)
+ .stdout(Stdio::from(io::stderr()))
+ .status();
+
+ match status {
+ Ok(status) if status.success() => output,
+ Ok(status) => panic!(
+ "{GENERATOR} failed ({status}). Run `bun install --frozen-lockfile` at the repository \
+ root and in packages/sdk, or point {PREBUILT} at `nix build .#code-mode-assets`."
+ ),
+ Err(error) => panic!(
+ "could not run bun for {GENERATOR}: {error}. Bun is in the nix devshell; \
+ or point {PREBUILT} at `nix build .#code-mode-assets`."
+ ),
+ }
+}
diff --git a/crates/code_mode_assets/src/lib.rs b/crates/code_mode_assets/src/lib.rs
new file mode 100644
index 0000000000..aa3e85e104
--- /dev/null
+++ b/crates/code_mode_assets/src/lib.rs
@@ -0,0 +1,16 @@
+//! The assets code mode embeds, generated from the public SDK by
+//! `packages/code-mode-sdk/scripts/generate.ts` when this crate builds (see
+//! `build.rs`).
+
+/// The public SDK bundled as one ES module for Deno.
+pub const SDK: &str = include_str!(concat!(env!("CODE_MODE_ASSETS"), "/sdk.mjs"));
+
+/// Handlebars bundled as one ES module for Deno.
+pub const HANDLEBARS: &str = include_str!(concat!(env!("CODE_MODE_ASSETS"), "/handlebars.mjs"));
+
+/// The agent SDK catalog: an index per entity and a reference per symbol, as JSON.
+pub const DOCUMENTATION: &str =
+ include_str!(concat!(env!("CODE_MODE_ASSETS"), "/documentation.json"));
+
+/// Display labels for every generated SDK operation, keyed `service.method`, as JSON.
+pub const OPERATIONS: &str = include_str!(concat!(env!("CODE_MODE_ASSETS"), "/operations.json"));
diff --git a/docs/design/sdk-content-editing.md b/docs/design/sdk-content-editing.md
index 893913bd39..93c225d96c 100644
--- a/docs/design/sdk-content-editing.md
+++ b/docs/design/sdk-content-editing.md
@@ -312,8 +312,8 @@ method documents how to use it in its TSDoc:
## PR plan
Each PR is small and independently mergeable, adds tests first, documents every
-new method as above, regenerates the SDK reference, the code-mode bundle and
-`documentation.json`, and adds the direct tool it replaces to
+new method as above (the SDK reference, code-mode bundle and documentation are
+generated at build time), and adds the direct tool it replaces to
`covered_by_code_sdk`.
1. **This design** (docs only).
diff --git a/docs/development/infrastructure.md b/docs/development/infrastructure.md
index 87e8e7a96f..073dfde270 100644
--- a/docs/development/infrastructure.md
+++ b/docs/development/infrastructure.md
@@ -122,10 +122,11 @@ specifically:
Deployment builds use the filtered source in `nix/cloud-storage.nix`, rather than
an entire checkout. Include any new `include_str!` or `include_bytes!` assets in
-its source filter. The `code-execution-assets` Nix check verifies that the Deno
-bootstrap, SDK and Handlebars bundles survive both the workspace filter and the
-pruned agent-harness deployment source; Rust CI runs this check before clippy.
-Run it locally with `nix build --no-link .#checks.x86_64-linux.code-execution-assets`.
+its source filter. Assets generated from JavaScript are built in their own
+derivation instead: the `code-mode-assets` package bundles the SDK from the Nix
+`node_modules`, and every crane build of `crates/code_mode_assets` reads it
+through `CODE_MODE_ASSETS_DIR`; Rust CI exports the same variable before cargo.
+Run it locally with `nix build --no-link .#code-mode-assets`.
## Other resources
diff --git a/nix-support/node_modules-hashes.json b/nix-support/node_modules-hashes.json
index 470b1981ba..c1ba977cd7 100644
--- a/nix-support/node_modules-hashes.json
+++ b/nix-support/node_modules-hashes.json
@@ -1,6 +1,6 @@
{
"nodeModules": {
- "aarch64-darwin": "sha256-daaUfzT3EjF5ucPvkP1G0K8J85leYVepAwIGo95/Mzk=",
- "x86_64-linux": "sha256-Ug6LzaWhu4Ms4vNh4csy6cj6wn9C01tY3TFZ57MxXdU="
+ "aarch64-darwin": "sha256-Yr8MJXW9kkp2gpFoQxI4Or1jEfTRTvHQx47Sqc/vKJM=",
+ "x86_64-linux": "sha256-nZmPnf0bY0FvGNhvUx2n/rIwPXRo7L+XJgcu4LSXSLo="
}
}
diff --git a/nix-support/node_modules.nix b/nix-support/node_modules.nix
index 0da174cb17..35605795f6 100644
--- a/nix-support/node_modules.nix
+++ b/nix-support/node_modules.nix
@@ -47,6 +47,7 @@ let
&& rel != ".direnv"
else
rel == "bun.lock"
+ || rel == "packages/sdk/bun.lock"
|| rel == "package.json"
|| lib.hasSuffix "/package.json" rel
|| lib.hasPrefix "apps/web/patches/" rel;
@@ -79,13 +80,20 @@ stdenvNoCC.mkDerivation {
export BUN_INSTALL_CACHE_DIR="$TMPDIR/bun-cache"
mkdir -p "$HOME" "$BUN_INSTALL_CACHE_DIR"
- bun install \
- --cpu="${bunCpu}" \
- --os="${bunOs}" \
- --linker=hoisted \
- --frozen-lockfile \
- --ignore-scripts \
- --no-progress
+ # packages/sdk is a standalone package with its own lockfile; the
+ # code-mode SDK bundle resolves its dependencies from there.
+ for project in . packages/sdk; do
+ (
+ cd "$project"
+ bun install \
+ --cpu="${bunCpu}" \
+ --os="${bunOs}" \
+ --linker=hoisted \
+ --frozen-lockfile \
+ --ignore-scripts \
+ --no-progress
+ )
+ done
runHook postBuild
'';
diff --git a/nix/cloud-storage.nix b/nix/cloud-storage.nix
index 3565e97e9a..18ec7c974b 100644
--- a/nix/cloud-storage.nix
+++ b/nix/cloud-storage.nix
@@ -58,7 +58,7 @@
# `crates/pptx_engine` embeds with `include_bytes!`; `.graphql` for the
# `static_assets/schema.graphql` that `cache-core`'s build script reads;
# `.jsonl` for the recorded sessions `agent_fold` tests embed; `.mjs`
- # for the Deno bootstrap and bundled public SDK/Handlebars runtime;
+ # for the Deno bootstrap and timer shims;
# `.proto` for the protobuf files the `whatsmeow_proto` and
# `whatsmeow_signal` build scripts compile.
assetFilter =
@@ -172,6 +172,66 @@
${overlays}
'';
+ # ── Code-mode assets ──────────────────────────────────────────
+ # crates/code_mode_assets embeds the Deno SDK bundle and agent SDK docs.
+ # Its build script runs the generator itself unless CODE_MODE_ASSETS_DIR
+ # names prebuilt assets, as every Nix build of it does: the sandbox has
+ # no network for a bun install. Keep this filter in step with the build
+ # script's GENERATOR_INPUTS.
+ jsNodeModules = pkgs.callPackage ../nix-support/node_modules.nix { src = ../.; };
+
+ codeModeAssetsSrc = pkgs.lib.cleanSourceWith {
+ src = ../.;
+ name = "code-mode-assets-src";
+ filter =
+ path: type:
+ let
+ rel = pkgs.lib.removePrefix ((toString ../.) + "/") (toString path);
+ segments = pkgs.lib.splitString "/" rel;
+ isUnder = directory: rel == directory || pkgs.lib.hasPrefix "${directory}/" rel;
+ in
+ !(builtins.elem "node_modules" segments)
+ && !(builtins.elem "dist" segments)
+ && (
+ builtins.elem rel [
+ "bun.lock"
+ "package.json"
+ "packages"
+ ]
+ || builtins.any isUnder [
+ "packages/code-mode-sdk"
+ "packages/sdk"
+ "packages/sdk-docs"
+ ]
+ );
+ };
+
+ codeModeAssets = pkgs.stdenvNoCC.mkDerivation {
+ pname = "code-mode-assets";
+ version = "0.1.0";
+ src = codeModeAssetsSrc;
+ nativeBuildInputs = [ pkgs.bun ];
+ dontConfigure = true;
+ buildPhase = ''
+ runHook preBuild
+ export HOME="$TMPDIR/home"
+ mkdir -p "$HOME"
+ for project in . packages/sdk packages/sdk-docs packages/code-mode-sdk; do
+ if [ -d "${jsNodeModules}/$project/node_modules" ]; then
+ cp -a "${jsNodeModules}/$project/node_modules" "$project/"
+ fi
+ done
+ bun packages/code-mode-sdk/scripts/generate.ts "$out"
+ runHook postBuild
+ '';
+ dontInstall = true;
+ dontFixup = true;
+ };
+
+ codeModeAssetsEnv = {
+ CODE_MODE_ASSETS_DIR = "${codeModeAssets}";
+ };
+
commonArgs = {
inherit src;
pname = "cloud-storage";
@@ -231,6 +291,7 @@
# set because its KV and R2 storage features are mutually exclusive.
workspaceArtifacts = craneLib.cargoBuild (
commonArgs
+ // codeModeAssetsEnv
// {
inherit cargoArtifacts;
pname = "cloud-storage-workspace";
@@ -285,6 +346,7 @@
pkgs.lib.nameValuePair "doppler-config-bin-${binName}" (
craneLib.buildPackage (
commonArgs
+ // codeModeAssetsEnv
// {
# Reuse the dependency-only layer, then compile only this
# Doppler config binary and the local crates it actually uses.
@@ -309,6 +371,7 @@
openApiBins = craneLib.buildPackage (
commonArgs
+ // codeModeAssetsEnv
// {
cargoArtifacts = workspaceArtifacts;
pname = "cloud-storage-openapi";
@@ -340,6 +403,7 @@
# postgres/redis services. Built in Nix and cached by Namespace.
nextestArchive = craneLib.mkCargoDerivation (
commonArgs
+ // codeModeAssetsEnv
// {
cargoArtifacts = workspaceArtifacts;
pname = "cloud-storage-nextest-archive";
@@ -506,6 +570,11 @@
}:
craneLib.buildPackage (
commonArgs
+ # Only services that embed the assets depend on them, so an SDK
+ # change leaves the other deploy derivations cached.
+ // pkgs.lib.optionalAttrs (builtins.elem "crates/code_mode_assets" (
+ workspaceDepClosures.${packageName} or [ ]
+ )) codeModeAssetsEnv
// {
# Pruned source: this derivation only rebuilds when a crate in
# the service's own workspace closure changes.
@@ -1020,14 +1089,7 @@
in
{
checks = {
- code-execution-assets = pkgs.runCommand "cloud-storage-code-execution-assets" { } ''
- for source in ${src} ${prunedDeploySrc "service-agent-harness-service" "agent_harness_service"}; do
- for asset in bootstrap.mjs sdk.mjs handlebars.mjs; do
- test -s "$source/crates/code_execution/src/outbound/deno/$asset"
- done
- done
- touch $out
- '';
+ code-mode-assets = codeModeAssets;
# Deploy builds compile [patch.crates-io] crates from the pruned
# source, so their real code (not mkDummySrc's stubs) must be there.
pruned-deploy-src-vendored-patches = pkgs.runCommand "cloud-storage-pruned-vendored-patches" { } ''
@@ -1042,6 +1104,7 @@
};
clippy = craneLib.cargoClippy (
commonArgs
+ // codeModeAssetsEnv
// {
cargoArtifacts = workspaceArtifacts;
cargoClippyExtraArgs = "--workspace --all-features --exclude sync_service -- -D warnings";
@@ -1050,6 +1113,7 @@
);
clippy-sync-service = craneLib.cargoClippy (
commonArgs
+ // codeModeAssetsEnv
// {
cargoArtifacts = workspaceArtifacts;
cargoClippyExtraArgs = "-p sync_service -- -D warnings -A clippy::unnecessary_map_or -A clippy::collapsible_if";
@@ -1111,6 +1175,7 @@
goalert-mcp-macro
;
default = cargoArtifacts;
+ code-mode-assets = codeModeAssets;
}
// dopplerConfigBinPackages
// deployServiceBinaryPackages
diff --git a/packages/code-mode-sdk/AGENTS.md b/packages/code-mode-sdk/AGENTS.md
index 1efbc18e06..5cdec2f5ea 100644
--- a/packages/code-mode-sdk/AGENTS.md
+++ b/packages/code-mode-sdk/AGENTS.md
@@ -8,7 +8,8 @@ HTML worker belong to `packages/sdk-docs`.
## Start here
-- `scripts/generate.ts`: bundle and backend artifact generation.
+- `scripts/generate.ts`: builds the Deno bundles and backend documentation into
+ the directory it is given; `crates/code_mode_assets` runs it at build time.
- `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 share
@@ -25,12 +26,15 @@ HTML worker belong to `packages/sdk-docs`.
- Run root `just check` for formatting; CodeMode uses `apps/web/biome.jsonc`, while the standalone SDK has its own formatter.
-- `bun run generate`, then `bun run check:generated`.
-- `bun run type-check` and `bun run test`.
+- `bun run type-check` and `bun run test` (generates into ignored `dist/` first).
+- `cargo test -p code_execution -- --include-ignored` runs the bundle in Deno.
Run from this directory after installing the root workspace and the standalone
-`packages/sdk` dependencies with `bun install --frozen-lockfile`, as CI does; a
-stale `packages/sdk/node_modules` changes the bundle's minified names. Generated Rust documentation JSON and Deno bundles
-must match the public SDK; edit source and regenerate them together.
-Use the repository's pinned Bun version (via `nix develop`); different Bun
-bundlers produce different checked-in output even from identical SDK source.
+`packages/sdk` dependencies with `bun install --frozen-lockfile`, as CI does;
+the generator refuses to run without `packages/sdk/node_modules`.
+
+## Gotchas
+
+- The outputs are never committed. A new file the generator reads must be added
+ to `GENERATOR_INPUTS` in `crates/code_mode_assets/build.rs` and to
+ `codeModeAssetsSrc` in `nix/cloud-storage.nix`.
diff --git a/packages/code-mode-sdk/README.md b/packages/code-mode-sdk/README.md
index 252a92ecfb..78a469795f 100644
--- a/packages/code-mode-sdk/README.md
+++ b/packages/code-mode-sdk/README.md
@@ -48,12 +48,15 @@ There is no runtime documentation helper. See the
[agent playbook](../../crates/agent_code_mode/SKILL.md).
```sh
-bun run --cwd packages/code-mode-sdk generate
-bun run --cwd packages/code-mode-sdk check:generated
+bun run --cwd packages/code-mode-sdk generate # writes the assets to dist/
bun run --cwd packages/code-mode-sdk type-check
bun run --cwd packages/code-mode-sdk test
```
-Commit the generated `sdk.mjs`, `handlebars.mjs` and backend documentation JSON.
+The generated `sdk.mjs`, `handlebars.mjs`, `documentation.json` and
+`operations.json` are build outputs, never committed. `crates/code_mode_assets`
+builds them when it compiles: local cargo runs `scripts/generate.ts` with bun,
+and Nix builds and Rust CI use the `code-mode-assets` flake package through
+`CODE_MODE_ASSETS_DIR`. See that crate's `AGENTS.md`.
Real Deno integration tests live in `crates/code_execution`; public SDK entity
behavior is tested under `packages/sdk/tests`.
diff --git a/packages/code-mode-sdk/package.json b/packages/code-mode-sdk/package.json
index 017badac9c..f4aa9d275d 100644
--- a/packages/code-mode-sdk/package.json
+++ b/packages/code-mode-sdk/package.json
@@ -7,9 +7,8 @@
".": "./src/index.ts"
},
"scripts": {
- "generate": "bun scripts/generate.ts",
- "check:generated": "bun scripts/generate.ts --check",
- "test": "bun run check:generated && vitest run",
+ "generate": "bun scripts/generate.ts dist",
+ "test": "bun run generate && vitest run",
"type-check": "tsc --noEmit --project tsconfig.json"
},
"dependencies": {
diff --git a/packages/code-mode-sdk/scripts/generate.ts b/packages/code-mode-sdk/scripts/generate.ts
index 2045e1fb5c..a7857f9159 100644
--- a/packages/code-mode-sdk/scripts/generate.ts
+++ b/packages/code-mode-sdk/scripts/generate.ts
@@ -1,27 +1,37 @@
-/** Prebundle dependencies and generate entity docs before building the runner. */
+/**
+ * Build the code-mode assets the Rust crates embed: the Deno SDK and Handlebars
+ * bundles, the agent documentation catalog and the operation labels.
+ *
+ * Usage: bun scripts/generate.ts <output-directory>
+ */
-import { join } from 'node:path';
+import { existsSync } from 'node:fs';
+import { mkdir, mkdtemp, rm } from 'node:fs/promises';
+import { join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { renderSdkDocs } from '@macro-inc/sdk-docs/render';
import { descriptions } from './catalog';
import { packageEntityDocs, readMarkdownPages } from './typedoc';
const root = fileURLToPath(new URL('../../../', import.meta.url));
-const check = Bun.argv.includes('--check');
-async function artifact(path: string, output: string) {
- const file = `${root}${path}`;
- if (check) {
- if ((await Bun.file(file).text()) !== output)
- throw new Error(
- `${path} is stale; run bun packages/code-mode-sdk/scripts/generate.ts`
- );
- } else if (
- !(await Bun.file(file).exists()) ||
- (await Bun.file(file).text()) !== output
- ) {
- await Bun.write(file, output);
- }
+const [outputArgument] = Bun.argv.slice(2);
+if (!outputArgument)
+ throw new Error('usage: bun scripts/generate.ts <output-directory>');
+const outputDirectory = resolve(outputArgument);
+
+// Without its own install, the SDK's imports resolve to the root workspace's
+// versions of the same packages and the bundle silently differs.
+if (!existsSync(join(root, 'packages/sdk/node_modules')))
+ throw new Error(
+ 'packages/sdk/node_modules is missing; run `bun install --frozen-lockfile` in packages/sdk.'
+ );
+
+await mkdir(outputDirectory, { recursive: true });
+
+async function artifact(name: string, output: string) {
+ await Bun.write(join(outputDirectory, name), output);
}
+
for (const [entry, name] of [
['packages/code-mode-sdk/src/index.ts', 'sdk'],
['node_modules/handlebars/dist/handlebars.js', 'handlebars'],
@@ -52,18 +62,23 @@ for (const [entry, name] of [
const output = result.outputs[0];
if (!output) throw new Error('No bundle produced');
await artifact(
- `crates/code_execution/src/outbound/deno/${name}.mjs`,
+ `${name}.mjs`,
`// Generated by packages/code-mode-sdk/scripts/generate.ts.\n${await output.text()}`
);
}
-const output = join(root, 'packages/sdk-docs/dist/docs');
-await renderSdkDocs(root, output);
-const pages = await readMarkdownPages(join(output, 'markdown'));
-const docs = packageEntityDocs(pages, descriptions);
-await artifact(
- 'crates/agent_code_mode/src/domain/documentation.json',
- `${JSON.stringify(docs, null, 2)}\n`
-);
+
+const rendered = await mkdtemp(join(outputDirectory, '.docs-'));
+try {
+ await renderSdkDocs(root, rendered);
+ const pages = await readMarkdownPages(join(rendered, 'markdown'));
+ const docs = packageEntityDocs(pages, descriptions);
+ await artifact(
+ 'documentation.json',
+ `${JSON.stringify(docs, null, 2)}\n`
+ );
+} finally {
+ await rm(rendered, { recursive: true, force: true });
+}
// The registry comes from generated SDK classes, not hand-maintained endpoint paths.
const operations: Record<string, string> = {};
@@ -106,6 +121,6 @@ for (const [service, directory] of Object.entries({
}
}
await artifact(
- 'crates/agent_code_mode/src/domain/operations.json',
+ 'operations.json',
`${JSON.stringify(operations, null, 2)}\n`
);
diff --git a/packages/code-mode-sdk/src/documentation.test.ts b/packages/code-mode-sdk/src/documentation.test.ts
index 3b6d0d7c87..863506c8b9 100644
--- a/packages/code-mode-sdk/src/documentation.test.ts
+++ b/packages/code-mode-sdk/src/documentation.test.ts
@@ -2,10 +2,8 @@ import { readFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { packageEntityDocs, type SdkDocs } from '../scripts/typedoc';
-const artifact = new URL(
- '../../../crates/agent_code_mode/src/domain/documentation.json',
- import.meta.url
-);
+// Written by `bun run generate`, which `bun run test` runs first.
+const artifact = new URL('../dist/documentation.json', import.meta.url);
const NAMESPACE = `# Class: ExampleNamespace
diff --git a/packages/sdk-docs/AGENTS.md b/packages/sdk-docs/AGENTS.md
index ad1204e7c5..6fa3b3c70b 100644
--- a/packages/sdk-docs/AGENTS.md
+++ b/packages/sdk-docs/AGENTS.md
@@ -3,8 +3,7 @@
## Start here
- `src/render.ts`: the shared TypeDoc conversion and Markdown/HTML outputs.
-- `scripts/generate.ts`: reference generation, build-only mode and stale-output check.
-- `reference/`: checked-in TypeDoc Markdown; regenerate when SDK source changes.
+- `scripts/generate.ts`: renders Markdown and HTML into ignored `dist/docs/`.
- `README.md`: local documentation preview commands.
## Scope
@@ -17,18 +16,17 @@
## Checks
- `bun run type-check`
-- `bun run generate` updates the checked-in Markdown after SDK changes.
-- `bun run test` renders fresh build outputs, checks the reference without
- rewriting it, and tests linked public contracts and stale-output detection.
+- `bun run test` renders fresh build outputs and tests linked public contracts.
- `bun run docs:dev` serves the generated HTML for browser verification.
## Gotchas
-- `reference/` is generated and committed; `dist/docs/{markdown,html}` are
- ignored build outputs. Edit the SDK source, not generated pages; retain links
- to generated API request/response types. Never regenerate the reference before
- checking it in CI, because that hides stale documentation.
-- Wrangler uses build-only mode so preview and deployment never rewrite `reference/`.
+- Nothing generated is committed: `dist/docs/{markdown,html}` are build
+ outputs. Edit the SDK source; retain links to generated API request/response
+ types.
+- `reference/` is an unused, no longer maintained copy awaiting deletion in its
+ own pull request (its 5,500 files exceed GitHub's pull request limits); do
+ not regenerate or read it.
- TypeDoc and its Markdown plugin must use the same TypeDoc runtime instance.
The workspace also contains other versions; preserve the peer resolution in
`src/render.ts` and test actual generation after dependency changes.
diff --git a/packages/sdk-docs/README.md b/packages/sdk-docs/README.md
index 36fbfbfb0d..4cc63b5594 100644
--- a/packages/sdk-docs/README.md
+++ b/packages/sdk-docs/README.md
@@ -16,28 +16,20 @@ are excluded from the reference.
From this directory:
```sh
-bun run generate
-bun run check:generated
+bun run build
bun run type-check
bun run test
bun run docs:dev
```
-The generated [Markdown reference](reference/README.md) is checked in under
-`reference/` so SDK changes include reviewable documentation. Edit SDK source
-comments or declarations, then run `bun run generate` and commit the regenerated
-reference. Generated pages are collapsed by default in pull requests.
-
-`bun run check:generated` renders fresh Markdown and HTML into ignored
-`dist/docs/` and compares every Markdown path and byte against `reference/`.
-It fails on changed, added or removed pages without rewriting the reference.
-`bun run test` performs this check before testing public contracts, so CI catches
-stale documentation. `bun run build` produces only ignored build assets.
+`bun run build` renders the Markdown and HTML into ignored `dist/docs/`; nothing
+generated is committed. `bun run test` builds them before testing public
+contracts. Edit SDK source comments or declarations and rebuild to see the
+result.
Wrangler serves the HTML as static assets without a request handler, credentials,
-database or model calls. It builds the docs before serving them without modifying
-the checked-in reference. To publish to your configured Cloudflare account,
-run `bun run docs:deploy`.
+database or model calls. It builds the docs before serving them. To publish to
+your configured Cloudflare account, run `bun run docs:deploy`.
The production address is `https://sdk.macro.com`, configured as a Worker
custom domain. The `Deploy SDK Docs` workflow publishes relevant changes on
diff --git a/packages/sdk-docs/package.json b/packages/sdk-docs/package.json
index 366f5385d2..c87e6c42d5 100644
--- a/packages/sdk-docs/package.json
+++ b/packages/sdk-docs/package.json
@@ -7,10 +7,8 @@
"./render": "./src/render.ts"
},
"scripts": {
- "generate": "bun scripts/generate.ts",
- "build": "bun scripts/generate.ts --build",
- "check:generated": "bun scripts/generate.ts --check",
- "test": "bun run check:generated && vitest run",
+ "build": "bun scripts/generate.ts",
+ "test": "bun run build && vitest run",
"type-check": "tsc --noEmit --project tsconfig.json",
"docs:dev": "wrangler dev",
"docs:deploy": "wrangler deploy"
diff --git a/packages/sdk-docs/scripts/generate.ts b/packages/sdk-docs/scripts/generate.ts
index c52210a014..c2dc18d019 100644
--- a/packages/sdk-docs/scripts/generate.ts
+++ b/packages/sdk-docs/scripts/generate.ts
@@ -1,45 +1,6 @@
-import { createHash } from 'node:crypto';
-import { cp, readdir, readFile, rm } from 'node:fs/promises';
-import { join, relative } from 'node:path';
+import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { renderSdkDocs } from '../src/render';
const root = fileURLToPath(new URL('../../../', import.meta.url));
-const output = join(root, 'packages/sdk-docs/dist/docs');
-const reference = join(root, 'packages/sdk-docs/reference');
-
-async function fingerprint(directory: string) {
- const hash = createHash('sha256');
- const files = (
- await readdir(directory, { recursive: true, withFileTypes: true })
- )
- .filter((entry) => entry.isFile())
- .map((entry) => relative(directory, join(entry.parentPath, entry.name)))
- .sort();
- if (!files.length)
- throw new Error('SDK reference is empty; run bun run generate.');
- for (const file of files) {
- hash.update(file).update('\0');
- hash.update(await readFile(join(directory, file))).update('\0');
- }
- return hash.digest('hex');
-}
-
-/** Compare every Markdown path and byte without modifying the checked-in reference. */
-export async function verifyReference(reference: string, generated: string) {
- if ((await fingerprint(reference)) !== (await fingerprint(generated))) {
- throw new Error(
- 'SDK reference is stale; run bun run generate and commit packages/sdk-docs/reference.'
- );
- }
-}
-
-if (import.meta.main) {
- await renderSdkDocs(root, output);
- if (Bun.argv.includes('--check')) {
- await verifyReference(reference, join(output, 'markdown'));
- } else if (!Bun.argv.includes('--build')) {
- await rm(reference, { recursive: true, force: true });
- await cp(join(output, 'markdown'), reference, { recursive: true });
- }
-}
+await renderSdkDocs(root, join(root, 'packages/sdk-docs/dist/docs'));
diff --git a/packages/sdk-docs/src/reference.test.ts b/packages/sdk-docs/src/reference.test.ts
deleted file mode 100644
index 8a32f65752..0000000000
--- a/packages/sdk-docs/src/reference.test.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
-import { tmpdir } from 'node:os';
-import { join } from 'node:path';
-import { expect, test } from 'vitest';
-import { verifyReference } from '../scripts/generate';
-
-test('reference checks detect changed, added and removed pages without overwriting them', async () => {
- const directory = await mkdtemp(join(tmpdir(), 'sdk-reference-'));
- const reference = join(directory, 'reference');
- const generated = join(directory, 'generated');
- try {
- await mkdir(reference);
- await mkdir(generated);
- await writeFile(join(reference, 'Document.md'), 'old signature');
- await writeFile(join(generated, 'Document.md'), 'new signature');
- await expect(verifyReference(reference, generated)).rejects.toThrow(
- 'reference is stale'
- );
- expect(await readFile(join(reference, 'Document.md'), 'utf8')).toBe(
- 'old signature'
- );
-
- await writeFile(join(reference, 'Document.md'), 'new signature');
- await expect(
- verifyReference(reference, generated)
- ).resolves.toBeUndefined();
-
- await writeFile(join(generated, 'New.md'), 'new method');
- await expect(verifyReference(reference, generated)).rejects.toThrow(
- 'reference is stale'
- );
- await rm(join(generated, 'New.md'));
- await writeFile(join(reference, 'Removed.md'), 'removed method');
- await expect(verifyReference(reference, generated)).rejects.toThrow(
- 'reference is stale'
- );
- } finally {
- await rm(directory, { recursive: true, force: true });
- }
-});
diff --git a/packages/sdk-docs/src/render.test.ts b/packages/sdk-docs/src/render.test.ts
index 2a2a233157..9e802393ac 100644
--- a/packages/sdk-docs/src/render.test.ts
+++ b/packages/sdk-docs/src/render.test.ts
@@ -2,7 +2,7 @@ import { readdir, readFile } from 'node:fs/promises';
import { expect, test } from 'vitest';
const output = new URL('../dist/docs/', import.meta.url);
-const reference = new URL('../reference/', import.meta.url);
+const pages = new URL('markdown/', output);
test('the homepage explains entities and links to their reference without test modules', async () => {
const html = await readFile(new URL('html/index.html', output), 'utf8');
@@ -20,7 +20,7 @@ test('the homepage explains entities and links to their reference without test m
'<html'
);
}
- const files = await readdir(reference, { recursive: true });
+ const files = await readdir(pages, { recursive: true });
expect(files.filter((file) => /\.(test|spec)(\/|\.)/.test(file))).toEqual([]);
});
@@ -28,7 +28,7 @@ test('public SDK pages preserve signatures and linked wire contracts in both for
const markdown = await readFile(
new URL(
'src/entities/workspace/namespace/classes/WorkspaceNamespace.md',
- reference
+ pages
),
'utf8'
);
@@ -41,7 +41,7 @@ test('public SDK pages preserve signatures and linked wire contracts in both for
const wire = await readFile(
new URL(
'generated/storage/types.gen/type-aliases/ApiEntityFilterAst.md',
- reference
+ pages
),
'utf8'
);
@@ -59,13 +59,13 @@ test('public SDK pages preserve signatures and linked wire contracts in both for
test('document content and AI contracts come from the SDK source', async () => {
const document = await readFile(
- new URL('src/entities/documents/document/classes/Document.md', reference),
+ new URL('src/entities/documents/document/classes/Document.md', pages),
'utf8'
);
expect(document).toContain('content()');
expect(document).not.toContain('property-client');
const ai = await readFile(
- new URL('src/entities/ai/namespace/classes/AiNamespace.md', reference),
+ new URL('src/entities/ai/namespace/classes/AiNamespace.md', pages),
'utf8'
);
expect(ai).toContain('structuredCompletion');
@@ -76,7 +76,7 @@ test('object aliases expose concrete fields while retaining linked types and des
const patch = await readFile(
new URL(
'generated/agent-harness/types.gen/type-aliases/AgentSessionChangesPatchResponse.md',
- reference
+ pages
),
'utf8'
);
@@ -88,7 +88,7 @@ test('object aliases expose concrete fields while retaining linked types and des
const request = await readFile(
new URL(
'generated/cognition/types.gen/type-aliases/StructuredCompletionRequest.md',
- reference
+ pages
),
'utf8'
);
diff --git a/packages/sdk/AGENTS.md b/packages/sdk/AGENTS.md
index 9b35ef0c23..830bb40843 100644
--- a/packages/sdk/AGENTS.md
+++ b/packages/sdk/AGENTS.md
@@ -84,11 +84,10 @@ the existing gateway prefixes.
bun run generate`; do not copy deployed schemas over a local API change.
- Run `bun run generate` to regenerate SDK clients and normalize whitespace-only
lines; do not hand-edit generated output to satisfy whitespace checks.
-- Regenerate `../sdk-docs/reference` after SDK source or generated type changes;
- run that package's checks because web CI verifies the reference is current.
- Also run `bun packages/code-mode-sdk/scripts/generate.ts` from the root and
- commit `crates/agent_code_mode/src/domain/documentation.json`; CI's Typecheck
- fails when it is stale.
+- The SDK reference (`../sdk-docs`) and the code-mode bundle and documentation
+ (`crates/code_mode_assets`) are generated from this source at build time and
+ never committed; run `bun run test` in `../sdk-docs` and `../code-mode-sdk`
+ after changing public API or comments.
- `generated/agent-fold/` is not from OpenAPI: `cargo run -p agent_fold --bin
export_types` writes it, and `foldedLog()` casts the opaque wire schema to it.
- System events project separately in fold metadata and never appear as user
diff --git a/packages/sdk/README.md b/packages/sdk/README.md
index 44bf452ecc..dc0c3bafbf 100644
--- a/packages/sdk/README.md
+++ b/packages/sdk/README.md
@@ -8,9 +8,8 @@ plain-English entity guide, and complete API reference, served by the SDK docs W
- **`src/`**: a hand-written ergonomic SDK layer that provides an "orm"-y API.
The [SDK reference build](../sdk-docs/README.md) uses TypeDoc to generate linked
-Markdown and HTML from these sources. The [generated Markdown](../sdk-docs/reference/README.md)
-is checked in alongside SDK changes; the HTML can be served with the included
-static docs Worker.
+Markdown and HTML from these sources at build time; the HTML is served with the
+included static docs Worker.
## Usage
diff --git a/tooling/xtask/crates/xtask_nextest_filter/determinator.toml b/tooling/xtask/crates/xtask_nextest_filter/determinator.toml
index 5904c77452..f2289d6f4b 100644
--- a/tooling/xtask/crates/xtask_nextest_filter/determinator.toml
+++ b/tooling/xtask/crates/xtask_nextest_filter/determinator.toml
@@ -12,3 +12,14 @@ mark-changed = [
"xtask_graphql_schema_compat",
"xtask_workflows",
]
+
+# Compiled into code_mode_assets by its build script (and the flake's
+# code-mode-assets package), which cargo cannot see.
+[[path-rule]]
+globs = [
+ "bun.lock",
+ "packages/code-mode-sdk/**",
+ "packages/sdk-docs/**",
+ "packages/sdk/**",
+]
+mark-changed = ["code_mode_assets"]
diff --git a/tooling/xtask/crates/xtask_nextest_filter/src/test.rs b/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
index 18ffb641be..14e62e3e32 100644
--- a/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
+++ b/tooling/xtask/crates/xtask_nextest_filter/src/test.rs
@@ -109,6 +109,27 @@ fn embedded_assets_select_their_consumers() {
assert!(mixed_set.contains("collab_surface"));
}
+/// The code-mode assets are generated from the SDK by a build script, so an
+/// SDK-only change must still test everything that embeds them.
+#[test]
+fn sdk_sources_select_code_mode_asset_consumers() {
+ let graph = build_graph(false).expect("cargo metadata");
+
+ let selection = select_in_repo(&graph, &["packages/sdk/src/macro.ts"]);
+ let set = selected_packages(&selection);
+ for expected in [
+ "code_mode_assets",
+ "code_execution",
+ "agent_code_mode",
+ "agent_harness_service",
+ ] {
+ assert!(
+ set.contains(expected),
+ "SDK changes must select {expected}: {selection:?}"
+ );
+ }
+}
+
/// Drift check: every workspace package whose Rust sources mention the shared
/// asset path must be listed in the determinator rule (and vice versa). The
/// scan is textual, so a doc-comment mention merely over-selects safely.
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/check_node_modules_nix.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/check_node_modules_nix.rs
index 57cca3b00d..57401da3aa 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/check_node_modules_nix.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/check_node_modules_nix.rs
@@ -17,6 +17,7 @@ pub fn check_node_modules_nix() -> Workflow {
PullRequest::default()
.add_branch("main")
.add_path(xtask_paths::repo_glob!("bun.lock"))
+ .add_path(xtask_paths::repo_glob!("packages/sdk/bun.lock"))
.add_path(xtask_paths::repo_glob!("package.json"))
.add_path(xtask_paths::repo_glob!("apps/**/package.json"))
.add_path(xtask_paths::repo_glob!("packages/**/package.json"))
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
index 52b91e9252..e0373dc4d1 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
@@ -105,10 +105,7 @@ fn check() -> Job {
.add_step(steps::setup_nix())
.add_step(steps::setup_dev_shell())
.add_step(steps::configure_namespace_sccache(vars::CI_SCCACHE_NAME))
- .add_step(
- Step::new("Check embedded code execution assets")
- .run("nix build --no-link .#checks.x86_64-linux.code-execution-assets"),
- )
+ .add_step(steps::code_mode_assets())
.add_step(cargo_fmt())
.add_step(cargo_clippy())
.add_step(steps::show_sccache_stats())
@@ -144,6 +141,7 @@ fn doppler_config() -> Job {
.add_step(steps::setup_nix())
.add_step(steps::setup_dev_shell())
.add_step(steps::configure_namespace_sccache(vars::CI_SCCACHE_NAME))
+ .add_step(steps::code_mode_assets())
.add_step(compute_doppler_bins())
.add_step(validate_doppler_configs())
.add_step(steps::show_sccache_stats())
@@ -195,6 +193,7 @@ fn test() -> Job {
.add_step(steps::setup_dev_shell())
.add_step(steps::configure_namespace_sccache(vars::CI_SCCACHE_NAME))
.add_step(steps::start_sccache_server())
+ .add_step(steps::code_mode_assets())
.add_step(configure_postgres())
.add_step(prepare_tests())
.add_step(run_tests())
@@ -275,8 +274,13 @@ fn paths_filter() -> Step<gh_workflow::Use> {
- 'tooling/xtask/**'
- 'static_assets/**'
- 'nix/**'
+ - 'nix-support/node_modules*'
- 'flake.nix'
- 'flake.lock'
+ - 'bun.lock'
+ - 'packages/sdk/**'
+ - 'packages/sdk-docs/**'
+ - 'packages/code-mode-sdk/**'
- '.github/actions/setup-nix/**'
- '.github/actions/setup-nix-dev-shell/**'
- '.github/actions/teardown-nix/**'
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
index 1cd668e079..f34da7328f 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
@@ -373,6 +373,17 @@ pub fn setup_reqs_web(name: &str, playwright: bool) -> Step<Use> {
.when(playwright, |step| step.add_with(("playwright", "true")))
}
+/// Build the code-mode assets (`crates/code_mode_assets`) in Nix and point
+/// later cargo steps at them, so Rust jobs need no bun install. Any job that
+/// compiles that crate or a dependent (DSS, the agent harness) needs this.
+pub fn code_mode_assets() -> Step<Run> {
+ // A separate assignment, so a failed build fails the step under `bash -e`.
+ Step::new("Build code-mode assets").run(indoc::indoc! {r#"
+ assets="$(nix build --no-link --print-out-paths --print-build-logs .#code-mode-assets)"
+ echo "CODE_MODE_ASSETS_DIR=$assets" >> "$GITHUB_ENV"
+ "#})
+}
+
/// Start the server before parallel compiler invocations can race to launch it.
/// Keep this in a separate step after remote configuration so `GITHUB_ENV`
/// has supplied the selected backend's credentials to the process.
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main.rs
index 5a409b1211..31a74a6bf6 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main.rs
@@ -160,6 +160,7 @@ fn generated_code() -> Job {
.add_step(steps::setup_nix())
.add_step(steps::setup_reqs_web("Setup Prereqs", false))
.add_step(steps::configure_namespace_sccache(vars::WEB_SCCACHE_NAME))
+ .add_step(steps::code_mode_assets())
.add_step(build_schema_binaries())
.add_step(generate_api_types())
.add_step(regenerate_sdk())
@@ -306,7 +307,7 @@ fn paths_filter() -> Step<Use> {
.add_with((
"filters",
format!(
- "should_run:\n{artifact_paths} - 'services/lexical-service/**'\n - 'packages/sdk/**'\n - 'packages/sdk-docs/**'\n - 'services/ai-editing-worker/**'\n - 'packages/code-mode-sdk/**'\n - 'crates/code_execution/src/outbound/deno/*.mjs'\n - 'crates/agent_code_mode/src/domain/documentation.json'\n - 'crates/agent_code_mode/SKILL.md'\n - '.github/actions/setup-reqs-web/**'\ncodegen_changed:\n - 'crates/**/*.rs'\n - 'services/**/*.rs'\n - 'Cargo.toml'\n - 'Cargo.lock'\n - 'apps/web/scripts/generate-api-schema.ts'\n - 'apps/web/scripts/services.ts'\n - 'packages/sdk/**'\n - 'apps/docs/**'\n - '.github/actions/setup-reqs-web/**'\ni18n_changed:\n - 'apps/web/src/lib/i18n/**'\n - 'apps/web/src/lib/core/component/ContextMenu.tsx'\n - 'apps/web/src/lib/core/constant/settingsTabsConfig.tsx'\n - 'apps/web/src/components/ui/components/Dropdown.tsx'\n - 'apps/web/src/features/settings/**'\ndatabase_grid_changed:\n - 'apps/web/src/features/database/**'\ncalendar_details_changed:\n - 'apps/web/src/features/calendar-view/**'\n - 'apps/web/src/features/calendar/**'\n - 'apps/web/src/lib/queries/calendar/**'\n"
+ "should_run:\n{artifact_paths} - 'services/lexical-service/**'\n - 'packages/sdk/**'\n - 'packages/sdk-docs/**'\n - 'services/ai-editing-worker/**'\n - 'packages/code-mode-sdk/**'\n - 'crates/agent_code_mode/SKILL.md'\n - '.github/actions/setup-reqs-web/**'\ncodegen_changed:\n - 'crates/**/*.rs'\n - 'services/**/*.rs'\n - 'Cargo.toml'\n - 'Cargo.lock'\n - 'apps/web/scripts/generate-api-schema.ts'\n - 'apps/web/scripts/services.ts'\n - 'packages/sdk/**'\n - 'apps/docs/**'\n - '.github/actions/setup-reqs-web/**'\ni18n_changed:\n - 'apps/web/src/lib/i18n/**'\n - 'apps/web/src/lib/core/component/ContextMenu.tsx'\n - 'apps/web/src/lib/core/constant/settingsTabsConfig.tsx'\n - 'apps/web/src/components/ui/components/Dropdown.tsx'\n - 'apps/web/src/features/settings/**'\ndatabase_grid_changed:\n - 'apps/web/src/features/database/**'\ncalendar_details_changed:\n - 'apps/web/src/features/calendar-view/**'\n - 'apps/web/src/features/calendar/**'\n - 'apps/web/src/lib/queries/calendar/**'\n"
),
))
}