diff --git a/.stats.yml b/.stats.yml index d0d7b46e..423e2f9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-e57add0181eb2a057f8416eaf4020dd5b3042431342a51e3d4dc39af4a41aced.yml -openapi_spec_hash: d0d66b814ebe56ac7c0135f9f3aab616 -config_hash: 11e84d884a86d2db0411c35fae6e9121 diff --git a/MIGRATION.md b/MIGRATION.md index 8242d14e..b08a80d2 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -56,8 +56,8 @@ This affects the following methods: - `client.folders.deletePolicy()` - `client.memories.update()` -- `client.memories.delete()` - `client.memories.get()` +- `client.memories.delete()` ### URI encoded path parameters diff --git a/README.md b/README.md index 64fefa33..411eaa79 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ It is generated with [Stainless](https://www.stainless.com/). Use the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJjb21tYW5kIjoibnB4I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A2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hyperspell%2Fhyperspell-mcp%22%5D%2C%22env%22%3A%7B%22HYPERSPELL_API_KEY%22%3A%22My%20API%20Key%22%2C%22HYPERSPELL_USER_ID%22%3A%22My%20User%20ID%22%7D%7D) > Note: You may need to set environment variables in your MCP client. diff --git a/api.md b/api.md index a5055309..294b3ad6 100644 --- a/api.md +++ b/api.md @@ -56,8 +56,8 @@ Types: Methods: -- client.connections.list() -> ConnectionListResponse - client.connections.revoke(connectionID) -> ConnectionRevokeResponse +- client.connections.list() -> ConnectionListResponse # Folders @@ -71,9 +71,9 @@ Types: Methods: - client.folders.list(connectionID, { ...params }) -> FolderListResponse -- client.folders.deletePolicy(policyID, { ...params }) -> FolderDeletePolicyResponse - client.folders.listPolicies(connectionID) -> FolderListPoliciesResponse - client.folders.setPolicies(connectionID, { ...params }) -> FolderSetPoliciesResponse +- client.folders.deletePolicy(policyID, { ...params }) -> FolderDeletePolicyResponse # Integrations @@ -130,15 +130,15 @@ Types: Methods: -- client.memories.update(resourceID, { ...params }) -> MemoryStatus -- client.memories.list({ ...params }) -> MemoryListResponsesCursorPage -- client.memories.delete(resourceID, { ...params }) -> MemoryDeleteResponse - client.memories.add({ ...params }) -> MemoryStatus - client.memories.addBulk({ ...params }) -> MemoryAddBulkResponse +- client.memories.upload({ ...params }) -> MemoryStatus +- client.memories.update(resourceID, { ...params }) -> MemoryStatus +- client.memories.list({ ...params }) -> MemoryListResponsesCursorPage +- client.memories.status() -> MemoryStatusResponse - client.memories.get(resourceID, { ...params }) -> MemoryGetResponse - client.memories.search({ ...params }) -> QueryResult -- client.memories.status() -> MemoryStatusResponse -- client.memories.upload({ ...params }) -> MemoryStatus +- client.memories.delete(resourceID, { ...params }) -> MemoryDeleteResponse # Evaluate @@ -150,10 +150,10 @@ Types: Methods: -- client.evaluate.getQuery(queryID) -> QueryResult - client.evaluate.listQueries({ ...params }) -> EvaluateListQueriesResponsesCursorPage -- client.evaluate.scoreHighlight(highlightID, { ...params }) -> EvaluateScoreHighlightResponse +- client.evaluate.getQuery(queryID) -> QueryResult - client.evaluate.scoreQuery(queryID, { ...params }) -> EvaluateScoreQueryResponse +- client.evaluate.scoreHighlight(highlightID, { ...params }) -> EvaluateScoreHighlightResponse # Actions @@ -164,8 +164,8 @@ Types: Methods: -- client.actions.addReaction({ ...params }) -> ActionAddReactionResponse - client.actions.sendMessage({ ...params }) -> ActionSendMessageResponse +- client.actions.addReaction({ ...params }) -> ActionAddReactionResponse # Sessions @@ -193,6 +193,6 @@ Types: Methods: -- client.auth.deleteUser() -> AuthDeleteUserResponse -- client.auth.me() -> AuthMeResponse - client.auth.userToken({ ...params }) -> Token +- client.auth.me() -> AuthMeResponse +- client.auth.deleteUser() -> AuthDeleteUserResponse diff --git a/bin/check-release-environment b/bin/check-release-environment index 6b43775a..c43c74fe 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,6 +2,10 @@ errors=() +if [ -z "${RELEASE_PLEASE_TOKEN}" ]; then + errors+=("The RELEASE_PLEASE_TOKEN secret has not been set. Create a fine-grained GitHub PAT and add it as a repository secret.") +fi + lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/bin/migration-config.json b/bin/migration-config.json index ed08d549..74f4c438 100644 --- a/bin/migration-config.json +++ b/bin/migration-config.json @@ -75,7 +75,7 @@ }, { "base": "memories", - "name": "delete", + "name": "get", "params": [ { "type": "param", @@ -108,7 +108,7 @@ }, { "base": "memories", - "name": "get", + "name": "delete", "params": [ { "type": "param", diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index b04a9ff9..d73bd3b2 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -41,14 +41,14 @@ For clients with a configuration JSON, it might look something like this: If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoeXBlcnNwZWxsL2h5cGVyc3BlbGwtbWNwIl0sImVudiI6eyJIWVBFUlNQRUxMX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiSFlQRVJTUEVMTF9VU0VSX0lEIjoiTXkgVXNlciBJRCJ9fQ) ### VS Code If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration. -[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D) +[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hyperspell%2Fhyperspell-mcp%22%5D%2C%22env%22%3A%7B%22HYPERSPELL_API_KEY%22%3A%22My%20API%20Key%22%2C%22HYPERSPELL_USER_ID%22%3A%22My%20User%20ID%22%7D%7D) ### Claude Code @@ -56,7 +56,7 @@ If you use Claude Code, you can install the MCP server by running the command be environment variables in Claude Code's `.claude.json`, which can be found in your home directory. ``` -claude mcp add hyperspell_hyperspell_mcp_api --header "x-hyperspell-api-key: My API Key" --header "X-As-User: My User ID" --transport http https://hyperspell.stlmcp.com +claude mcp add hyperspell_hyperspell_mcp_api --env HYPERSPELL_API_KEY="My API Key" HYPERSPELL_USER_ID="My User ID" -- npx -y @hyperspell/hyperspell-mcp ``` ## Code Mode diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts index 0bfa9557..edab6620 100644 --- a/packages/mcp-server/src/code-tool.ts +++ b/packages/mcp-server/src/code-tool.ts @@ -1,17 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { - ContentBlock, - McpRequestContext, - McpTool, - Metadata, - ToolCallResult, - asErrorResult, - asTextContentResult, -} from './types'; +import { ContentBlock, McpRequestContext, McpTool, Metadata, ToolCallResult, asErrorResult } from './types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import { readEnv, requireValue } from './util'; -import { WorkerInput, WorkerOutput } from './code-tool-types'; +import { WorkerOutput } from './code-tool-types'; import { getLogger } from './logger'; import { SdkMethod } from './methods'; import { McpCodeExecutionMode } from './options'; @@ -108,13 +99,8 @@ export function codeTool({ let result: ToolCallResult; const startTime = Date.now(); - if (codeExecutionMode === 'local') { - logger.debug('Executing code in local Deno environment'); - result = await localDenoHandler({ reqContext, args }); - } else { - logger.debug('Executing code in remote Stainless environment'); - result = await remoteStainlessHandler({ reqContext, args }); - } + logger.debug('Executing code in local Deno environment'); + result = await localDenoHandler({ reqContext, args }); logger.info( { @@ -131,71 +117,6 @@ export function codeTool({ return { metadata, tool, handler }; } -const remoteStainlessHandler = async ({ - reqContext, - args, -}: { - reqContext: McpRequestContext; - args: any; -}): Promise => { - const code = args.code as string; - const intent = args.intent as string | undefined; - const client = reqContext.client; - - const codeModeEndpoint = readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool'; - - const localClientEnvs = { - HYPERSPELL_API_KEY: requireValue( - readEnv('HYPERSPELL_API_KEY') ?? client.apiKey, - 'set HYPERSPELL_API_KEY environment variable or provide apiKey client option', - ), - HYPERSPELL_BASE_URL: readEnv('HYPERSPELL_BASE_URL') ?? client.baseURL ?? undefined, - }; - // Merge any upstream client envs from the request header, with upstream values taking precedence. - const mergedClientEnvs = { ...localClientEnvs, ...reqContext.upstreamClientEnvs }; - - // Setting a Stainless API key authenticates requests to the code tool endpoint. - const res = await fetch(codeModeEndpoint, { - method: 'POST', - headers: { - ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }), - 'Content-Type': 'application/json', - 'x-stainless-mcp-client-envs': JSON.stringify(mergedClientEnvs), - }, - body: JSON.stringify({ - project_name: 'hyperspell', - code, - intent, - client_opts: { userID: readEnv('HYPERSPELL_USER_ID') }, - } satisfies WorkerInput), - }); - - if (!res.ok) { - if (res.status === 404 && !reqContext.stainlessApiKey) { - throw new Error( - 'Could not access code tool for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.', - ); - } - throw new Error( - `${res.status}: ${ - res.statusText - } error when trying to contact Code Tool server. Details: ${await res.text()}`, - ); - } - - const { is_error, result, log_lines, err_lines } = (await res.json()) as WorkerOutput; - const hasLogs = log_lines.length > 0 || err_lines.length > 0; - const output = { - result, - ...(log_lines.length > 0 && { log_lines }), - ...(err_lines.length > 0 && { err_lines }), - }; - if (is_error) { - return asErrorResult(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2)); - } - return asTextContentResult(output); -}; - const localDenoHandler = async ({ reqContext, args, diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index b288e63d..eafcd871 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -2,7 +2,7 @@ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { Metadata, McpRequestContext, asTextContentResult } from './types'; -import { getLogger } from './logger'; + import type { LocalDocsSearch } from './local-docs-search'; export const metadata: Metadata = { @@ -41,9 +41,6 @@ export const tool: Tool = { }, }; -const docsSearchURL = - process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/hyperspell/docs/search'; - let _localSearch: LocalDocsSearch | undefined; export function setLocalSearch(search: LocalDocsSearch): void { @@ -67,58 +64,6 @@ async function searchLocal(args: Record): Promise { }).results; } -async function searchRemote(args: Record, reqContext: McpRequestContext): Promise { - const body = args as any; - const query = new URLSearchParams(body).toString(); - - const startTime = Date.now(); - const result = await fetch(`${docsSearchURL}?${query}`, { - headers: { - ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }), - ...(reqContext.mcpSessionId && { 'x-stainless-mcp-session-id': reqContext.mcpSessionId }), - ...(reqContext.mcpClientInfo && { - 'x-stainless-mcp-client-info': JSON.stringify(reqContext.mcpClientInfo), - }), - }, - }); - - const logger = getLogger(); - - if (!result.ok) { - const errorText = await result.text(); - logger.warn( - { - durationMs: Date.now() - startTime, - query: body.query, - status: result.status, - statusText: result.statusText, - errorText, - }, - 'Got error response from docs search tool', - ); - - if (result.status === 404 && !reqContext.stainlessApiKey) { - throw new Error( - 'Could not find docs for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.', - ); - } - - throw new Error( - `${result.status}: ${result.statusText} when using doc search tool. Details: ${errorText}`, - ); - } - - const resultBody = await result.json(); - logger.info( - { - durationMs: Date.now() - startTime, - query: body.query, - }, - 'Got docs search result', - ); - return resultBody; -} - export const handler = async ({ reqContext, args, @@ -128,11 +73,7 @@ export const handler = async ({ }) => { const body = args ?? {}; - if (_localSearch) { - return asTextContentResult(await searchLocal(body)); - } - - return asTextContentResult(await searchRemote(body, reqContext)); + return asTextContentResult(await searchLocal(body)); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/instructions.ts b/packages/mcp-server/src/instructions.ts index 12e717b6..0e0f6c43 100644 --- a/packages/mcp-server/src/instructions.ts +++ b/packages/mcp-server/src/instructions.ts @@ -2,7 +2,6 @@ import fs from 'fs/promises'; import { getLogger } from './logger'; -import { readEnv } from './util'; const INSTRUCTIONS_CACHE_TTL_MS = 15 * 60 * 1000; // 15 minutes @@ -40,7 +39,8 @@ export async function getInstructions({ if (customInstructionsPath) { fetchedInstructions = await fetchLatestInstructionsFromFile(customInstructionsPath); } else { - fetchedInstructions = await fetchLatestInstructionsFromApi(stainlessApiKey); + fetchedInstructions = + '\n This is the hyperspell MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n '; } instructionsCache.set(cacheKey, { fetchedInstructions, fetchedAt: now }); @@ -55,29 +55,3 @@ async function fetchLatestInstructionsFromFile(path: string): Promise { throw error; } } - -async function fetchLatestInstructionsFromApi(stainlessApiKey: string | undefined): Promise { - // Setting the stainless API key is optional, but may be required - // to authenticate requests to the Stainless API. - const response = await fetch( - readEnv('CODE_MODE_INSTRUCTIONS_URL') ?? 'https://api.stainless.com/api/ai/instructions/hyperspell', - { - method: 'GET', - headers: { ...(stainlessApiKey && { Authorization: stainlessApiKey }) }, - }, - ); - - let instructions: string | undefined; - if (!response.ok) { - getLogger().warn( - 'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...', - ); - - instructions = - '\n This is the hyperspell MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n '; - } - - instructions ??= ((await response.json()) as { instructions: string }).instructions; - - return instructions; -} diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index cc4ad20d..0aaed090 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -56,24 +56,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [ httpMethod: 'delete', summary: 'Revoke connection', description: - "Revokes Hyperspell's access the given provider and deletes all stored credentials and indexed data.", + 'Revoke Hyperspell\'s access to a provider and delete this user\'s stored data.\n\nThe external OAuth/Unified revoke and the (potentially large) data purge run in\na background Temporal workflow; this returns ``202 Accepted`` immediately. A\nheavy provider — a Gmail account can carry hundreds of thousands of chunks —\nplus a slow third-party revoke would otherwise outrun the request timeout: the\nold synchronous path "timed out" for the caller while still finishing\nserver-side, making the outcome invisible. Idempotent per (app, user, provider).', stainlessPath: '(resource) connections > (method) revoke', qualified: 'client.connections.revoke', params: ['connection_id: string;'], response: '{ message: string; success: boolean; }', markdown: - "## revoke\n\n`client.connections.revoke(connection_id: string): { message: string; success: boolean; }`\n\n**delete** `/connections/{connection_id}/revoke`\n\nRevokes Hyperspell's access the given provider and deletes all stored credentials and indexed data.\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ message: string; success: boolean; }`\n\n - `message: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.connections.revoke('connection_id');\n\nconsole.log(response);\n```", + "## revoke\n\n`client.connections.revoke(connection_id: string): { message: string; success: boolean; }`\n\n**delete** `/connections/{connection_id}/revoke`\n\nRevoke Hyperspell's access to a provider and delete this user's stored data.\n\nThe external OAuth/Unified revoke and the (potentially large) data purge run in\na background Temporal workflow; this returns ``202 Accepted`` immediately. A\nheavy provider — a Gmail account can carry hundreds of thousands of chunks —\nplus a slow third-party revoke would otherwise outrun the request timeout: the\nold synchronous path \"timed out\" for the caller while still finishing\nserver-side, making the outcome invisible. Idempotent per (app, user, provider).\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ message: string; success: boolean; }`\n\n - `message: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.connections.revoke('connection_id');\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.connections.revoke', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.connections.revoke('connection_id');\n\nconsole.log(response.message);", - }, - python: { - method: 'connections.revoke', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.connections.revoke(\n "connection_id",\n)\nprint(response.message)', - }, go: { method: 'client.Connections.Revoke', example: @@ -84,6 +74,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell connections revoke \\\n --api-key 'My API Key' \\\n --connection-id connection_id", }, + python: { + method: 'connections.revoke', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.connections.revoke(\n "connection_id",\n)\nprint(response.message)', + }, + typescript: { + method: 'client.connections.revoke', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.connections.revoke('connection_id');\n\nconsole.log(response.message);", + }, http: { example: 'curl https://api.hyperspell.com/connections/$CONNECTION_ID/revoke \\\n -X DELETE \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -103,16 +103,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.connections.list(): { connections: object[]; }`\n\n**get** `/connections/list`\n\nList all connections for the user.\n\n### Returns\n\n- `{ connections: { id: string; integration_id: string; label: string; provider: string; selected_count?: number; }[]; }`\n\n - `connections: { id: string; integration_id: string; label: string; provider: string; selected_count?: number; }[]`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst connections = await client.connections.list();\n\nconsole.log(connections);\n```", perLanguage: { - typescript: { - method: 'client.connections.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst connections = await client.connections.list();\n\nconsole.log(connections.connections);", - }, - python: { - method: 'connections.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nconnections = client.connections.list()\nprint(connections.connections)', - }, go: { method: 'client.Connections.List', example: @@ -122,6 +112,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'connections list', example: "hyperspell connections list \\\n --api-key 'My API Key'", }, + python: { + method: 'connections.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nconnections = client.connections.list()\nprint(connections.connections)', + }, + typescript: { + method: 'client.connections.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst connections = await client.connections.list();\n\nconsole.log(connections.connections);", + }, http: { example: 'curl https://api.hyperspell.com/connections/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -143,16 +143,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.folders.list(connection_id: string, parent_id?: string): { folders: object[]; }`\n\n**get** `/connections/{connection_id}/folders`\n\nList one level of folders from the user's connected source.\n\nReturns folders decorated with their explicit folder policy (if any).\nUse parent_id to drill into subfolders.\n\n### Parameters\n\n- `connection_id: string`\n\n- `parent_id?: string`\n Parent folder ID. Omit for root-level folders.\n\n### Returns\n\n- `{ folders: { has_children: boolean; name: string; provider_folder_id: string; parent_folder_id?: string; policy?: { id: string; sync_mode: 'sync' | 'skip' | 'manual'; }; }[]; }`\n\n - `folders: { has_children: boolean; name: string; provider_folder_id: string; parent_folder_id?: string; policy?: { id: string; sync_mode: 'sync' | 'skip' | 'manual'; }; }[]`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst folders = await client.folders.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(folders);\n```", perLanguage: { - typescript: { - method: 'client.folders.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst folders = await client.folders.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(folders.folders);", - }, - python: { - method: 'folders.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nfolders = client.folders.list(\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(folders.folders)', - }, go: { method: 'client.Folders.List', example: @@ -163,6 +153,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell folders list \\\n --api-key 'My API Key' \\\n --connection-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, + python: { + method: 'folders.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nfolders = client.folders.list(\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(folders.folders)', + }, + typescript: { + method: 'client.folders.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst folders = await client.folders.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(folders.folders);", + }, http: { example: 'curl https://api.hyperspell.com/connections/$CONNECTION_ID/folders \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -183,16 +183,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list_policies\n\n`client.folders.listPolicies(connection_id: string): { policies: object[]; }`\n\n**get** `/connections/{connection_id}/folder-policies`\n\nList all folder policies for a specific connection.\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ policies: { id: string; provider_folder_id: string; sync_mode: 'sync' | 'skip' | 'manual'; connection_id?: string; folder_name?: string; folder_path?: string; parent_folder_id?: string; }[]; }`\n\n - `policies: { id: string; provider_folder_id: string; sync_mode: 'sync' | 'skip' | 'manual'; connection_id?: string; folder_name?: string; folder_path?: string; parent_folder_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.folders.listPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.folders.listPolicies', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.listPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.policies);", - }, - python: { - method: 'folders.list_policies', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.list_policies(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.policies)', - }, go: { method: 'client.Folders.ListPolicies', example: @@ -203,6 +193,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell folders list-policies \\\n --api-key 'My API Key' \\\n --connection-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, + python: { + method: 'folders.list_policies', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.list_policies(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.policies)', + }, + typescript: { + method: 'client.folders.listPolicies', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.listPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.policies);", + }, http: { example: 'curl https://api.hyperspell.com/connections/$CONNECTION_ID/folder-policies \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -230,16 +230,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## set_policies\n\n`client.folders.setPolicies(connection_id: string, provider_folder_id: string, sync_mode: 'sync' | 'skip' | 'manual', folder_name?: string, folder_path?: string, parent_folder_id?: string): { id: string; provider_folder_id: string; sync_mode: 'sync' | 'skip' | 'manual'; connection_id?: string; folder_name?: string; folder_path?: string; parent_folder_id?: string; }`\n\n**post** `/connections/{connection_id}/folder-policies`\n\nCreate or update a folder policy for a specific connection.\n\n### Parameters\n\n- `connection_id: string`\n\n- `provider_folder_id: string`\n Folder ID from the source provider\n\n- `sync_mode: 'sync' | 'skip' | 'manual'`\n Sync mode for this folder\n\n- `folder_name?: string`\n Display name of the folder\n\n- `folder_path?: string`\n Display path of the folder\n\n- `parent_folder_id?: string`\n Parent folder's provider ID for inheritance resolution\n\n### Returns\n\n- `{ id: string; provider_folder_id: string; sync_mode: 'sync' | 'skip' | 'manual'; connection_id?: string; folder_name?: string; folder_path?: string; parent_folder_id?: string; }`\n\n - `id: string`\n - `provider_folder_id: string`\n - `sync_mode: 'sync' | 'skip' | 'manual'`\n - `connection_id?: string`\n - `folder_name?: string`\n - `folder_path?: string`\n - `parent_folder_id?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.folders.setPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { provider_folder_id: 'provider_folder_id', sync_mode: 'sync' });\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.folders.setPolicies', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.setPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n provider_folder_id: 'provider_folder_id',\n sync_mode: 'sync',\n});\n\nconsole.log(response.id);", - }, - python: { - method: 'folders.set_policies', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.set_policies(\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n provider_folder_id="provider_folder_id",\n sync_mode="sync",\n)\nprint(response.id)', - }, go: { method: 'client.Folders.SetPolicies', example: @@ -250,6 +240,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell folders set-policies \\\n --api-key 'My API Key' \\\n --connection-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --provider-folder-id provider_folder_id \\\n --sync-mode sync", }, + python: { + method: 'folders.set_policies', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.set_policies(\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n provider_folder_id="provider_folder_id",\n sync_mode="sync",\n)\nprint(response.id)', + }, + typescript: { + method: 'client.folders.setPolicies', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.setPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n provider_folder_id: 'provider_folder_id',\n sync_mode: 'sync',\n});\n\nconsole.log(response.id);", + }, http: { example: 'curl https://api.hyperspell.com/connections/$CONNECTION_ID/folder-policies \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "provider_folder_id": "provider_folder_id",\n "sync_mode": "sync"\n }\'', @@ -269,16 +269,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## delete_policy\n\n`client.folders.deletePolicy(connection_id: string, policy_id: string): { success: boolean; }`\n\n**delete** `/connections/{connection_id}/folder-policies/{policy_id}`\n\nDelete a folder policy for a specific connection.\n\n### Parameters\n\n- `connection_id: string`\n\n- `policy_id: string`\n\n### Returns\n\n- `{ success: boolean; }`\n\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.folders.deletePolicy', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.success);", - }, - python: { - method: 'folders.delete_policy', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.delete_policy(\n policy_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.success)', - }, go: { method: 'client.Folders.DeletePolicy', example: @@ -289,6 +279,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell folders delete-policy \\\n --api-key 'My API Key' \\\n --connection-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --policy-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, + python: { + method: 'folders.delete_policy', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.folders.delete_policy(\n policy_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n connection_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.success)', + }, + typescript: { + method: 'client.folders.deletePolicy', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.success);", + }, http: { example: 'curl https://api.hyperspell.com/connections/$CONNECTION_ID/folder-policies/$POLICY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -308,16 +308,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.integrations.list(): { integrations: object[]; }`\n\n**get** `/integrations/list`\n\nList all integrations for the user.\n\n### Returns\n\n- `{ integrations: { id: string; allow_multiple_connections: boolean; auth_provider: 'nango' | 'unified' | 'whitelabel'; icon: string; name: string; provider: string; actions_only?: boolean; requires_channel_selection?: boolean; }[]; }`\n\n - `integrations: { id: string; allow_multiple_connections: boolean; auth_provider: 'nango' | 'unified' | 'whitelabel'; icon: string; name: string; provider: string; actions_only?: boolean; requires_channel_selection?: boolean; }[]`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst integrations = await client.integrations.list();\n\nconsole.log(integrations);\n```", perLanguage: { - typescript: { - method: 'client.integrations.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst integrations = await client.integrations.list();\n\nconsole.log(integrations.integrations);", - }, - python: { - method: 'integrations.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nintegrations = client.integrations.list()\nprint(integrations.integrations)', - }, go: { method: 'client.Integrations.List', example: @@ -327,6 +317,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'integrations list', example: "hyperspell integrations list \\\n --api-key 'My API Key'", }, + python: { + method: 'integrations.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nintegrations = client.integrations.list()\nprint(integrations.integrations)', + }, + typescript: { + method: 'client.integrations.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst integrations = await client.integrations.list();\n\nconsole.log(integrations.integrations);", + }, http: { example: 'curl https://api.hyperspell.com/integrations/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -346,16 +346,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## connect\n\n`client.integrations.connect(integration_id: string, redirect_url?: string): { expires_at: string; url: string; }`\n\n**get** `/integrations/{integration_id}/connect`\n\nRedirects to the connect URL to link an integration.\n\n### Parameters\n\n- `integration_id: string`\n\n- `redirect_url?: string`\n\n### Returns\n\n- `{ expires_at: string; url: string; }`\n\n - `expires_at: string`\n - `url: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.integrations.connect('integration_id');\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.integrations.connect', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.integrations.connect('integration_id');\n\nconsole.log(response.expires_at);", - }, - python: { - method: 'integrations.connect', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.integrations.connect(\n integration_id="integration_id",\n)\nprint(response.expires_at)', - }, go: { method: 'client.Integrations.Connect', example: @@ -366,6 +356,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell integrations connect \\\n --api-key 'My API Key' \\\n --integration-id integration_id", }, + python: { + method: 'integrations.connect', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.integrations.connect(\n integration_id="integration_id",\n)\nprint(response.expires_at)', + }, + typescript: { + method: 'client.integrations.connect', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.integrations.connect('integration_id');\n\nconsole.log(response.expires_at);", + }, http: { example: 'curl https://api.hyperspell.com/integrations/$INTEGRATION_ID/connect \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -385,16 +385,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.integrations.googleCalendar.list(): { items: object[]; }`\n\n**get** `/integrations/google_calendar/list`\n\nList available calendars for a user. This can be used to ie. populate a dropdown for the user to select a calendar.\n\n### Returns\n\n- `{ items: { id: string; name: string; primary: boolean; timezone: string; }[]; }`\n\n - `items: { id: string; name: string; primary: boolean; timezone: string; }[]`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst calendar = await client.integrations.googleCalendar.list();\n\nconsole.log(calendar);\n```", perLanguage: { - typescript: { - method: 'client.integrations.googleCalendar.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst calendar = await client.integrations.googleCalendar.list();\n\nconsole.log(calendar.items);", - }, - python: { - method: 'integrations.google_calendar.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\ncalendar = client.integrations.google_calendar.list()\nprint(calendar.items)', - }, go: { method: 'client.Integrations.GoogleCalendar.List', example: @@ -404,6 +394,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'google_calendar list', example: "hyperspell integrations:google-calendar list \\\n --api-key 'My API Key'", }, + python: { + method: 'integrations.google_calendar.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\ncalendar = client.integrations.google_calendar.list()\nprint(calendar.items)', + }, + typescript: { + method: 'client.integrations.googleCalendar.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst calendar = await client.integrations.googleCalendar.list();\n\nconsole.log(calendar.items);", + }, http: { example: 'curl https://api.hyperspell.com/integrations/google_calendar/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -424,16 +424,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## index\n\n`client.integrations.webCrawler.index(url: string, limit?: number, max_depth?: number): { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n**get** `/integrations/web_crawler/index`\n\nRecursively crawl a website to make it available for indexed search.\n\n### Parameters\n\n- `url: string`\n The base URL of the website to crawl\n\n- `limit?: number`\n Maximum number of pages to crawl in total\n\n- `max_depth?: number`\n Maximum depth of links to follow during crawling\n\n### Returns\n\n- `{ resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n - `resource_id: string`\n - `source: string`\n - `status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.integrations.webCrawler.index({ url: 'url' });\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.integrations.webCrawler.index', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.integrations.webCrawler.index({ url: 'url' });\n\nconsole.log(response.resource_id);", - }, - python: { - method: 'integrations.web_crawler.index', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.integrations.web_crawler.index(\n url="url",\n)\nprint(response.resource_id)', - }, go: { method: 'client.Integrations.WebCrawler.Index', example: @@ -443,6 +433,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'web_crawler index', example: "hyperspell integrations:web-crawler index \\\n --api-key 'My API Key' \\\n --url url", }, + python: { + method: 'integrations.web_crawler.index', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.integrations.web_crawler.index(\n url="url",\n)\nprint(response.resource_id)', + }, + typescript: { + method: 'client.integrations.webCrawler.index', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.integrations.webCrawler.index({ url: 'url' });\n\nconsole.log(response.resource_id);", + }, http: { example: 'curl https://api.hyperspell.com/integrations/web_crawler/index \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -469,16 +469,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.integrations.slack.list(channels?: string[], exclude_archived?: boolean, include_dms?: boolean, include_group_dms?: boolean, include_private?: boolean): object`\n\n**get** `/integrations/slack/list`\n\nList Slack conversations accessible to the user via the live Nango connection.\n\nReturns minimal channel metadata suitable for selection UIs. If required\nscopes are missing, Slack's error is propagated with details.\n\nSupports filtering by channels, including/excluding private channels, DMs,\ngroup DMs, and archived channels based on the provided search options.\n\n### Parameters\n\n- `channels?: string[]`\n List of Slack channels to include (by id, name, or #name).\n\n- `exclude_archived?: boolean`\n If set, pass 'exclude_archived' to Slack. If None, omit the param.\n\n- `include_dms?: boolean`\n Include direct messages (im) when listing conversations.\n\n- `include_group_dms?: boolean`\n Include group DMs (mpim) when listing conversations.\n\n- `include_private?: boolean`\n Include private channels when constructing Slack 'types'.\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst slacks = await client.integrations.slack.list();\n\nconsole.log(slacks);\n```", perLanguage: { - typescript: { - method: 'client.integrations.slack.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst slacks = await client.integrations.slack.list();\n\nconsole.log(slacks);", - }, - python: { - method: 'integrations.slack.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nslacks = client.integrations.slack.list()\nprint(slacks)', - }, go: { method: 'client.Integrations.Slack.List', example: @@ -488,6 +478,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'slack list', example: "hyperspell integrations:slack list \\\n --api-key 'My API Key'", }, + python: { + method: 'integrations.slack.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nslacks = client.integrations.slack.list()\nprint(slacks)', + }, + typescript: { + method: 'client.integrations.slack.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst slacks = await client.integrations.slack.list();\n\nconsole.log(slacks);", + }, http: { example: 'curl https://api.hyperspell.com/integrations/slack/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -516,16 +516,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## add\n\n`client.memories.add(text: string, collection?: string, date?: string, metadata?: object, resource_id?: string, title?: string): { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n**post** `/memories/add`\n\nAdds an arbitrary document to the index. This can be any text, email,\ncall transcript, etc. The document will be processed and made available for\nquerying once the processing is complete.\n\n### Parameters\n\n- `text: string`\n Full text of the document.\n\n- `collection?: string`\n The collection to add the document to — deprecated, set the collection using metadata instead.\n\n- `date?: string`\n Date of the document. Depending on the document, this could be the creation date or date the document was last updated (eg. for a chat transcript, this would be the date of the last message). This helps the ranking algorithm and allows you to filter by date range.\n\n- `metadata?: object`\n Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, boolean, or null.\n\n- `resource_id?: string`\n The resource ID to add the document to. If not provided, a new resource ID will be generated. If provided, the document will be updated if it already exists.\n\n- `title?: string`\n Title of the document.\n\n### Returns\n\n- `{ resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n - `resource_id: string`\n - `source: string`\n - `status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memoryStatus = await client.memories.add({ text: '...' });\n\nconsole.log(memoryStatus);\n```", perLanguage: { - typescript: { - method: 'client.memories.add', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.add({ text: '...' });\n\nconsole.log(memoryStatus.resource_id);", - }, - python: { - method: 'memories.add', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.add(\n text="...",\n)\nprint(memory_status.resource_id)', - }, go: { method: 'client.Memories.Add', example: @@ -535,6 +525,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'memories add', example: "hyperspell memories add \\\n --api-key 'My API Key' \\\n --text ...", }, + python: { + method: 'memories.add', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.add(\n text="...",\n)\nprint(memory_status.resource_id)', + }, + typescript: { + method: 'client.memories.add', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.add({ text: '...' });\n\nconsole.log(memoryStatus.resource_id);", + }, http: { example: 'curl https://api.hyperspell.com/memories/add \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "text": "...",\n "collection": "my-collection",\n "metadata": {\n "author": "John Doe",\n "date": "2025-05-20T02:31:00Z",\n "rating": 3\n },\n "title": "My Document"\n }\'', @@ -558,16 +558,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## add_bulk\n\n`client.memories.addBulk(items: { text: string; collection?: string; date?: string; metadata?: object; resource_id?: string; title?: string; }[]): { count: number; items: memory_status[]; success?: boolean; }`\n\n**post** `/memories/add/bulk`\n\nAdds multiple documents to the index in a single request.\n\nAll items are validated before any database operations occur. If any item\nfails validation, the entire batch is rejected with a 422 error detailing\nwhich items failed and why.\n\nMaximum 100 items per request. Each item follows the same schema as the\nsingle-item /memories/add endpoint.\n\n### Parameters\n\n- `items: { text: string; collection?: string; date?: string; metadata?: object; resource_id?: string; title?: string; }[]`\n List of memories to ingest. Maximum 100 items.\n\n### Returns\n\n- `{ count: number; items: { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }[]; success?: boolean; }`\n Response schema for successful bulk ingestion.\n\n - `count: number`\n - `items: { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }[]`\n - `success?: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.memories.addBulk({ items: [{ text: '...' }] });\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.memories.addBulk', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.memories.addBulk({ items: [{ text: '...' }] });\n\nconsole.log(response.count);", - }, - python: { - method: 'memories.add_bulk', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.memories.add_bulk(\n items=[{\n "text": "..."\n }],\n)\nprint(response.count)', - }, go: { method: 'client.Memories.AddBulk', example: @@ -577,6 +567,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'memories add_bulk', example: "hyperspell memories add-bulk \\\n --api-key 'My API Key' \\\n --item '{text: ...}'", }, + python: { + method: 'memories.add_bulk', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.memories.add_bulk(\n items=[{\n "text": "..."\n }],\n)\nprint(response.count)', + }, + typescript: { + method: 'client.memories.addBulk', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.memories.addBulk({ items: [{ text: '...' }] });\n\nconsole.log(response.count);", + }, http: { example: 'curl https://api.hyperspell.com/memories/add/bulk \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "items": [\n {\n "text": "...",\n "collection": "my-collection",\n "metadata": {\n "author": "John Doe",\n "date": "2025-05-20T02:31:00Z",\n "rating": 3\n },\n "title": "My Document"\n }\n ]\n }\'', @@ -598,16 +598,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## upload\n\n`client.memories.upload(file: string, collection?: string, metadata?: string): { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n**post** `/memories/upload`\n\nThis endpoint will upload a file to the index and return a resource_id.\nThe file will be processed in the background and the memory will be available for querying once the processing is complete.\nYou can use the `resource_id` to query the memory later, and check the status of the memory.\n\n### Parameters\n\n- `file: string`\n The file to ingest.\n\n- `collection?: string`\n The collection to add the document to — deprecated, set the collection using metadata instead.\n\n- `metadata?: string`\n Custom metadata as JSON string for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, or boolean.\n\n### Returns\n\n- `{ resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n - `resource_id: string`\n - `source: string`\n - `status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memoryStatus = await client.memories.upload({ file: fs.createReadStream('path/to/file') });\n\nconsole.log(memoryStatus);\n```", perLanguage: { - typescript: { - method: 'client.memories.upload', - example: - "import fs from 'fs';\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.upload({ file: fs.createReadStream('path/to/file') });\n\nconsole.log(memoryStatus.resource_id);", - }, - python: { - method: 'memories.upload', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.upload(\n file=b"Example data",\n)\nprint(memory_status.resource_id)', - }, go: { method: 'client.Memories.Upload', example: @@ -617,6 +607,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'memories upload', example: "hyperspell memories upload \\\n --api-key 'My API Key' \\\n --file 'Example data'", }, + python: { + method: 'memories.upload', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.upload(\n file=b"Example data",\n)\nprint(memory_status.resource_id)', + }, + typescript: { + method: 'client.memories.upload', + example: + "import fs from 'fs';\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.upload({ file: fs.createReadStream('path/to/file') });\n\nconsole.log(memoryStatus.resource_id);", + }, http: { example: "curl https://api.hyperspell.com/memories/upload \\\n -H 'Content-Type: multipart/form-data' \\\n -H \"Authorization: Bearer $HYPERSPELL_API_KEY\" \\\n -F 'file=@/path/to/file'", @@ -646,16 +646,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## update\n\n`client.memories.update(source: string, resource_id: string, collection?: string | object, date?: string | object, metadata?: object | object, text?: string | object, title?: string | object): { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n**post** `/memories/update/{source}/{resource_id}`\n\nUpdates an existing document in the index. You can update the text, collection,\ntitle, and metadata. The document must already exist or a 404 will be returned.\nThis works for documents from any source (vault, slack, gmail, etc.).\n\nTo remove a collection, set it to null explicitly.\n\n### Parameters\n\n- `source: string`\n\n- `resource_id: string`\n\n- `collection?: string | object`\n The collection to move the document to — deprecated, set the collection using metadata instead.\n\n- `date?: string | object`\n Date of the document for ranking and filtering.\n\n- `metadata?: object | object`\n Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, boolean, or null. Will be merged with existing metadata.\n\n- `text?: string | object`\n Full text of the document. If provided, the document will be re-indexed.\n\n- `title?: string | object`\n Title of the document.\n\n### Returns\n\n- `{ resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n - `resource_id: string`\n - `source: string`\n - `status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memoryStatus = await client.memories.update('resource_id', { source: 'reddit' });\n\nconsole.log(memoryStatus);\n```", perLanguage: { - typescript: { - method: 'client.memories.update', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.update('resource_id', { source: 'reddit' });\n\nconsole.log(memoryStatus.resource_id);", - }, - python: { - method: 'memories.update', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.update(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory_status.resource_id)', - }, go: { method: 'client.Memories.Update', example: @@ -666,6 +656,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell memories update \\\n --api-key 'My API Key' \\\n --source reddit \\\n --resource-id resource_id", }, + python: { + method: 'memories.update', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.memories.update(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory_status.resource_id)', + }, + typescript: { + method: 'client.memories.update', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.update('resource_id', { source: 'reddit' });\n\nconsole.log(memoryStatus.resource_id);", + }, http: { example: "curl https://api.hyperspell.com/memories/update/$SOURCE/$RESOURCE_ID \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $HYPERSPELL_API_KEY\" \\\n -d '{}'", @@ -692,18 +692,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ document: object | object | object | object | object | object | object | object | object | object | object | object; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }", markdown: - "## list\n\n`client.memories.list(collection?: string, cursor?: string, filter?: string, size?: number, source?: string, status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'): { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n\n**get** `/memories/list`\n\nThis endpoint allows you to paginate through all documents in the index.\nYou can filter the documents by title, date, metadata, etc.\n\n### Parameters\n\n- `collection?: string`\n Filter documents by collection.\n\n- `cursor?: string`\n\n- `filter?: string`\n Filter documents by metadata using MongoDB-style operators. Example: {\"department\": \"engineering\", \"priority\": {\"$gt\": 3}}\n\n- `size?: number`\n\n- `source?: string`\n Filter documents by source.\n\n- `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n Filter documents by status.\n\n### Returns\n\n- `{ document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).\n\n - `document: { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; comments?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; due_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }; id?: string; channel?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; external_id?: string; is_self?: boolean; mentioned_users?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; metadata?: { edited_by?: string; sources?: object[]; }; num_replies?: number; replies?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; end_at?: string; location?: string; meeting_url?: string; metadata?: { edited_by?: string; sources?: object[]; }; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; type?: 'conversation'; } | { id?: string; children?: { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; ended_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; participants?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }`\n - `resource_id: string`\n - `source: string`\n - `type: string`\n - `collection?: string`\n - `document_date?: string`\n - `ingested_at?: string`\n - `last_modified_at?: string`\n - `metadata?: object`\n - `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n - `title?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// Automatically fetches more pages as needed.\nfor await (const memoryListResponse of client.memories.list()) {\n console.log(memoryListResponse);\n}\n```", + "## list\n\n`client.memories.list(collection?: string, cursor?: string, filter?: string, size?: number, source?: string, status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'): { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n\n**get** `/memories/list`\n\nThis endpoint allows you to paginate through all documents in the index.\nYou can filter the documents by title, date, metadata, etc.\n\n### Parameters\n\n- `collection?: string`\n Filter documents by collection.\n\n- `cursor?: string`\n\n- `filter?: string`\n Filter documents by metadata using MongoDB-style operators. Example: {\"department\": \"engineering\", \"priority\": {\"$gt\": 3}}\n\n- `size?: number`\n\n- `source?: string`\n Filter documents by source.\n\n- `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n Filter documents by status.\n\n### Returns\n\n- `{ document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).\n\n - `document: { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; comments?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; due_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }; id?: string; channel?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; external_id?: string; is_self?: boolean; mentioned_users?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; metadata?: { edited_by?: string; sources?: object[]; }; num_replies?: number; replies?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; end_at?: string; location?: string; meeting_url?: string; metadata?: { edited_by?: string; sources?: object[]; }; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; ended_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; participants?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }`\n - `resource_id: string`\n - `source: string`\n - `type: string`\n - `collection?: string`\n - `document_date?: string`\n - `ingested_at?: string`\n - `last_modified_at?: string`\n - `metadata?: object`\n - `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n - `title?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// Automatically fetches more pages as needed.\nfor await (const memoryListResponse of client.memories.list()) {\n console.log(memoryListResponse);\n}\n```", perLanguage: { - typescript: { - method: 'client.memories.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const memoryListResponse of client.memories.list()) {\n console.log(memoryListResponse.resource_id);\n}", - }, - python: { - method: 'memories.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.memories.list()\npage = page.items[0]\nprint(page.resource_id)', - }, go: { method: 'client.Memories.List', example: @@ -713,6 +703,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'memories list', example: "hyperspell memories list \\\n --api-key 'My API Key'", }, + python: { + method: 'memories.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.memories.list()\npage = page.items[0]\nprint(page.resource_id)', + }, + typescript: { + method: 'client.memories.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const memoryListResponse of client.memories.list()) {\n console.log(memoryListResponse.resource_id);\n}", + }, http: { example: 'curl https://api.hyperspell.com/memories/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -731,16 +731,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## status\n\n`client.memories.status(): { providers: object; total: object; }`\n\n**get** `/memories/status`\n\nThis endpoint shows the indexing progress of documents, both by provider and total.\n\n### Returns\n\n- `{ providers: object; total: object; }`\n\n - `providers: object`\n - `total: object`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.memories.status();\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.memories.status', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.memories.status();\n\nconsole.log(response.providers);", - }, - python: { - method: 'memories.status', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.memories.status()\nprint(response.providers)', - }, go: { method: 'client.Memories.Status', example: @@ -750,6 +740,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'memories status', example: "hyperspell memories status \\\n --api-key 'My API Key'", }, + python: { + method: 'memories.status', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.memories.status()\nprint(response.providers)', + }, + typescript: { + method: 'client.memories.status', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.memories.status();\n\nconsole.log(response.providers);", + }, http: { example: 'curl https://api.hyperspell.com/memories/status \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -769,18 +769,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ document: object | object | object | object | object | object | object | object | object | object | object | object; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }", markdown: - "## get\n\n`client.memories.get(source: string, resource_id: string): { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n\n**get** `/memories/get/{source}/{resource_id}`\n\nRetrieves a document by provider and resource_id, as a document-shaped\nresponse carrying the full hyperdoc tree (ENG-2479 Phase 4).\n\n### Parameters\n\n- `source: string`\n\n- `resource_id: string`\n\n### Returns\n\n- `{ document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).\n\n - `document: { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; comments?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; due_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }; id?: string; channel?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; external_id?: string; is_self?: boolean; mentioned_users?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; metadata?: { edited_by?: string; sources?: object[]; }; num_replies?: number; replies?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; end_at?: string; location?: string; meeting_url?: string; metadata?: { edited_by?: string; sources?: object[]; }; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; type?: 'conversation'; } | { id?: string; children?: { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; ended_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; participants?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }`\n - `resource_id: string`\n - `source: string`\n - `type: string`\n - `collection?: string`\n - `document_date?: string`\n - `ingested_at?: string`\n - `last_modified_at?: string`\n - `metadata?: object`\n - `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n - `title?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memory = await client.memories.get('resource_id', { source: 'reddit' });\n\nconsole.log(memory);\n```", + "## get\n\n`client.memories.get(source: string, resource_id: string): { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n\n**get** `/memories/get/{source}/{resource_id}`\n\nRetrieves a document by provider and resource_id, as a document-shaped\nresponse carrying the full hyperdoc tree (ENG-2479 Phase 4).\n\n### Parameters\n\n- `source: string`\n\n- `resource_id: string`\n\n### Returns\n\n- `{ document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; ingested_at?: string; last_modified_at?: string; metadata?: object; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; title?: string; }`\n A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).\n\n - `document: { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; comments?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; due_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }; id?: string; channel?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; external_id?: string; is_self?: boolean; mentioned_users?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; metadata?: { edited_by?: string; sources?: object[]; }; num_replies?: number; replies?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; end_at?: string; location?: string; meeting_url?: string; metadata?: { edited_by?: string; sources?: object[]; }; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; }[]; metadata?: { edited_by?: string; sources?: object[]; }; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; ended_at?: string; metadata?: { edited_by?: string; sources?: object[]; }; participants?: { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; }[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: { data: string; mimetype: string; id?: string; metadata?: metadata; type?: 'blob'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'callout'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'chunk'; } | { text: string; id?: string; language?: string; metadata?: metadata; type?: 'code'; } | { text: string; id?: string; created_at?: string; metadata?: metadata; type?: 'comment'; } | { id?: string; metadata?: metadata; type?: 'divider'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'equation'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'footnote'; } | { level: number; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'heading'; } | { src: string; text: string; id?: string; metadata?: metadata; type?: 'image'; } | { text: string; url: string; id?: string; metadata?: metadata; type?: 'link'; } | { id?: string; metadata?: metadata; type?: 'line_break'; } | { id?: string; children?: list_item | to_do[]; metadata?: metadata; ordered?: boolean; text?: string; type?: 'list'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'list_item'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'paragraph'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'quote'; } | { id?: string; children?: table_row[]; has_header?: boolean; metadata?: metadata; text?: string; type?: 'table'; } | { id?: string; align?: 'left' | 'center' | 'right'; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'table_cell'; } | { id?: string; children?: table_cell[]; metadata?: metadata; text?: string; type?: 'table_row'; } | { text: string; id?: string; marks?: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'math'[]; metadata?: metadata; type?: 'text'; } | { id?: string; checked?: boolean; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; type?: 'todo'; } | { tool_call_id: string; tool_name: string; id?: string; args?: object; metadata?: metadata; type?: 'tool_call'; } | { output: string | object | object[]; tool_call_id: string; tool_name: string; id?: string; is_error?: boolean; metadata?: metadata; type?: 'tool_result'; } | { text: string; id?: string; message_type?: 'message' | 'thinking'; metadata?: metadata; role?: 'user' | 'assistant'; timestamp?: string; type?: 'trace_message'; } | { text: string; id?: string; end?: number; metadata?: metadata; speaker?: person; start?: number; type?: 'utterance'; }[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: { edited_by?: string; sources?: object[]; }; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }`\n - `resource_id: string`\n - `source: string`\n - `type: string`\n - `collection?: string`\n - `document_date?: string`\n - `ingested_at?: string`\n - `last_modified_at?: string`\n - `metadata?: object`\n - `status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n - `title?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memory = await client.memories.get('resource_id', { source: 'reddit' });\n\nconsole.log(memory);\n```", perLanguage: { - typescript: { - method: 'client.memories.get', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memory = await client.memories.get('resource_id', { source: 'reddit' });\n\nconsole.log(memory.resource_id);", - }, - python: { - method: 'memories.get', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory = client.memories.get(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory.resource_id)', - }, go: { method: 'client.Memories.Get', example: @@ -791,6 +781,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell memories get \\\n --api-key 'My API Key' \\\n --source reddit \\\n --resource-id resource_id", }, + python: { + method: 'memories.get', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory = client.memories.get(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory.resource_id)', + }, + typescript: { + method: 'client.memories.get', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memory = await client.memories.get('resource_id', { source: 'reddit' });\n\nconsole.log(memory.resource_id);", + }, http: { example: 'curl https://api.hyperspell.com/memories/get/$SOURCE/$RESOURCE_ID \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -817,18 +817,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }", markdown: - "## search\n\n`client.memories.search(query: string, answer?: boolean, effort?: 'minimal' | 'low' | 'medium' | 'high' | 'very_high', max_results?: number, options?: { after?: string; answer_model?: string; before?: string; box?: { weight?: number; }; filter?: object; google_calendar?: { calendar_id?: string; weight?: number; }; google_drive?: { weight?: number; }; google_mail?: { label_ids?: string[]; weight?: number; }; max_results?: number; memory_types?: 'procedure' | 'memory' | 'mood'[]; notion?: { notion_page_ids?: string[]; weight?: number; }; recency_half_life_days?: number; resource_ids?: string[]; slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }; vault?: { weight?: number; }; web_crawler?: { max_depth?: number; url?: string; weight?: number; }; }, provenance?: boolean, sources?: string[]): { answer?: string; documents?: scored_document_response[]; errors?: object[]; provenance?: provenance; query?: string; query_id?: string; score?: number; }`\n\n**post** `/memories/query`\n\nRetrieves documents matching the query.\n\n### Parameters\n\n- `query: string`\n Query to run.\n\n- `answer?: boolean`\n If true, the query will be answered along with matching source documents.\n\n- `effort?: 'minimal' | 'low' | 'medium' | 'high' | 'very_high'`\n How much compute to spend on retrieval. Mirrors the dial popularized by frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' = verbatim single-shot retrieval (fastest). 'low' = LLM rewrites the query for better retrieval and extracts date filters. 'medium' = rewrite + agentic refinement loop (the answer LLM may request additional retrieval rounds, up to 3). 'high' = rewrite + extended refinement (up to 6 rounds). Higher = better recall, more latency, more cost.\n\n- `max_results?: number`\n Maximum number of results to return.\n\n- `options?: { after?: string; answer_model?: string; before?: string; box?: { weight?: number; }; filter?: object; google_calendar?: { calendar_id?: string; weight?: number; }; google_drive?: { weight?: number; }; google_mail?: { label_ids?: string[]; weight?: number; }; max_results?: number; memory_types?: 'procedure' | 'memory' | 'mood'[]; notion?: { notion_page_ids?: string[]; weight?: number; }; recency_half_life_days?: number; resource_ids?: string[]; slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }; vault?: { weight?: number; }; web_crawler?: { max_depth?: number; url?: string; weight?: number; }; }`\n Search options for the query.\n - `after?: string`\n Only query documents created on or after this date.\n - `answer_model?: string`\n Model to use for answer generation when answer=True\n - `before?: string`\n Only query documents created before this date.\n - `box?: { weight?: number; }`\n Search options for Box\n - `filter?: object`\n Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}\n - `google_calendar?: { calendar_id?: string; weight?: number; }`\n Search options for Google Calendar\n - `google_drive?: { weight?: number; }`\n Search options for Google Drive\n - `google_mail?: { label_ids?: string[]; weight?: number; }`\n Search options for Gmail\n - `max_results?: number`\n Maximum number of results to return.\n - `memory_types?: 'procedure' | 'memory' | 'mood'[]`\n Filter by memory type. Defaults to generic memories only. Pass multiple types to include procedures, etc.\n - `notion?: { notion_page_ids?: string[]; weight?: number; }`\n Search options for Notion\n - `recency_half_life_days?: number`\n When set, multiplies each result's score by an exponential-decay factor based on the document's most recent activity timestamp (source-reported last_modified, falling back to document_date). A document one half-life old gets its score halved. Resources with no recency timestamp are passed through unchanged. Leave unset to disable.\n - `resource_ids?: string[]`\n Only return results from these specific resource IDs. Useful for scoping searches to specific documents (e.g., a specific email thread or uploaded file).\n - `slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }`\n Search options for Slack\n - `vault?: { weight?: number; }`\n Search options for vault\n - `web_crawler?: { max_depth?: number; url?: string; weight?: number; }`\n Search options for Web Crawler\n\n- `provenance?: boolean`\n If true (effort='very_high' only), attach a provenance record to the response: the source documents and entities the answer was grounded in, the agent's search trajectory, and any sources that failed. Adds one indexed lookup; intended for auditability / compliance use cases.\n\n- `sources?: string[]`\n Only query documents from these sources.\n\n### Returns\n\n- `{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }`\n\n - `answer?: string`\n - `documents?: { document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]`\n - `errors?: object[]`\n - `provenance?: { entities?: { id: string; name: string; type: string; }[]; failed_sources?: string[]; sources?: { resource_id: string; source: string; score?: number; title?: string; }[]; steps?: { iteration: number; status: string; tool: string; query?: string; result_count?: number; source?: string; }[]; }`\n - `query?: string`\n - `query_id?: string`\n - `score?: number`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst queryResult = await client.memories.search({ query: 'What does Hyperspell do?' });\n\nconsole.log(queryResult);\n```", + "## search\n\n`client.memories.search(query: string, answer?: boolean, effort?: 'minimal' | 'low' | 'medium' | 'high' | 'very_high', max_results?: number, options?: { after?: string; answer_model?: string; before?: string; box?: { weight?: number; }; filter?: object; google_calendar?: { calendar_id?: string; weight?: number; }; google_drive?: { weight?: number; }; google_mail?: { label_ids?: string[]; weight?: number; }; max_results?: number; memory_types?: 'procedure' | 'memory' | 'mood'[]; notion?: { notion_page_ids?: string[]; weight?: number; }; recency_half_life_days?: number; resource_ids?: string[]; slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }; vault?: { weight?: number; }; web_crawler?: { max_depth?: number; url?: string; weight?: number; }; }, provenance?: boolean, sources?: string[]): { answer?: string; documents?: scored_document_response[]; errors?: object[]; provenance?: provenance; query?: string; query_id?: string; score?: number; }`\n\n**post** `/memories/query`\n\nRetrieves documents matching the query.\n\n### Parameters\n\n- `query: string`\n Query to run.\n\n- `answer?: boolean`\n If true, the query will be answered along with matching source documents.\n\n- `effort?: 'minimal' | 'low' | 'medium' | 'high' | 'very_high'`\n How much compute to spend on retrieval. Mirrors the dial popularized by frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' = verbatim single-shot retrieval (fastest). 'low' = LLM rewrites the query for better retrieval and extracts date filters. 'medium' = rewrite + agentic refinement loop (the answer LLM may request additional retrieval rounds, up to 3). 'high' = rewrite + extended refinement (up to 6 rounds). Higher = better recall, more latency, more cost.\n\n- `max_results?: number`\n Maximum number of results to return.\n\n- `options?: { after?: string; answer_model?: string; before?: string; box?: { weight?: number; }; filter?: object; google_calendar?: { calendar_id?: string; weight?: number; }; google_drive?: { weight?: number; }; google_mail?: { label_ids?: string[]; weight?: number; }; max_results?: number; memory_types?: 'procedure' | 'memory' | 'mood'[]; notion?: { notion_page_ids?: string[]; weight?: number; }; recency_half_life_days?: number; resource_ids?: string[]; slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }; vault?: { weight?: number; }; web_crawler?: { max_depth?: number; url?: string; weight?: number; }; }`\n Search options for the query.\n - `after?: string`\n Only query documents created on or after this date.\n - `answer_model?: string`\n Model to use for answer generation when answer=True\n - `before?: string`\n Only query documents created before this date.\n - `box?: { weight?: number; }`\n Search options for Box\n - `filter?: object`\n Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}\n - `google_calendar?: { calendar_id?: string; weight?: number; }`\n Search options for Google Calendar\n - `google_drive?: { weight?: number; }`\n Search options for Google Drive\n - `google_mail?: { label_ids?: string[]; weight?: number; }`\n Search options for Gmail\n - `max_results?: number`\n Maximum number of results to return.\n - `memory_types?: 'procedure' | 'memory' | 'mood'[]`\n Filter by memory type. Defaults to generic memories only. Pass multiple types to include procedures, etc.\n - `notion?: { notion_page_ids?: string[]; weight?: number; }`\n Search options for Notion\n - `recency_half_life_days?: number`\n When set, multiplies each result's score by an exponential-decay factor based on the document's most recent activity timestamp (source-reported last_modified, falling back to document_date). A document one half-life old gets its score halved. Resources with no recency timestamp are passed through unchanged. Leave unset to disable.\n - `resource_ids?: string[]`\n Only return results from these specific resource IDs. Useful for scoping searches to specific documents (e.g., a specific email thread or uploaded file).\n - `slack?: { channels?: string[]; exclude_archived?: boolean; include_dms?: boolean; include_group_dms?: boolean; include_private?: boolean; weight?: number; }`\n Search options for Slack\n - `vault?: { weight?: number; }`\n Search options for vault\n - `web_crawler?: { max_depth?: number; url?: string; weight?: number; }`\n Search options for Web Crawler\n\n- `provenance?: boolean`\n If true (effort='very_high' only), attach a provenance record to the response: the source documents and entities the answer was grounded in, the agent's search trajectory, and any sources that failed. Adds one indexed lookup; intended for auditability / compliance use cases.\n\n- `sources?: string[]`\n Only query documents from these sources.\n\n### Returns\n\n- `{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }`\n\n - `answer?: string`\n - `documents?: { document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]`\n - `errors?: object[]`\n - `provenance?: { entities?: { id: string; name: string; type: string; }[]; failed_sources?: string[]; sources?: { resource_id: string; source: string; score?: number; title?: string; }[]; steps?: { iteration: number; status: string; tool: string; query?: string; result_count?: number; source?: string; }[]; }`\n - `query?: string`\n - `query_id?: string`\n - `score?: number`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst queryResult = await client.memories.search({ query: 'What does Hyperspell do?' });\n\nconsole.log(queryResult);\n```", perLanguage: { - typescript: { - method: 'client.memories.search', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst queryResult = await client.memories.search({ query: 'What does Hyperspell do?' });\n\nconsole.log(queryResult.query_id);", - }, - python: { - method: 'memories.search', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nquery_result = client.memories.search(\n query="What does Hyperspell do?",\n)\nprint(query_result.query_id)', - }, go: { method: 'client.Memories.Search', example: @@ -839,6 +829,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell memories search \\\n --api-key 'My API Key' \\\n --query 'What does Hyperspell do?'", }, + python: { + method: 'memories.search', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nquery_result = client.memories.search(\n query="What does Hyperspell do?",\n)\nprint(query_result.query_id)', + }, + typescript: { + method: 'client.memories.search', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst queryResult = await client.memories.search({ query: 'What does Hyperspell do?' });\n\nconsole.log(queryResult.query_id);", + }, http: { example: 'curl https://api.hyperspell.com/memories/query \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "query": "What does Hyperspell do?",\n "answer": true,\n "options": {\n "filter": {}\n },\n "sources": [\n "vault"\n ]\n }\'', @@ -860,16 +860,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## delete\n\n`client.memories.delete(source: string, resource_id: string): { chunks_deleted: number; message: string; resource_id: string; source: string; success: boolean; }`\n\n**delete** `/memories/delete/{source}/{resource_id}`\n\nDelete a memory and its associated chunks from the index.\n\nThis removes the memory completely from the vector index and database.\nThe operation deletes:\n1. All chunks associated with the resource (including embeddings)\n2. The documents row AND any legacy resources rows sharing the identity —\n leaving either one behind would resurrect the memory through the\n double-read path (ENG-2477).\n\nArgs:\n source: The document provider (e.g., gmail, notion, vault)\n resource_id: The unique identifier of the resource to delete\n api_token: Authentication token\n\nReturns:\n MemoryDeletionResponse with deletion details\n\nRaises:\n DocumentNotFound: If the resource doesn't exist or user doesn't have access\n\n### Parameters\n\n- `source: string`\n\n- `resource_id: string`\n\n### Returns\n\n- `{ chunks_deleted: number; message: string; resource_id: string; source: string; success: boolean; }`\n\n - `chunks_deleted: number`\n - `message: string`\n - `resource_id: string`\n - `source: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memory = await client.memories.delete('resource_id', { source: 'reddit' });\n\nconsole.log(memory);\n```", perLanguage: { - typescript: { - method: 'client.memories.delete', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memory = await client.memories.delete('resource_id', { source: 'reddit' });\n\nconsole.log(memory.resource_id);", - }, - python: { - method: 'memories.delete', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory = client.memories.delete(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory.resource_id)', - }, go: { method: 'client.Memories.Delete', example: @@ -880,6 +870,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell memories delete \\\n --api-key 'My API Key' \\\n --source reddit \\\n --resource-id resource_id", }, + python: { + method: 'memories.delete', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory = client.memories.delete(\n resource_id="resource_id",\n source="reddit",\n)\nprint(memory.resource_id)', + }, + typescript: { + method: 'client.memories.delete', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memory = await client.memories.delete('resource_id', { source: 'reddit' });\n\nconsole.log(memory.resource_id);", + }, http: { example: 'curl https://api.hyperspell.com/memories/delete/$SOURCE/$RESOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -900,16 +900,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list_queries\n\n`client.evaluate.listQueries(cursor?: string, size?: number, user_id?: string): { query: string; query_id: string; time: string; user_id?: string; }`\n\n**get** `/evaluate/queries`\n\nPaginate through all prior queries for the app, newest first.\n\nUser tokens only see their own queries; admin tokens see every query in the\napp and can narrow to a single user with the `user_id` filter.\n\n### Parameters\n\n- `cursor?: string`\n\n- `size?: number`\n\n- `user_id?: string`\n Filter queries by the user that issued them.\n\n### Returns\n\n- `{ query: string; query_id: string; time: string; user_id?: string; }`\n\n - `query: string`\n - `query_id: string`\n - `time: string`\n - `user_id?: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluateListQueriesResponse of client.evaluate.listQueries()) {\n console.log(evaluateListQueriesResponse);\n}\n```", perLanguage: { - typescript: { - method: 'client.evaluate.listQueries', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluateListQueriesResponse of client.evaluate.listQueries()) {\n console.log(evaluateListQueriesResponse.query_id);\n}", - }, - python: { - method: 'evaluate.list_queries', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluate.list_queries()\npage = page.items[0]\nprint(page.query_id)', - }, go: { method: 'client.Evaluate.ListQueries', example: @@ -919,6 +909,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'evaluate list_queries', example: "hyperspell evaluate list-queries \\\n --api-key 'My API Key'", }, + python: { + method: 'evaluate.list_queries', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluate.list_queries()\npage = page.items[0]\nprint(page.query_id)', + }, + typescript: { + method: 'client.evaluate.listQueries', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluateListQueriesResponse of client.evaluate.listQueries()) {\n console.log(evaluateListQueriesResponse.query_id);\n}", + }, http: { example: 'curl https://api.hyperspell.com/evaluate/queries \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -937,18 +937,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }", markdown: - "## get_query\n\n`client.evaluate.getQuery(query_id: string): { answer?: string; documents?: scored_document_response[]; errors?: object[]; provenance?: provenance; query?: string; query_id?: string; score?: number; }`\n\n**get** `/evaluate/query/{query_id}`\n\nRetrieve the result of a previous query.\n\n### Parameters\n\n- `query_id: string`\n\n### Returns\n\n- `{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }`\n\n - `answer?: string`\n - `documents?: { document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]`\n - `errors?: object[]`\n - `provenance?: { entities?: { id: string; name: string; type: string; }[]; failed_sources?: string[]; sources?: { resource_id: string; source: string; score?: number; title?: string; }[]; steps?: { iteration: number; status: string; tool: string; query?: string; result_count?: number; source?: string; }[]; }`\n - `query?: string`\n - `query_id?: string`\n - `score?: number`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst queryResult = await client.evaluate.getQuery('query_id');\n\nconsole.log(queryResult);\n```", + "## get_query\n\n`client.evaluate.getQuery(query_id: string): { answer?: string; documents?: scored_document_response[]; errors?: object[]; provenance?: provenance; query?: string; query_id?: string; score?: number; }`\n\n**get** `/evaluate/query/{query_id}`\n\nRetrieve the result of a previous query.\n\n### Parameters\n\n- `query_id: string`\n\n### Returns\n\n- `{ answer?: string; documents?: { document: document | website | task | person | message | event | file | conversation | trace | transcript | company | deal; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]; errors?: object[]; provenance?: { entities?: provenance_entity[]; failed_sources?: string[]; sources?: provenance_source[]; steps?: provenance_step[]; }; query?: string; query_id?: string; score?: number; }`\n\n - `answer?: string`\n - `documents?: { document: { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; text?: string; title?: string; type?: 'document'; } | { url: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; description?: string; favicon?: string; image_url?: string; language?: string; metadata?: metadata; text?: string; title?: string; type?: 'website'; } | { id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; comments?: message[]; due_at?: string; metadata?: metadata; priority?: 'urgent' | 'high' | 'medium' | 'low'; status?: 'completed' | 'not_started' | 'in_progress' | 'cancelled'; text?: string; type?: 'task'; } | { id?: string; address?: string; alt_names?: string[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; company?: string; company_ids?: string[]; date_of_birth?: string; deal_ids?: string[]; email?: string; emails?: string[]; image_url?: string; job_title?: string; link_urls?: string[]; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; type?: 'person'; username?: string; } | { date: string; sender: person; id?: string; channel?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; external_id?: string; is_self?: boolean; mentioned_users?: person[]; metadata?: metadata; num_replies?: number; replies?: message[]; text?: string; thread_id?: string; title?: string; type?: 'message'; updated_at?: string; upvotes?: number; } | { id?: string; attendees?: person[]; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; end_at?: string; location?: string; meeting_url?: string; metadata?: metadata; start_at?: string; text?: string; title?: string; type?: 'event'; } | { content_type: string; filename: string; id?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; metadata?: metadata; path?: string[]; text?: string; title?: string; type?: 'file'; } | { id?: string; channel?: string; children?: message[]; metadata?: metadata; text?: string; title?: string; type?: 'conversation'; } | { id?: string; children?: trace_message | tool_call | tool_result[]; metadata?: metadata; text?: string; title?: string; type?: 'trace'; } | { id?: string; children?: utterance[]; ended_at?: string; metadata?: metadata; participants?: person[]; started_at?: string; text?: string; title?: string; type?: 'transcript'; } | { id?: string; address?: string; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; contact_ids?: string[]; deal_ids?: string[]; description?: string; emails?: string[]; employees?: number; image_url?: string; industry?: string; is_active?: boolean; metadata?: metadata; name?: string; phone_numbers?: string[]; tags?: string[]; text?: string; timezone?: string; type?: 'company'; websites?: string[]; } | { id?: string; amount?: number; children?: blob | callout | chunk | code | comment | divider | equation | footnote | heading | image | link | line_break | list | list_item | paragraph | quote | table | table_cell | table_row | text | to_do | tool_call | tool_result | trace_message | utterance[]; closed_at?: string; company_ids?: string[]; contact_ids?: string[]; currency?: string; deal_source?: string; lost_reason?: string; metadata?: metadata; name?: string; pipeline?: string; probability?: number; stage?: string; tags?: string[]; text?: string; type?: 'deal'; won_reason?: string; }; resource_id: string; source: string; type: string; collection?: string; document_date?: string; highlights?: object[]; ingested_at?: string; last_modified_at?: string; metadata?: object; score?: number; status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; summary?: string; title?: string; }[]`\n - `errors?: object[]`\n - `provenance?: { entities?: { id: string; name: string; type: string; }[]; failed_sources?: string[]; sources?: { resource_id: string; source: string; score?: number; title?: string; }[]; steps?: { iteration: number; status: string; tool: string; query?: string; result_count?: number; source?: string; }[]; }`\n - `query?: string`\n - `query_id?: string`\n - `score?: number`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst queryResult = await client.evaluate.getQuery('query_id');\n\nconsole.log(queryResult);\n```", perLanguage: { - typescript: { - method: 'client.evaluate.getQuery', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst queryResult = await client.evaluate.getQuery('query_id');\n\nconsole.log(queryResult.query_id);", - }, - python: { - method: 'evaluate.get_query', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nquery_result = client.evaluate.get_query(\n "query_id",\n)\nprint(query_result.query_id)', - }, go: { method: 'client.Evaluate.GetQuery', example: @@ -958,6 +948,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'evaluate get_query', example: "hyperspell evaluate get-query \\\n --api-key 'My API Key' \\\n --query-id query_id", }, + python: { + method: 'evaluate.get_query', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nquery_result = client.evaluate.get_query(\n "query_id",\n)\nprint(query_result.query_id)', + }, + typescript: { + method: 'client.evaluate.getQuery', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst queryResult = await client.evaluate.getQuery('query_id');\n\nconsole.log(queryResult.query_id);", + }, http: { example: 'curl https://api.hyperspell.com/evaluate/query/$QUERY_ID \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -977,16 +977,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## score_query\n\n`client.evaluate.scoreQuery(query_id: string, score?: number): { message: string; success: boolean; }`\n\n**post** `/evaluate/query/{query_id}`\n\nScore the result of a query.\n\n### Parameters\n\n- `query_id: string`\n\n- `score?: number`\n Rating of the query result from -1 (bad) to +1 (good).\n\n### Returns\n\n- `{ message: string; success: boolean; }`\n\n - `message: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.evaluate.scoreQuery('query_id');\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.evaluate.scoreQuery', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluate.scoreQuery('query_id');\n\nconsole.log(response.message);", - }, - python: { - method: 'evaluate.score_query', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluate.score_query(\n query_id="query_id",\n)\nprint(response.message)', - }, go: { method: 'client.Evaluate.ScoreQuery', example: @@ -996,6 +986,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'evaluate score_query', example: "hyperspell evaluate score-query \\\n --api-key 'My API Key' \\\n --query-id query_id", }, + python: { + method: 'evaluate.score_query', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluate.score_query(\n query_id="query_id",\n)\nprint(response.message)', + }, + typescript: { + method: 'client.evaluate.scoreQuery', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluate.scoreQuery('query_id');\n\nconsole.log(response.message);", + }, http: { example: "curl https://api.hyperspell.com/evaluate/query/$QUERY_ID \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $HYPERSPELL_API_KEY\" \\\n -d '{}'", @@ -1015,16 +1015,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## score_highlight\n\n`client.evaluate.scoreHighlight(highlight_id: string, comment?: string, score?: number): { message: string; success: boolean; }`\n\n**post** `/evaluate/highlight/{highlight_id}`\n\nScore an individual highlight.\n\n### Parameters\n\n- `highlight_id: string`\n\n- `comment?: string`\n Comment on the chunk\n\n- `score?: number`\n Rating of the chunk from -1 (bad) to +1 (good).\n\n### Returns\n\n- `{ message: string; success: boolean; }`\n\n - `message: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.evaluate.scoreHighlight('highlight_id');\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.evaluate.scoreHighlight', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluate.scoreHighlight('highlight_id');\n\nconsole.log(response.message);", - }, - python: { - method: 'evaluate.score_highlight', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluate.score_highlight(\n highlight_id="highlight_id",\n)\nprint(response.message)', - }, go: { method: 'client.Evaluate.ScoreHighlight', example: @@ -1035,6 +1025,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell evaluate score-highlight \\\n --api-key 'My API Key' \\\n --highlight-id highlight_id", }, + python: { + method: 'evaluate.score_highlight', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluate.score_highlight(\n highlight_id="highlight_id",\n)\nprint(response.message)', + }, + typescript: { + method: 'client.evaluate.scoreHighlight', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluate.scoreHighlight('highlight_id');\n\nconsole.log(response.message);", + }, http: { example: "curl https://api.hyperspell.com/evaluate/highlight/$HIGHLIGHT_ID \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $HYPERSPELL_API_KEY\" \\\n -d '{}'", @@ -1060,16 +1060,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## send_message\n\n`client.actions.sendMessage(provider: string, text: string, channel?: string, connection?: string, parent?: string): { success: boolean; error?: string; provider_response?: object; }`\n\n**post** `/actions/send_message`\n\nSend a message to a channel or conversation on a connected integration.\n\n### Parameters\n\n- `provider: string`\n Integration provider (e.g., slack)\n\n- `text: string`\n Message text\n\n- `channel?: string`\n Channel ID (required for Slack)\n\n- `connection?: string`\n Connection ID. If omitted, auto-resolved from provider + user.\n\n- `parent?: string`\n Parent message ID for threading (thread_ts for Slack)\n\n### Returns\n\n- `{ success: boolean; error?: string; provider_response?: object; }`\n Result from executing an integration action.\n\n - `success: boolean`\n - `error?: string`\n - `provider_response?: object`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.actions.sendMessage({ provider: 'reddit', text: 'text' });\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.actions.sendMessage', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.actions.sendMessage({ provider: 'reddit', text: 'text' });\n\nconsole.log(response.provider_response);", - }, - python: { - method: 'actions.send_message', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.actions.send_message(\n provider="reddit",\n text="text",\n)\nprint(response.provider_response)', - }, go: { method: 'client.Actions.SendMessage', example: @@ -1080,6 +1070,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell actions send-message \\\n --api-key 'My API Key' \\\n --provider reddit \\\n --text text", }, + python: { + method: 'actions.send_message', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.actions.send_message(\n provider="reddit",\n text="text",\n)\nprint(response.provider_response)', + }, + typescript: { + method: 'client.actions.sendMessage', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.actions.sendMessage({ provider: 'reddit', text: 'text' });\n\nconsole.log(response.provider_response);", + }, http: { example: 'curl https://api.hyperspell.com/actions/send_message \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "provider": "reddit",\n "text": "text"\n }\'', @@ -1105,16 +1105,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## add_reaction\n\n`client.actions.addReaction(channel: string, name: string, provider: string, timestamp: string, connection?: string): { success: boolean; error?: string; provider_response?: object; }`\n\n**post** `/actions/add_reaction`\n\nAdd an emoji reaction to a message on a connected integration.\n\n### Parameters\n\n- `channel: string`\n Channel ID containing the message\n\n- `name: string`\n Emoji name without colons (e.g., thumbsup)\n\n- `provider: string`\n Integration provider (e.g., slack)\n\n- `timestamp: string`\n Message timestamp to react to\n\n- `connection?: string`\n Connection ID. If omitted, auto-resolved from provider + user.\n\n### Returns\n\n- `{ success: boolean; error?: string; provider_response?: object; }`\n Result from executing an integration action.\n\n - `success: boolean`\n - `error?: string`\n - `provider_response?: object`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.actions.addReaction({\n channel: 'channel',\n name: 'name',\n provider: 'reddit',\n timestamp: 'timestamp',\n});\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.actions.addReaction', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.actions.addReaction({\n channel: 'channel',\n name: 'name',\n provider: 'reddit',\n timestamp: 'timestamp',\n});\n\nconsole.log(response.provider_response);", - }, - python: { - method: 'actions.add_reaction', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.actions.add_reaction(\n channel="channel",\n name="name",\n provider="reddit",\n timestamp="timestamp",\n)\nprint(response.provider_response)', - }, go: { method: 'client.Actions.AddReaction', example: @@ -1125,6 +1115,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "hyperspell actions add-reaction \\\n --api-key 'My API Key' \\\n --channel channel \\\n --name name \\\n --provider reddit \\\n --timestamp timestamp", }, + python: { + method: 'actions.add_reaction', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.actions.add_reaction(\n channel="channel",\n name="name",\n provider="reddit",\n timestamp="timestamp",\n)\nprint(response.provider_response)', + }, + typescript: { + method: 'client.actions.addReaction', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.actions.addReaction({\n channel: 'channel',\n name: 'name',\n provider: 'reddit',\n timestamp: 'timestamp',\n});\n\nconsole.log(response.provider_response);", + }, http: { example: 'curl https://api.hyperspell.com/actions/add_reaction \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "channel": "channel",\n "name": "name",\n "provider": "reddit",\n "timestamp": "timestamp"\n }\'', @@ -1154,16 +1154,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## add\n\n`client.sessions.add(history: string, date?: string, extract?: 'procedure' | 'memory' | 'mood'[], format?: 'vercel' | 'hyperdoc' | 'openclaw', metadata?: object, session_id?: string, title?: string): { resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n**post** `/trace/add`\n\nAdd an agent trace/transcript to the index.\n\nAccepts traces as a string in Hyperdoc format (native), Vercel AI SDK format,\nor OpenClaw JSONL format. The format is auto-detected if not specified.\n\n**Hyperdoc format** (JSON array, snake_case with type discriminators):\n```json\n{\"history\": \"[{\\\"type\\\": \\\"trace_message\\\", \\\"role\\\": \\\"user\\\", \\\"text\\\": \\\"Hello\\\"}]\"}\n```\n\n**Vercel AI SDK format** (JSON array, camelCase):\n```json\n{\"history\": \"[{\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"Hello\\\"}]\"}\n```\n\n**OpenClaw JSONL format** (newline-delimited JSON):\n```json\n{\"history\": \"{\\\"type\\\":\\\"session\\\",\\\"id\\\":\\\"abc\\\"}\\n{\\\"type\\\":\\\"message\\\",\\\"message\\\":{\\\"role\\\":\\\"user\\\",...}}\"}\n```\n\n### Parameters\n\n- `history: string`\n The trace history as a string. Can be a JSON array of Hyperdoc steps, a JSON array of Vercel AI SDK steps, or OpenClaw JSONL.\n\n- `date?: string`\n Date of the trace\n\n- `extract?: 'procedure' | 'memory' | 'mood'[]`\n What kind of memories to extract from the trace\n\n- `format?: 'vercel' | 'hyperdoc' | 'openclaw'`\n Trace format: 'vercel', 'hyperdoc', or 'openclaw'. Auto-detected if not set.\n\n- `metadata?: object`\n Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars.\n\n- `session_id?: string`\n Resource identifier for the trace.\n\n- `title?: string`\n Title of the trace\n\n### Returns\n\n- `{ resource_id: string; source: string; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; }`\n\n - `resource_id: string`\n - `source: string`\n - `status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst memoryStatus = await client.sessions.add({ history: 'history' });\n\nconsole.log(memoryStatus);\n```", perLanguage: { - typescript: { - method: 'client.sessions.add', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.sessions.add({ history: 'history' });\n\nconsole.log(memoryStatus.resource_id);", - }, - python: { - method: 'sessions.add', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.sessions.add(\n history="history",\n)\nprint(memory_status.resource_id)', - }, go: { method: 'client.Sessions.Add', example: @@ -1173,6 +1163,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'sessions add', example: "hyperspell sessions add \\\n --api-key 'My API Key' \\\n --history history", }, + python: { + method: 'sessions.add', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nmemory_status = client.sessions.add(\n history="history",\n)\nprint(memory_status.resource_id)', + }, + typescript: { + method: 'client.sessions.add', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.sessions.add({ history: 'history' });\n\nconsole.log(memoryStatus.resource_id);", + }, http: { example: 'curl https://api.hyperspell.com/trace/add \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "history": "history"\n }\'', @@ -1193,16 +1193,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## list\n\n`client.vaults.list(cursor?: string, size?: number): { collection: string; document_count: number; }`\n\n**get** `/vault/list`\n\nThis endpoint lists all collections, and how many documents are in each collection.\nAll documents that do not have a collection assigned are in the `null` collection.\n\n### Parameters\n\n- `cursor?: string`\n\n- `size?: number`\n\n### Returns\n\n- `{ collection: string; document_count: number; }`\n\n - `collection: string`\n - `document_count: number`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// Automatically fetches more pages as needed.\nfor await (const vaultListResponse of client.vaults.list()) {\n console.log(vaultListResponse);\n}\n```", perLanguage: { - typescript: { - method: 'client.vaults.list', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vaultListResponse of client.vaults.list()) {\n console.log(vaultListResponse.collection);\n}", - }, - python: { - method: 'vaults.list', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.vaults.list()\npage = page.items[0]\nprint(page.collection)', - }, go: { method: 'client.Vaults.List', example: @@ -1212,6 +1202,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'vaults list', example: "hyperspell vaults list \\\n --api-key 'My API Key'", }, + python: { + method: 'vaults.list', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\npage = client.vaults.list()\npage = page.items[0]\nprint(page.collection)', + }, + typescript: { + method: 'client.vaults.list', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vaultListResponse of client.vaults.list()) {\n console.log(vaultListResponse.collection);\n}", + }, http: { example: 'curl https://api.hyperspell.com/vault/list \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -1232,16 +1232,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## user_token\n\n`client.auth.userToken(user_id: string, expires_in?: string, origin?: string): { token: string; expires_at: string; }`\n\n**post** `/auth/user_token`\n\nUse this endpoint to create a user token for a specific user.\nThis token can be safely passed to your user-facing front-end.\n\n### Parameters\n\n- `user_id: string`\n\n- `expires_in?: string`\n Token lifetime, e.g., '30m', '2h', '1d'. Defaults to 24 hours if not provided.\n\n- `origin?: string`\n Origin of the request, used for CSRF protection. If set, the token will only be valid for requests originating from this origin.\n\n### Returns\n\n- `{ token: string; expires_at: string; }`\n\n - `token: string`\n - `expires_at: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst token = await client.auth.userToken({ user_id: 'user_id' });\n\nconsole.log(token);\n```", perLanguage: { - typescript: { - method: 'client.auth.userToken', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst token = await client.auth.userToken({ user_id: 'user_id' });\n\nconsole.log(token.token);", - }, - python: { - method: 'auth.user_token', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\ntoken = client.auth.user_token(\n user_id="user_id",\n)\nprint(token.token)', - }, go: { method: 'client.Auth.UserToken', example: @@ -1251,6 +1241,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'auth user_token', example: "hyperspell auth user-token \\\n --api-key 'My API Key' \\\n --user-id user_id", }, + python: { + method: 'auth.user_token', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\ntoken = client.auth.user_token(\n user_id="user_id",\n)\nprint(token.token)', + }, + typescript: { + method: 'client.auth.userToken', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst token = await client.auth.userToken({ user_id: 'user_id' });\n\nconsole.log(token.token);", + }, http: { example: 'curl https://api.hyperspell.com/auth/user_token \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY" \\\n -d \'{\n "user_id": "user_id",\n "expires_in": "30m"\n }\'', @@ -1270,16 +1270,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## me\n\n`client.auth.me(): { id: string; app: object; available_integrations: string[]; installed_integrations: string[]; token_expiration: string; }`\n\n**get** `/auth/me`\n\nEndpoint to get basic user data.\n\n### Returns\n\n- `{ id: string; app: { id: string; icon_url: string; name: string; redirect_url: string; }; available_integrations: string[]; installed_integrations: string[]; token_expiration: string; }`\n\n - `id: string`\n - `app: { id: string; icon_url: string; name: string; redirect_url: string; }`\n - `available_integrations: string[]`\n - `installed_integrations: string[]`\n - `token_expiration: string`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.auth.me();\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.auth.me', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.auth.me();\n\nconsole.log(response.id);", - }, - python: { - method: 'auth.me', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.auth.me()\nprint(response.id)', - }, go: { method: 'client.Auth.Me', example: @@ -1289,6 +1279,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'auth me', example: "hyperspell auth me \\\n --api-key 'My API Key'", }, + python: { + method: 'auth.me', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.auth.me()\nprint(response.id)', + }, + typescript: { + method: 'client.auth.me', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.auth.me();\n\nconsole.log(response.id);", + }, http: { example: 'curl https://api.hyperspell.com/auth/me \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -1307,16 +1307,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## delete_user\n\n`client.auth.deleteUser(): { message: string; success: boolean; }`\n\n**delete** `/auth/delete`\n\nEndpoint to delete user.\n\n### Returns\n\n- `{ message: string; success: boolean; }`\n\n - `message: string`\n - `success: boolean`\n\n### Example\n\n```typescript\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\nconst response = await client.auth.deleteUser();\n\nconsole.log(response);\n```", perLanguage: { - typescript: { - method: 'client.auth.deleteUser', - example: - "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.auth.deleteUser();\n\nconsole.log(response.message);", - }, - python: { - method: 'auth.delete_user', - example: - 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.auth.delete_user()\nprint(response.message)', - }, go: { method: 'client.Auth.DeleteUser', example: @@ -1326,6 +1316,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'auth delete_user', example: "hyperspell auth delete-user \\\n --api-key 'My API Key'", }, + python: { + method: 'auth.delete_user', + example: + 'import os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.auth.delete_user()\nprint(response.message)', + }, + typescript: { + method: 'client.auth.deleteUser', + example: + "import Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.auth.deleteUser();\n\nconsole.log(response.message);", + }, http: { example: 'curl https://api.hyperspell.com/auth/delete \\\n -X DELETE \\\n -H "Authorization: Bearer $HYPERSPELL_API_KEY"', @@ -1336,24 +1336,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [ const EMBEDDED_READMES: { language: string; content: string }[] = [ { - language: 'cli', + language: 'go', content: - "# Hyperspell CLI\n\nThe official CLI for the [Hyperspell REST API](https://docs.hyperspell.com/).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install hyperspell/tools/hyperspell\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/hyperspell/hyperspell-cli/cmd/hyperspell@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nhyperspell [resource] [flags...]\n~~~\n\n~~~sh\nhyperspell memories add \\\n --api-key 'My API Key' \\\n --text ...\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Description | Required |\n| -------------------- | ---------------------------------------------------------------------------- | -------- |\n| `HYPERSPELL_API_KEY` | Either an API Key or User Token to authenticate a specific user of your app. | yes |\n\n### Global flags\n\n- `--api-key` - Either an API Key or User Token to authenticate a specific user of your app. (can also be set with `HYPERSPELL_API_KEY` env var)\n- `--user-id` - The id of the user making this request. Optional.\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nhyperspell --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nhyperspell --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nhyperspell < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nhyperspell --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Hyperspell Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/hyperspell-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../hyperspell-go`.\n", + '# Hyperspell Go API Library\n\nGo Reference\n\nThe Hyperspell Go library provides convenient access to the [Hyperspell REST API](https://docs.hyperspell.com/)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoeXBlcnNwZWxsL2h5cGVyc3BlbGwtbWNwIl0sImVudiI6eyJIWVBFUlNQRUxMX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiSFlQRVJTUEVMTF9VU0VSX0lEIjoiTXkgVXNlciBJRCJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hyperspell%2Fhyperspell-mcp%22%5D%2C%22env%22%3A%7B%22HYPERSPELL_API_KEY%22%3A%22My%20API%20Key%22%2C%22HYPERSPELL_USER_ID%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/hyperspell/hyperspell-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/hyperspell/hyperspell-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/hyperspell/hyperspell-go"\n\t"github.com/hyperspell/hyperspell-go/option"\n)\n\nfunc main() {\n\tclient := hyperspell.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("HYPERSPELL_API_KEY")\n\t)\n\tmemoryStatus, err := client.Memories.Add(context.TODO(), hyperspell.MemoryAddParams{\n\t\tText: "...",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", memoryStatus.ResourceID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Memories.Add(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/hyperspell/hyperspell-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Memories.ListAutoPaging(context.TODO(), hyperspell.MemoryListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tmemoryListResponse := iter.Current()\n\tfmt.Printf("%+v\\n", memoryListResponse)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Memories.List(context.TODO(), hyperspell.MemoryListParams{})\nfor page != nil {\n\tfor _, memory := range page.Items {\n\t\tfmt.Printf("%+v\\n", memory)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Memories.Add(context.TODO(), hyperspell.MemoryAddParams{\n\tText: "...",\n})\nif err != nil {\n\tvar apierr *hyperspell.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/memories/add": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Memories.Add(\n\tctx,\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nhyperspell.MemoryUploadParams{\n\tFile: file,\n}\n\n// A file from a string\nhyperspell.MemoryUploadParams{\n\tFile: strings.NewReader("my file contents"),\n}\n\n// With a custom filename and contentType\nhyperspell.MemoryUploadParams{\n\tFile: hyperspell.NewFile(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := hyperspell.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Memories.Add(\n\tcontext.TODO(),\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\nmemoryStatus, err := client.Memories.Add(\n\tcontext.TODO(),\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", memoryStatus)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/hyperspell-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { - language: 'go', + language: 'cli', content: - '# Hyperspell Go API Library\n\nGo Reference\n\nThe Hyperspell Go library provides convenient access to the [Hyperspell REST API](https://docs.hyperspell.com/)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/hyperspell/hyperspell-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/hyperspell/hyperspell-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/hyperspell/hyperspell-go"\n\t"github.com/hyperspell/hyperspell-go/option"\n)\n\nfunc main() {\n\tclient := hyperspell.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("HYPERSPELL_API_KEY")\n\t)\n\tmemoryStatus, err := client.Memories.Add(context.TODO(), hyperspell.MemoryAddParams{\n\t\tText: "...",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", memoryStatus.ResourceID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Memories.Add(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/hyperspell/hyperspell-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Memories.ListAutoPaging(context.TODO(), hyperspell.MemoryListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tmemoryListResponse := iter.Current()\n\tfmt.Printf("%+v\\n", memoryListResponse)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Memories.List(context.TODO(), hyperspell.MemoryListParams{})\nfor page != nil {\n\tfor _, memory := range page.Items {\n\t\tfmt.Printf("%+v\\n", memory)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Memories.Add(context.TODO(), hyperspell.MemoryAddParams{\n\tText: "...",\n})\nif err != nil {\n\tvar apierr *hyperspell.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/memories/add": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Memories.Add(\n\tctx,\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nhyperspell.MemoryUploadParams{\n\tFile: file,\n}\n\n// A file from a string\nhyperspell.MemoryUploadParams{\n\tFile: strings.NewReader("my file contents"),\n}\n\n// With a custom filename and contentType\nhyperspell.MemoryUploadParams{\n\tFile: hyperspell.NewFile(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := hyperspell.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Memories.Add(\n\tcontext.TODO(),\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\nmemoryStatus, err := client.Memories.Add(\n\tcontext.TODO(),\n\thyperspell.MemoryAddParams{\n\t\tText: "...",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", memoryStatus)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/hyperspell-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', + "# Hyperspell CLI\n\nThe official CLI for the [Hyperspell REST API](https://docs.hyperspell.com/).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install hyperspell/tools/hyperspell\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/hyperspell/hyperspell-cli/cmd/hyperspell@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nhyperspell [resource] [flags...]\n~~~\n\n~~~sh\nhyperspell memories add \\\n --api-key 'My API Key' \\\n --text ...\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Description | Required |\n| -------------------- | ---------------------------------------------------------------------------- | -------- |\n| `HYPERSPELL_API_KEY` | Either an API Key or User Token to authenticate a specific user of your app. | yes |\n\n### Global flags\n\n- `--api-key` - Either an API Key or User Token to authenticate a specific user of your app. (can also be set with `HYPERSPELL_API_KEY` env var)\n- `--user-id` - The id of the user making this request. Optional.\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nhyperspell --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nhyperspell --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nhyperspell < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nhyperspell --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Hyperspell Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/hyperspell-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../hyperspell-go`.\n", }, { language: 'python', content: - '# Hyperspell Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/hyperspell.svg?label=pypi%20(stable))](https://pypi.org/project/hyperspell/)\n\nThe Hyperspell Python library provides convenient access to the Hyperspell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.hyperspell.com](https://docs.hyperspell.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install hyperspell\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\n\nmemory_status = client.memories.add(\n text="...",\n)\nprint(memory_status.resource_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `HYPERSPELL_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncHyperspell` instead of `Hyperspell` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom hyperspell import AsyncHyperspell\n\nclient = AsyncHyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n memory_status = await client.memories.add(\n text="...",\n )\n print(memory_status.resource_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install hyperspell[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom hyperspell import DefaultAioHttpClient\nfrom hyperspell import AsyncHyperspell\n\nasync def main() -> None:\n async with AsyncHyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n memory_status = await client.memories.add(\n text="...",\n )\n print(memory_status.resource_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Hyperspell API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nall_memories = []\n# Automatically fetches more pages as needed.\nfor memory in client.memories.list():\n # Do something with memory here\n all_memories.append(memory)\nprint(all_memories)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom hyperspell import AsyncHyperspell\n\nclient = AsyncHyperspell()\n\nasync def main() -> None:\n all_memories = []\n # Iterate through items across all pages, issuing requests as needed.\n async for memory in client.memories.list():\n all_memories.append(memory)\n print(all_memories)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.memories.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.items)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.memories.list()\n\nprint(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..."\nfor memory in first_page.items:\n print(memory.resource_id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nquery_result = client.memories.search(\n query="What does Hyperspell do?",\n options={\n "filter": {}\n },\n)\nprint(query_result.options)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nclient.memories.upload(\n file=Path("/path/to/file"),\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `hyperspell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `hyperspell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `hyperspell.APIError`.\n\n```python\nimport hyperspell\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\ntry:\n client.memories.add(\n text="...",\n )\nexcept hyperspell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept hyperspell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept hyperspell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom hyperspell import Hyperspell\n\n# Configure the default for all requests:\nclient = Hyperspell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).memories.add(\n text="...",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom hyperspell import Hyperspell\n\n# Configure the default for all requests:\nclient = Hyperspell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Hyperspell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).memories.add(\n text="...",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `HYPERSPELL_LOG` to `info`.\n\n```shell\n$ export HYPERSPELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\nresponse = client.memories.with_raw_response.add(\n text="...",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nmemory = response.parse() # get the object that `memories.add()` would have returned\nprint(memory.resource_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.memories.with_streaming_response.add(\n text="...",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom hyperspell import Hyperspell, DefaultHttpxClient\n\nclient = Hyperspell(\n # Or use the `HYPERSPELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom hyperspell import Hyperspell\n\nwith Hyperspell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport hyperspell\nprint(hyperspell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', + '# Hyperspell Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/hyperspell.svg?label=pypi%20(stable))](https://pypi.org/project/hyperspell/)\n\nThe Hyperspell Python library provides convenient access to the Hyperspell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoeXBlcnNwZWxsL2h5cGVyc3BlbGwtbWNwIl0sImVudiI6eyJIWVBFUlNQRUxMX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiSFlQRVJTUEVMTF9VU0VSX0lEIjoiTXkgVXNlciBJRCJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hyperspell%2Fhyperspell-mcp%22%5D%2C%22env%22%3A%7B%22HYPERSPELL_API_KEY%22%3A%22My%20API%20Key%22%2C%22HYPERSPELL_USER_ID%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.hyperspell.com](https://docs.hyperspell.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install hyperspell\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\n\nmemory_status = client.memories.add(\n text="...",\n)\nprint(memory_status.resource_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `HYPERSPELL_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncHyperspell` instead of `Hyperspell` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom hyperspell import AsyncHyperspell\n\nclient = AsyncHyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n memory_status = await client.memories.add(\n text="...",\n )\n print(memory_status.resource_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install hyperspell[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom hyperspell import DefaultAioHttpClient\nfrom hyperspell import AsyncHyperspell\n\nasync def main() -> None:\n async with AsyncHyperspell(\n api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n memory_status = await client.memories.add(\n text="...",\n )\n print(memory_status.resource_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Hyperspell API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nall_memories = []\n# Automatically fetches more pages as needed.\nfor memory in client.memories.list():\n # Do something with memory here\n all_memories.append(memory)\nprint(all_memories)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom hyperspell import AsyncHyperspell\n\nclient = AsyncHyperspell()\n\nasync def main() -> None:\n all_memories = []\n # Iterate through items across all pages, issuing requests as needed.\n async for memory in client.memories.list():\n all_memories.append(memory)\n print(all_memories)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.memories.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.items)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.memories.list()\n\nprint(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..."\nfor memory in first_page.items:\n print(memory.resource_id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nquery_result = client.memories.search(\n query="What does Hyperspell do?",\n options={\n "filter": {}\n },\n)\nprint(query_result.options)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\nclient.memories.upload(\n file=Path("/path/to/file"),\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `hyperspell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `hyperspell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `hyperspell.APIError`.\n\n```python\nimport hyperspell\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\n\ntry:\n client.memories.add(\n text="...",\n )\nexcept hyperspell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept hyperspell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept hyperspell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom hyperspell import Hyperspell\n\n# Configure the default for all requests:\nclient = Hyperspell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).memories.add(\n text="...",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom hyperspell import Hyperspell\n\n# Configure the default for all requests:\nclient = Hyperspell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Hyperspell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).memories.add(\n text="...",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `HYPERSPELL_LOG` to `info`.\n\n```shell\n$ export HYPERSPELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom hyperspell import Hyperspell\n\nclient = Hyperspell()\nresponse = client.memories.with_raw_response.add(\n text="...",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nmemory = response.parse() # get the object that `memories.add()` would have returned\nprint(memory.resource_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/hyperspell/python-sdk/tree/main/src/hyperspell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.memories.with_streaming_response.add(\n text="...",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom hyperspell import Hyperspell, DefaultHttpxClient\n\nclient = Hyperspell(\n # Or use the `HYPERSPELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom hyperspell import Hyperspell\n\nwith Hyperspell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport hyperspell\nprint(hyperspell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { language: 'typescript', content: - "# Hyperspell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@hyperspell/hyperspell.svg?label=npm%20(stable))](https://npmjs.org/package/@hyperspell/hyperspell) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@hyperspell/hyperspell)\n\nThis library provides convenient access to the Hyperspell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.hyperspell.com](https://docs.hyperspell.com/). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @hyperspell/hyperspell\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n\n```js\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.add({ text: '...' });\n\nconsole.log(memoryStatus.resource_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Hyperspell.MemoryAddParams = { text: '...' };\nconst memoryStatus: Hyperspell.MemoryStatus = await client.memories.add(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport Hyperspell, { toFile } from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.memories.upload({ file: fs.createReadStream('/path/to/file') });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.memories.upload({ file: new File(['my bytes'], 'file') });\n\n// You can also pass a `fetch` `Response`:\nawait client.memories.upload({ file: await fetch('https://somesite/file') });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.memories.upload({ file: await toFile(Buffer.from('my bytes'), 'file') });\nawait client.memories.upload({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n\n```ts\nconst memoryStatus = await client.memories.add({ text: '...' }).catch(async (err) => {\n if (err instanceof Hyperspell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n\n```js\n// Configure the default for all requests:\nconst client = new Hyperspell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.memories.add({ text: '...' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n\n```ts\n// Configure the default for all requests:\nconst client = new Hyperspell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.memories.add({ text: '...' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the Hyperspell API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllMemoryListResponses(params) {\n const allMemoryListResponses = [];\n // Automatically fetches more pages as needed.\n for await (const memoryListResponse of client.memories.list()) {\n allMemoryListResponses.push(memoryListResponse);\n }\n return allMemoryListResponses;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.memories.list();\nfor (const memoryListResponse of page.items) {\n console.log(memoryListResponse);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n\n```ts\nconst client = new Hyperspell();\n\nconst response = await client.memories.add({ text: '...' }).asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: memoryStatus, response: raw } = await client.memories\n .add({ text: '...' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(memoryStatus.resource_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `HYPERSPELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Hyperspell({\n logger: logger.child({ name: 'Hyperspell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.memories.add({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport fetch from 'my-fetch';\n\nconst client = new Hyperspell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Hyperspell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n **Bun** [[docs](https://bun.sh/guides/http/proxy)]\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]\n\n```ts\nimport Hyperspell from 'npm:@hyperspell/hyperspell';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Hyperspell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/node-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n", + "# Hyperspell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@hyperspell/hyperspell.svg?label=npm%20(stable))](https://npmjs.org/package/@hyperspell/hyperspell) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@hyperspell/hyperspell)\n\nThis library provides convenient access to the Hyperspell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.hyperspell.com](https://docs.hyperspell.com/). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoeXBlcnNwZWxsL2h5cGVyc3BlbGwtbWNwIl0sImVudiI6eyJIWVBFUlNQRUxMX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiSFlQRVJTUEVMTF9VU0VSX0lEIjoiTXkgVXNlciBJRCJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40hyperspell%2Fhyperspell-mcp%22%5D%2C%22env%22%3A%7B%22HYPERSPELL_API_KEY%22%3A%22My%20API%20Key%22%2C%22HYPERSPELL_USER_ID%22%3A%22My%20User%20ID%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @hyperspell/hyperspell\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n\n```js\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst memoryStatus = await client.memories.add({ text: '...' });\n\nconsole.log(memoryStatus.resource_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Hyperspell.MemoryAddParams = { text: '...' };\nconst memoryStatus: Hyperspell.MemoryStatus = await client.memories.add(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport Hyperspell, { toFile } from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.memories.upload({ file: fs.createReadStream('/path/to/file') });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.memories.upload({ file: new File(['my bytes'], 'file') });\n\n// You can also pass a `fetch` `Response`:\nawait client.memories.upload({ file: await fetch('https://somesite/file') });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.memories.upload({ file: await toFile(Buffer.from('my bytes'), 'file') });\nawait client.memories.upload({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n\n```ts\nconst memoryStatus = await client.memories.add({ text: '...' }).catch(async (err) => {\n if (err instanceof Hyperspell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n\n```js\n// Configure the default for all requests:\nconst client = new Hyperspell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.memories.add({ text: '...' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n\n```ts\n// Configure the default for all requests:\nconst client = new Hyperspell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.memories.add({ text: '...' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the Hyperspell API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllMemoryListResponses(params) {\n const allMemoryListResponses = [];\n // Automatically fetches more pages as needed.\n for await (const memoryListResponse of client.memories.list()) {\n allMemoryListResponses.push(memoryListResponse);\n }\n return allMemoryListResponses;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.memories.list();\nfor (const memoryListResponse of page.items) {\n console.log(memoryListResponse);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n\n```ts\nconst client = new Hyperspell();\n\nconst response = await client.memories.add({ text: '...' }).asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: memoryStatus, response: raw } = await client.memories\n .add({ text: '...' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(memoryStatus.resource_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `HYPERSPELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Hyperspell({\n logger: logger.child({ name: 'Hyperspell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.memories.add({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport fetch from 'my-fetch';\n\nconst client = new Hyperspell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Hyperspell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n **Bun** [[docs](https://bun.sh/guides/http/proxy)]\n\n```ts\nimport Hyperspell from '@hyperspell/hyperspell';\n\nconst client = new Hyperspell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]\n\n```ts\nimport Hyperspell from 'npm:@hyperspell/hyperspell';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Hyperspell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/hyperspell/node-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n", }, ]; diff --git a/packages/mcp-server/src/methods.ts b/packages/mcp-server/src/methods.ts index 5511121a..3f2bedbd 100644 --- a/packages/mcp-server/src/methods.ts +++ b/packages/mcp-server/src/methods.ts @@ -10,30 +10,24 @@ export type SdkMethod = { }; export const sdkMethods: SdkMethod[] = [ - { - clientCallName: 'client.connections.list', - fullyQualifiedName: 'connections.list', - httpMethod: 'get', - httpPath: '/connections/list', - }, { clientCallName: 'client.connections.revoke', fullyQualifiedName: 'connections.revoke', httpMethod: 'delete', httpPath: '/connections/{connection_id}/revoke', }, + { + clientCallName: 'client.connections.list', + fullyQualifiedName: 'connections.list', + httpMethod: 'get', + httpPath: '/connections/list', + }, { clientCallName: 'client.folders.list', fullyQualifiedName: 'folders.list', httpMethod: 'get', httpPath: '/connections/{connection_id}/folders', }, - { - clientCallName: 'client.folders.deletePolicy', - fullyQualifiedName: 'folders.deletePolicy', - httpMethod: 'delete', - httpPath: '/connections/{connection_id}/folder-policies/{policy_id}', - }, { clientCallName: 'client.folders.listPolicies', fullyQualifiedName: 'folders.listPolicies', @@ -46,6 +40,12 @@ export const sdkMethods: SdkMethod[] = [ httpMethod: 'post', httpPath: '/connections/{connection_id}/folder-policies', }, + { + clientCallName: 'client.folders.deletePolicy', + fullyQualifiedName: 'folders.deletePolicy', + httpMethod: 'delete', + httpPath: '/connections/{connection_id}/folder-policies/{policy_id}', + }, { clientCallName: 'client.integrations.list', fullyQualifiedName: 'integrations.list', @@ -76,6 +76,24 @@ export const sdkMethods: SdkMethod[] = [ httpMethod: 'get', httpPath: '/integrations/slack/list', }, + { + clientCallName: 'client.memories.add', + fullyQualifiedName: 'memories.add', + httpMethod: 'post', + httpPath: '/memories/add', + }, + { + clientCallName: 'client.memories.addBulk', + fullyQualifiedName: 'memories.addBulk', + httpMethod: 'post', + httpPath: '/memories/add/bulk', + }, + { + clientCallName: 'client.memories.upload', + fullyQualifiedName: 'memories.upload', + httpMethod: 'post', + httpPath: '/memories/upload', + }, { clientCallName: 'client.memories.update', fullyQualifiedName: 'memories.update', @@ -89,22 +107,10 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/memories/list', }, { - clientCallName: 'client.memories.delete', - fullyQualifiedName: 'memories.delete', - httpMethod: 'delete', - httpPath: '/memories/delete/{source}/{resource_id}', - }, - { - clientCallName: 'client.memories.add', - fullyQualifiedName: 'memories.add', - httpMethod: 'post', - httpPath: '/memories/add', - }, - { - clientCallName: 'client.memories.addBulk', - fullyQualifiedName: 'memories.addBulk', - httpMethod: 'post', - httpPath: '/memories/add/bulk', + clientCallName: 'client.memories.status', + fullyQualifiedName: 'memories.status', + httpMethod: 'get', + httpPath: '/memories/status', }, { clientCallName: 'client.memories.get', @@ -119,16 +125,16 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/memories/query', }, { - clientCallName: 'client.memories.status', - fullyQualifiedName: 'memories.status', - httpMethod: 'get', - httpPath: '/memories/status', + clientCallName: 'client.memories.delete', + fullyQualifiedName: 'memories.delete', + httpMethod: 'delete', + httpPath: '/memories/delete/{source}/{resource_id}', }, { - clientCallName: 'client.memories.upload', - fullyQualifiedName: 'memories.upload', - httpMethod: 'post', - httpPath: '/memories/upload', + clientCallName: 'client.evaluate.listQueries', + fullyQualifiedName: 'evaluate.listQueries', + httpMethod: 'get', + httpPath: '/evaluate/queries', }, { clientCallName: 'client.evaluate.getQuery', @@ -137,10 +143,10 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/evaluate/query/{query_id}', }, { - clientCallName: 'client.evaluate.listQueries', - fullyQualifiedName: 'evaluate.listQueries', - httpMethod: 'get', - httpPath: '/evaluate/queries', + clientCallName: 'client.evaluate.scoreQuery', + fullyQualifiedName: 'evaluate.scoreQuery', + httpMethod: 'post', + httpPath: '/evaluate/query/{query_id}', }, { clientCallName: 'client.evaluate.scoreHighlight', @@ -149,10 +155,10 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/evaluate/highlight/{highlight_id}', }, { - clientCallName: 'client.evaluate.scoreQuery', - fullyQualifiedName: 'evaluate.scoreQuery', + clientCallName: 'client.actions.sendMessage', + fullyQualifiedName: 'actions.sendMessage', httpMethod: 'post', - httpPath: '/evaluate/query/{query_id}', + httpPath: '/actions/send_message', }, { clientCallName: 'client.actions.addReaction', @@ -160,12 +166,6 @@ export const sdkMethods: SdkMethod[] = [ httpMethod: 'post', httpPath: '/actions/add_reaction', }, - { - clientCallName: 'client.actions.sendMessage', - fullyQualifiedName: 'actions.sendMessage', - httpMethod: 'post', - httpPath: '/actions/send_message', - }, { clientCallName: 'client.sessions.add', fullyQualifiedName: 'sessions.add', @@ -179,10 +179,10 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/vault/list', }, { - clientCallName: 'client.auth.deleteUser', - fullyQualifiedName: 'auth.deleteUser', - httpMethod: 'delete', - httpPath: '/auth/delete', + clientCallName: 'client.auth.userToken', + fullyQualifiedName: 'auth.userToken', + httpMethod: 'post', + httpPath: '/auth/user_token', }, { clientCallName: 'client.auth.me', @@ -191,10 +191,10 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/auth/me', }, { - clientCallName: 'client.auth.userToken', - fullyQualifiedName: 'auth.userToken', - httpMethod: 'post', - httpPath: '/auth/user_token', + clientCallName: 'client.auth.deleteUser', + fullyQualifiedName: 'auth.deleteUser', + httpMethod: 'delete', + httpPath: '/auth/delete', }, ]; diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index f1518764..ff817c70 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -18,7 +18,7 @@ export type McpOptions = { includeCodeTool?: boolean | undefined; includeDocsTools?: boolean | undefined; stainlessApiKey?: string | undefined; - docsSearchMode?: 'stainless-api' | 'local' | undefined; + docsSearchMode?: 'local' | undefined; docsDir?: string | undefined; codeAllowHttpGets?: boolean | undefined; codeAllowedMethods?: string[] | undefined; @@ -27,7 +27,7 @@ export type McpOptions = { customInstructionsPath?: string | undefined; }; -export type McpCodeExecutionMode = 'stainless-sandbox' | 'local'; +export type McpCodeExecutionMode = 'local'; export function parseCLIOptions(): CLIOptions { const opts = yargs(hideBin(process.argv)) @@ -50,10 +50,10 @@ export function parseCLIOptions(): CLIOptions { }) .option('code-execution-mode', { type: 'string', - choices: ['stainless-sandbox', 'local'], - default: 'stainless-sandbox', + choices: ['local'], + default: 'local', description: - "Where to run code execution in code tool; 'stainless-sandbox' will execute code in Stainless-hosted sandboxes whereas 'local' will execute code locally on the MCP server machine.", + 'The server was generated without access to the Stainless API, so code execution can only run locally on the MCP server machine.', }) .option('custom-instructions-path', { type: 'string', @@ -67,10 +67,10 @@ export function parseCLIOptions(): CLIOptions { }) .option('docs-search-mode', { type: 'string', - choices: ['stainless-api', 'local'], - default: 'stainless-api', + choices: ['local'], + default: 'local', description: - "Where to search documentation; 'stainless-api' uses the Stainless-hosted search API whereas 'local' uses an in-memory search index built from embedded SDK method data and optional local docs files.", + "Documentation search will use an in-memory search index built from embedded SDK method data and optional local docs files; the 'stainless-api' option is unavailable.", }) .option('log-format', { type: 'string', @@ -132,7 +132,7 @@ export function parseCLIOptions(): CLIOptions { ...(includeDocsTools !== undefined && { includeDocsTools }), debug: !!argv.debug, stainlessApiKey: argv.stainlessApiKey, - docsSearchMode: argv.docsSearchMode as 'stainless-api' | 'local' | undefined, + docsSearchMode: argv.docsSearchMode as 'local' | undefined, docsDir: argv.docsDir, codeAllowHttpGets: argv.codeAllowHttpGets, codeAllowedMethods: argv.codeAllowedMethods, diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index a90add23..969823d0 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -184,7 +184,7 @@ export function selectTools(options?: McpOptions): McpTool[] { includedTools.push( codeTool({ blockedMethods: blockedMethodsForCodeTool(options), - codeExecutionMode: options?.codeExecutionMode ?? 'stainless-sandbox', + codeExecutionMode: options?.codeExecutionMode ?? 'local', }), ); } diff --git a/scripts/mock b/scripts/mock index feebe5ed..1df910b9 100755 --- a/scripts/mock +++ b/scripts/mock @@ -7,14 +7,15 @@ cd "$(dirname "$0")/.." if [[ -n "$1" && "$1" != '--'* ]]; then URL="$1" shift +elif [ -n "$STAINLESS_OPENAPI_SPEC_URL" ]; then + URL="$STAINLESS_OPENAPI_SPEC_URL" else - URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" -fi - -# Check if the URL is empty -if [ -z "$URL" ]; then - echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" - exit 1 + # Embedded OpenAPI spec (base64-encoded, gzipped) + EMBEDDED_SPEC="H4sIAAAAAAAAA+y97XIbyZEo+ioVOCdCpA2Akjz2xuGs9xwOSc3QpiQuKXl270ABFroLQC0bVe2ubkJYXUXcX/sAG/cJ/ST3ZmZVdzX6AyAIakAbfyQCqO/KzMrv/NLRsVA8lp3jzu/6r/ovO92OVGPdOf7SSWUaic5x56dFLBITiyhiJ1cXnW7HZLMZTxbln6Rh6VSwmZjpZMEivhAJG+uEnVwwHseGcRUyPhEqNX32YZrobDLFDidXF1220BkLuGI8DGkEKUyXBVopEaQs5ClnRmdJIAxLNZMqFJ+h84xJxRLBo14qZ6KLcxjBk2Caj8LmMp0ynSVM8TRLeMQiriYZnwj210wkCybURCrR73Q7qUhm5v34RiT3MoCNT9M0NsdHR9N8l/1Az45GkZ4cpdp0up1Aq5QHKZyW4rPyYXW6nSyJmofpdDtixiW2EFGk/0/5987XbudeJEZq1TnuvOz/7nX/FXxnRAJfd45/+bI0Po9lf2mMbicUJkhknNIwV4kOswA/fP3U7cQ8nRpY/JE7riMehvBFrA3uKuUTmKrz1v7e+eRf/0kYMm6vvDLXSRjCrTOejGSa8GTBQh1kM6FSuEO4erxHgAZp8PZHgnG1YKn4nHYZnk13oAIeRSxNuKKxu0ykAfQRxXBzGUXQOU50IIwRIQLCjIeC8XsuIz6KBMDiQOGVSzVhWgUC12D7wHewCj2LI5EiOOhYJBz2chF2jjs8DIfukIbwAU+o20nEXzNh0h90uIDzAoAQCo+Ox3EkAxzh6D8MHMmXjgmmYsbhr/+ZiHHnuPM/jmBKrQAvjuhXc3ShJsKk1zRy5+vXrzSNTETYOU6TTOAX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$(mktemp)" + trap 'rm -f "$SPEC_TMPFILE"' EXIT + echo "$EMBEDDED_SPEC" | base64 --decode | gunzip > "$SPEC_TMPFILE" + URL="$SPEC_TMPFILE" fi echo "==> Starting mock server with URL ${URL}" diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index 9afaa242..95ad67ab 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \ if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/hyperspell-typescript/$SHA'\033[0m" + echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/node-sdk/$SHA'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/client.ts b/src/client.ts index 52598c5e..4c19147b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -765,19 +765,11 @@ export class Hyperspell { return () => controller.abort(); } - private buildBody({ options }: { options: FinalRequestOptions }): { + private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; } { - const { body, headers: rawHeaders } = options; if (!body) { - // A resource method always passes a `body` key when its operation defines a - // request body, even if the caller omitted an optional body param. Keep the - // content-type for those, and only elide it for operations with no body at - // all (e.g. GET/DELETE). - if (body == null && 'body' in options) { - return this.#encoder({ body, headers: buildHeaders([rawHeaders]) }); - } return { bodyHeaders: undefined, body: undefined }; } const headers = buildHeaders([rawHeaders]); @@ -877,8 +869,8 @@ export declare namespace Hyperspell { type FolderListPoliciesResponse as FolderListPoliciesResponse, type FolderSetPoliciesResponse as FolderSetPoliciesResponse, type FolderListParams as FolderListParams, - type FolderDeletePolicyParams as FolderDeletePolicyParams, type FolderSetPoliciesParams as FolderSetPoliciesParams, + type FolderDeletePolicyParams as FolderDeletePolicyParams, }; export { @@ -897,14 +889,14 @@ export declare namespace Hyperspell { type MemoryGetResponse as MemoryGetResponse, type MemoryStatusResponse as MemoryStatusResponse, type MemoryListResponsesCursorPage as MemoryListResponsesCursorPage, - type MemoryUpdateParams as MemoryUpdateParams, - type MemoryListParams as MemoryListParams, - type MemoryDeleteParams as MemoryDeleteParams, type MemoryAddParams as MemoryAddParams, type MemoryAddBulkParams as MemoryAddBulkParams, + type MemoryUploadParams as MemoryUploadParams, + type MemoryUpdateParams as MemoryUpdateParams, + type MemoryListParams as MemoryListParams, type MemoryGetParams as MemoryGetParams, type MemorySearchParams as MemorySearchParams, - type MemoryUploadParams as MemoryUploadParams, + type MemoryDeleteParams as MemoryDeleteParams, }; export { @@ -914,16 +906,16 @@ export declare namespace Hyperspell { type EvaluateScoreQueryResponse as EvaluateScoreQueryResponse, type EvaluateListQueriesResponsesCursorPage as EvaluateListQueriesResponsesCursorPage, type EvaluateListQueriesParams as EvaluateListQueriesParams, - type EvaluateScoreHighlightParams as EvaluateScoreHighlightParams, type EvaluateScoreQueryParams as EvaluateScoreQueryParams, + type EvaluateScoreHighlightParams as EvaluateScoreHighlightParams, }; export { Actions as Actions, type ActionAddReactionResponse as ActionAddReactionResponse, type ActionSendMessageResponse as ActionSendMessageResponse, - type ActionAddReactionParams as ActionAddReactionParams, type ActionSendMessageParams as ActionSendMessageParams, + type ActionAddReactionParams as ActionAddReactionParams, }; export { Sessions as Sessions, type SessionAddParams as SessionAddParams }; diff --git a/src/resources/actions.ts b/src/resources/actions.ts index d6c01e31..dcacb818 100644 --- a/src/resources/actions.ts +++ b/src/resources/actions.ts @@ -5,16 +5,6 @@ import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; export class Actions extends APIResource { - /** - * Add an emoji reaction to a message on a connected integration. - */ - addReaction( - body: ActionAddReactionParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/actions/add_reaction', { body, ...options }); - } - /** * Send a message to a channel or conversation on a connected integration. */ @@ -24,6 +14,16 @@ export class Actions extends APIResource { ): APIPromise { return this._client.post('/actions/send_message', { body, ...options }); } + + /** + * Add an emoji reaction to a message on a connected integration. + */ + addReaction( + body: ActionAddReactionParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/actions/add_reaction', { body, ...options }); + } } /** @@ -48,17 +48,7 @@ export interface ActionSendMessageResponse { provider_response?: { [key: string]: unknown } | null; } -export interface ActionAddReactionParams { - /** - * Channel ID containing the message - */ - channel: string; - - /** - * Emoji name without colons (e.g., thumbsup) - */ - name: string; - +export interface ActionSendMessageParams { /** * Integration provider (e.g., slack) */ @@ -88,17 +78,37 @@ export interface ActionAddReactionParams { | 'gong'; /** - * Message timestamp to react to + * Message text */ - timestamp: string; + text: string; + + /** + * Channel ID (required for Slack) + */ + channel?: string | null; /** * Connection ID. If omitted, auto-resolved from provider + user. */ connection?: string | null; + + /** + * Parent message ID for threading (thread_ts for Slack) + */ + parent?: string | null; } -export interface ActionSendMessageParams { +export interface ActionAddReactionParams { + /** + * Channel ID containing the message + */ + channel: string; + + /** + * Emoji name without colons (e.g., thumbsup) + */ + name: string; + /** * Integration provider (e.g., slack) */ @@ -128,31 +138,21 @@ export interface ActionSendMessageParams { | 'gong'; /** - * Message text - */ - text: string; - - /** - * Channel ID (required for Slack) + * Message timestamp to react to */ - channel?: string | null; + timestamp: string; /** * Connection ID. If omitted, auto-resolved from provider + user. */ connection?: string | null; - - /** - * Parent message ID for threading (thread_ts for Slack) - */ - parent?: string | null; } export declare namespace Actions { export { type ActionAddReactionResponse as ActionAddReactionResponse, type ActionSendMessageResponse as ActionSendMessageResponse, - type ActionAddReactionParams as ActionAddReactionParams, type ActionSendMessageParams as ActionSendMessageParams, + type ActionAddReactionParams as ActionAddReactionParams, }; } diff --git a/src/resources/auth.ts b/src/resources/auth.ts index 2cdbf90f..7dc1bf02 100644 --- a/src/resources/auth.ts +++ b/src/resources/auth.ts @@ -6,15 +6,18 @@ import { RequestOptions } from '../internal/request-options'; export class Auth extends APIResource { /** - * Endpoint to delete user. + * Use this endpoint to create a user token for a specific user. This token can be + * safely passed to your user-facing front-end. * * @example * ```ts - * const response = await client.auth.deleteUser(); + * const token = await client.auth.userToken({ + * user_id: 'user_id', + * }); * ``` */ - deleteUser(options?: RequestOptions): APIPromise { - return this._client.delete('/auth/delete', options); + userToken(body: AuthUserTokenParams, options?: RequestOptions): APIPromise { + return this._client.post('/auth/user_token', { body, ...options }); } /** @@ -30,18 +33,15 @@ export class Auth extends APIResource { } /** - * Use this endpoint to create a user token for a specific user. This token can be - * safely passed to your user-facing front-end. + * Endpoint to delete user. * * @example * ```ts - * const token = await client.auth.userToken({ - * user_id: 'user_id', - * }); + * const response = await client.auth.deleteUser(); * ``` */ - userToken(body: AuthUserTokenParams, options?: RequestOptions): APIPromise { - return this._client.post('/auth/user_token', { body, ...options }); + deleteUser(options?: RequestOptions): APIPromise { + return this._client.delete('/auth/delete', options); } } diff --git a/src/resources/connections.ts b/src/resources/connections.ts index 0b4c2db7..748d6558 100644 --- a/src/resources/connections.ts +++ b/src/resources/connections.ts @@ -7,18 +7,24 @@ import { path } from '../internal/utils/path'; export class Connections extends APIResource { /** - * List all connections for the user. + * Revoke Hyperspell's access to a provider and delete this user's stored data. + * + * The external OAuth/Unified revoke and the (potentially large) data purge run in + * a background Temporal workflow; this returns `202 Accepted` immediately. A heavy + * provider — a Gmail account can carry hundreds of thousands of chunks — plus a + * slow third-party revoke would otherwise outrun the request timeout: the old + * synchronous path "timed out" for the caller while still finishing server-side, + * making the outcome invisible. Idempotent per (app, user, provider). */ - list(options?: RequestOptions): APIPromise { - return this._client.get('/connections/list', options); + revoke(connectionID: string, options?: RequestOptions): APIPromise { + return this._client.delete(path`/connections/${connectionID}/revoke`, options); } /** - * Revokes Hyperspell's access the given provider and deletes all stored - * credentials and indexed data. + * List all connections for the user. */ - revoke(connectionID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/connections/${connectionID}/revoke`, options); + list(options?: RequestOptions): APIPromise { + return this._client.get('/connections/list', options); } } diff --git a/src/resources/evaluate.ts b/src/resources/evaluate.ts index 7c3bc741..d1b4683d 100644 --- a/src/resources/evaluate.ts +++ b/src/resources/evaluate.ts @@ -8,13 +8,6 @@ import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; export class Evaluate extends APIResource { - /** - * Retrieve the result of a previous query. - */ - getQuery(queryID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/evaluate/query/${queryID}`, options); - } - /** * Paginate through all prior queries for the app, newest first. * @@ -32,14 +25,10 @@ export class Evaluate extends APIResource { } /** - * Score an individual highlight. + * Retrieve the result of a previous query. */ - scoreHighlight( - highlightID: string, - body: EvaluateScoreHighlightParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/evaluate/highlight/${highlightID}`, { body, ...options }); + getQuery(queryID: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/evaluate/query/${queryID}`, options); } /** @@ -52,6 +41,17 @@ export class Evaluate extends APIResource { ): APIPromise { return this._client.post(path`/evaluate/query/${queryID}`, { body, ...options }); } + + /** + * Score an individual highlight. + */ + scoreHighlight( + highlightID: string, + body: EvaluateScoreHighlightParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post(path`/evaluate/highlight/${highlightID}`, { body, ...options }); + } } export type EvaluateListQueriesResponsesCursorPage = CursorPage; @@ -109,6 +109,13 @@ export interface EvaluateListQueriesParams extends CursorPageParams { user_id?: string | null; } +export interface EvaluateScoreQueryParams { + /** + * Rating of the query result from -1 (bad) to +1 (good). + */ + score?: number; +} + export interface EvaluateScoreHighlightParams { /** * Comment on the chunk @@ -121,13 +128,6 @@ export interface EvaluateScoreHighlightParams { score?: number; } -export interface EvaluateScoreQueryParams { - /** - * Rating of the query result from -1 (bad) to +1 (good). - */ - score?: number; -} - export declare namespace Evaluate { export { type EvaluateListQueriesResponse as EvaluateListQueriesResponse, @@ -135,7 +135,7 @@ export declare namespace Evaluate { type EvaluateScoreQueryResponse as EvaluateScoreQueryResponse, type EvaluateListQueriesResponsesCursorPage as EvaluateListQueriesResponsesCursorPage, type EvaluateListQueriesParams as EvaluateListQueriesParams, - type EvaluateScoreHighlightParams as EvaluateScoreHighlightParams, type EvaluateScoreQueryParams as EvaluateScoreQueryParams, + type EvaluateScoreHighlightParams as EvaluateScoreHighlightParams, }; } diff --git a/src/resources/folders.ts b/src/resources/folders.ts index 2c9485c6..5cb5aec8 100644 --- a/src/resources/folders.ts +++ b/src/resources/folders.ts @@ -20,18 +20,6 @@ export class Folders extends APIResource { return this._client.get(path`/connections/${connectionID}/folders`, { query, ...options }); } - /** - * Delete a folder policy for a specific connection. - */ - deletePolicy( - policyID: string, - params: FolderDeletePolicyParams, - options?: RequestOptions, - ): APIPromise { - const { connection_id } = params; - return this._client.delete(path`/connections/${connection_id}/folder-policies/${policyID}`, options); - } - /** * List all folder policies for a specific connection. */ @@ -49,6 +37,18 @@ export class Folders extends APIResource { ): APIPromise { return this._client.post(path`/connections/${connectionID}/folder-policies`, { body, ...options }); } + + /** + * Delete a folder policy for a specific connection. + */ + deletePolicy( + policyID: string, + params: FolderDeletePolicyParams, + options?: RequestOptions, + ): APIPromise { + const { connection_id } = params; + return this._client.delete(path`/connections/${connection_id}/folder-policies/${policyID}`, options); + } } export interface FolderListResponse { @@ -201,10 +201,6 @@ export interface FolderListParams { parent_id?: string | null; } -export interface FolderDeletePolicyParams { - connection_id: string; -} - export interface FolderSetPoliciesParams { /** * Folder ID from the source provider @@ -232,6 +228,10 @@ export interface FolderSetPoliciesParams { parent_folder_id?: string | null; } +export interface FolderDeletePolicyParams { + connection_id: string; +} + export declare namespace Folders { export { type FolderListResponse as FolderListResponse, @@ -239,7 +239,7 @@ export declare namespace Folders { type FolderListPoliciesResponse as FolderListPoliciesResponse, type FolderSetPoliciesResponse as FolderSetPoliciesResponse, type FolderListParams as FolderListParams, - type FolderDeletePolicyParams as FolderDeletePolicyParams, type FolderSetPoliciesParams as FolderSetPoliciesParams, + type FolderDeletePolicyParams as FolderDeletePolicyParams, }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index fc55018a..53f58731 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -5,8 +5,8 @@ export { Actions, type ActionAddReactionResponse, type ActionSendMessageResponse, - type ActionAddReactionParams, type ActionSendMessageParams, + type ActionAddReactionParams, } from './actions'; export { Auth, @@ -22,8 +22,8 @@ export { type EvaluateScoreHighlightResponse, type EvaluateScoreQueryResponse, type EvaluateListQueriesParams, - type EvaluateScoreHighlightParams, type EvaluateScoreQueryParams, + type EvaluateScoreHighlightParams, type EvaluateListQueriesResponsesCursorPage, } from './evaluate'; export { @@ -33,8 +33,8 @@ export { type FolderListPoliciesResponse, type FolderSetPoliciesResponse, type FolderListParams, - type FolderDeletePolicyParams, type FolderSetPoliciesParams, + type FolderDeletePolicyParams, } from './folders'; export { Integrations, @@ -50,14 +50,14 @@ export { type MemoryAddBulkResponse, type MemoryGetResponse, type MemoryStatusResponse, - type MemoryUpdateParams, - type MemoryListParams, - type MemoryDeleteParams, type MemoryAddParams, type MemoryAddBulkParams, + type MemoryUploadParams, + type MemoryUpdateParams, + type MemoryListParams, type MemoryGetParams, type MemorySearchParams, - type MemoryUploadParams, + type MemoryDeleteParams, type MemoryListResponsesCursorPage, } from './memories'; export { Sessions, type SessionAddParams } from './sessions'; diff --git a/src/resources/memories.ts b/src/resources/memories.ts index 71a0e182..cd8ff777 100644 --- a/src/resources/memories.ts +++ b/src/resources/memories.ts @@ -10,6 +10,63 @@ import { multipartFormRequestOptions } from '../internal/uploads'; import { path } from '../internal/utils/path'; export class Memories extends APIResource { + /** + * Adds an arbitrary document to the index. This can be any text, email, call + * transcript, etc. The document will be processed and made available for querying + * once the processing is complete. + * + * @example + * ```ts + * const memoryStatus = await client.memories.add({ + * text: '...', + * }); + * ``` + */ + add(body: MemoryAddParams, options?: RequestOptions): APIPromise { + return this._client.post('/memories/add', { body, ...options }); + } + + /** + * Adds multiple documents to the index in a single request. + * + * All items are validated before any database operations occur. If any item fails + * validation, the entire batch is rejected with a 422 error detailing which items + * failed and why. + * + * Maximum 100 items per request. Each item follows the same schema as the + * single-item /memories/add endpoint. + * + * @example + * ```ts + * const response = await client.memories.addBulk({ + * items: [{ text: '...' }], + * }); + * ``` + */ + addBulk(body: MemoryAddBulkParams, options?: RequestOptions): APIPromise { + return this._client.post('/memories/add/bulk', { body, ...options }); + } + + /** + * This endpoint will upload a file to the index and return a resource_id. The file + * will be processed in the background and the memory will be available for + * querying once the processing is complete. You can use the `resource_id` to query + * the memory later, and check the status of the memory. + * + * @example + * ```ts + * const memoryStatus = await client.memories.upload({ + * file: fs.createReadStream('path/to/file'), + * }); + * ``` + */ + upload(body: MemoryUploadParams, options?: RequestOptions): APIPromise { + return this._client.post( + '/memories/upload', + multipartFormRequestOptions({ body, ...options }, this._client), + ); + } + /** * Updates an existing document in the index. You can update the text, collection, * title, and metadata. The document must already exist or a 404 will be returned. @@ -50,75 +107,16 @@ export class Memories extends APIResource { } /** - * Delete a memory and its associated chunks from the index. - * - * This removes the memory completely from the vector index and database. The - * operation deletes: - * - * 1. All chunks associated with the resource (including embeddings) - * 2. The documents row AND any legacy resources rows sharing the identity — - * leaving either one behind would resurrect the memory through the double-read - * path (ENG-2477). - * - * Args: source: The document provider (e.g., gmail, notion, vault) resource_id: - * The unique identifier of the resource to delete api_token: Authentication token - * - * Returns: MemoryDeletionResponse with deletion details - * - * Raises: DocumentNotFound: If the resource doesn't exist or user doesn't have - * access - * - * @example - * ```ts - * const memory = await client.memories.delete('resource_id', { - * source: 'reddit', - * }); - * ``` - */ - delete( - resourceID: string, - params: MemoryDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { source } = params; - return this._client.delete(path`/memories/delete/${source}/${resourceID}`, options); - } - - /** - * Adds an arbitrary document to the index. This can be any text, email, call - * transcript, etc. The document will be processed and made available for querying - * once the processing is complete. - * - * @example - * ```ts - * const memoryStatus = await client.memories.add({ - * text: '...', - * }); - * ``` - */ - add(body: MemoryAddParams, options?: RequestOptions): APIPromise { - return this._client.post('/memories/add', { body, ...options }); - } - - /** - * Adds multiple documents to the index in a single request. - * - * All items are validated before any database operations occur. If any item fails - * validation, the entire batch is rejected with a 422 error detailing which items - * failed and why. - * - * Maximum 100 items per request. Each item follows the same schema as the - * single-item /memories/add endpoint. + * This endpoint shows the indexing progress of documents, both by provider and + * total. * * @example * ```ts - * const response = await client.memories.addBulk({ - * items: [{ text: '...' }], - * }); + * const response = await client.memories.status(); * ``` */ - addBulk(body: MemoryAddBulkParams, options?: RequestOptions): APIPromise { - return this._client.post('/memories/add/bulk', { body, ...options }); + status(options?: RequestOptions): APIPromise { + return this._client.get('/memories/status', options); } /** @@ -152,36 +150,38 @@ export class Memories extends APIResource { } /** - * This endpoint shows the indexing progress of documents, both by provider and - * total. + * Delete a memory and its associated chunks from the index. * - * @example - * ```ts - * const response = await client.memories.status(); - * ``` - */ - status(options?: RequestOptions): APIPromise { - return this._client.get('/memories/status', options); - } - - /** - * This endpoint will upload a file to the index and return a resource_id. The file - * will be processed in the background and the memory will be available for - * querying once the processing is complete. You can use the `resource_id` to query - * the memory later, and check the status of the memory. + * This removes the memory completely from the vector index and database. The + * operation deletes: + * + * 1. All chunks associated with the resource (including embeddings) + * 2. The documents row AND any legacy resources rows sharing the identity — + * leaving either one behind would resurrect the memory through the double-read + * path (ENG-2477). + * + * Args: source: The document provider (e.g., gmail, notion, vault) resource_id: + * The unique identifier of the resource to delete api_token: Authentication token + * + * Returns: MemoryDeletionResponse with deletion details + * + * Raises: DocumentNotFound: If the resource doesn't exist or user doesn't have + * access * * @example * ```ts - * const memoryStatus = await client.memories.upload({ - * file: fs.createReadStream('path/to/file'), + * const memory = await client.memories.delete('resource_id', { + * source: 'reddit', * }); * ``` */ - upload(body: MemoryUploadParams, options?: RequestOptions): APIPromise { - return this._client.post( - '/memories/upload', - multipartFormRequestOptions({ body, ...options }, this._client), - ); + delete( + resourceID: string, + params: MemoryDeleteParams, + options?: RequestOptions, + ): APIPromise { + const { source } = params; + return this._client.delete(path`/memories/delete/${source}/${resourceID}`, options); } } @@ -456,6 +456,110 @@ export interface MemoryStatusResponse { total: { [key: string]: number }; } +export interface MemoryAddParams { + /** + * Full text of the document. + */ + text: string; + + /** + * @deprecated The collection to add the document to — deprecated, set the + * collection using metadata instead. + */ + collection?: string | null; + + /** + * Date of the document. Depending on the document, this could be the creation date + * or date the document was last updated (eg. for a chat transcript, this would be + * the date of the last message). This helps the ranking algorithm and allows you + * to filter by date range. + */ + date?: string; + + /** + * Custom metadata for filtering. Keys must be alphanumeric with underscores, max + * 64 chars. Values must be string, number, boolean, or null. + */ + metadata?: { [key: string]: string | number | boolean | null } | null; + + /** + * The resource ID to add the document to. If not provided, a new resource ID will + * be generated. If provided, the document will be updated if it already exists. + */ + resource_id?: string; + + /** + * Title of the document. + */ + title?: string | null; +} + +export interface MemoryAddBulkParams { + /** + * List of memories to ingest. Maximum 100 items. + */ + items: Array; +} + +export namespace MemoryAddBulkParams { + export interface Item { + /** + * Full text of the document. + */ + text: string; + + /** + * @deprecated The collection to add the document to — deprecated, set the + * collection using metadata instead. + */ + collection?: string | null; + + /** + * Date of the document. Depending on the document, this could be the creation date + * or date the document was last updated (eg. for a chat transcript, this would be + * the date of the last message). This helps the ranking algorithm and allows you + * to filter by date range. + */ + date?: string; + + /** + * Custom metadata for filtering. Keys must be alphanumeric with underscores, max + * 64 chars. Values must be string, number, boolean, or null. + */ + metadata?: { [key: string]: string | number | boolean | null } | null; + + /** + * The resource ID to add the document to. If not provided, a new resource ID will + * be generated. If provided, the document will be updated if it already exists. + */ + resource_id?: string; + + /** + * Title of the document. + */ + title?: string | null; + } +} + +export interface MemoryUploadParams { + /** + * The file to ingest. + */ + file: Uploadable; + + /** + * @deprecated The collection to add the document to — deprecated, set the + * collection using metadata instead. + */ + collection?: string | null; + + /** + * Custom metadata as JSON string for filtering. Keys must be alphanumeric with + * underscores, max 64 chars. Values must be string, number, or boolean. + */ + metadata?: string | null; +} + export interface MemoryUpdateParams { /** * Path param @@ -562,118 +666,6 @@ export interface MemoryListParams extends CursorPageParams { status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped' | null; } -export interface MemoryDeleteParams { - source: - | 'reddit' - | 'notion' - | 'slack' - | 'google_calendar' - | 'google_mail' - | 'box' - | 'dropbox' - | 'github' - | 'google_drive' - | 'vault' - | 'web_crawler' - | 'trace' - | 'microsoft_teams' - | 'gmail_actions' - | 'granola' - | 'fathom' - | 'fireflies' - | 'linear' - | 'hubspot' - | 'salesforce' - | 'coda' - | 'lightfield' - | 'gong'; -} - -export interface MemoryAddParams { - /** - * Full text of the document. - */ - text: string; - - /** - * @deprecated The collection to add the document to — deprecated, set the - * collection using metadata instead. - */ - collection?: string | null; - - /** - * Date of the document. Depending on the document, this could be the creation date - * or date the document was last updated (eg. for a chat transcript, this would be - * the date of the last message). This helps the ranking algorithm and allows you - * to filter by date range. - */ - date?: string; - - /** - * Custom metadata for filtering. Keys must be alphanumeric with underscores, max - * 64 chars. Values must be string, number, boolean, or null. - */ - metadata?: { [key: string]: string | number | boolean | null } | null; - - /** - * The resource ID to add the document to. If not provided, a new resource ID will - * be generated. If provided, the document will be updated if it already exists. - */ - resource_id?: string; - - /** - * Title of the document. - */ - title?: string | null; -} - -export interface MemoryAddBulkParams { - /** - * List of memories to ingest. Maximum 100 items. - */ - items: Array; -} - -export namespace MemoryAddBulkParams { - export interface Item { - /** - * Full text of the document. - */ - text: string; - - /** - * @deprecated The collection to add the document to — deprecated, set the - * collection using metadata instead. - */ - collection?: string | null; - - /** - * Date of the document. Depending on the document, this could be the creation date - * or date the document was last updated (eg. for a chat transcript, this would be - * the date of the last message). This helps the ranking algorithm and allows you - * to filter by date range. - */ - date?: string; - - /** - * Custom metadata for filtering. Keys must be alphanumeric with underscores, max - * 64 chars. Values must be string, number, boolean, or null. - */ - metadata?: { [key: string]: string | number | boolean | null } | null; - - /** - * The resource ID to add the document to. If not provided, a new resource ID will - * be generated. If provided, the document will be updated if it already exists. - */ - resource_id?: string; - - /** - * Title of the document. - */ - title?: string | null; - } -} - export interface MemoryGetParams { source: | 'reddit' @@ -1036,23 +1028,31 @@ export namespace MemorySearchParams { } } -export interface MemoryUploadParams { - /** - * The file to ingest. - */ - file: Uploadable; - - /** - * @deprecated The collection to add the document to — deprecated, set the - * collection using metadata instead. - */ - collection?: string | null; - - /** - * Custom metadata as JSON string for filtering. Keys must be alphanumeric with - * underscores, max 64 chars. Values must be string, number, or boolean. - */ - metadata?: string | null; +export interface MemoryDeleteParams { + source: + | 'reddit' + | 'notion' + | 'slack' + | 'google_calendar' + | 'google_mail' + | 'box' + | 'dropbox' + | 'github' + | 'google_drive' + | 'vault' + | 'web_crawler' + | 'trace' + | 'microsoft_teams' + | 'gmail_actions' + | 'granola' + | 'fathom' + | 'fireflies' + | 'linear' + | 'hubspot' + | 'salesforce' + | 'coda' + | 'lightfield' + | 'gong'; } export declare namespace Memories { @@ -1064,13 +1064,13 @@ export declare namespace Memories { type MemoryGetResponse as MemoryGetResponse, type MemoryStatusResponse as MemoryStatusResponse, type MemoryListResponsesCursorPage as MemoryListResponsesCursorPage, - type MemoryUpdateParams as MemoryUpdateParams, - type MemoryListParams as MemoryListParams, - type MemoryDeleteParams as MemoryDeleteParams, type MemoryAddParams as MemoryAddParams, type MemoryAddBulkParams as MemoryAddBulkParams, + type MemoryUploadParams as MemoryUploadParams, + type MemoryUpdateParams as MemoryUpdateParams, + type MemoryListParams as MemoryListParams, type MemoryGetParams as MemoryGetParams, type MemorySearchParams as MemorySearchParams, - type MemoryUploadParams as MemoryUploadParams, + type MemoryDeleteParams as MemoryDeleteParams, }; } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 1984a7d8..bffd529f 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -277,6 +277,8 @@ export interface Conversation { text?: string | null; + title?: string | null; + type?: 'conversation'; } diff --git a/tests/api-resources/actions.test.ts b/tests/api-resources/actions.test.ts index 63c65d7c..0eacbc9b 100644 --- a/tests/api-resources/actions.test.ts +++ b/tests/api-resources/actions.test.ts @@ -9,13 +9,8 @@ const client = new Hyperspell({ }); describe('resource actions', () => { - test('addReaction: only required params', async () => { - const responsePromise = client.actions.addReaction({ - channel: 'channel', - name: 'name', - provider: 'reddit', - timestamp: 'timestamp', - }); + test('sendMessage: only required params', async () => { + const responsePromise = client.actions.sendMessage({ provider: 'reddit', text: 'text' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,18 +20,23 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('addReaction: required and optional params', async () => { - const response = await client.actions.addReaction({ - channel: 'channel', - name: 'name', + test('sendMessage: required and optional params', async () => { + const response = await client.actions.sendMessage({ provider: 'reddit', - timestamp: 'timestamp', + text: 'text', + channel: 'channel', connection: 'connection', + parent: 'parent', }); }); - test('sendMessage: only required params', async () => { - const responsePromise = client.actions.sendMessage({ provider: 'reddit', text: 'text' }); + test('addReaction: only required params', async () => { + const responsePromise = client.actions.addReaction({ + channel: 'channel', + name: 'name', + provider: 'reddit', + timestamp: 'timestamp', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,13 +46,13 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('sendMessage: required and optional params', async () => { - const response = await client.actions.sendMessage({ - provider: 'reddit', - text: 'text', + test('addReaction: required and optional params', async () => { + const response = await client.actions.addReaction({ channel: 'channel', + name: 'name', + provider: 'reddit', + timestamp: 'timestamp', connection: 'connection', - parent: 'parent', }); }); }); diff --git a/tests/api-resources/auth.test.ts b/tests/api-resources/auth.test.ts index 0960b0ee..dd4e1f4d 100644 --- a/tests/api-resources/auth.test.ts +++ b/tests/api-resources/auth.test.ts @@ -9,8 +9,8 @@ const client = new Hyperspell({ }); describe('resource auth', () => { - test('deleteUser', async () => { - const responsePromise = client.auth.deleteUser(); + test('userToken: only required params', async () => { + const responsePromise = client.auth.userToken({ user_id: 'user_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,6 +20,14 @@ describe('resource auth', () => { expect(dataAndResponse.response).toBe(rawResponse); }); + test('userToken: required and optional params', async () => { + const response = await client.auth.userToken({ + user_id: 'user_id', + expires_in: '30m', + origin: 'origin', + }); + }); + test('me', async () => { const responsePromise = client.auth.me(); const rawResponse = await responsePromise.asResponse(); @@ -31,8 +39,8 @@ describe('resource auth', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('userToken: only required params', async () => { - const responsePromise = client.auth.userToken({ user_id: 'user_id' }); + test('deleteUser', async () => { + const responsePromise = client.auth.deleteUser(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -41,12 +49,4 @@ describe('resource auth', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); - - test('userToken: required and optional params', async () => { - const response = await client.auth.userToken({ - user_id: 'user_id', - expires_in: '30m', - origin: 'origin', - }); - }); }); diff --git a/tests/api-resources/connections.test.ts b/tests/api-resources/connections.test.ts index f945baa1..270cab3c 100644 --- a/tests/api-resources/connections.test.ts +++ b/tests/api-resources/connections.test.ts @@ -9,8 +9,8 @@ const client = new Hyperspell({ }); describe('resource connections', () => { - test('list', async () => { - const responsePromise = client.connections.list(); + test('revoke', async () => { + const responsePromise = client.connections.revoke('connection_id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,8 +20,8 @@ describe('resource connections', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('revoke', async () => { - const responsePromise = client.connections.revoke('connection_id'); + test('list', async () => { + const responsePromise = client.connections.list(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tests/api-resources/evaluate.test.ts b/tests/api-resources/evaluate.test.ts index 1c94e833..50af2b4f 100644 --- a/tests/api-resources/evaluate.test.ts +++ b/tests/api-resources/evaluate.test.ts @@ -9,17 +9,6 @@ const client = new Hyperspell({ }); describe('resource evaluate', () => { - test('getQuery', async () => { - const responsePromise = client.evaluate.getQuery('query_id'); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - test('listQueries', async () => { const responsePromise = client.evaluate.listQueries(); const rawResponse = await responsePromise.asResponse(); @@ -45,8 +34,8 @@ describe('resource evaluate', () => { ).rejects.toThrow(Hyperspell.NotFoundError); }); - test('scoreHighlight', async () => { - const responsePromise = client.evaluate.scoreHighlight('highlight_id', {}); + test('getQuery', async () => { + const responsePromise = client.evaluate.getQuery('query_id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -66,4 +55,15 @@ describe('resource evaluate', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + test('scoreHighlight', async () => { + const responsePromise = client.evaluate.scoreHighlight('highlight_id', {}); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); }); diff --git a/tests/api-resources/folders.test.ts b/tests/api-resources/folders.test.ts index 8848eb81..5b444866 100644 --- a/tests/api-resources/folders.test.ts +++ b/tests/api-resources/folders.test.ts @@ -31,25 +31,6 @@ describe('resource folders', () => { ).rejects.toThrow(Hyperspell.NotFoundError); }); - test('deletePolicy: only required params', async () => { - const responsePromise = client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { - connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('deletePolicy: required and optional params', async () => { - const response = await client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { - connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); - }); - test('listPolicies', async () => { const responsePromise = client.folders.listPolicies('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); @@ -84,4 +65,23 @@ describe('resource folders', () => { parent_folder_id: 'parent_folder_id', }); }); + + test('deletePolicy: only required params', async () => { + const responsePromise = client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('deletePolicy: required and optional params', async () => { + const response = await client.folders.deletePolicy('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + connection_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); + }); }); diff --git a/tests/api-resources/memories.test.ts b/tests/api-resources/memories.test.ts index 7bafa169..6b221029 100644 --- a/tests/api-resources/memories.test.ts +++ b/tests/api-resources/memories.test.ts @@ -9,8 +9,8 @@ const client = new Hyperspell({ }); describe('resource memories', () => { - test('update: only required params', async () => { - const responsePromise = client.memories.update('resource_id', { source: 'reddit' }); + test('add: only required params', async () => { + const responsePromise = client.memories.add({ text: '...' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,19 +20,23 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('update: required and optional params', async () => { - const response = await client.memories.update('resource_id', { - source: 'reddit', - collection: 'string', + test('add: required and optional params', async () => { + const response = await client.memories.add({ + text: '...', + collection: 'my-collection', date: '2019-12-27T18:11:19.117Z', - metadata: { foo: 'string' }, - text: 'string', - title: 'string', + metadata: { + author: 'John Doe', + date: '2025-05-20T02:31:00Z', + rating: 3, + }, + resource_id: 'resource_id', + title: 'My Document', }); }); - test('list', async () => { - const responsePromise = client.memories.list(); + test('addBulk: only required params', async () => { + const responsePromise = client.memories.addBulk({ items: [{ text: '...' }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -42,25 +46,29 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('list: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.memories.list( + test('addBulk: required and optional params', async () => { + const response = await client.memories.addBulk({ + items: [ { - collection: 'collection', - cursor: 'cursor', - filter: 'filter', - size: 0, - source: 'reddit', - status: 'pending', + text: '...', + collection: 'my-collection', + date: '2019-12-27T18:11:19.117Z', + metadata: { + author: 'John Doe', + date: '2025-05-20T02:31:00Z', + rating: 3, + }, + resource_id: 'resource_id', + title: 'My Document', }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Hyperspell.NotFoundError); + ], + }); }); - test('delete: only required params', async () => { - const responsePromise = client.memories.delete('resource_id', { source: 'reddit' }); + test('upload: only required params', async () => { + const responsePromise = client.memories.upload({ + file: await toFile(Buffer.from('Example data'), 'README.md'), + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -70,12 +78,16 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('delete: required and optional params', async () => { - const response = await client.memories.delete('resource_id', { source: 'reddit' }); + test('upload: required and optional params', async () => { + const response = await client.memories.upload({ + file: await toFile(Buffer.from('Example data'), 'README.md'), + collection: 'collection', + metadata: 'metadata', + }); }); - test('add: only required params', async () => { - const responsePromise = client.memories.add({ text: '...' }); + test('update: only required params', async () => { + const responsePromise = client.memories.update('resource_id', { source: 'reddit' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -85,23 +97,19 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('add: required and optional params', async () => { - const response = await client.memories.add({ - text: '...', - collection: 'my-collection', + test('update: required and optional params', async () => { + const response = await client.memories.update('resource_id', { + source: 'reddit', + collection: 'string', date: '2019-12-27T18:11:19.117Z', - metadata: { - author: 'John Doe', - date: '2025-05-20T02:31:00Z', - rating: 3, - }, - resource_id: 'resource_id', - title: 'My Document', + metadata: { foo: 'string' }, + text: 'string', + title: 'string', }); }); - test('addBulk: only required params', async () => { - const responsePromise = client.memories.addBulk({ items: [{ text: '...' }] }); + test('list', async () => { + const responsePromise = client.memories.list(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -111,23 +119,32 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('addBulk: required and optional params', async () => { - const response = await client.memories.addBulk({ - items: [ + test('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.memories.list( { - text: '...', - collection: 'my-collection', - date: '2019-12-27T18:11:19.117Z', - metadata: { - author: 'John Doe', - date: '2025-05-20T02:31:00Z', - rating: 3, - }, - resource_id: 'resource_id', - title: 'My Document', + collection: 'collection', + cursor: 'cursor', + filter: 'filter', + size: 0, + source: 'reddit', + status: 'pending', }, - ], - }); + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Hyperspell.NotFoundError); + }); + + test('status', async () => { + const responsePromise = client.memories.status(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); }); test('get: only required params', async () => { @@ -161,7 +178,7 @@ describe('resource memories', () => { query: 'What does Hyperspell do?', answer: true, effort: 'minimal', - max_results: 0, + max_results: 1, options: { after: '2019-12-27T18:11:19.117Z', answer_model: 'llama-3.1', @@ -171,7 +188,7 @@ describe('resource memories', () => { google_calendar: { calendar_id: 'calendar_id', weight: 0 }, google_drive: { weight: 0 }, google_mail: { label_ids: ['string'], weight: 0 }, - max_results: 200, + max_results: 1, memory_types: ['procedure'], notion: { notion_page_ids: ['string'], weight: 0 }, recency_half_life_days: 1, @@ -196,21 +213,8 @@ describe('resource memories', () => { }); }); - test('status', async () => { - const responsePromise = client.memories.status(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('upload: only required params', async () => { - const responsePromise = client.memories.upload({ - file: await toFile(Buffer.from('Example data'), 'README.md'), - }); + test('delete: only required params', async () => { + const responsePromise = client.memories.delete('resource_id', { source: 'reddit' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -220,11 +224,7 @@ describe('resource memories', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('upload: required and optional params', async () => { - const response = await client.memories.upload({ - file: await toFile(Buffer.from('Example data'), 'README.md'), - collection: 'collection', - metadata: 'metadata', - }); + test('delete: required and optional params', async () => { + const response = await client.memories.delete('resource_id', { source: 'reddit' }); }); });