@epilot/sdk 2.18.9 → 2.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/ai-agents-runtime.json +1 -1
- package/definitions/ai-agents.json +185 -0
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +178 -0
- package/dist/ai-agents-3JK4UU2G.js +7 -0
- package/dist/ai-agents-XST3YUFA.cjs +7 -0
- package/dist/{ai-agents-runtime-EA23HCCP.js → ai-agents-runtime-HOBR2KUZ.js} +1 -1
- package/dist/{ai-agents-runtime-WZ3EI3NH.cjs → ai-agents-runtime-T62OQDWE.cjs} +2 -2
- package/dist/{ai-agents.d-D-7bTH-9.d.cts → ai-agents.d-BnR7CAeJ.d.cts} +91 -1
- package/dist/{ai-agents.d-D-7bTH-9.d.ts → ai-agents.d-BnR7CAeJ.d.ts} +91 -1
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +8 -8
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +2 -2
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +8 -8
- package/dist/apis/file.d.cts +2 -2
- package/dist/apis/file.d.ts +2 -2
- package/dist/apis/file.js +2 -2
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-X7DUVWSL.cjs → chunk-324JJ7CA.cjs} +4 -4
- package/dist/chunk-5S2PEECD.cjs +14 -0
- package/dist/{chunk-YEBEA6XU.cjs → chunk-GD6KHA54.cjs} +1 -1
- package/dist/chunk-IBMGFLXF.js +14 -0
- package/dist/{chunk-BRWY3QHG.js → chunk-IZ6OQZZ2.js} +1 -1
- package/dist/{chunk-P32T4ZYN.js → chunk-MIHMEO7K.js} +4 -4
- package/dist/file-M5HNKOPG.cjs +7 -0
- package/dist/file-ZUNCUDBY.js +7 -0
- package/dist/{file-runtime-ASJ6YBDM.js → file-runtime-423SISQ2.js} +1 -1
- package/dist/file-runtime-IHVDQNIX.cjs +5 -0
- package/dist/{file.d-FYKxJ29C.d.cts → file.d-CBsXF4W8.d.cts} +218 -1
- package/dist/{file.d-FYKxJ29C.d.ts → file.d-CBsXF4W8.d.ts} +218 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/docs/ai-agents.md +104 -0
- package/docs/file.md +122 -0
- package/package.json +1 -1
- package/dist/ai-agents-D6C5TXLD.cjs +0 -7
- package/dist/ai-agents-Y6PH53PH.js +0 -7
- package/dist/chunk-CIPXCDZ6.js +0 -14
- package/dist/chunk-CO7WGRHF.cjs +0 -14
- package/dist/file-A6OZJKIS.cjs +0 -7
- package/dist/file-CRT7VUGQ.js +0 -7
- package/dist/file-runtime-VQIZUOUB.cjs +0 -5
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/ai-agents.json
|
|
4
|
-
var ai_agents_default = '# AI Agents API\n\n- **Base URL:** `https://ai-agents.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.aiAgents.createAgent(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/ai-agents\'\n\nconst aiAgentsClient = getClient()\nauthorize(aiAgentsClient, () => \'<token>\')\nconst { data } = await aiAgentsClient.createAgent(...)\n```\n\n## Operations\n\n**Agents Configuration**\n- [`createAgent`](#createagent)\n- [`listAgents`](#listagents)\n- [`getAgentById`](#getagentbyid)\n- [`updateAgentById`](#updateagentbyid)\n- [`deleteAgentById`](#deleteagentbyid)\n\n**Agent Execution**\n- [`executeAgent`](#executeagent)\n- [`executeAgentStream`](#executeagentstream)\n- [`listExecutions`](#listexecutions)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`getExecutionTrace`](#getexecutiontrace)\n- [`approveExecution`](#approveexecution)\n- [`rejectExecution`](#rejectexecution)\n- [`streamExecution`](#streamexecution)\n\n**Chat**\n- [`chat`](#chat)\n\n**Conversations**\n- [`listConversations`](#listconversations)\n- [`getConversation`](#getconversation)\n- [`deleteConversation`](#deleteconversation)\n- [`submitConversationFeedback`](#submitconversationfeedback)\n\n**Schemas**\n- [`AgentId`](#agentid)\n- [`CreateAgentRequest`](#createagentrequest)\n- [`UpdateAgentRequest`](#updateagentrequest)\n- [`AgentDefinition`](#agentdefinition)\n- [`ListAgentsResponse`](#listagentsresponse)\n- [`ListExecutionsResponse`](#listexecutionsresponse)\n- [`ApproveExecutionRequest`](#approveexecutionrequest)\n- [`RejectExecutionRequest`](#rejectexecutionrequest)\n- [`ExecuteAgentRequest`](#executeagentrequest)\n- [`ExecutionResponse`](#executionresponse)\n- [`ExecutionIterationProjection`](#executioniterationprojection)\n- [`ExecutionTrace`](#executiontrace)\n- [`ExecutionIteration`](#executioniteration)\n- [`PendingAction`](#pendingaction)\n- [`ExecutionError`](#executionerror)\n- [`ExecutionMetrics`](#executionmetrics)\n- [`ToolPreview`](#toolpreview)\n- [`PreviewActionType`](#previewactiontype)\n- [`PreviewEntity`](#previewentity)\n- [`PreviewChange`](#previewchange)\n- [`PreviewValue`](#previewvalue)\n- [`ToolDefinition`](#tooldefinition)\n- [`SkillCategory`](#skillcategory)\n- [`AgentSource`](#agentsource)\n- [`SkillAvailability`](#skillavailability)\n- [`ExecutionContext`](#executioncontext)\n- [`ExecutionPattern`](#executionpattern)\n- [`ExecutionMode`](#executionmode)\n- [`ExecutionStatus`](#executionstatus)\n- [`ParameterType`](#parametertype)\n- [`InputParameterDefinition`](#inputparameterdefinition)\n- [`InputParametersSchema`](#inputparametersschema)\n- [`ModelConfig`](#modelconfig)\n- [`Error`](#error)\n- [`ChatRequest`](#chatrequest)\n- [`ChatMessage`](#chatmessage)\n- [`StreamingOptions`](#streamingoptions)\n- [`StreamEvent`](#streamevent)\n- [`ExecutionResult`](#executionresult)\n- [`ConversationItem`](#conversationitem)\n- [`MessageItem`](#messageitem)\n- [`MessageFeedback`](#messagefeedback)\n- [`SubmitFeedbackRequest`](#submitfeedbackrequest)\n- [`ListConversationsResponse`](#listconversationsresponse)\n- [`ConversationWithMessages`](#conversationwithmessages)\n\n### `createAgent`\n\nCreate Agent definition\n\n`POST /v1/agents`\n\n```ts\nconst { data } = await client.createAgent(\n null,\n {\n name: \'Email Reply Generator\',\n description: \'string\',\n category: \'message\',\n icon: \'mail-reply\',\n system_prompt: \'string\',\n tools: [\'entity.search\', \'message.draft\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 10,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `listAgents`\n\nList all agent configurations\n\n`GET /v1/agents`\n\n```ts\nconst { data } = await client.listAgents({\n source: \'example\',\n availability: \'example\',\n entity_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agents": [\n {\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getAgentById`\n\nGet the agent configuration by ID\n\n`GET /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.getAgentById({\n agent_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateAgentById`\n\nUpdate the agent configuration by ID\n\n`PUT /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.updateAgentById(\n {\n agent_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n category: \'message\',\n icon: \'string\',\n system_prompt: \'string\',\n tools: [\'string\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 1,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteAgentById`\n\nDelete the agent configuration by ID\n\n`DELETE /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.deleteAgentById({\n agent_id: \'example\',\n})\n```\n\n---\n\n### `executeAgent`\n\nExecute an agent\n\n`POST /v1/agents/{agent_id}/execute`\n\n```ts\nconst { data } = await client.executeAgent(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `executeAgentStream`\n\nExecute an agent with streaming response\n\n`POST /v1/agents/{agent_id}/execute/stream`\n\n```ts\nconst { data } = await client.executeAgentStream(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n---\n\n### `listExecutions`\n\nList executions\n\n`GET /v1/executions`\n\n```ts\nconst { data } = await client.listExecutions({\n agent_id: \'example\',\n status: \'example\',\n limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "executions": [\n {\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet execution by ID\n\n`GET /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel execution\n\n`DELETE /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecutionTrace`\n\nGet execution trace/iterations\n\n`GET /v1/executions/{execution_id}/trace`\n\n```ts\nconst { data } = await client.getExecutionTrace({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "iterations": [\n {\n "iteration_index": 0,\n "thought": "string",\n "action": {\n "tool": "string",\n "input": {}\n },\n "observation": {},\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tokens_used": 0,\n "latency_ms": 0\n }\n ],\n "total_iterations": 0\n}\n```\n\n</details>\n\n---\n\n### `approveExecution`\n\nApprove pending action\n\n`POST /v1/executions/{execution_id}/approve`\n\n```ts\nconst { data } = await client.approveExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\',\n approved_action_ids: [\'string\'],\n rejected_action_ids: [\'string\'],\n share_scope: \'primary_only\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `rejectExecution`\n\nReject pending action\n\n`POST /v1/executions/{execution_id}/reject`\n\n```ts\nconst { data } = await client.rejectExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `streamExecution`\n\nReconnect to execution stream\n\n`GET /v1/executions/{execution_id}/stream`\n\n```ts\nconst { data } = await client.streamExecution({\n execution_id: \'example\',\n from_sequence: 1,\n})\n```\n\n---\n\n### `chat`\n\nStreaming chat with AI agent\n\n`POST /v1/chat`\n\n```ts\nconst { data } = await client.chat(\n null,\n {\n agentId: \'string\',\n message: \'string\',\n conversationId: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n clientHistory: [\n {\n role: \'user\',\n content: \'string\',\n tool_calls: [\n {\n id: \'string\',\n name: \'string\',\n input: {},\n output: \'string\'\n }\n ]\n }\n ],\n context: {\n entityId: \'string\',\n customData: {}\n },\n streaming: {\n mode: \'updates\',\n streamTokens: false,\n includeMetadata: false\n }\n },\n)\n```\n\n---\n\n### `listConversations`\n\nList conversations\n\n`GET /v1/conversations`\n\n```ts\nconst { data } = await client.listConversations({\n agent_id: \'example\',\n limit: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversations": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getConversation`\n\nGet conversation with messages\n\n`GET /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.getConversation({\n conversation_id: \'example\',\n message_limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation": {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n },\n "messages": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "role": "user",\n "content": "string",\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tool_calls": [\n {\n "id": "string",\n "name": "string",\n "input": {},\n "output": "string"\n }\n ],\n "token_count": 0,\n "trace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteConversation`\n\nDelete conversation\n\n`DELETE /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.deleteConversation({\n conversation_id: \'example\',\n})\n```\n\n---\n\n### `submitConversationFeedback`\n\nSubmit feedback for an assistant turn\n\n`POST /v1/conversations/{conversation_id}/feedback`\n\n```ts\nconst { data } = await client.submitConversationFeedback(\n {\n conversation_id: \'example\',\n },\n {\n trace_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AgentId`\n\nAgent identifier. Can be either:\n- System skill ID (prefixed): "skill:email-categorizer", "skill:email-labeler"\n- Custom agent UUID: "0336a235-9417-4dd8-894c-fe81285bba75"\n\n\n```ts\ntype AgentId = string\n```\n\n### `CreateAgentRequest`\n\n```ts\ntype CreateAgentRequest = {\n name: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `UpdateAgentRequest`\n\n```ts\ntype UpdateAgentRequest = {\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `AgentDefinition`\n\n```ts\ntype AgentDefinition = {\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n}\n```\n\n### `ListAgentsResponse`\n\n```ts\ntype ListAgentsResponse = {\n agents?: Array<{\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: { ... }\n temperature?: { ... }\n max_tokens?: { ... }\n thinking?: { ... }\n thinking_budget?: { ... }\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: { ... }\n parameters: { ... }\n required?: { ... }\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `ListExecutionsResponse`\n\n```ts\ntype ListExecutionsResponse = {\n executions?: Array<{\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: { ... }\n structured_output?: { ... }\n }\n error?: {\n code?: { ... }\n message?: { ... }\n details?: { ... }\n }\n pending_action?: {\n tool?: { ... }\n input?: { ... }\n description?: { ... }\n preview?: { ... }\n }\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: { ... }\n tool?: { ... }\n status?: { ... }\n timestamp?: { ... }\n }>\n }>\n next_cursor?: string\n}\n```\n\n### `ApproveExecutionRequest`\n\n```ts\ntype ApproveExecutionRequest = {\n reason?: string\n approved_action_ids?: string[]\n rejected_action_ids?: string[]\n share_scope?: "primary_only" | "primary_and_relations"\n}\n```\n\n### `RejectExecutionRequest`\n\n```ts\ntype RejectExecutionRequest = {\n reason: string\n}\n```\n\n### `ExecuteAgentRequest`\n\n```ts\ntype ExecuteAgentRequest = {\n input?: {\n entity_id?: string\n entity_schema?: string\n workflow_id?: string\n workflow_execution_id?: string\n task_id?: string\n custom_data?: Record<string, unknown>\n flow_context?: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }>\n }\n parameters?: Record<string, unknown>\n execution_mode_override?: "automatic" | "approval" | "draft"\n execution_context?: "flows" | "copilot" | "api"\n callback_url?: string // uri\n timeout_ms?: number\n}\n```\n\n### `ExecutionResponse`\n\n```ts\ntype ExecutionResponse = {\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: string\n structured_output?: object\n }\n error?: {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n }\n pending_action?: {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: { ... }\n source?: { ... }\n target?: { ... }\n changes?: { ... }\n metadata?: { ... }\n summary?: { ... }\n }\n }\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n }>\n}\n```\n\n### `ExecutionIterationProjection`\n\n```ts\ntype ExecutionIterationProjection = {\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n}\n```\n\n### `ExecutionTrace`\n\n```ts\ntype ExecutionTrace = {\n execution_id?: string // uuid\n iterations?: Array<{\n iteration_index?: number\n thought?: string\n action?: {\n tool?: { ... }\n input?: { ... }\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n }>\n total_iterations?: number\n}\n```\n\n### `ExecutionIteration`\n\n```ts\ntype ExecutionIteration = {\n iteration_index?: number\n thought?: string\n action?: {\n tool?: string\n input?: object\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n}\n```\n\n### `PendingAction`\n\nAction waiting for approval (when status=waiting_approval)\n\n```ts\ntype PendingAction = {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: {\n type: { ... }\n verb: { ... }\n }\n source?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n target?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n changes?: Array<{\n field?: { ... }\n label?: { ... }\n from?: { ... }\n to?: { ... }\n }>\n metadata?: Record<string, {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }>\n summary?: string\n }\n}\n```\n\n### `ExecutionError`\n\n```ts\ntype ExecutionError = {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n}\n```\n\n### `ExecutionMetrics`\n\n```ts\ntype ExecutionMetrics = {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n}\n```\n\n### `ToolPreview`\n\nStructured preview data for approval UI. Provides a generic format that any tool can populate.\n\n```ts\ntype ToolPreview = {\n action?: {\n type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n verb: string\n }\n source?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n target?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n changes?: Array<{\n field?: string\n label?: string\n from?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n to?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n }>\n metadata?: Record<string, {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }>\n summary?: string\n}\n```\n\n### `PreviewActionType`\n\nType of action being previewed\n\n```ts\ntype PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n```\n\n### `PreviewEntity`\n\nEntity reference for preview display\n\n```ts\ntype PreviewEntity = {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n}\n```\n\n### `PreviewChange`\n\nA single field change in the preview\n\n```ts\ntype PreviewChange = {\n field?: string\n label?: string\n from?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n to?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n}\n```\n\n### `PreviewValue`\n\nTyped value for preview display\n\n```ts\ntype PreviewValue = {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n}\n```\n\n### `ToolDefinition`\n\n```ts\ntype ToolDefinition = {\n tool_id?: string\n name?: string\n description?: string\n category?: "entity" | "message" | "taxonomy" | "rag" | "workflow"\n parameters?: object\n returns?: object\n requires_approval?: boolean\n enabled?: boolean\n}\n```\n\n### `SkillCategory`\n\n```ts\ntype SkillCategory = "message" | "entity" | "document" | "classification" | "custom"\n```\n\n### `AgentSource`\n\n- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n\n\n```ts\ntype AgentSource = "system" | "custom"\n```\n\n### `SkillAvailability`\n\nWhere the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- portals: Available in end-user self-service portals\n- all: Available everywhere\n\n\n```ts\ntype SkillAvailability = "flows" | "copilot" | "portals" | "all"\n```\n\n### `ExecutionContext`\n\nWhere the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n\n\n```ts\ntype ExecutionContext = "flows" | "copilot" | "api"\n```\n\n### `ExecutionPattern`\n\n- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n\n\n```ts\ntype ExecutionPattern = "direct" | "react"\n```\n\n### `ExecutionMode`\n\n- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n\n\n```ts\ntype ExecutionMode = "automatic" | "approval" | "draft"\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n```\n\n### `ParameterType`\n\nBase types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute\n\n```ts\ntype ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n```\n\n### `InputParameterDefinition`\n\n```ts\ntype InputParameterDefinition = {\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n}\n```\n\n### `InputParametersSchema`\n\n```ts\ntype InputParametersSchema = {\n type: "object"\n parameters: Array<{\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n }>\n required?: string[]\n}\n```\n\n### `ModelConfig`\n\n```ts\ntype ModelConfig = {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n}\n```\n\n### `Error`\n\n```ts\ntype Error = {\n error?: string\n message?: string\n details?: object\n}\n```\n\n### `ChatRequest`\n\n```ts\ntype ChatRequest = {\n agentId: string\n message: string\n conversationId?: string // uuid\n clientHistory?: Array<{\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n }>\n context?: {\n entityId?: string\n customData?: Record<string, unknown>\n }\n streaming?: {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n }\n}\n```\n\n### `ChatMessage`\n\n```ts\ntype ChatMessage = {\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n}\n```\n\n### `StreamingOptions`\n\n```ts\ntype StreamingOptions = {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n}\n```\n\n### `StreamEvent`\n\nServer-Sent Event for streaming responses\n\n```ts\ntype StreamEvent = {\n type?: "token" | "agent_step" | "tool_call" | "tool_result" | "complete" | "error" | "metadata" | "needs_approval"\n content?: string\n index?: number\n tool?: string\n input?: object\n output?: string\n callId?: string\n result?: {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n }\n error?: {\n code?: string\n message?: string\n }\n conversationId?: string // uuid\n}\n```\n\n### `ExecutionResult`\n\n```ts\ntype ExecutionResult = {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n}\n```\n\n### `ConversationItem`\n\n```ts\ntype ConversationItem = {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: string\n customData?: object\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `MessageItem`\n\n```ts\ntype MessageItem = {\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `MessageFeedback`\n\n```ts\ntype MessageFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `SubmitFeedbackRequest`\n\n```ts\ntype SubmitFeedbackRequest = {\n trace_id: string // uuid\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ListConversationsResponse`\n\n```ts\ntype ListConversationsResponse = {\n conversations?: Array<{\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }>\n next_cursor?: string\n}\n```\n\n### `ConversationWithMessages`\n\n```ts\ntype ConversationWithMessages = {\n conversation?: {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }\n messages?: Array<{\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: { ... }\n comment?: { ... }\n user_id: { ... }\n submitted_at: { ... }\n }\n }>\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = ai_agents_default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/ai-agents.json
|
|
4
|
-
var ai_agents_default = '# AI Agents API\n\n- **Base URL:** `https://ai-agents.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.aiAgents.createAgent(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/ai-agents\'\n\nconst aiAgentsClient = getClient()\nauthorize(aiAgentsClient, () => \'<token>\')\nconst { data } = await aiAgentsClient.createAgent(...)\n```\n\n## Operations\n\n**Agents Configuration**\n- [`createAgent`](#createagent)\n- [`listAgents`](#listagents)\n- [`getAgentById`](#getagentbyid)\n- [`updateAgentById`](#updateagentbyid)\n- [`deleteAgentById`](#deleteagentbyid)\n\n**Agent Execution**\n- [`executeAgent`](#executeagent)\n- [`executeAgentStream`](#executeagentstream)\n- [`listExecutions`](#listexecutions)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`getExecutionTrace`](#getexecutiontrace)\n- [`approveExecution`](#approveexecution)\n- [`rejectExecution`](#rejectexecution)\n- [`streamExecution`](#streamexecution)\n\n**Chat**\n- [`chat`](#chat)\n\n**Conversations**\n- [`listConversations`](#listconversations)\n- [`getConversation`](#getconversation)\n- [`deleteConversation`](#deleteconversation)\n- [`submitConversationFeedback`](#submitconversationfeedback)\n\n**Schemas**\n- [`AgentId`](#agentid)\n- [`CreateAgentRequest`](#createagentrequest)\n- [`UpdateAgentRequest`](#updateagentrequest)\n- [`AgentDefinition`](#agentdefinition)\n- [`ListAgentsResponse`](#listagentsresponse)\n- [`ListExecutionsResponse`](#listexecutionsresponse)\n- [`ApproveExecutionRequest`](#approveexecutionrequest)\n- [`RejectExecutionRequest`](#rejectexecutionrequest)\n- [`ExecuteAgentRequest`](#executeagentrequest)\n- [`ExecutionResponse`](#executionresponse)\n- [`ExecutionIterationProjection`](#executioniterationprojection)\n- [`ExecutionTrace`](#executiontrace)\n- [`ExecutionIteration`](#executioniteration)\n- [`PendingAction`](#pendingaction)\n- [`ExecutionError`](#executionerror)\n- [`ExecutionMetrics`](#executionmetrics)\n- [`ToolPreview`](#toolpreview)\n- [`PreviewActionType`](#previewactiontype)\n- [`PreviewEntity`](#previewentity)\n- [`PreviewChange`](#previewchange)\n- [`PreviewValue`](#previewvalue)\n- [`ToolDefinition`](#tooldefinition)\n- [`SkillCategory`](#skillcategory)\n- [`AgentSource`](#agentsource)\n- [`SkillAvailability`](#skillavailability)\n- [`ExecutionContext`](#executioncontext)\n- [`ExecutionPattern`](#executionpattern)\n- [`ExecutionMode`](#executionmode)\n- [`ExecutionStatus`](#executionstatus)\n- [`ParameterType`](#parametertype)\n- [`InputParameterDefinition`](#inputparameterdefinition)\n- [`InputParametersSchema`](#inputparametersschema)\n- [`ModelConfig`](#modelconfig)\n- [`Error`](#error)\n- [`ChatRequest`](#chatrequest)\n- [`ChatMessage`](#chatmessage)\n- [`StreamingOptions`](#streamingoptions)\n- [`StreamEvent`](#streamevent)\n- [`ExecutionResult`](#executionresult)\n- [`ConversationItem`](#conversationitem)\n- [`MessageItem`](#messageitem)\n- [`MessageFeedback`](#messagefeedback)\n- [`SubmitFeedbackRequest`](#submitfeedbackrequest)\n- [`ListConversationsResponse`](#listconversationsresponse)\n- [`ConversationWithMessages`](#conversationwithmessages)\n\n### `createAgent`\n\nCreate Agent definition\n\n`POST /v1/agents`\n\n```ts\nconst { data } = await client.createAgent(\n null,\n {\n name: \'Email Reply Generator\',\n description: \'string\',\n category: \'message\',\n icon: \'mail-reply\',\n system_prompt: \'string\',\n tools: [\'entity.search\', \'message.draft\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 10,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `listAgents`\n\nList all agent configurations\n\n`GET /v1/agents`\n\n```ts\nconst { data } = await client.listAgents({\n source: \'example\',\n availability: \'example\',\n entity_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agents": [\n {\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getAgentById`\n\nGet the agent configuration by ID\n\n`GET /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.getAgentById({\n agent_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateAgentById`\n\nUpdate the agent configuration by ID\n\n`PUT /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.updateAgentById(\n {\n agent_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n category: \'message\',\n icon: \'string\',\n system_prompt: \'string\',\n tools: [\'string\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 1,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteAgentById`\n\nDelete the agent configuration by ID\n\n`DELETE /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.deleteAgentById({\n agent_id: \'example\',\n})\n```\n\n---\n\n### `executeAgent`\n\nExecute an agent\n\n`POST /v1/agents/{agent_id}/execute`\n\n```ts\nconst { data } = await client.executeAgent(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `executeAgentStream`\n\nExecute an agent with streaming response\n\n`POST /v1/agents/{agent_id}/execute/stream`\n\n```ts\nconst { data } = await client.executeAgentStream(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n---\n\n### `listExecutions`\n\nList executions\n\n`GET /v1/executions`\n\n```ts\nconst { data } = await client.listExecutions({\n agent_id: \'example\',\n status: \'example\',\n limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "executions": [\n {\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet execution by ID\n\n`GET /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel execution\n\n`DELETE /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecutionTrace`\n\nGet execution trace/iterations\n\n`GET /v1/executions/{execution_id}/trace`\n\n```ts\nconst { data } = await client.getExecutionTrace({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "iterations": [\n {\n "iteration_index": 0,\n "thought": "string",\n "action": {\n "tool": "string",\n "input": {}\n },\n "observation": {},\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tokens_used": 0,\n "latency_ms": 0\n }\n ],\n "total_iterations": 0\n}\n```\n\n</details>\n\n---\n\n### `approveExecution`\n\nApprove pending action\n\n`POST /v1/executions/{execution_id}/approve`\n\n```ts\nconst { data } = await client.approveExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\',\n approved_action_ids: [\'string\'],\n rejected_action_ids: [\'string\'],\n share_scope: \'primary_only\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `rejectExecution`\n\nReject pending action\n\n`POST /v1/executions/{execution_id}/reject`\n\n```ts\nconst { data } = await client.rejectExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `streamExecution`\n\nReconnect to execution stream\n\n`GET /v1/executions/{execution_id}/stream`\n\n```ts\nconst { data } = await client.streamExecution({\n execution_id: \'example\',\n from_sequence: 1,\n})\n```\n\n---\n\n### `chat`\n\nStreaming chat with AI agent\n\n`POST /v1/chat`\n\n```ts\nconst { data } = await client.chat(\n null,\n {\n agentId: \'string\',\n message: \'string\',\n conversationId: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n clientHistory: [\n {\n role: \'user\',\n content: \'string\',\n tool_calls: [\n {\n id: \'string\',\n name: \'string\',\n input: {},\n output: \'string\'\n }\n ]\n }\n ],\n context: {\n entityId: \'string\',\n customData: {}\n },\n streaming: {\n mode: \'updates\',\n streamTokens: false,\n includeMetadata: false\n }\n },\n)\n```\n\n---\n\n### `listConversations`\n\nList conversations\n\n`GET /v1/conversations`\n\n```ts\nconst { data } = await client.listConversations({\n agent_id: \'example\',\n limit: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversations": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getConversation`\n\nGet conversation with messages\n\n`GET /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.getConversation({\n conversation_id: \'example\',\n message_limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation": {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n },\n "messages": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "role": "user",\n "content": "string",\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tool_calls": [\n {\n "id": "string",\n "name": "string",\n "input": {},\n "output": "string"\n }\n ],\n "token_count": 0,\n "trace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteConversation`\n\nDelete conversation\n\n`DELETE /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.deleteConversation({\n conversation_id: \'example\',\n})\n```\n\n---\n\n### `submitConversationFeedback`\n\nSubmit feedback for an assistant turn\n\n`POST /v1/conversations/{conversation_id}/feedback`\n\n```ts\nconst { data } = await client.submitConversationFeedback(\n {\n conversation_id: \'example\',\n },\n {\n trace_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AgentId`\n\nAgent identifier. Can be either:\n- System skill ID (prefixed): "skill:email-categorizer", "skill:email-labeler"\n- Custom agent UUID: "0336a235-9417-4dd8-894c-fe81285bba75"\n\n\n```ts\ntype AgentId = string\n```\n\n### `CreateAgentRequest`\n\n```ts\ntype CreateAgentRequest = {\n name: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `UpdateAgentRequest`\n\n```ts\ntype UpdateAgentRequest = {\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `AgentDefinition`\n\n```ts\ntype AgentDefinition = {\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n}\n```\n\n### `ListAgentsResponse`\n\n```ts\ntype ListAgentsResponse = {\n agents?: Array<{\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: { ... }\n temperature?: { ... }\n max_tokens?: { ... }\n thinking?: { ... }\n thinking_budget?: { ... }\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: { ... }\n parameters: { ... }\n required?: { ... }\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `ListExecutionsResponse`\n\n```ts\ntype ListExecutionsResponse = {\n executions?: Array<{\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: { ... }\n structured_output?: { ... }\n }\n error?: {\n code?: { ... }\n message?: { ... }\n details?: { ... }\n }\n pending_action?: {\n tool?: { ... }\n input?: { ... }\n description?: { ... }\n preview?: { ... }\n }\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: { ... }\n tool?: { ... }\n status?: { ... }\n timestamp?: { ... }\n }>\n }>\n next_cursor?: string\n}\n```\n\n### `ApproveExecutionRequest`\n\n```ts\ntype ApproveExecutionRequest = {\n reason?: string\n approved_action_ids?: string[]\n rejected_action_ids?: string[]\n share_scope?: "primary_only" | "primary_and_relations"\n}\n```\n\n### `RejectExecutionRequest`\n\n```ts\ntype RejectExecutionRequest = {\n reason: string\n}\n```\n\n### `ExecuteAgentRequest`\n\n```ts\ntype ExecuteAgentRequest = {\n input?: {\n entity_id?: string\n entity_schema?: string\n workflow_id?: string\n workflow_execution_id?: string\n task_id?: string\n custom_data?: Record<string, unknown>\n flow_context?: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }>\n }\n parameters?: Record<string, unknown>\n execution_mode_override?: "automatic" | "approval" | "draft"\n execution_context?: "flows" | "copilot" | "api"\n callback_url?: string // uri\n timeout_ms?: number\n}\n```\n\n### `ExecutionResponse`\n\n```ts\ntype ExecutionResponse = {\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: string\n structured_output?: object\n }\n error?: {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n }\n pending_action?: {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: { ... }\n source?: { ... }\n target?: { ... }\n changes?: { ... }\n metadata?: { ... }\n summary?: { ... }\n }\n }\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n }>\n}\n```\n\n### `ExecutionIterationProjection`\n\n```ts\ntype ExecutionIterationProjection = {\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n}\n```\n\n### `ExecutionTrace`\n\n```ts\ntype ExecutionTrace = {\n execution_id?: string // uuid\n iterations?: Array<{\n iteration_index?: number\n thought?: string\n action?: {\n tool?: { ... }\n input?: { ... }\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n }>\n total_iterations?: number\n}\n```\n\n### `ExecutionIteration`\n\n```ts\ntype ExecutionIteration = {\n iteration_index?: number\n thought?: string\n action?: {\n tool?: string\n input?: object\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n}\n```\n\n### `PendingAction`\n\nAction waiting for approval (when status=waiting_approval)\n\n```ts\ntype PendingAction = {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: {\n type: { ... }\n verb: { ... }\n }\n source?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n target?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n changes?: Array<{\n field?: { ... }\n label?: { ... }\n from?: { ... }\n to?: { ... }\n }>\n metadata?: Record<string, {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }>\n summary?: string\n }\n}\n```\n\n### `ExecutionError`\n\n```ts\ntype ExecutionError = {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n}\n```\n\n### `ExecutionMetrics`\n\n```ts\ntype ExecutionMetrics = {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n}\n```\n\n### `ToolPreview`\n\nStructured preview data for approval UI. Provides a generic format that any tool can populate.\n\n```ts\ntype ToolPreview = {\n action?: {\n type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n verb: string\n }\n source?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n target?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n changes?: Array<{\n field?: string\n label?: string\n from?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n to?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n }>\n metadata?: Record<string, {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }>\n summary?: string\n}\n```\n\n### `PreviewActionType`\n\nType of action being previewed\n\n```ts\ntype PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n```\n\n### `PreviewEntity`\n\nEntity reference for preview display\n\n```ts\ntype PreviewEntity = {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n}\n```\n\n### `PreviewChange`\n\nA single field change in the preview\n\n```ts\ntype PreviewChange = {\n field?: string\n label?: string\n from?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n to?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n}\n```\n\n### `PreviewValue`\n\nTyped value for preview display\n\n```ts\ntype PreviewValue = {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n}\n```\n\n### `ToolDefinition`\n\n```ts\ntype ToolDefinition = {\n tool_id?: string\n name?: string\n description?: string\n category?: "entity" | "message" | "taxonomy" | "rag" | "workflow"\n parameters?: object\n returns?: object\n requires_approval?: boolean\n enabled?: boolean\n}\n```\n\n### `SkillCategory`\n\n```ts\ntype SkillCategory = "message" | "entity" | "document" | "classification" | "custom"\n```\n\n### `AgentSource`\n\n- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n\n\n```ts\ntype AgentSource = "system" | "custom"\n```\n\n### `SkillAvailability`\n\nWhere the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- portals: Available in end-user self-service portals\n- all: Available everywhere\n\n\n```ts\ntype SkillAvailability = "flows" | "copilot" | "portals" | "all"\n```\n\n### `ExecutionContext`\n\nWhere the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n\n\n```ts\ntype ExecutionContext = "flows" | "copilot" | "api"\n```\n\n### `ExecutionPattern`\n\n- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n\n\n```ts\ntype ExecutionPattern = "direct" | "react"\n```\n\n### `ExecutionMode`\n\n- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n\n\n```ts\ntype ExecutionMode = "automatic" | "approval" | "draft"\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n```\n\n### `ParameterType`\n\nBase types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute\n\n```ts\ntype ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n```\n\n### `InputParameterDefinition`\n\n```ts\ntype InputParameterDefinition = {\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n}\n```\n\n### `InputParametersSchema`\n\n```ts\ntype InputParametersSchema = {\n type: "object"\n parameters: Array<{\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n }>\n required?: string[]\n}\n```\n\n### `ModelConfig`\n\n```ts\ntype ModelConfig = {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n}\n```\n\n### `Error`\n\n```ts\ntype Error = {\n error?: string\n message?: string\n details?: object\n}\n```\n\n### `ChatRequest`\n\n```ts\ntype ChatRequest = {\n agentId: string\n message: string\n conversationId?: string // uuid\n clientHistory?: Array<{\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n }>\n context?: {\n entityId?: string\n customData?: Record<string, unknown>\n }\n streaming?: {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n }\n}\n```\n\n### `ChatMessage`\n\n```ts\ntype ChatMessage = {\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n}\n```\n\n### `StreamingOptions`\n\n```ts\ntype StreamingOptions = {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n}\n```\n\n### `StreamEvent`\n\nServer-Sent Event for streaming responses\n\n```ts\ntype StreamEvent = {\n type?: "token" | "agent_step" | "tool_call" | "tool_result" | "complete" | "error" | "metadata" | "needs_approval"\n content?: string\n index?: number\n tool?: string\n input?: object\n output?: string\n callId?: string\n result?: {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n }\n error?: {\n code?: string\n message?: string\n }\n conversationId?: string // uuid\n}\n```\n\n### `ExecutionResult`\n\n```ts\ntype ExecutionResult = {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n}\n```\n\n### `ConversationItem`\n\n```ts\ntype ConversationItem = {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: string\n customData?: object\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `MessageItem`\n\n```ts\ntype MessageItem = {\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `MessageFeedback`\n\n```ts\ntype MessageFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `SubmitFeedbackRequest`\n\n```ts\ntype SubmitFeedbackRequest = {\n trace_id: string // uuid\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ListConversationsResponse`\n\n```ts\ntype ListConversationsResponse = {\n conversations?: Array<{\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }>\n next_cursor?: string\n}\n```\n\n### `ConversationWithMessages`\n\n```ts\ntype ConversationWithMessages = {\n conversation?: {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }\n messages?: Array<{\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: { ... }\n comment?: { ... }\n user_id: { ... }\n submitted_at: { ... }\n }\n }>\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
ai_agents_default as default
|
|
7
|
-
};
|
package/dist/chunk-CIPXCDZ6.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
} from "./chunk-YPSWSI3M.js";
|
|
4
|
-
|
|
5
|
-
// src/definitions/file-runtime.json
|
|
6
|
-
var require_file_runtime = __commonJS({
|
|
7
|
-
"src/definitions/file-runtime.json"(exports, module) {
|
|
8
|
-
module.exports = { s: "https://file.sls.epilot.io", o: [["uploadFileV2", "post", "/v2/files/upload", [["file_entity_id", "q"]], 1], ["saveFileV2", "post", "/v2/files", [["ActivityIdQueryParam"], ["FillActivityQueryParam"], ["StrictQueryParam"], ["AsyncOperationQueryParam"], ["DeleteTempFileQueryParam"], ["VersionOnlyQueryParam"]], 1], ["uploadFile", "post", "/v1/files/upload", [["file_entity_id", "q"]], 1], ["saveFile", "post", "/v1/files", [["ActivityIdQueryParam"], ["AsyncOperationQueryParam"], ["VersionOnlyQueryParam"]], 1], ["getFile", "get", "/v2/files/{id}", [["id", "p", true], ["source_url", "q"], ["StrictQueryParam"], ["AsyncOperationQueryParam"]]], ["deleteFile", "delete", "/v2/files/{id}", [["id", "p", true], ["purge", "q"], ["ActivityIdQueryParam"], ["StrictQueryParam"]]], ["downloadFile", "get", "/v1/files/{id}/download", [["id", "p", true], ["version", "q"], ["attachment", "q"], ["x-track", "q", false, "form", true]]], ["downloadS3File", "post", "/v1/files:downloadS3", [["s3_key", "q", true], ["s3_bucket", "q", true], ["attachment", "q"]]], ["downloadFiles", "post", "/v1/files:downloadFiles", null, 1], ["createZipJob", "post", "/v1/files:zipJob", null, 1], ["getZipJob", "get", "/v1/files:zipJob/{job_id}", [["job_id", "p", true]]], ["getFileSummary", "get", "/v1/files/{id}/summary", [["id", "p", true]]], ["createFileSummaryJob", "post", "/v1/files/{id}/summary-jobs", [["id", "p", true]]], ["getCurrentFileSummaryJob", "get", "/v1/files/{id}/summary-jobs/current", [["id", "p", true]]], ["getFileSummaryJob", "get", "/v1/files/{id}/summary-jobs/{job_id}", [["id", "p", true], ["job_id", "p", true]]], ["generateFileSummary", "post", "/v1/files/{id}/summary:generate", [["id", "p", true]]], ["getFileText", "get", "/v1/files/{id}/text", [["id", "p", true]]], ["previewFile", "get", "/v1/files/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"]]], ["previewS3File", "post", "/v1/files:previewS3", [["w", "q"], ["h", "q"]], 1], ["previewS3FileGet", "get", "/v1/files:previewS3", [["key", "q", true], ["bucket", "q", true], ["w", "q"], ["h", "q"]]], ["previewPublicFile", "get", "/v1/files/public/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"], ["org_id", "q"]]], ["getSession", "get", "/v1/files/session"], ["deleteSession", "delete", "/v1/files/session"], ["generatePublicLink", "post", "/v1/files/{id}/public/links", [["id", "p", true]]], ["listPublicLinksForFile", "get", "/v1/files/{id}/public/links", [["id", "p", true]]], ["accessPublicLink", "get", "/v1/files/public/links/{id}/{filename}", [["id", "p", true], ["filename", "p", true], ["hash", "q"]]], ["revokePublicLink", "delete", "/v1/files/public/links/{id}", [["id", "p", true]]], ["verifyCustomDownloadUrl", "post", "/v1/files/download:verify", null, 1], ["uploadFilePublic", "post", "/v1/files/public/upload", null, 1], ["getUserSchemaFileCollections", "get", "/v1/{slug}/collections", [["slug", "p", true]]], ["createUserSchemaFileCollection", "post", "/v1/{slug}/collections", [["slug", "p", true]], 1], ["updateUserSchemaFileCollection", "put", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]], 1], ["deleteUserSchemaFileCollection", "delete", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]]], ["getFilesInCollection", "get", "/v1/entity/{id}/collections/{collectionSlug}/files", [["EntityIdPathParam"], ["collectionSlug", "p", true]]], ["getGlobalFileCollections", "get", "/v1/collections/{schemaSlug}", [["schemaSlug", "p", true]]]], v: "3.0.3", cp: { EntityIdPathParam: ["id", "p", true], StrictQueryParam: ["strict", "q"], ActivityIdQueryParam: ["activity_id", "q"], FillActivityQueryParam: ["fill_activity", "q"], AsyncOperationQueryParam: ["async", "q"], DeleteTempFileQueryParam: ["delete_temp_file", "q"], VersionOnlyQueryParam: ["version_only", "q"] } };
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
require_file_runtime
|
|
14
|
-
};
|
package/dist/chunk-CO7WGRHF.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
4
|
-
|
|
5
|
-
// src/definitions/file-runtime.json
|
|
6
|
-
var require_file_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
|
|
7
|
-
"src/definitions/file-runtime.json"(exports, module) {
|
|
8
|
-
module.exports = { s: "https://file.sls.epilot.io", o: [["uploadFileV2", "post", "/v2/files/upload", [["file_entity_id", "q"]], 1], ["saveFileV2", "post", "/v2/files", [["ActivityIdQueryParam"], ["FillActivityQueryParam"], ["StrictQueryParam"], ["AsyncOperationQueryParam"], ["DeleteTempFileQueryParam"], ["VersionOnlyQueryParam"]], 1], ["uploadFile", "post", "/v1/files/upload", [["file_entity_id", "q"]], 1], ["saveFile", "post", "/v1/files", [["ActivityIdQueryParam"], ["AsyncOperationQueryParam"], ["VersionOnlyQueryParam"]], 1], ["getFile", "get", "/v2/files/{id}", [["id", "p", true], ["source_url", "q"], ["StrictQueryParam"], ["AsyncOperationQueryParam"]]], ["deleteFile", "delete", "/v2/files/{id}", [["id", "p", true], ["purge", "q"], ["ActivityIdQueryParam"], ["StrictQueryParam"]]], ["downloadFile", "get", "/v1/files/{id}/download", [["id", "p", true], ["version", "q"], ["attachment", "q"], ["x-track", "q", false, "form", true]]], ["downloadS3File", "post", "/v1/files:downloadS3", [["s3_key", "q", true], ["s3_bucket", "q", true], ["attachment", "q"]]], ["downloadFiles", "post", "/v1/files:downloadFiles", null, 1], ["createZipJob", "post", "/v1/files:zipJob", null, 1], ["getZipJob", "get", "/v1/files:zipJob/{job_id}", [["job_id", "p", true]]], ["getFileSummary", "get", "/v1/files/{id}/summary", [["id", "p", true]]], ["createFileSummaryJob", "post", "/v1/files/{id}/summary-jobs", [["id", "p", true]]], ["getCurrentFileSummaryJob", "get", "/v1/files/{id}/summary-jobs/current", [["id", "p", true]]], ["getFileSummaryJob", "get", "/v1/files/{id}/summary-jobs/{job_id}", [["id", "p", true], ["job_id", "p", true]]], ["generateFileSummary", "post", "/v1/files/{id}/summary:generate", [["id", "p", true]]], ["getFileText", "get", "/v1/files/{id}/text", [["id", "p", true]]], ["previewFile", "get", "/v1/files/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"]]], ["previewS3File", "post", "/v1/files:previewS3", [["w", "q"], ["h", "q"]], 1], ["previewS3FileGet", "get", "/v1/files:previewS3", [["key", "q", true], ["bucket", "q", true], ["w", "q"], ["h", "q"]]], ["previewPublicFile", "get", "/v1/files/public/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"], ["org_id", "q"]]], ["getSession", "get", "/v1/files/session"], ["deleteSession", "delete", "/v1/files/session"], ["generatePublicLink", "post", "/v1/files/{id}/public/links", [["id", "p", true]]], ["listPublicLinksForFile", "get", "/v1/files/{id}/public/links", [["id", "p", true]]], ["accessPublicLink", "get", "/v1/files/public/links/{id}/{filename}", [["id", "p", true], ["filename", "p", true], ["hash", "q"]]], ["revokePublicLink", "delete", "/v1/files/public/links/{id}", [["id", "p", true]]], ["verifyCustomDownloadUrl", "post", "/v1/files/download:verify", null, 1], ["uploadFilePublic", "post", "/v1/files/public/upload", null, 1], ["getUserSchemaFileCollections", "get", "/v1/{slug}/collections", [["slug", "p", true]]], ["createUserSchemaFileCollection", "post", "/v1/{slug}/collections", [["slug", "p", true]], 1], ["updateUserSchemaFileCollection", "put", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]], 1], ["deleteUserSchemaFileCollection", "delete", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]]], ["getFilesInCollection", "get", "/v1/entity/{id}/collections/{collectionSlug}/files", [["EntityIdPathParam"], ["collectionSlug", "p", true]]], ["getGlobalFileCollections", "get", "/v1/collections/{schemaSlug}", [["schemaSlug", "p", true]]]], v: "3.0.3", cp: { EntityIdPathParam: ["id", "p", true], StrictQueryParam: ["strict", "q"], ActivityIdQueryParam: ["activity_id", "q"], FillActivityQueryParam: ["fill_activity", "q"], AsyncOperationQueryParam: ["async", "q"], DeleteTempFileQueryParam: ["delete_temp_file", "q"], VersionOnlyQueryParam: ["version_only", "q"] } };
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.require_file_runtime = require_file_runtime;
|
package/dist/file-A6OZJKIS.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/file.json
|
|
4
|
-
var file_default = '# File API\n\n- **Base URL:** `https://file.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.file.uploadFileV2(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/file\'\n\nconst fileClient = getClient()\nauthorize(fileClient, () => \'<token>\')\nconst { data } = await fileClient.uploadFileV2(...)\n```\n\n## Operations\n\n**File**\n- [`uploadFileV2`](#uploadfilev2)\n- [`saveFileV2`](#savefilev2)\n- [`getFile`](#getfile)\n- [`deleteFile`](#deletefile)\n- [`downloadFile`](#downloadfile)\n- [`downloadS3File`](#downloads3file)\n- [`downloadFiles`](#downloadfiles)\n- [`createZipJob`](#createzipjob)\n- [`getZipJob`](#getzipjob)\n- [`getFileSummary`](#getfilesummary)\n- [`createFileSummaryJob`](#createfilesummaryjob)\n- [`getCurrentFileSummaryJob`](#getcurrentfilesummaryjob)\n- [`getFileSummaryJob`](#getfilesummaryjob)\n- [`generateFileSummary`](#generatefilesummary)\n- [`getFileText`](#getfiletext)\n- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)\n- [`uploadFilePublic`](#uploadfilepublic)\n\n**Preview**\n- [`previewFile`](#previewfile)\n- [`previewS3File`](#previews3file)\n- [`previewS3FileGet`](#previews3fileget)\n- [`previewPublicFile`](#previewpublicfile)\n\n**Session**\n- [`getSession`](#getsession)\n- [`deleteSession`](#deletesession)\n\n**Public Links**\n- [`generatePublicLink`](#generatepubliclink)\n- [`listPublicLinksForFile`](#listpubliclinksforfile)\n- [`accessPublicLink`](#accesspubliclink)\n- [`revokePublicLink`](#revokepubliclink)\n\n**File Collections**\n- [`getUserSchemaFileCollections`](#getuserschemafilecollections)\n- [`createUserSchemaFileCollection`](#createuserschemafilecollection)\n- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)\n- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)\n- [`getFilesInCollection`](#getfilesincollection)\n- [`getGlobalFileCollections`](#getglobalfilecollections)\n\n**Schemas**\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`ActivityId`](#activityid)\n- [`FileEntityId`](#fileentityid)\n- [`FileAttributes`](#fileattributes)\n- [`FileType`](#filetype)\n- [`FileSummaryJobStatus`](#filesummaryjobstatus)\n- [`FileSummaryJob`](#filesummaryjob)\n- [`FileSummary`](#filesummary)\n- [`FileTextStatus`](#filetextstatus)\n- [`FileText`](#filetext)\n- [`FileTextReady`](#filetextready)\n- [`FileTextNotReady`](#filetextnotready)\n- [`FileTextUnsupported`](#filetextunsupported)\n- [`CustomDownloadUrl`](#customdownloadurl)\n- [`CustomDownloadUrlAuth`](#customdownloadurlauth)\n- [`FileEntity`](#fileentity)\n- [`CommonSaveFilePayload`](#commonsavefilepayload)\n- [`SaveS3FilePayload`](#saves3filepayload)\n- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)\n- [`SaveCustomFilePayload`](#savecustomfilepayload)\n- [`SaveFilePayload`](#savefilepayload)\n- [`SaveFilePayloadV2`](#savefilepayloadv2)\n- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)\n- [`UploadFilePayload`](#uploadfilepayload)\n- [`FileUpload`](#fileupload)\n- [`DownloadFilesPayload`](#downloadfilespayload)\n- [`CreateZipJobPayload`](#createzipjobpayload)\n- [`ZipJob`](#zipjob)\n- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)\n- [`S3Reference`](#s3reference)\n- [`S3Ref`](#s3ref)\n- [`FileItem`](#fileitem)\n- [`FileRelationItem`](#filerelationitem)\n- [`PublicLink`](#publiclink)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`ErrorObject`](#errorobject)\n- [`FileCollectionId`](#filecollectionid)\n- [`FileCollectionItem`](#filecollectionitem)\n- [`FileCollectionAttributes`](#filecollectionattributes)\n- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)\n\n### `uploadFileV2`\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\n`POST /v2/files/upload`\n\n```ts\nconst { data } = await client.uploadFileV2(\n {\n file_entity_id: \'example\',\n },\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n}\n```\n\n</details>\n\n---\n\n### `saveFileV2`\n\nSaves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\n`POST /v2/files`\n\n```ts\nconst { data } = await client.saveFileV2(\n {\n activity_id: \'example\',\n fill_activity: true,\n strict: true,\n async: true,\n delete_temp_file: true,\n version_only: true,\n },\n {\n _id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n file_entity_id: \'string\',\n relations: [\n {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n _schema: \'contact\',\n _tags: [\'string\']\n }\n ],\n _tags: [\'tag1\', \'tag2\'],\n _purpose: [\'8d396871-95a0-4c9d-bb4d-9eda9c35776c\', \'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8\'],\n _manifest: [\'123e4567-e89b-12d3-a456-426614174000\'],\n filename: \'document.pdf\',\n type: \'document\',\n mime_type: \'application/pdf\',\n size_bytes: 1234,\n readable_size: \'1.2 MB\',\n etag: \'9bb58f26192e4ba00f01e2e7b136bbd8\',\n access_control: \'private\',\n public_url: \'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf\',\n custom_download_url: \'https://some-api-url.com/download?file_id=123\',\n custom_download_url_auth: \'token\',\n preview_summary_de: \'string\',\n short_summary_de: \'string\',\n preview_summary_en: \'string\',\n short_summary_en: \'string\',\n s3ref: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `getFile`\n\nGet a file entity by id\n\n`GET /v2/files/{id}`\n\n```ts\nconst { data } = await client.getFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n source_url: true,\n strict: true,\n async: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `deleteFile`\n\nDelete a file entity by id\n\n`DELETE /v2/files/{id}`\n\n```ts\nconst { data } = await client.deleteFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n purge: true,\n activity_id: \'example\',\n strict: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `downloadFile`\n\nGenerate a pre-signed download URL for a file.\n\n`GET /v1/files/{id}/download`\n\n```ts\nconst { data } = await client.downloadFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n attachment: true,\n x-track: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadS3File`\n\nGenerate a pre-signed download URL for a file using its S3 reference.\n\n`POST /v1/files:downloadS3`\n\n```ts\nconst { data } = await client.downloadS3File({\n s3_key: \'example\',\n s3_bucket: \'example\',\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadFiles`\n\nBulk generate pre-signed download URLs for multiple files in a single request.\n\n`POST /v1/files:downloadFiles`\n\n```ts\nconst { data } = await client.downloadFiles(\n null,\n [\n {\n id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n version: 0\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n]\n```\n\n</details>\n\n---\n\n### `createZipJob`\n\nCreate a background job to ZIP multiple files and send a download link via email.\n\n`POST /v1/files:zipJob`\n\n```ts\nconst { data } = await client.createZipJob(\n null,\n {},\n)\n```\n\n---\n\n### `getZipJob`\n\nGet the status of a ZIP job\n\n`GET /v1/files:zipJob/{job_id}`\n\n```ts\nconst { data } = await client.getZipJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "completed",\n "progress": {\n "total_files": 100,\n "downloaded_files": 75,\n "failed_files": 2\n },\n "result": {\n "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",\n "expires_at": "2024-01-02T12:00:00Z",\n "zip_size_bytes": 104857600\n },\n "error": "Failed to download file: access denied",\n "created_at": "2024-01-01T12:00:00Z",\n "created_by": "10234",\n "org_id": "123",\n "updated_at": "2024-01-01T12:05:00Z"\n}\n```\n\n</details>\n\n---\n\n### `getFileSummary`\n\nGet summary text for a file entity together with the current summary job status when available.\n\n`GET /v1/files/{id}/summary`\n\n```ts\nconst { data } = await client.getFileSummary({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string"\n}\n```\n\n</details>\n\n---\n\n### `createFileSummaryJob`\n\nCreate or return the current AI summary job for a file entity.\n\n`POST /v1/files/{id}/summary-jobs`\n\n```ts\nconst { data } = await client.createFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getCurrentFileSummaryJob`\n\nGet the latest AI summary job for the file entity\'s current source.\n\n`GET /v1/files/{id}/summary-jobs/current`\n\n```ts\nconst { data } = await client.getCurrentFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "file_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "status": "queued",\n "error": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getFileSummaryJob`\n\nGet an AI summary job by id.\n\n`GET /v1/files/{id}/summary-jobs/{job_id}`\n\n```ts\nconst { data } = await client.getFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "file_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "status": "queued",\n "error": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `generateFileSummary`\n\nCompatibility alias for creating or returning the current AI summary job for a file entity.\n\n`POST /v1/files/{id}/summary:generate`\n\n```ts\nconst { data } = await client.generateFileSummary({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getFileText`\n\nGet the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.\n\n`GET /v1/files/{id}/text`\n\n```ts\nconst { data } = await client.getFileText({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "ready",\n "text": "string",\n "truncated": true,\n "total_chars": 0\n}\n```\n\n</details>\n\n---\n\n### `previewFile`\n\nGenerate a thumbnail preview for a file entity.\n\n`GET /v1/files/{id}/preview`\n\n```ts\nconst { data } = await client.previewFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewS3File`\n\nGenerate a thumbnail preview from an S3 reference.\n\n`POST /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3File(\n {\n w: 1,\n h: 1,\n },\n {},\n)\n```\n\n---\n\n### `previewS3FileGet`\n\nGet a thumbnail preview from an S3 reference using query parameters.\n\n`GET /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3FileGet({\n key: \'example\',\n bucket: \'example\',\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewPublicFile`\n\nGenerate a thumbnail preview for a public file entity.\n\n`GET /v1/files/public/{id}/preview`\n\n```ts\nconst { data } = await client.previewPublicFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n org_id: \'example\',\n})\n```\n\n---\n\n### `getSession`\n\nStart a browser session by converting a Bearer token into a server-side cookie.\n\n`GET /v1/files/session`\n\n```ts\nconst { data } = await client.getSession()\n```\n\n---\n\n### `deleteSession`\n\nEnd a browser session by deleting the token cookie.\n\n`DELETE /v1/files/session`\n\n```ts\nconst { data } = await client.deleteSession()\n```\n\n---\n\n### `generatePublicLink`\n\nGenerate a public link to share a private file externally.\n\n`POST /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.generatePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n"string"\n```\n\n</details>\n\n---\n\n### `listPublicLinksForFile`\n\nFetches all public links previously generated for a file\n\n`GET /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.listPublicLinksForFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "last_accessed_at": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `accessPublicLink`\n\nAccess a file via its public link.\n\n`GET /v1/files/public/links/{id}/{filename}`\n\n```ts\nconst { data } = await client.accessPublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n filename: \'example\',\n hash: \'example\',\n})\n```\n\n---\n\n### `revokePublicLink`\n\nRevokes a given public link by ID\n\n`DELETE /v1/files/public/links/{id}`\n\n```ts\nconst { data } = await client.revokePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `verifyCustomDownloadUrl`\n\nVerify that a custom download URL is valid and has not expired.\n\n`POST /v1/files/download:verify`\n\n```ts\nconst { data } = await client.verifyCustomDownloadUrl(\n null,\n {\n custom_download_url: \'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": true\n}\n```\n\n</details>\n\n---\n\n### `uploadFilePublic`\n\nCreate a pre-signed S3 URL for uploading a file without authentication.\n\n`POST /v1/files/public/upload`\n\n```ts\nconst { data } = await client.uploadFilePublic(\n null,\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "error": "File entity not found"\n}\n```\n\n</details>\n\n---\n\n### `getUserSchemaFileCollections`\n\nGet all file collections for the current user within a specific schema.\n\n`GET /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.getUserSchemaFileCollections({\n slug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n### `createUserSchemaFileCollection`\n\nCreate a new file collection for the current user within a specific schema.\n\n`POST /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.createUserSchemaFileCollection(\n {\n slug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUserSchemaFileCollection`\n\nUpdate an existing file collection.\n\n`PUT /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.updateUserSchemaFileCollection(\n {\n slug: \'example\',\n collectionSlug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUserSchemaFileCollection`\n\nDelete a file collection.\n\n`DELETE /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.deleteUserSchemaFileCollection({\n slug: \'example\',\n collectionSlug: \'example\',\n})\n```\n\n---\n\n### `getFilesInCollection`\n\nGet all files within a specific collection for an entity.\n\n`GET /v1/entity/{id}/collections/{collectionSlug}/files`\n\n```ts\nconst { data } = await client.getFilesInCollection({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n collectionSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n }\n]\n```\n\n</details>\n\n---\n\n### `getGlobalFileCollections`\n\nGet all global file collections for a specific schema.\n\n`GET /v1/collections/{schemaSlug}`\n\n```ts\nconst { data } = await client.getGlobalFileCollections({\n schemaSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema\n\n```ts\ntype EntitySlug = string\n```\n\n### `ActivityId`\n\nSee https://github.com/ulid/spec\n\n```ts\ntype ActivityId = string // ulid\n```\n\n### `FileEntityId`\n\n```ts\ntype FileEntityId = string | string // uuid\n```\n\n### `FileAttributes`\n\n```ts\ntype FileAttributes = {\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `FileType`\n\n```ts\ntype FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n```\n\n### `FileSummaryJobStatus`\n\nCurrent state of a file summary job.\n\n```ts\ntype FileSummaryJobStatus = "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n```\n\n### `FileSummaryJob`\n\n```ts\ntype FileSummaryJob = {\n job_id: string // uuid\n file_id: string | string // uuid\n status: "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n error?: string\n created_at: string // date-time\n updated_at: string // date-time\n completed_at?: string // date-time\n}\n```\n\n### `FileSummary`\n\n```ts\ntype FileSummary = {\n status?: "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n job_id?: string // uuid\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `FileTextStatus`\n\nAvailability of the plain-text representation for a file entity.\n\n```ts\ntype FileTextStatus = "ready" | "not_ready" | "unsupported"\n```\n\n### `FileText`\n\n```ts\ntype FileText = {\n status: "ready"\n text: string\n truncated: boolean\n total_chars: number\n} | {\n status: "not_ready"\n} | {\n status: "unsupported"\n}\n```\n\n### `FileTextReady`\n\n```ts\ntype FileTextReady = {\n status: "ready"\n text: string\n truncated: boolean\n total_chars: number\n}\n```\n\n### `FileTextNotReady`\n\n```ts\ntype FileTextNotReady = {\n status: "not_ready"\n}\n```\n\n### `FileTextUnsupported`\n\n```ts\ntype FileTextUnsupported = {\n status: "unsupported"\n}\n```\n\n### `CustomDownloadUrl`\n\nCustom external download url used for the file\n\n```ts\ntype CustomDownloadUrl = string // uri\n```\n\n### `CustomDownloadUrlAuth`\n\nAuthorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller\'s bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/s\n\n```ts\ntype CustomDownloadUrlAuth = "presigned" | "token"\n```\n\n### `FileEntity`\n\n```ts\ntype FileEntity = {\n _title: string\n _schema: "file"\n _org: string\n _id: string | string // uuid\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename: string\n type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n source_url?: string\n s3ref?: object\n versions: Array<{\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n etag?: string\n }>\n _updated_at?: string // date-time\n _created_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n __additional?: Record<string, unknown>\n}\n```\n\n### `CommonSaveFilePayload`\n\n```ts\ntype CommonSaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n}\n```\n\n### `SaveS3FilePayload`\n\n```ts\ntype SaveS3FilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n s3ref?: unknown\n}\n```\n\n### `SaveFileFromSourceURLPayload`\n\n```ts\ntype SaveFileFromSourceURLPayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n source_url?: string // uri\n}\n```\n\n### `SaveCustomFilePayload`\n\n```ts\ntype SaveCustomFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `SaveFilePayload`\n\n```ts\ntype SaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `SaveFilePayloadV2`\n\n```ts\ntype SaveFilePayloadV2 = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `BatchSaveFileVersionPayload`\n\nPayload for batch version save. Only s3ref payloads are supported.\n\n```ts\ntype BatchSaveFileVersionPayload = {\n _id?: object\n file_entity_id?: string\n filename?: string\n mime_type?: string\n access_control?: "private" | "public-read"\n s3ref: unknown\n}\n```\n\n### `UploadFilePayload`\n\n```ts\ntype UploadFilePayload = {\n filename: string\n mime_type?: string\n index_tag?: string\n metadata?: Record<string, string>\n}\n```\n\n### `FileUpload`\n\n```ts\ntype FileUpload = {\n s3ref?: object\n upload_url?: string // url\n public_url?: string // url\n}\n```\n\n### `DownloadFilesPayload`\n\n```ts\ntype DownloadFilesPayload = Array<{\n id: string | string // uuid\n version?: number\n}>\n```\n\n### `CreateZipJobPayload`\n\nRequest payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n\n\n```ts\ntype CreateZipJobPayload = unknown | unknown\n```\n\n### `ZipJob`\n\nZIP job status and result\n\n```ts\ntype ZipJob = {\n job_id?: string // uuid\n status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"\n progress?: {\n total_files?: number\n downloaded_files?: number\n failed_files?: number\n }\n result?: {\n file_entity_id?: string // uuid\n download_url?: string // uri\n expires_at?: string // date-time\n zip_size_bytes?: number\n }\n error?: string\n created_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_at?: string // date-time\n}\n```\n\n### `VerifyCustomDownloadUrlPayload`\n\n```ts\ntype VerifyCustomDownloadUrlPayload = {\n custom_download_url: string\n}\n```\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `S3Ref`\n\n```ts\ntype S3Ref = {\n bucket: string\n key: string\n}\n```\n\n### `FileItem`\n\n```ts\ntype FileItem = {\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n etag?: string\n}\n```\n\n### `FileRelationItem`\n\n```ts\ntype FileRelationItem = {\n entity_id: string\n _schema?: string\n _tags?: string[]\n}\n```\n\n### `PublicLink`\n\n```ts\ntype PublicLink = {\n id?: string\n link?: string\n last_accessed_at?: string\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `ErrorObject`\n\nA generic error returned by the API\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n\n### `FileCollectionId`\n\nGenerated uuid for a file collection\n\n```ts\ntype FileCollectionId = string // uuid\n```\n\n### `FileCollectionItem`\n\nA file collection with identifiers and timestamps\n\n```ts\ntype FileCollectionItem = {\n slug?: string\n name: string\n id?: string // uuid\n parents?: string[]\n starred?: boolean\n order?: number\n enabled_locations?: string[]\n enabled_purposes?: string[]\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `FileCollectionAttributes`\n\n```ts\ntype FileCollectionAttributes = {\n name?: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n\n### `FileCollectionCreateRequest`\n\nRequest body for creating a file collection\n\n```ts\ntype FileCollectionCreateRequest = {\n name: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = file_default;
|