From a17a67bc7f6d01e8b92ef088b72c1edec396f0b2 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 07:11:40 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- api/core/workflow/snippet_start.py | 1 - api/models/__init__.py | 2 +- api/openapi/markdown/console-swagger.md | 1070 +++++++- api/services/snippet_service.py | 3 +- .../console/snippets/test_snippet_workflow.py | 8 +- .../generated/api/console/apps/types.gen.ts | 5 +- .../generated/api/console/apps/zod.gen.ts | 5 +- .../generated/api/console/orpc.gen.ts | 2 + .../api/console/snippets/orpc.gen.ts | 878 +++++++ .../api/console/snippets/types.gen.ts | 928 +++++++ .../generated/api/console/snippets/zod.gen.ts | 633 +++++ .../api/console/tag-bindings/types.gen.ts | 2 +- .../api/console/tag-bindings/zod.gen.ts | 2 +- .../generated/api/console/tags/types.gen.ts | 2 +- .../generated/api/console/tags/zod.gen.ts | 2 +- .../api/console/workspaces/orpc.gen.ts | 2263 ++++++++++------- .../api/console/workspaces/types.gen.ts | 375 +++ .../api/console/workspaces/zod.gen.ts | 228 ++ 18 files changed, 5405 insertions(+), 1004 deletions(-) create mode 100644 packages/contracts/generated/api/console/snippets/orpc.gen.ts create mode 100644 packages/contracts/generated/api/console/snippets/types.gen.ts create mode 100644 packages/contracts/generated/api/console/snippets/zod.gen.ts diff --git a/api/core/workflow/snippet_start.py b/api/core/workflow/snippet_start.py index 37b80450b81..bba065aa0f5 100644 --- a/api/core/workflow/snippet_start.py +++ b/api/core/workflow/snippet_start.py @@ -8,7 +8,6 @@ runtime-only snippet Start node as compatible with the legacy ``start`` id. from __future__ import annotations - LEGACY_START_NODE_ID = "start" SNIPPET_VIRTUAL_START_NODE_ID = "__snippet_virtual_start__" diff --git a/api/models/__init__.py b/api/models/__init__.py index 8028d5057f2..4fdcda34ff2 100644 --- a/api/models/__init__.py +++ b/api/models/__init__.py @@ -261,10 +261,10 @@ __all__ = [ "WorkflowAppLog", "WorkflowAppLogCreatedFrom", "WorkflowArchiveLog", - "WorkflowKind", "WorkflowComment", "WorkflowCommentMention", "WorkflowCommentReply", + "WorkflowKind", "WorkflowNodeExecutionModel", "WorkflowNodeExecutionOffload", "WorkflowNodeExecutionTriggeredFrom", diff --git a/api/openapi/markdown/console-swagger.md b/api/openapi/markdown/console-swagger.md index 555b063e595..4859e2719e3 100644 --- a/api/openapi/markdown/console-swagger.md +++ b/api/openapi/markdown/console-swagger.md @@ -8068,6 +8068,610 @@ Generate structured output rules using LLM | 400 | Invalid request parameters | | 402 | Provider quota exceeded | +### /snippets/{snippet_id}/workflow-runs + +#### GET +##### Summary + +List workflow runs for snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Workflow runs retrieved successfully | [WorkflowRunPaginationResponse](#workflowrunpaginationresponse) | + +### /snippets/{snippet_id}/workflow-runs/tasks/{task_id}/stop + +#### POST +##### Summary + +Stop a running snippet workflow task + +##### Description + +Uses both the legacy stop flag mechanism and the graph engine +command channel for backward compatibility. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| task_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Task stopped successfully | +| 404 | Snippet not found | + +### /snippets/{snippet_id}/workflow-runs/{run_id} + +#### GET +##### Summary + +Get workflow run detail for snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| run_id | path | | Yes | string | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Workflow run detail retrieved successfully | [WorkflowRunDetailResponse](#workflowrundetailresponse) | +| 404 | Workflow run not found | | + +### /snippets/{snippet_id}/workflow-runs/{run_id}/node-executions + +#### GET +##### Summary + +List node executions for a workflow run + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| run_id | path | | Yes | string | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Node executions retrieved successfully | [WorkflowRunNodeExecutionListResponse](#workflowrunnodeexecutionlistresponse) | + +### /snippets/{snippet_id}/workflows + +#### GET +##### Summary + +Get all published workflow versions for snippet + +##### Description + +Get all published workflows for a snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetWorkflowListQuery](#snippetworkflowlistquery) | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Published workflows retrieved successfully | [WorkflowPaginationResponse](#workflowpaginationresponse) | + +### /snippets/{snippet_id}/workflows/default-workflow-block-configs + +#### GET +##### Summary + +Get default block configurations for snippet workflow + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Default block configs retrieved successfully | + +### /snippets/{snippet_id}/workflows/draft + +#### GET +##### Summary + +Get draft workflow for snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Draft workflow retrieved successfully | [SnippetWorkflowResponse](#snippetworkflowresponse) | +| 404 | Snippet or draft workflow not found | | + +#### POST +##### Summary + +Sync draft workflow for snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| payload | body | | Yes | [SnippetDraftSyncPayload](#snippetdraftsyncpayload) | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Draft workflow synced successfully | +| 400 | Hash mismatch | + +### /snippets/{snippet_id}/workflows/draft/config + +#### GET +##### Summary + +Get snippet draft workflow configuration limits + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Draft config retrieved successfully | + +### /snippets/{snippet_id}/workflows/draft/conversation-variables + +#### GET +##### Description + +Conversation variables are not used in snippet workflows; returns an empty list for API parity + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Conversation variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) | + +### /snippets/{snippet_id}/workflows/draft/environment-variables + +#### GET +##### Description + +Get environment variables from snippet draft workflow graph + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Environment variables retrieved successfully | +| 404 | Draft workflow not found | + +### /snippets/{snippet_id}/workflows/draft/iteration/nodes/{node_id}/run + +#### POST +##### Summary + +Run a draft workflow iteration node for snippet + +##### Description + +Run draft workflow iteration node for snippet +Iteration nodes execute their internal sub-graph multiple times over an input list. +Returns an SSE event stream with iteration progress and results. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetIterationNodeRunPayload](#snippetiterationnoderunpayload) | +| node_id | path | Node ID | Yes | string | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Iteration node run started successfully (SSE stream) | +| 404 | Snippet or draft workflow not found | + +### /snippets/{snippet_id}/workflows/draft/loop/nodes/{node_id}/run + +#### POST +##### Summary + +Run a draft workflow loop node for snippet + +##### Description + +Run draft workflow loop node for snippet +Loop nodes execute their internal sub-graph repeatedly until a condition is met. +Returns an SSE event stream with loop progress and results. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetLoopNodeRunPayload](#snippetloopnoderunpayload) | +| node_id | path | Node ID | Yes | string | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Loop node run started successfully (SSE stream) | +| 404 | Snippet or draft workflow not found | + +### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/last-run + +#### GET +##### Summary + +Get the last run result for a specific node in snippet draft workflow + +##### Description + +Get last run result for a node in snippet draft workflow +Returns the most recent execution record for the given node, +including status, inputs, outputs, and timing information. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| node_id | path | Node ID | Yes | string | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Node last run retrieved successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) | +| 404 | Snippet, draft workflow, or node last run not found | | + +### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/run + +#### POST +##### Summary + +Run a single node in snippet draft workflow + +##### Description + +Run a single node in snippet draft workflow (single-step debugging) +Executes a specific node with provided inputs for single-step debugging. +Returns the node execution result including status, outputs, and timing. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetDraftNodeRunPayload](#snippetdraftnoderunpayload) | +| node_id | path | Node ID | Yes | string | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Node run completed successfully | [WorkflowRunNodeExecutionResponse](#workflowrunnodeexecutionresponse) | +| 404 | Snippet or draft workflow not found | | + +### /snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables + +#### DELETE +##### Description + +Delete all variables for a specific node (snippet draft workflow) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| node_id | path | | Yes | string | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 204 | Node variables deleted successfully | + +#### GET +##### Description + +Get variables for a specific node (snippet draft workflow) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| node_id | path | | Yes | string | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Node variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) | + +### /snippets/{snippet_id}/workflows/draft/run + +#### POST +##### Summary + +Run draft workflow for snippet + +##### Description + +Executes the snippet's draft workflow with the provided inputs +and returns an SSE event stream with execution progress and results. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| payload | body | | Yes | [SnippetDraftRunPayload](#snippetdraftrunpayload) | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Draft workflow run started successfully (SSE stream) | +| 404 | Snippet or draft workflow not found | + +### /snippets/{snippet_id}/workflows/draft/system-variables + +#### GET +##### Description + +System variables are not used in snippet workflows; returns an empty list for API parity + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | System variables retrieved successfully | [WorkflowDraftVariableList](#workflowdraftvariablelist) | + +### /snippets/{snippet_id}/workflows/draft/variables + +#### DELETE +##### Description + +Delete all draft workflow variables for the current user (snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 204 | Workflow variables deleted successfully | + +#### GET +##### Description + +List draft workflow variables without values (paginated, snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| payload | body | | Yes | [WorkflowDraftVariableListQuery](#workflowdraftvariablelistquery) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Workflow variables retrieved successfully | [WorkflowDraftVariableListWithoutValue](#workflowdraftvariablelistwithoutvalue) | + +### /snippets/{snippet_id}/workflows/draft/variables/{variable_id} + +#### DELETE +##### Description + +Delete a draft workflow variable (snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| variable_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 204 | Variable deleted successfully | +| 404 | Variable not found | + +#### GET +##### Description + +Get a specific draft workflow variable (snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| variable_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Variable retrieved successfully | [WorkflowDraftVariable](#workflowdraftvariable) | +| 404 | Variable not found | | + +#### PATCH +##### Description + +Update a draft workflow variable (snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| variable_id | path | | Yes | string | +| payload | body | | Yes | [WorkflowDraftVariableUpdatePayload](#workflowdraftvariableupdatepayload) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Variable updated successfully | [WorkflowDraftVariable](#workflowdraftvariable) | +| 404 | Variable not found | | + +### /snippets/{snippet_id}/workflows/draft/variables/{variable_id}/reset + +#### PUT +##### Description + +Reset a draft workflow variable to its default value (snippet scope) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| variable_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Variable reset successfully | [WorkflowDraftVariable](#workflowdraftvariable) | +| 204 | Variable reset (no content) | | +| 404 | Variable not found | | + +### /snippets/{snippet_id}/workflows/publish + +#### GET +##### Summary + +Get published workflow for snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Published workflow retrieved successfully | [SnippetWorkflowResponse](#snippetworkflowresponse) | +| 404 | Snippet not found | | + +#### POST +##### Summary + +Publish snippet workflow + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| payload | body | | Yes | [PublishWorkflowPayload](#publishworkflowpayload) | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Workflow published successfully | +| 400 | No draft workflow found | + +### /snippets/{snippet_id}/workflows/{workflow_id}/restore + +#### POST +##### Summary + +Restore a published snippet workflow version into the draft workflow + +##### Description + +Restore a published snippet workflow version into the draft workflow + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | Snippet ID | Yes | string | +| workflow_id | path | Published workflow ID | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Workflow restored successfully | +| 400 | Source workflow must be published | +| 404 | Workflow not found | + ### /spec/schema-definitions #### GET @@ -8150,7 +8754,7 @@ Remove one or more tag bindings from a target. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | | keyword | query | Search keyword for tag name. | No | string | -| type | query | Tag type filter. Can be "knowledge" or "app". | No | string | +| type | query | Tag type filter. Can be "knowledge", "app", or "snippet". | No | string | ##### Responses @@ -8595,6 +9199,222 @@ Get list of available agent providers | ---- | ----------- | ------ | | 200 | Success | [ object ] | +### /workspaces/current/customized-snippets + +#### GET +##### Summary + +List customized snippets with pagination and search + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetListQuery](#snippetlistquery) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Snippets retrieved successfully | [SnippetPagination](#snippetpagination) | + +#### POST +##### Summary + +Create a new customized snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [CreateSnippetPayload](#createsnippetpayload) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 201 | Snippet created successfully | [Snippet](#snippet) | +| 400 | Invalid request | | + +### /workspaces/current/customized-snippets/imports + +#### POST +##### Summary + +Import snippet from DSL + +##### Description + +Import snippet from DSL + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| payload | body | | Yes | [SnippetImportPayload](#snippetimportpayload) | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Snippet imported successfully | +| 202 | Import pending confirmation | +| 400 | Import failed | + +### /workspaces/current/customized-snippets/imports/{import_id}/confirm + +#### POST +##### Summary + +Confirm a pending snippet import + +##### Description + +Confirm a pending snippet import + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| import_id | path | Import ID to confirm | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Import confirmed successfully | +| 400 | Import failed | + +### /workspaces/current/customized-snippets/{snippet_id} + +#### DELETE +##### Summary + +Delete customized snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 204 | Snippet deleted successfully | +| 404 | Snippet not found | + +#### GET +##### Summary + +Get customized snippet details + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Snippet retrieved successfully | [Snippet](#snippet) | +| 404 | Snippet not found | | + +#### PATCH +##### Summary + +Update customized snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | | Yes | string | +| payload | body | | Yes | [UpdateSnippetPayload](#updatesnippetpayload) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Snippet updated successfully | [Snippet](#snippet) | +| 400 | Invalid request | | +| 404 | Snippet not found | | + +### /workspaces/current/customized-snippets/{snippet_id}/check-dependencies + +#### GET +##### Summary + +Check dependencies for a snippet + +##### Description + +Check dependencies for a snippet + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Dependencies checked successfully | +| 404 | Snippet not found | + +### /workspaces/current/customized-snippets/{snippet_id}/export + +#### GET +##### Summary + +Export snippet as DSL + +##### Description + +Export snippet configuration as DSL + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | Snippet ID to export | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Snippet exported successfully | +| 404 | Snippet not found | + +### /workspaces/current/customized-snippets/{snippet_id}/use-count/increment + +#### POST +##### Summary + +Increment snippet use count when it is inserted into a workflow + +##### Description + +Increment snippet use count by 1 + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| snippet_id | path | Snippet ID | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Use count incremented successfully | +| 404 | Snippet not found | + ### /workspaces/current/dataset-operators #### GET @@ -12556,6 +13376,19 @@ Condition detail | mode | string | App mode
*Enum:* `"advanced-chat"`, `"agent"`, `"agent-chat"`, `"chat"`, `"completion"`, `"workflow"` | Yes | | name | string | App name | Yes | +#### CreateSnippetPayload + +Payload for creating a new snippet. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| graph | object | | No | +| icon_info | [IconInfo](#iconinfo) | | No | +| input_fields | [ [InputFieldDefinition](#inputfielddefinition) ] | | No | +| name | string | | Yes | +| type | string | *Enum:* `"group"`, `"node"` | No | + #### CredentialType | Name | Type | Description | Required | @@ -13997,6 +14830,17 @@ Request payload for bulk downloading documents as a zip archive. | form_id | string | | Yes | | type | string | | Yes | +#### IconInfo + +Icon information model. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| icon | string | | No | +| icon_background | string | | No | +| icon_type | string | *Enum:* `"emoji"`, `"image"` | No | +| icon_url | string | | No | + #### IconType | Name | Type | Description | Required | @@ -14023,9 +14867,11 @@ Request payload for bulk downloading documents as a zip archive. #### IncludeSecretQuery +Query parameter for including secret variables in export. + | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | -| include_secret | string | Whether to include secret values in the exported DSL | No | +| include_secret | string | Whether to include secret variables | No | #### IndexingEstimate @@ -14086,6 +14932,21 @@ Request payload for bulk downloading documents as a zip archive. | model_type | [ModelType](#modeltype) | | Yes | | provider | string | | No | +#### InputFieldDefinition + +Input field definition for snippet parameters. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| default | string | | No | +| hint | boolean | | No | +| label | string | | No | +| max_length | integer | | No | +| options | [ string ] | | No | +| placeholder | string | | No | +| required | boolean | | No | +| type | string | | No | + #### InstallPermission | Name | Type | Description | Required | @@ -15164,10 +16025,11 @@ Shared permission levels for resources (datasets, credentials, etc.) #### PublishWorkflowPayload +Payload for publishing snippet workflow. + | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | -| marked_comment | string | | No | -| marked_name | string | | No | +| knowledge_base_setting | object | | No | #### PublishedWorkflowRunPayload @@ -15657,6 +16519,157 @@ Shared permission levels for resources (datasets, credentials, etc.) | updated_by | string | | No | | use_icon_as_answer_icon | boolean | | No | +#### Snippet + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| created_at | object | | No | +| created_by | [_AnonymousInlineModel_b0fd3f86d9d5](#_anonymousinlinemodel_b0fd3f86d9d5) | | No | +| description | string | | No | +| graph | object | | No | +| icon_info | object | | No | +| id | string | | No | +| input_fields | object | | No | +| is_published | boolean | | No | +| name | string | | No | +| tags | [ [_AnonymousInlineModel_7b8b49ca164e](#_anonymousinlinemodel_7b8b49ca164e) ] | | No | +| type | string | | No | +| updated_at | object | | No | +| updated_by | [_AnonymousInlineModel_b0fd3f86d9d5](#_anonymousinlinemodel_b0fd3f86d9d5) | | No | +| use_count | integer | | No | +| version | integer | | No | + +#### SnippetDraftNodeRunPayload + +Payload for running a single node in snippet draft workflow. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| files | [ object ] | | No | +| inputs | object | | Yes | +| query | string | | No | + +#### SnippetDraftRunPayload + +Payload for running snippet draft workflow. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| files | [ object ] | | No | +| inputs | object | | Yes | + +#### SnippetDraftSyncPayload + +Payload for syncing snippet draft workflow. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| conversation_variables | [ object ] | Ignored. Snippet workflows do not persist conversation variables. | No | +| graph | object | | Yes | +| hash | string | | No | +| input_fields | [ object ] | | No | + +#### SnippetImportPayload + +Payload for importing snippet from DSL. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | Override snippet description | No | +| mode | string | Import mode: yaml-content or yaml-url | Yes | +| name | string | Override snippet name | No | +| snippet_id | string | Snippet ID to update (optional) | No | +| yaml_content | string | YAML content (required for yaml-content mode) | No | +| yaml_url | string | YAML URL (required for yaml-url mode) | No | + +#### SnippetIterationNodeRunPayload + +Payload for running an iteration node in snippet draft workflow. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| inputs | object | | No | + +#### SnippetList + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| author_name | string | | No | +| created_at | object | | No | +| created_by | string | | No | +| description | string | | No | +| icon_info | object | | No | +| id | string | | No | +| is_published | boolean | | No | +| name | string | | No | +| tags | [ [_AnonymousInlineModel_7b8b49ca164e](#_anonymousinlinemodel_7b8b49ca164e) ] | | No | +| type | string | | No | +| updated_at | object | | No | +| updated_by | string | | No | +| use_count | integer | | No | +| version | integer | | No | + +#### SnippetListQuery + +Query parameters for listing snippets. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| creators | [ string ] | Filter by creator account IDs | No | +| is_published | boolean | Filter by published status | No | +| keyword | string | | No | +| limit | integer | | No | +| page | integer | | No | +| tag_ids | [ string ] | Filter by tag IDs | No | + +#### SnippetLoopNodeRunPayload + +Payload for running a loop node in snippet draft workflow. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| inputs | object | | No | + +#### SnippetPagination + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| data | [ [_AnonymousInlineModel_7b67ac8a4db8](#_anonymousinlinemodel_7b67ac8a4db8) ] | | No | +| has_more | boolean | | No | +| limit | integer | | No | +| page | integer | | No | +| total | integer | | No | + +#### SnippetWorkflowListQuery + +Query parameters for listing snippet published workflows. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| limit | integer | | No | +| page | integer | | No | + +#### SnippetWorkflowResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| conversation_variables | [ [WorkflowConversationVariableResponse](#workflowconversationvariableresponse) ] | | Yes | +| created_at | integer | | Yes | +| created_by | [SimpleAccount](#simpleaccount) | | No | +| environment_variables | [ [WorkflowEnvironmentVariableResponse](#workflowenvironmentvariableresponse) ] | | Yes | +| features | object | | Yes | +| graph | object | | Yes | +| hash | string | | Yes | +| id | string | | Yes | +| input_fields | [ object ] | | No | +| marked_comment | string | | Yes | +| marked_name | string | | Yes | +| rag_pipeline_variables | [ [PipelineVariableResponse](#pipelinevariableresponse) ] | | Yes | +| tool_published | boolean | | Yes | +| updated_at | integer | | Yes | +| updated_by | [SimpleAccount](#simpleaccount) | | No | +| version | string | | Yes | + #### StatisticTimeRangeQuery | Name | Type | Description | Required | @@ -15808,7 +16821,7 @@ Default configuration for form inputs. | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | | keyword | string | Search keyword | No | -| type | string | Tag type filter
*Enum:* `""`, `"app"`, `"knowledge"` | No | +| type | string | Tag type filter
*Enum:* `""`, `"app"`, `"knowledge"`, `"snippet"` | No | #### TagResponse @@ -16151,6 +17164,16 @@ Tag type | name | string | App name | Yes | | use_icon_as_answer_icon | boolean | Use icon as answer icon | No | +#### UpdateSnippetPayload + +Payload for updating a snippet. + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| icon_info | [IconInfo](#iconinfo) | | No | +| name | string | | No | + #### UpgradeMode | Name | Type | Description | Required | @@ -16897,6 +17920,8 @@ How a workflow node is bound to an Agent. #### WorkflowRunQuery +Query parameters for workflow runs. + | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | | last_id | string | | No | @@ -17047,6 +18072,41 @@ Workflow tool configuration | text | string | | No | | truncated | boolean | | Yes | +#### _AnonymousInlineModel_7b67ac8a4db8 + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| author_name | string | | No | +| created_at | object | | No | +| created_by | string | | No | +| description | string | | No | +| icon_info | object | | No | +| id | string | | No | +| is_published | boolean | | No | +| name | string | | No | +| tags | [ [_AnonymousInlineModel_7b8b49ca164e](#_anonymousinlinemodel_7b8b49ca164e) ] | | No | +| type | string | | No | +| updated_at | object | | No | +| updated_by | string | | No | +| use_count | integer | | No | +| version | integer | | No | + +#### _AnonymousInlineModel_7b8b49ca164e + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | string | | No | +| name | string | | No | +| type | string | | No | + +#### _AnonymousInlineModel_b0fd3f86d9d5 + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| email | string | | No | +| id | string | | No | +| name | string | | No | + #### _AnonymousInlineModel_b1954337d565 | Name | Type | Description | Required | diff --git a/api/services/snippet_service.py b/api/services/snippet_service.py index 0b911c62b97..6cbab051522 100644 --- a/api/services/snippet_service.py +++ b/api/services/snippet_service.py @@ -74,8 +74,7 @@ class SnippetService: return detail = ", ".join(f"{nid}:{t}" for nid, t in disallowed) raise ValueError( - "Snippet workflow cannot contain start, human-input, or knowledge-retrieval nodes. " - f"Found: {detail}" + f"Snippet workflow cannot contain start, human-input, or knowledge-retrieval nodes. Found: {detail}" ) # --- CRUD Operations --- diff --git a/api/tests/unit_tests/controllers/console/snippets/test_snippet_workflow.py b/api/tests/unit_tests/controllers/console/snippets/test_snippet_workflow.py index 574cbcba596..d95b099cd91 100644 --- a/api/tests/unit_tests/controllers/console/snippets/test_snippet_workflow.py +++ b/api/tests/unit_tests/controllers/console/snippets/test_snippet_workflow.py @@ -15,9 +15,7 @@ def _unwrap(func): return func -def test_restore_published_snippet_workflow_to_draft_success( - app, monkeypatch: pytest.MonkeyPatch -) -> None: +def test_restore_published_snippet_workflow_to_draft_success(app, monkeypatch: pytest.MonkeyPatch) -> None: workflow = SimpleNamespace( unique_hash="restored-hash", updated_at=None, @@ -46,9 +44,7 @@ def test_restore_published_snippet_workflow_to_draft_success( assert response["hash"] == "restored-hash" -def test_restore_published_snippet_workflow_to_draft_not_found( - app, monkeypatch: pytest.MonkeyPatch -) -> None: +def test_restore_published_snippet_workflow_to_draft_not_found(app, monkeypatch: pytest.MonkeyPatch) -> None: user = SimpleNamespace(id="account-1") snippet = SimpleNamespace(id="snippet-1", tenant_id="tenant-1") diff --git a/packages/contracts/generated/api/console/apps/types.gen.ts b/packages/contracts/generated/api/console/apps/types.gen.ts index c1bccffa9ce..b624d4a0be8 100644 --- a/packages/contracts/generated/api/console/apps/types.gen.ts +++ b/packages/contracts/generated/api/console/apps/types.gen.ts @@ -892,8 +892,9 @@ export type WorkflowDraftVariableUpdatePayload = { } export type PublishWorkflowPayload = { - marked_comment?: string | null - marked_name?: string | null + knowledge_base_setting?: { + [key: string]: unknown + } | null } export type WebhookTriggerResponse = { diff --git a/packages/contracts/generated/api/console/apps/zod.gen.ts b/packages/contracts/generated/api/console/apps/zod.gen.ts index ccff2c49f02..0a618ed281a 100644 --- a/packages/contracts/generated/api/console/apps/zod.gen.ts +++ b/packages/contracts/generated/api/console/apps/zod.gen.ts @@ -577,10 +577,11 @@ export const zWorkflowDraftVariableUpdatePayload = z.object({ /** * PublishWorkflowPayload + * + * Payload for publishing snippet workflow. */ export const zPublishWorkflowPayload = z.object({ - marked_comment: z.string().max(100).nullish(), - marked_name: z.string().max(20).nullish(), + knowledge_base_setting: z.record(z.string(), z.unknown()).nullish(), }) /** diff --git a/packages/contracts/generated/api/console/orpc.gen.ts b/packages/contracts/generated/api/console/orpc.gen.ts index 63a1e9185e9..4dbac17b171 100644 --- a/packages/contracts/generated/api/console/orpc.gen.ts +++ b/packages/contracts/generated/api/console/orpc.gen.ts @@ -38,6 +38,7 @@ import { resetPassword } from './reset-password/orpc.gen' import { ruleCodeGenerate } from './rule-code-generate/orpc.gen' import { ruleGenerate } from './rule-generate/orpc.gen' import { ruleStructuredOutputGenerate } from './rule-structured-output-generate/orpc.gen' +import { snippets } from './snippets/orpc.gen' import { spec } from './spec/orpc.gen' import { systemFeatures } from './system-features/orpc.gen' import { tagBindings } from './tag-bindings/orpc.gen' @@ -88,6 +89,7 @@ export const contract = { ruleCodeGenerate, ruleGenerate, ruleStructuredOutputGenerate, + snippets, spec, systemFeatures, tagBindings, diff --git a/packages/contracts/generated/api/console/snippets/orpc.gen.ts b/packages/contracts/generated/api/console/snippets/orpc.gen.ts new file mode 100644 index 00000000000..d64e39b2110 --- /dev/null +++ b/packages/contracts/generated/api/console/snippets/orpc.gen.ts @@ -0,0 +1,878 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { oc } from '@orpc/contract' +import * as z from 'zod' + +import { + zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath, + zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse, + zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath, + zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse, + zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesPath, + zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse, + zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsPath, + zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponse, + zGetSnippetsBySnippetIdWorkflowRunsByRunIdPath, + zGetSnippetsBySnippetIdWorkflowRunsByRunIdResponse, + zGetSnippetsBySnippetIdWorkflowRunsPath, + zGetSnippetsBySnippetIdWorkflowRunsResponse, + zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsPath, + zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponse, + zGetSnippetsBySnippetIdWorkflowsDraftConfigPath, + zGetSnippetsBySnippetIdWorkflowsDraftConfigResponse, + zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesPath, + zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponse, + zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesPath, + zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponse, + zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunPath, + zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponse, + zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath, + zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse, + zGetSnippetsBySnippetIdWorkflowsDraftPath, + zGetSnippetsBySnippetIdWorkflowsDraftResponse, + zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesPath, + zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponse, + zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath, + zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse, + zGetSnippetsBySnippetIdWorkflowsDraftVariablesPath, + zGetSnippetsBySnippetIdWorkflowsDraftVariablesQuery, + zGetSnippetsBySnippetIdWorkflowsDraftVariablesResponse, + zGetSnippetsBySnippetIdWorkflowsPath, + zGetSnippetsBySnippetIdWorkflowsPublishPath, + zGetSnippetsBySnippetIdWorkflowsPublishResponse, + zGetSnippetsBySnippetIdWorkflowsQuery, + zGetSnippetsBySnippetIdWorkflowsResponse, + zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdBody, + zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath, + zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse, + zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopPath, + zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponse, + zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestorePath, + zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponse, + zPostSnippetsBySnippetIdWorkflowsDraftBody, + zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunBody, + zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunPath, + zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponse, + zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunBody, + zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunPath, + zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponse, + zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunBody, + zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunPath, + zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponse, + zPostSnippetsBySnippetIdWorkflowsDraftPath, + zPostSnippetsBySnippetIdWorkflowsDraftResponse, + zPostSnippetsBySnippetIdWorkflowsDraftRunBody, + zPostSnippetsBySnippetIdWorkflowsDraftRunPath, + zPostSnippetsBySnippetIdWorkflowsDraftRunResponse, + zPostSnippetsBySnippetIdWorkflowsPublishBody, + zPostSnippetsBySnippetIdWorkflowsPublishPath, + zPostSnippetsBySnippetIdWorkflowsPublishResponse, + zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetPath, + zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse, +} from './zod.gen' + +/** + * Stop a running snippet workflow task + * + * Uses both the legacy stop flag mechanism and the graph engine + * command channel for backward compatibility. + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post = oc + .route({ + deprecated: true, + description: + 'Uses both the legacy stop flag mechanism and the graph engine\ncommand channel for backward compatibility.\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStop', + path: '/snippets/{snippet_id}/workflow-runs/tasks/{task_id}/stop', + summary: 'Stop a running snippet workflow task', + tags: ['console'], + }) + .input(z.object({ params: zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopPath })) + .output(zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponse) + +export const stop = { + post, +} + +export const byTaskId = { + stop, +} + +export const tasks = { + byTaskId, +} + +/** + * List node executions for a workflow run + */ +export const get = oc + .route({ + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutions', + path: '/snippets/{snippet_id}/workflow-runs/{run_id}/node-executions', + summary: 'List node executions for a workflow run', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsPath })) + .output(zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponse) + +export const nodeExecutions = { + get, +} + +/** + * Get workflow run detail for snippet + */ +export const get2 = oc + .route({ + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowRunsByRunId', + path: '/snippets/{snippet_id}/workflow-runs/{run_id}', + summary: 'Get workflow run detail for snippet', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowRunsByRunIdPath })) + .output(zGetSnippetsBySnippetIdWorkflowRunsByRunIdResponse) + +export const byRunId = { + get: get2, + nodeExecutions, +} + +/** + * List workflow runs for snippet + */ +export const get3 = oc + .route({ + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowRuns', + path: '/snippets/{snippet_id}/workflow-runs', + summary: 'List workflow runs for snippet', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowRunsPath })) + .output(zGetSnippetsBySnippetIdWorkflowRunsResponse) + +export const workflowRuns = { + get: get3, + tasks, + byRunId, +} + +/** + * Get default block configurations for snippet workflow + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get4 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigs', + path: '/snippets/{snippet_id}/workflows/default-workflow-block-configs', + summary: 'Get default block configurations for snippet workflow', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponse) + +export const defaultWorkflowBlockConfigs = { + get: get4, +} + +/** + * Get snippet draft workflow configuration limits + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get5 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftConfig', + path: '/snippets/{snippet_id}/workflows/draft/config', + summary: 'Get snippet draft workflow configuration limits', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftConfigPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftConfigResponse) + +export const config = { + get: get5, +} + +/** + * Conversation variables are not used in snippet workflows; returns an empty list for API parity + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get6 = oc + .route({ + deprecated: true, + description: + 'Conversation variables are not used in snippet workflows; returns an empty list for API parity\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftConversationVariables', + path: '/snippets/{snippet_id}/workflows/draft/conversation-variables', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponse) + +export const conversationVariables = { + get: get6, +} + +/** + * Get environment variables from snippet draft workflow graph + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get7 = oc + .route({ + deprecated: true, + description: + 'Get environment variables from snippet draft workflow graph\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftEnvironmentVariables', + path: '/snippets/{snippet_id}/workflows/draft/environment-variables', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponse) + +export const environmentVariables = { + get: get7, +} + +/** + * Run a draft workflow iteration node for snippet + * + * Run draft workflow iteration node for snippet + * Iteration nodes execute their internal sub-graph multiple times over an input list. + * Returns an SSE event stream with iteration progress and results. + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post2 = oc + .route({ + deprecated: true, + description: + 'Run draft workflow iteration node for snippet\nIteration nodes execute their internal sub-graph multiple times over an input list.\nReturns an SSE event stream with iteration progress and results.\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRun', + path: '/snippets/{snippet_id}/workflows/draft/iteration/nodes/{node_id}/run', + summary: 'Run a draft workflow iteration node for snippet', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunBody, + params: zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponse) + +export const run = { + post: post2, +} + +export const byNodeId = { + run, +} + +export const nodes = { + byNodeId, +} + +export const iteration = { + nodes, +} + +/** + * Run a draft workflow loop node for snippet + * + * Run draft workflow loop node for snippet + * Loop nodes execute their internal sub-graph repeatedly until a condition is met. + * Returns an SSE event stream with loop progress and results. + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post3 = oc + .route({ + deprecated: true, + description: + 'Run draft workflow loop node for snippet\nLoop nodes execute their internal sub-graph repeatedly until a condition is met.\nReturns an SSE event stream with loop progress and results.\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRun', + path: '/snippets/{snippet_id}/workflows/draft/loop/nodes/{node_id}/run', + summary: 'Run a draft workflow loop node for snippet', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunBody, + params: zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponse) + +export const run2 = { + post: post3, +} + +export const byNodeId2 = { + run: run2, +} + +export const nodes2 = { + byNodeId: byNodeId2, +} + +export const loop = { + nodes: nodes2, +} + +/** + * Get the last run result for a specific node in snippet draft workflow + * + * Get last run result for a node in snippet draft workflow + * Returns the most recent execution record for the given node, + * including status, inputs, outputs, and timing information. + */ +export const get8 = oc + .route({ + description: + 'Get last run result for a node in snippet draft workflow\nReturns the most recent execution record for the given node,\nincluding status, inputs, outputs, and timing information.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRun', + path: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/last-run', + summary: 'Get the last run result for a specific node in snippet draft workflow', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponse) + +export const lastRun = { + get: get8, +} + +/** + * Run a single node in snippet draft workflow + * + * Run a single node in snippet draft workflow (single-step debugging) + * Executes a specific node with provided inputs for single-step debugging. + * Returns the node execution result including status, outputs, and timing. + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post4 = oc + .route({ + deprecated: true, + description: + 'Run a single node in snippet draft workflow (single-step debugging)\nExecutes a specific node with provided inputs for single-step debugging.\nReturns the node execution result including status, outputs, and timing.\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRun', + path: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/run', + summary: 'Run a single node in snippet draft workflow', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunBody, + params: zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponse) + +export const run3 = { + post: post4, +} + +/** + * Delete all variables for a specific node (snippet draft workflow) + */ +export const delete_ = oc + .route({ + description: 'Delete all variables for a specific node (snippet draft workflow)', + inputStructure: 'detailed', + method: 'DELETE', + operationId: 'deleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariables', + path: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables', + successStatus: 204, + tags: ['console'], + }) + .input(z.object({ params: zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath })) + .output(zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse) + +/** + * Get variables for a specific node (snippet draft workflow) + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get9 = oc + .route({ + deprecated: true, + description: + 'Get variables for a specific node (snippet draft workflow)\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariables', + path: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse) + +export const variables = { + delete: delete_, + get: get9, +} + +export const byNodeId3 = { + lastRun, + run: run3, + variables, +} + +export const nodes3 = { + byNodeId: byNodeId3, +} + +/** + * Run draft workflow for snippet + * + * Executes the snippet's draft workflow with the provided inputs + * and returns an SSE event stream with execution progress and results. + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post5 = oc + .route({ + deprecated: true, + description: + 'Executes the snippet\'s draft workflow with the provided inputs\nand returns an SSE event stream with execution progress and results.\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsDraftRun', + path: '/snippets/{snippet_id}/workflows/draft/run', + summary: 'Run draft workflow for snippet', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsDraftRunBody, + params: zPostSnippetsBySnippetIdWorkflowsDraftRunPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsDraftRunResponse) + +export const run4 = { + post: post5, +} + +/** + * System variables are not used in snippet workflows; returns an empty list for API parity + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get10 = oc + .route({ + deprecated: true, + description: + 'System variables are not used in snippet workflows; returns an empty list for API parity\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftSystemVariables', + path: '/snippets/{snippet_id}/workflows/draft/system-variables', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponse) + +export const systemVariables = { + get: get10, +} + +/** + * Reset a draft workflow variable to its default value (snippet scope) + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const put = oc + .route({ + deprecated: true, + description: + 'Reset a draft workflow variable to its default value (snippet scope)\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'PUT', + operationId: 'putSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdReset', + path: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}/reset', + tags: ['console'], + }) + .input(z.object({ params: zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetPath })) + .output(zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse) + +export const reset = { + put, +} + +/** + * Delete a draft workflow variable (snippet scope) + */ +export const delete2 = oc + .route({ + description: 'Delete a draft workflow variable (snippet scope)', + inputStructure: 'detailed', + method: 'DELETE', + operationId: 'deleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableId', + path: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}', + successStatus: 204, + tags: ['console'], + }) + .input(z.object({ params: zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath })) + .output(zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse) + +/** + * Get a specific draft workflow variable (snippet scope) + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get11 = oc + .route({ + deprecated: true, + description: + 'Get a specific draft workflow variable (snippet scope)\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftVariablesByVariableId', + path: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse) + +/** + * Update a draft workflow variable (snippet scope) + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const patch = oc + .route({ + deprecated: true, + description: + 'Update a draft workflow variable (snippet scope)\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'PATCH', + operationId: 'patchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableId', + path: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}', + tags: ['console'], + }) + .input( + z.object({ + body: zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdBody, + params: zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath, + }), + ) + .output(zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse) + +export const byVariableId = { + delete: delete2, + get: get11, + patch, + reset, +} + +/** + * Delete all draft workflow variables for the current user (snippet scope) + */ +export const delete3 = oc + .route({ + description: 'Delete all draft workflow variables for the current user (snippet scope)', + inputStructure: 'detailed', + method: 'DELETE', + operationId: 'deleteSnippetsBySnippetIdWorkflowsDraftVariables', + path: '/snippets/{snippet_id}/workflows/draft/variables', + successStatus: 204, + tags: ['console'], + }) + .input(z.object({ params: zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesPath })) + .output(zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse) + +/** + * List draft workflow variables without values (paginated, snippet scope) + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get12 = oc + .route({ + deprecated: true, + description: + 'List draft workflow variables without values (paginated, snippet scope)\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraftVariables', + path: '/snippets/{snippet_id}/workflows/draft/variables', + tags: ['console'], + }) + .input( + z.object({ + params: zGetSnippetsBySnippetIdWorkflowsDraftVariablesPath, + query: zGetSnippetsBySnippetIdWorkflowsDraftVariablesQuery.optional(), + }), + ) + .output(zGetSnippetsBySnippetIdWorkflowsDraftVariablesResponse) + +export const variables2 = { + delete: delete3, + get: get12, + byVariableId, +} + +/** + * Get draft workflow for snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get13 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsDraft', + path: '/snippets/{snippet_id}/workflows/draft', + summary: 'Get draft workflow for snippet', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsDraftPath })) + .output(zGetSnippetsBySnippetIdWorkflowsDraftResponse) + +/** + * Sync draft workflow for snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post6 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsDraft', + path: '/snippets/{snippet_id}/workflows/draft', + summary: 'Sync draft workflow for snippet', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsDraftBody, + params: zPostSnippetsBySnippetIdWorkflowsDraftPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsDraftResponse) + +export const draft = { + get: get13, + post: post6, + config, + conversationVariables, + environmentVariables, + iteration, + loop, + nodes: nodes3, + run: run4, + systemVariables, + variables: variables2, +} + +/** + * Get published workflow for snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get14 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflowsPublish', + path: '/snippets/{snippet_id}/workflows/publish', + summary: 'Get published workflow for snippet', + tags: ['console'], + }) + .input(z.object({ params: zGetSnippetsBySnippetIdWorkflowsPublishPath })) + .output(zGetSnippetsBySnippetIdWorkflowsPublishResponse) + +/** + * Publish snippet workflow + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post7 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsPublish', + path: '/snippets/{snippet_id}/workflows/publish', + summary: 'Publish snippet workflow', + tags: ['console'], + }) + .input( + z.object({ + body: zPostSnippetsBySnippetIdWorkflowsPublishBody, + params: zPostSnippetsBySnippetIdWorkflowsPublishPath, + }), + ) + .output(zPostSnippetsBySnippetIdWorkflowsPublishResponse) + +export const publish = { + get: get14, + post: post7, +} + +/** + * Restore a published snippet workflow version into the draft workflow + * + * Restore a published snippet workflow version into the draft workflow + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post8 = oc + .route({ + deprecated: true, + description: + 'Restore a published snippet workflow version into the draft workflow\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postSnippetsBySnippetIdWorkflowsByWorkflowIdRestore', + path: '/snippets/{snippet_id}/workflows/{workflow_id}/restore', + summary: 'Restore a published snippet workflow version into the draft workflow', + tags: ['console'], + }) + .input(z.object({ params: zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestorePath })) + .output(zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponse) + +export const restore = { + post: post8, +} + +export const byWorkflowId = { + restore, +} + +/** + * Get all published workflow versions for snippet + * + * Get all published workflows for a snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get15 = oc + .route({ + deprecated: true, + description: + 'Get all published workflows for a snippet\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getSnippetsBySnippetIdWorkflows', + path: '/snippets/{snippet_id}/workflows', + summary: 'Get all published workflow versions for snippet', + tags: ['console'], + }) + .input( + z.object({ + params: zGetSnippetsBySnippetIdWorkflowsPath, + query: zGetSnippetsBySnippetIdWorkflowsQuery.optional(), + }), + ) + .output(zGetSnippetsBySnippetIdWorkflowsResponse) + +export const workflows = { + get: get15, + defaultWorkflowBlockConfigs, + draft, + publish, + byWorkflowId, +} + +export const bySnippetId = { + workflowRuns, + workflows, +} + +export const snippets = { + bySnippetId, +} + +export const contract = { + snippets, +} diff --git a/packages/contracts/generated/api/console/snippets/types.gen.ts b/packages/contracts/generated/api/console/snippets/types.gen.ts new file mode 100644 index 00000000000..ae46ee98134 --- /dev/null +++ b/packages/contracts/generated/api/console/snippets/types.gen.ts @@ -0,0 +1,928 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ClientOptions = { + baseUrl: `${string}://${string}/console/api` | (string & {}) +} + +export type WorkflowRunPaginationResponse = { + data: Array + has_more: boolean + limit: number +} + +export type WorkflowRunDetailResponse = { + created_at?: number | null + created_by_account?: SimpleAccount + created_by_end_user?: SimpleEndUser + created_by_role?: string | null + elapsed_time?: number | null + error?: string | null + exceptions_count?: number | null + finished_at?: number | null + graph: unknown + id: string + inputs: unknown + outputs: unknown + status?: string | null + total_steps?: number | null + total_tokens?: number | null + version?: string | null +} + +export type WorkflowRunNodeExecutionListResponse = { + data: Array +} + +export type WorkflowPaginationResponse = { + has_more: boolean + items: Array + limit: number + page: number +} + +export type SnippetWorkflowResponse = { + conversation_variables: Array + created_at: number + created_by?: SimpleAccount + environment_variables: Array + features: { + [key: string]: unknown + } + graph: { + [key: string]: unknown + } + hash: string + id: string + input_fields?: Array<{ + [key: string]: unknown + }> + marked_comment: string + marked_name: string + rag_pipeline_variables: Array + tool_published: boolean + updated_at: number + updated_by?: SimpleAccount + version: string +} + +export type SnippetDraftSyncPayload = { + conversation_variables?: Array<{ + [key: string]: unknown + }> | null + graph: { + [key: string]: unknown + } + hash?: string | null + input_fields?: Array<{ + [key: string]: unknown + }> | null +} + +export type WorkflowDraftVariableList = { + items?: Array +} + +export type SnippetIterationNodeRunPayload = { + inputs?: { + [key: string]: unknown + } | null +} + +export type SnippetLoopNodeRunPayload = { + inputs?: { + [key: string]: unknown + } | null +} + +export type WorkflowRunNodeExecutionResponse = { + created_at?: number | null + created_by_account?: SimpleAccount + created_by_end_user?: SimpleEndUser + created_by_role?: string | null + elapsed_time?: number | null + error?: string | null + execution_metadata?: unknown + extras?: unknown + finished_at?: number | null + id: string + index?: number | null + inputs?: unknown + inputs_truncated?: boolean | null + node_id?: string | null + node_type?: string | null + outputs?: unknown + outputs_truncated?: boolean | null + predecessor_node_id?: string | null + process_data?: unknown + process_data_truncated?: boolean | null + status?: string | null + title?: string | null +} + +export type SnippetDraftNodeRunPayload = { + files?: Array<{ + [key: string]: unknown + }> | null + inputs: { + [key: string]: unknown + } + query?: string +} + +export type SnippetDraftRunPayload = { + files?: Array<{ + [key: string]: unknown + }> | null + inputs: { + [key: string]: unknown + } +} + +export type WorkflowDraftVariableListWithoutValue = { + items?: Array + total?: { + [key: string]: unknown + } +} + +export type WorkflowDraftVariable = { + description?: string + edited?: boolean + full_content?: { + [key: string]: unknown + } + id?: string + is_truncated?: boolean + name?: string + selector?: Array + type?: string + value?: { + [key: string]: unknown + } + value_type?: string + visible?: boolean +} + +export type WorkflowDraftVariableUpdatePayload = { + name?: string | null + value?: unknown +} + +export type PublishWorkflowPayload = { + knowledge_base_setting?: { + [key: string]: unknown + } | null +} + +export type WorkflowRunForListResponse = { + created_at?: number | null + created_by_account?: SimpleAccount + elapsed_time?: number | null + exceptions_count?: number | null + finished_at?: number | null + id: string + retry_index?: number | null + status?: string | null + total_steps?: number | null + total_tokens?: number | null + version?: string | null +} + +export type SimpleAccount = { + email: string + id: string + name: string +} + +export type SimpleEndUser = { + id: string + is_anonymous: boolean + session_id?: string | null + type: string +} + +export type WorkflowResponse = { + conversation_variables: Array + created_at: number + created_by?: SimpleAccount + environment_variables: Array + features: { + [key: string]: unknown + } + graph: { + [key: string]: unknown + } + hash: string + id: string + marked_comment: string + marked_name: string + rag_pipeline_variables: Array + tool_published: boolean + updated_at: number + updated_by?: SimpleAccount + version: string +} + +export type WorkflowConversationVariableResponse = { + description: string + id: string + name: string + value: { + [key: string]: unknown + } + value_type: string +} + +export type WorkflowEnvironmentVariableResponse = { + description: string + id: string + name: string + value: { + [key: string]: unknown + } + value_type: string +} + +export type PipelineVariableResponse = { + allowed_file_extensions?: Array | null + allowed_file_types?: Array | null + allowed_file_upload_methods?: Array | null + belong_to_node_id: string + default_value?: { + [key: string]: unknown + } + label: string + max_length?: number | null + options?: Array | null + placeholder?: string | null + required: boolean + tooltips?: string | null + type: string + unit?: string | null + variable: string +} + +export type WorkflowDraftVariableWithoutValue = { + description?: string + edited?: boolean + id?: string + is_truncated?: boolean + name?: string + selector?: Array + type?: string + value_type?: string + visible?: boolean +} + +export type GetSnippetsBySnippetIdWorkflowRunsData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflow-runs' +} + +export type GetSnippetsBySnippetIdWorkflowRunsResponses = { + 200: WorkflowRunPaginationResponse +} + +export type GetSnippetsBySnippetIdWorkflowRunsResponse + = GetSnippetsBySnippetIdWorkflowRunsResponses[keyof GetSnippetsBySnippetIdWorkflowRunsResponses] + +export type PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopData = { + body?: never + path: { + snippet_id: string + task_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflow-runs/tasks/{task_id}/stop' +} + +export type PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopError + = PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopErrors[keyof PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopErrors] + +export type PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponse + = PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponses[keyof PostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponses] + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdData = { + body?: never + path: { + run_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflow-runs/{run_id}' +} + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdError + = GetSnippetsBySnippetIdWorkflowRunsByRunIdErrors[keyof GetSnippetsBySnippetIdWorkflowRunsByRunIdErrors] + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdResponses = { + 200: WorkflowRunDetailResponse +} + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdResponse + = GetSnippetsBySnippetIdWorkflowRunsByRunIdResponses[keyof GetSnippetsBySnippetIdWorkflowRunsByRunIdResponses] + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsData = { + body?: never + path: { + run_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflow-runs/{run_id}/node-executions' +} + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponses = { + 200: WorkflowRunNodeExecutionListResponse +} + +export type GetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponse + = GetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponses[keyof GetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponses] + +export type GetSnippetsBySnippetIdWorkflowsData = { + body?: never + path: { + snippet_id: string + } + query?: { + limit?: number + page?: number + } + url: '/snippets/{snippet_id}/workflows' +} + +export type GetSnippetsBySnippetIdWorkflowsResponses = { + 200: WorkflowPaginationResponse +} + +export type GetSnippetsBySnippetIdWorkflowsResponse + = GetSnippetsBySnippetIdWorkflowsResponses[keyof GetSnippetsBySnippetIdWorkflowsResponses] + +export type GetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/default-workflow-block-configs' +} + +export type GetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponses = { + 200: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponse + = GetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponses[keyof GetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftError + = GetSnippetsBySnippetIdWorkflowsDraftErrors[keyof GetSnippetsBySnippetIdWorkflowsDraftErrors] + +export type GetSnippetsBySnippetIdWorkflowsDraftResponses = { + 200: SnippetWorkflowResponse +} + +export type GetSnippetsBySnippetIdWorkflowsDraftResponse + = GetSnippetsBySnippetIdWorkflowsDraftResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftResponses] + +export type PostSnippetsBySnippetIdWorkflowsDraftData = { + body: SnippetDraftSyncPayload + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft' +} + +export type PostSnippetsBySnippetIdWorkflowsDraftErrors = { + 400: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftError + = PostSnippetsBySnippetIdWorkflowsDraftErrors[keyof PostSnippetsBySnippetIdWorkflowsDraftErrors] + +export type PostSnippetsBySnippetIdWorkflowsDraftResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftResponse + = PostSnippetsBySnippetIdWorkflowsDraftResponses[keyof PostSnippetsBySnippetIdWorkflowsDraftResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftConfigData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/config' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftConfigResponses = { + 200: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftConfigResponse + = GetSnippetsBySnippetIdWorkflowsDraftConfigResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftConfigResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftConversationVariablesData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/conversation-variables' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponses = { + 200: WorkflowDraftVariableList +} + +export type GetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponse + = GetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/environment-variables' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesError + = GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesErrors[keyof GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesErrors] + +export type GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponses = { + 200: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponse + = GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponses] + +export type PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunData = { + body: SnippetIterationNodeRunPayload + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/iteration/nodes/{node_id}/run' +} + +export type PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunError + = PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunErrors[keyof PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunErrors] + +export type PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponse + = PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponses] + +export type PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunData = { + body: SnippetLoopNodeRunPayload + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/loop/nodes/{node_id}/run' +} + +export type PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunError + = PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunErrors[keyof PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunErrors] + +export type PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponse + = PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunData = { + body?: never + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/last-run' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunError + = GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunErrors[keyof GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunErrors] + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponses = { + 200: WorkflowRunNodeExecutionResponse +} + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponse + = GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponses] + +export type PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunData = { + body: SnippetDraftNodeRunPayload + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/run' +} + +export type PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunError + = PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunErrors[keyof PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunErrors] + +export type PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponses = { + 200: WorkflowRunNodeExecutionResponse +} + +export type PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponse + = PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponses[keyof PostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponses] + +export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesData = { + body?: never + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables' +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses = { + 204: { + [key: string]: never + } +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse + = DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof DeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesData = { + body?: never + path: { + node_id: string + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/nodes/{node_id}/variables' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses = { + 200: WorkflowDraftVariableList +} + +export type GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse + = GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponses] + +export type PostSnippetsBySnippetIdWorkflowsDraftRunData = { + body: SnippetDraftRunPayload + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/run' +} + +export type PostSnippetsBySnippetIdWorkflowsDraftRunErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftRunError + = PostSnippetsBySnippetIdWorkflowsDraftRunErrors[keyof PostSnippetsBySnippetIdWorkflowsDraftRunErrors] + +export type PostSnippetsBySnippetIdWorkflowsDraftRunResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsDraftRunResponse + = PostSnippetsBySnippetIdWorkflowsDraftRunResponses[keyof PostSnippetsBySnippetIdWorkflowsDraftRunResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftSystemVariablesData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/system-variables' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponses = { + 200: WorkflowDraftVariableList +} + +export type GetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponse + = GetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponses] + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/variables' +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponses = { + 204: { + [key: string]: never + } +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse + = DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponses[keyof DeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesData = { + body?: never + path: { + snippet_id: string + } + query?: { + limit?: number + page?: number + } + url: '/snippets/{snippet_id}/workflows/draft/variables' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesResponses = { + 200: WorkflowDraftVariableListWithoutValue +} + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesResponse + = GetSnippetsBySnippetIdWorkflowsDraftVariablesResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftVariablesResponses] + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdData = { + body?: never + path: { + snippet_id: string + variable_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}' +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdError + = DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors[keyof DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors] + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses = { + 204: { + [key: string]: never + } +} + +export type DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse + = DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses[keyof DeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses] + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdData = { + body?: never + path: { + snippet_id: string + variable_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}' +} + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdError + = GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors[keyof GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors] + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses = { + 200: WorkflowDraftVariable +} + +export type GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse + = GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses[keyof GetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses] + +export type PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdData = { + body: WorkflowDraftVariableUpdatePayload + path: { + snippet_id: string + variable_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}' +} + +export type PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdError + = PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors[keyof PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdErrors] + +export type PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses = { + 200: WorkflowDraftVariable +} + +export type PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse + = PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses[keyof PatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponses] + +export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetData = { + body?: never + path: { + snippet_id: string + variable_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/draft/variables/{variable_id}/reset' +} + +export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetErrors = { + 404: { + [key: string]: unknown + } +} + +export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetError + = PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetErrors[keyof PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetErrors] + +export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponses = { + 200: WorkflowDraftVariable + 204: { + [key: string]: never + } +} + +export type PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse + = PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponses[keyof PutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponses] + +export type GetSnippetsBySnippetIdWorkflowsPublishData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/publish' +} + +export type GetSnippetsBySnippetIdWorkflowsPublishErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetSnippetsBySnippetIdWorkflowsPublishError + = GetSnippetsBySnippetIdWorkflowsPublishErrors[keyof GetSnippetsBySnippetIdWorkflowsPublishErrors] + +export type GetSnippetsBySnippetIdWorkflowsPublishResponses = { + 200: SnippetWorkflowResponse +} + +export type GetSnippetsBySnippetIdWorkflowsPublishResponse + = GetSnippetsBySnippetIdWorkflowsPublishResponses[keyof GetSnippetsBySnippetIdWorkflowsPublishResponses] + +export type PostSnippetsBySnippetIdWorkflowsPublishData = { + body: PublishWorkflowPayload + path: { + snippet_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/publish' +} + +export type PostSnippetsBySnippetIdWorkflowsPublishErrors = { + 400: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsPublishError + = PostSnippetsBySnippetIdWorkflowsPublishErrors[keyof PostSnippetsBySnippetIdWorkflowsPublishErrors] + +export type PostSnippetsBySnippetIdWorkflowsPublishResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsPublishResponse + = PostSnippetsBySnippetIdWorkflowsPublishResponses[keyof PostSnippetsBySnippetIdWorkflowsPublishResponses] + +export type PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreData = { + body?: never + path: { + snippet_id: string + workflow_id: string + } + query?: never + url: '/snippets/{snippet_id}/workflows/{workflow_id}/restore' +} + +export type PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreErrors = { + 400: { + [key: string]: unknown + } + 404: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreError + = PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreErrors[keyof PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreErrors] + +export type PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponse + = PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponses[keyof PostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponses] diff --git a/packages/contracts/generated/api/console/snippets/zod.gen.ts b/packages/contracts/generated/api/console/snippets/zod.gen.ts new file mode 100644 index 00000000000..20b932592a6 --- /dev/null +++ b/packages/contracts/generated/api/console/snippets/zod.gen.ts @@ -0,0 +1,633 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import * as z from 'zod' + +/** + * SnippetDraftSyncPayload + * + * Payload for syncing snippet draft workflow. + */ +export const zSnippetDraftSyncPayload = z.object({ + conversation_variables: z.array(z.record(z.string(), z.unknown())).nullish(), + graph: z.record(z.string(), z.unknown()), + hash: z.string().nullish(), + input_fields: z.array(z.record(z.string(), z.unknown())).nullish(), +}) + +/** + * SnippetIterationNodeRunPayload + * + * Payload for running an iteration node in snippet draft workflow. + */ +export const zSnippetIterationNodeRunPayload = z.object({ + inputs: z.record(z.string(), z.unknown()).nullish(), +}) + +/** + * SnippetLoopNodeRunPayload + * + * Payload for running a loop node in snippet draft workflow. + */ +export const zSnippetLoopNodeRunPayload = z.object({ + inputs: z.record(z.string(), z.unknown()).nullish(), +}) + +/** + * SnippetDraftNodeRunPayload + * + * Payload for running a single node in snippet draft workflow. + */ +export const zSnippetDraftNodeRunPayload = z.object({ + files: z.array(z.record(z.string(), z.unknown())).nullish(), + inputs: z.record(z.string(), z.unknown()), + query: z.string().optional().default(''), +}) + +/** + * SnippetDraftRunPayload + * + * Payload for running snippet draft workflow. + */ +export const zSnippetDraftRunPayload = z.object({ + files: z.array(z.record(z.string(), z.unknown())).nullish(), + inputs: z.record(z.string(), z.unknown()), +}) + +export const zWorkflowDraftVariable = z.object({ + description: z.string().optional(), + edited: z.boolean().optional(), + full_content: z.record(z.string(), z.unknown()).optional(), + id: z.string().optional(), + is_truncated: z.boolean().optional(), + name: z.string().optional(), + selector: z.array(z.string()).optional(), + type: z.string().optional(), + value: z.record(z.string(), z.unknown()).optional(), + value_type: z.string().optional(), + visible: z.boolean().optional(), +}) + +export const zWorkflowDraftVariableList = z.object({ + items: z.array(zWorkflowDraftVariable).optional(), +}) + +/** + * WorkflowDraftVariableUpdatePayload + */ +export const zWorkflowDraftVariableUpdatePayload = z.object({ + name: z.string().nullish(), + value: z.unknown().optional(), +}) + +/** + * PublishWorkflowPayload + * + * Payload for publishing snippet workflow. + */ +export const zPublishWorkflowPayload = z.object({ + knowledge_base_setting: z.record(z.string(), z.unknown()).nullish(), +}) + +/** + * SimpleAccount + */ +export const zSimpleAccount = z.object({ + email: z.string(), + id: z.string(), + name: z.string(), +}) + +/** + * WorkflowRunForListResponse + */ +export const zWorkflowRunForListResponse = z.object({ + created_at: z.int().nullish(), + created_by_account: zSimpleAccount.optional(), + elapsed_time: z.number().nullish(), + exceptions_count: z.int().nullish(), + finished_at: z.int().nullish(), + id: z.string(), + retry_index: z.int().nullish(), + status: z.string().nullish(), + total_steps: z.int().nullish(), + total_tokens: z.int().nullish(), + version: z.string().nullish(), +}) + +/** + * WorkflowRunPaginationResponse + */ +export const zWorkflowRunPaginationResponse = z.object({ + data: z.array(zWorkflowRunForListResponse), + has_more: z.boolean(), + limit: z.int(), +}) + +/** + * SimpleEndUser + */ +export const zSimpleEndUser = z.object({ + id: z.string(), + is_anonymous: z.boolean(), + session_id: z.string().nullish(), + type: z.string(), +}) + +/** + * WorkflowRunDetailResponse + */ +export const zWorkflowRunDetailResponse = z.object({ + created_at: z.int().nullish(), + created_by_account: zSimpleAccount.optional(), + created_by_end_user: zSimpleEndUser.optional(), + created_by_role: z.string().nullish(), + elapsed_time: z.number().nullish(), + error: z.string().nullish(), + exceptions_count: z.int().nullish(), + finished_at: z.int().nullish(), + graph: z.unknown(), + id: z.string(), + inputs: z.unknown(), + outputs: z.unknown(), + status: z.string().nullish(), + total_steps: z.int().nullish(), + total_tokens: z.int().nullish(), + version: z.string().nullish(), +}) + +/** + * WorkflowRunNodeExecutionResponse + */ +export const zWorkflowRunNodeExecutionResponse = z.object({ + created_at: z.int().nullish(), + created_by_account: zSimpleAccount.optional(), + created_by_end_user: zSimpleEndUser.optional(), + created_by_role: z.string().nullish(), + elapsed_time: z.number().nullish(), + error: z.string().nullish(), + execution_metadata: z.unknown().optional(), + extras: z.unknown().optional(), + finished_at: z.int().nullish(), + id: z.string(), + index: z.int().nullish(), + inputs: z.unknown().optional(), + inputs_truncated: z.boolean().nullish(), + node_id: z.string().nullish(), + node_type: z.string().nullish(), + outputs: z.unknown().optional(), + outputs_truncated: z.boolean().nullish(), + predecessor_node_id: z.string().nullish(), + process_data: z.unknown().optional(), + process_data_truncated: z.boolean().nullish(), + status: z.string().nullish(), + title: z.string().nullish(), +}) + +/** + * WorkflowRunNodeExecutionListResponse + */ +export const zWorkflowRunNodeExecutionListResponse = z.object({ + data: z.array(zWorkflowRunNodeExecutionResponse), +}) + +/** + * WorkflowConversationVariableResponse + */ +export const zWorkflowConversationVariableResponse = z.object({ + description: z.string(), + id: z.string(), + name: z.string(), + value: z.record(z.string(), z.unknown()), + value_type: z.string(), +}) + +/** + * WorkflowEnvironmentVariableResponse + */ +export const zWorkflowEnvironmentVariableResponse = z.object({ + description: z.string(), + id: z.string(), + name: z.string(), + value: z.record(z.string(), z.unknown()), + value_type: z.string(), +}) + +/** + * PipelineVariableResponse + */ +export const zPipelineVariableResponse = z.object({ + allowed_file_extensions: z.array(z.string()).nullish(), + allowed_file_types: z.array(z.string()).nullish(), + allowed_file_upload_methods: z.array(z.string()).nullish(), + belong_to_node_id: z.string(), + default_value: z.record(z.string(), z.unknown()).optional(), + label: z.string(), + max_length: z.int().nullish(), + options: z.array(z.string()).nullish(), + placeholder: z.string().nullish(), + required: z.boolean(), + tooltips: z.string().nullish(), + type: z.string(), + unit: z.string().nullish(), + variable: z.string(), +}) + +/** + * SnippetWorkflowResponse + */ +export const zSnippetWorkflowResponse = z.object({ + conversation_variables: z.array(zWorkflowConversationVariableResponse), + created_at: z.int(), + created_by: zSimpleAccount.optional(), + environment_variables: z.array(zWorkflowEnvironmentVariableResponse), + features: z.record(z.string(), z.unknown()), + graph: z.record(z.string(), z.unknown()), + hash: z.string(), + id: z.string(), + input_fields: z.array(z.record(z.string(), z.unknown())).optional(), + marked_comment: z.string(), + marked_name: z.string(), + rag_pipeline_variables: z.array(zPipelineVariableResponse), + tool_published: z.boolean(), + updated_at: z.int(), + updated_by: zSimpleAccount.optional(), + version: z.string(), +}) + +/** + * WorkflowResponse + */ +export const zWorkflowResponse = z.object({ + conversation_variables: z.array(zWorkflowConversationVariableResponse), + created_at: z.int(), + created_by: zSimpleAccount.optional(), + environment_variables: z.array(zWorkflowEnvironmentVariableResponse), + features: z.record(z.string(), z.unknown()), + graph: z.record(z.string(), z.unknown()), + hash: z.string(), + id: z.string(), + marked_comment: z.string(), + marked_name: z.string(), + rag_pipeline_variables: z.array(zPipelineVariableResponse), + tool_published: z.boolean(), + updated_at: z.int(), + updated_by: zSimpleAccount.optional(), + version: z.string(), +}) + +/** + * WorkflowPaginationResponse + */ +export const zWorkflowPaginationResponse = z.object({ + has_more: z.boolean(), + items: z.array(zWorkflowResponse), + limit: z.int(), + page: z.int(), +}) + +export const zWorkflowDraftVariableWithoutValue = z.object({ + description: z.string().optional(), + edited: z.boolean().optional(), + id: z.string().optional(), + is_truncated: z.boolean().optional(), + name: z.string().optional(), + selector: z.array(z.string()).optional(), + type: z.string().optional(), + value_type: z.string().optional(), + visible: z.boolean().optional(), +}) + +export const zWorkflowDraftVariableListWithoutValue = z.object({ + items: z.array(zWorkflowDraftVariableWithoutValue).optional(), + total: z.record(z.string(), z.unknown()).optional(), +}) + +export const zGetSnippetsBySnippetIdWorkflowRunsPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Workflow runs retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowRunsResponse = zWorkflowRunPaginationResponse + +export const zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopPath = z.object({ + snippet_id: z.string(), + task_id: z.string(), +}) + +/** + * Task stopped successfully + */ +export const zPostSnippetsBySnippetIdWorkflowRunsTasksByTaskIdStopResponse = z.record( + z.string(), + z.unknown(), +) + +export const zGetSnippetsBySnippetIdWorkflowRunsByRunIdPath = z.object({ + run_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Workflow run detail retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowRunsByRunIdResponse = zWorkflowRunDetailResponse + +export const zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsPath = z.object({ + run_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Node executions retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowRunsByRunIdNodeExecutionsResponse + = zWorkflowRunNodeExecutionListResponse + +export const zGetSnippetsBySnippetIdWorkflowsPath = z.object({ + snippet_id: z.string(), +}) + +export const zGetSnippetsBySnippetIdWorkflowsQuery = z.object({ + limit: z.int().gte(1).lte(100).optional().default(10), + page: z.int().gte(1).lte(99999).optional().default(1), +}) + +/** + * Published workflows retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsResponse = zWorkflowPaginationResponse + +export const zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Default block configs retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDefaultWorkflowBlockConfigsResponse = z.record( + z.string(), + z.unknown(), +) + +export const zGetSnippetsBySnippetIdWorkflowsDraftPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Draft workflow retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftResponse = zSnippetWorkflowResponse + +export const zPostSnippetsBySnippetIdWorkflowsDraftBody = zSnippetDraftSyncPayload + +export const zPostSnippetsBySnippetIdWorkflowsDraftPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Draft workflow synced successfully + */ +export const zPostSnippetsBySnippetIdWorkflowsDraftResponse = z.record(z.string(), z.unknown()) + +export const zGetSnippetsBySnippetIdWorkflowsDraftConfigPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Draft config retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftConfigResponse = z.record(z.string(), z.unknown()) + +export const zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Conversation variables retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftConversationVariablesResponse + = zWorkflowDraftVariableList + +export const zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Environment variables retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftEnvironmentVariablesResponse = z.record( + z.string(), + z.unknown(), +) + +export const zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunBody + = zSnippetIterationNodeRunPayload + +export const zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Iteration node run started successfully (SSE stream) + */ +export const zPostSnippetsBySnippetIdWorkflowsDraftIterationNodesByNodeIdRunResponse = z.record( + z.string(), + z.unknown(), +) + +export const zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunBody + = zSnippetLoopNodeRunPayload + +export const zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Loop node run started successfully (SSE stream) + */ +export const zPostSnippetsBySnippetIdWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record( + z.string(), + z.unknown(), +) + +export const zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Node last run retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdLastRunResponse + = zWorkflowRunNodeExecutionResponse + +export const zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunBody + = zSnippetDraftNodeRunPayload + +export const zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Node run completed successfully + */ +export const zPostSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdRunResponse + = zWorkflowRunNodeExecutionResponse + +export const zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Node variables deleted successfully + */ +export const zDeleteSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record( + z.string(), + z.never(), +) + +export const zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({ + node_id: z.string(), + snippet_id: z.string(), +}) + +/** + * Node variables retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdVariablesResponse + = zWorkflowDraftVariableList + +export const zPostSnippetsBySnippetIdWorkflowsDraftRunBody = zSnippetDraftRunPayload + +export const zPostSnippetsBySnippetIdWorkflowsDraftRunPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Draft workflow run started successfully (SSE stream) + */ +export const zPostSnippetsBySnippetIdWorkflowsDraftRunResponse = z.record(z.string(), z.unknown()) + +export const zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesPath = z.object({ + snippet_id: z.string(), +}) + +/** + * System variables retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftSystemVariablesResponse + = zWorkflowDraftVariableList + +export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Workflow variables deleted successfully + */ +export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesResponse = z.record( + z.string(), + z.never(), +) + +export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesPath = z.object({ + snippet_id: z.string(), +}) + +export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesQuery = z.object({ + limit: z.int().gte(1).lte(100).optional().default(20), + page: z.int().gte(1).lte(100000).optional().default(1), +}) + +/** + * Workflow variables retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesResponse + = zWorkflowDraftVariableListWithoutValue + +export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath = z.object({ + snippet_id: z.string(), + variable_id: z.string(), +}) + +/** + * Variable deleted successfully + */ +export const zDeleteSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse = z.record( + z.string(), + z.never(), +) + +export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath = z.object({ + snippet_id: z.string(), + variable_id: z.string(), +}) + +/** + * Variable retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse + = zWorkflowDraftVariable + +export const zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdBody + = zWorkflowDraftVariableUpdatePayload + +export const zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdPath = z.object({ + snippet_id: z.string(), + variable_id: z.string(), +}) + +/** + * Variable updated successfully + */ +export const zPatchSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResponse + = zWorkflowDraftVariable + +export const zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetPath = z.object({ + snippet_id: z.string(), + variable_id: z.string(), +}) + +export const zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse = z.union([ + zWorkflowDraftVariable, + z.record(z.string(), z.never()), +]) + +export const zGetSnippetsBySnippetIdWorkflowsPublishPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Published workflow retrieved successfully + */ +export const zGetSnippetsBySnippetIdWorkflowsPublishResponse = zSnippetWorkflowResponse + +export const zPostSnippetsBySnippetIdWorkflowsPublishBody = zPublishWorkflowPayload + +export const zPostSnippetsBySnippetIdWorkflowsPublishPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Workflow published successfully + */ +export const zPostSnippetsBySnippetIdWorkflowsPublishResponse = z.record(z.string(), z.unknown()) + +export const zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestorePath = z.object({ + snippet_id: z.string(), + workflow_id: z.string(), +}) + +/** + * Workflow restored successfully + */ +export const zPostSnippetsBySnippetIdWorkflowsByWorkflowIdRestoreResponse = z.record( + z.string(), + z.unknown(), +) diff --git a/packages/contracts/generated/api/console/tag-bindings/types.gen.ts b/packages/contracts/generated/api/console/tag-bindings/types.gen.ts index 98f7424449e..967be7d0f48 100644 --- a/packages/contracts/generated/api/console/tag-bindings/types.gen.ts +++ b/packages/contracts/generated/api/console/tag-bindings/types.gen.ts @@ -20,7 +20,7 @@ export type TagBindingRemovePayload = { type: TagType } -export type TagType = 'app' | 'knowledge' +export type TagType = 'app' | 'knowledge' | 'snippet' export type PostTagBindingsData = { body: TagBindingPayload diff --git a/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts b/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts index a734d0874f3..566922edcf1 100644 --- a/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts +++ b/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts @@ -14,7 +14,7 @@ export const zSimpleResultResponse = z.object({ * * Tag type */ -export const zTagType = z.enum(['app', 'knowledge']) +export const zTagType = z.enum(['app', 'knowledge', 'snippet']) /** * TagBindingPayload diff --git a/packages/contracts/generated/api/console/tags/types.gen.ts b/packages/contracts/generated/api/console/tags/types.gen.ts index c43abdbb00d..8ecf1a55e75 100644 --- a/packages/contracts/generated/api/console/tags/types.gen.ts +++ b/packages/contracts/generated/api/console/tags/types.gen.ts @@ -20,7 +20,7 @@ export type TagUpdateRequestPayload = { name: string } -export type TagType = 'app' | 'knowledge' +export type TagType = 'app' | 'knowledge' | 'snippet' export type GetTagsData = { body?: never diff --git a/packages/contracts/generated/api/console/tags/zod.gen.ts b/packages/contracts/generated/api/console/tags/zod.gen.ts index 263b67b0838..b0479b09508 100644 --- a/packages/contracts/generated/api/console/tags/zod.gen.ts +++ b/packages/contracts/generated/api/console/tags/zod.gen.ts @@ -24,7 +24,7 @@ export const zTagUpdateRequestPayload = z.object({ * * Tag type */ -export const zTagType = z.enum(['app', 'knowledge']) +export const zTagType = z.enum(['app', 'knowledge', 'snippet']) /** * TagBasePayload diff --git a/packages/contracts/generated/api/console/workspaces/orpc.gen.ts b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts index 766859ec819..91a36f10b6c 100644 --- a/packages/contracts/generated/api/console/workspaces/orpc.gen.ts +++ b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts @@ -4,6 +4,8 @@ import { oc } from '@orpc/contract' import * as z from 'zod' import { + zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath, + zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse, zDeleteWorkspacesCurrentEndpointsByIdPath, zDeleteWorkspacesCurrentEndpointsByIdResponse, zDeleteWorkspacesCurrentMembersByMemberIdPath, @@ -28,6 +30,14 @@ import { zGetWorkspacesCurrentAgentProviderByProviderNamePath, zGetWorkspacesCurrentAgentProviderByProviderNameResponse, zGetWorkspacesCurrentAgentProvidersResponse, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath, + zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse, + zGetWorkspacesCurrentCustomizedSnippetsQuery, + zGetWorkspacesCurrentCustomizedSnippetsResponse, zGetWorkspacesCurrentDatasetOperatorsResponse, zGetWorkspacesCurrentDefaultModelQuery, zGetWorkspacesCurrentDefaultModelResponse, @@ -122,6 +132,9 @@ import { zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse, zGetWorkspacesCurrentTriggersResponse, zGetWorkspacesResponse, + zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody, + zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath, + zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse, zPatchWorkspacesCurrentEndpointsByIdBody, zPatchWorkspacesCurrentEndpointsByIdPath, zPatchWorkspacesCurrentEndpointsByIdResponse, @@ -131,6 +144,14 @@ import { zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody, zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath, zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse, + zPostWorkspacesCurrentCustomizedSnippetsBody, + zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath, + zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse, + zPostWorkspacesCurrentCustomizedSnippetsImportsBody, + zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath, + zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse, + zPostWorkspacesCurrentCustomizedSnippetsImportsResponse, + zPostWorkspacesCurrentCustomizedSnippetsResponse, zPostWorkspacesCurrentDefaultModelBody, zPostWorkspacesCurrentDefaultModelResponse, zPostWorkspacesCurrentEndpointsBody, @@ -349,7 +370,286 @@ export const agentProviders = { get: get2, } +/** + * Confirm a pending snippet import + * + * Confirm a pending snippet import + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post = oc + .route({ + deprecated: true, + description: + 'Confirm a pending snippet import\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirm', + path: '/workspaces/current/customized-snippets/imports/{import_id}/confirm', + summary: 'Confirm a pending snippet import', + tags: ['console'], + }) + .input(z.object({ params: zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath })) + .output(zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse) + +export const confirm = { + post, +} + +export const byImportId = { + confirm, +} + +/** + * Import snippet from DSL + * + * Import snippet from DSL + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post2 = oc + .route({ + deprecated: true, + description: + 'Import snippet from DSL\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentCustomizedSnippetsImports', + path: '/workspaces/current/customized-snippets/imports', + summary: 'Import snippet from DSL', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentCustomizedSnippetsImportsBody })) + .output(zPostWorkspacesCurrentCustomizedSnippetsImportsResponse) + +export const imports = { + post: post2, + byImportId, +} + +/** + * Check dependencies for a snippet + * + * Check dependencies for a snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ export const get3 = oc + .route({ + deprecated: true, + description: + 'Check dependencies for a snippet\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependencies', + path: '/workspaces/current/customized-snippets/{snippet_id}/check-dependencies', + summary: 'Check dependencies for a snippet', + tags: ['console'], + }) + .input( + z.object({ params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath }), + ) + .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse) + +export const checkDependencies = { + get: get3, +} + +/** + * Export snippet as DSL + * + * Export snippet configuration as DSL + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get4 = oc + .route({ + deprecated: true, + description: + 'Export snippet configuration as DSL\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetIdExport', + path: '/workspaces/current/customized-snippets/{snippet_id}/export', + summary: 'Export snippet as DSL', + tags: ['console'], + }) + .input(z.object({ params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath })) + .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse) + +export const export_ = { + get: get4, +} + +/** + * Increment snippet use count when it is inserted into a workflow + * + * Increment snippet use count by 1 + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post3 = oc + .route({ + deprecated: true, + description: + 'Increment snippet use count by 1\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrement', + path: '/workspaces/current/customized-snippets/{snippet_id}/use-count/increment', + summary: 'Increment snippet use count when it is inserted into a workflow', + tags: ['console'], + }) + .input( + z.object({ params: zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath }), + ) + .output(zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse) + +export const increment = { + post: post3, +} + +export const useCount = { + increment, +} + +/** + * Delete customized snippet + */ +export const delete_ = oc + .route({ + inputStructure: 'detailed', + method: 'DELETE', + operationId: 'deleteWorkspacesCurrentCustomizedSnippetsBySnippetId', + path: '/workspaces/current/customized-snippets/{snippet_id}', + successStatus: 204, + summary: 'Delete customized snippet', + tags: ['console'], + }) + .input(z.object({ params: zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath })) + .output(zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse) + +/** + * Get customized snippet details + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get5 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetId', + path: '/workspaces/current/customized-snippets/{snippet_id}', + summary: 'Get customized snippet details', + tags: ['console'], + }) + .input(z.object({ params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath })) + .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse) + +/** + * Update customized snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const patch = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'PATCH', + operationId: 'patchWorkspacesCurrentCustomizedSnippetsBySnippetId', + path: '/workspaces/current/customized-snippets/{snippet_id}', + summary: 'Update customized snippet', + tags: ['console'], + }) + .input( + z.object({ + body: zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody, + params: zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath, + }), + ) + .output(zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse) + +export const bySnippetId = { + delete: delete_, + get: get5, + patch, + checkDependencies, + export: export_, + useCount, +} + +/** + * List customized snippets with pagination and search + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get6 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentCustomizedSnippets', + path: '/workspaces/current/customized-snippets', + summary: 'List customized snippets with pagination and search', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentCustomizedSnippetsQuery.optional() })) + .output(zGetWorkspacesCurrentCustomizedSnippetsResponse) + +/** + * Create a new customized snippet + * + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post4 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentCustomizedSnippets', + path: '/workspaces/current/customized-snippets', + successStatus: 201, + summary: 'Create a new customized snippet', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentCustomizedSnippetsBody })) + .output(zPostWorkspacesCurrentCustomizedSnippetsResponse) + +export const customizedSnippets = { + get: get6, + post: post4, + imports, + bySnippetId, +} + +export const get7 = oc .route({ inputStructure: 'detailed', method: 'GET', @@ -360,7 +660,7 @@ export const get3 = oc .output(zGetWorkspacesCurrentDatasetOperatorsResponse) export const datasetOperators = { - get: get3, + get: get7, } /** @@ -368,7 +668,7 @@ export const datasetOperators = { * * @deprecated */ -export const get4 = oc +export const get8 = oc .route({ deprecated: true, description: @@ -382,7 +682,7 @@ export const get4 = oc .input(z.object({ query: zGetWorkspacesCurrentDefaultModelQuery })) .output(zGetWorkspacesCurrentDefaultModelResponse) -export const post = oc +export const post5 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -394,8 +694,8 @@ export const post = oc .output(zPostWorkspacesCurrentDefaultModelResponse) export const defaultModel = { - get: get4, - post, + get: get8, + post: post5, } /** @@ -405,7 +705,7 @@ export const defaultModel = { * * @deprecated */ -export const post2 = oc +export const post6 = oc .route({ deprecated: true, description: @@ -420,7 +720,7 @@ export const post2 = oc .output(zPostWorkspacesCurrentEndpointsCreateResponse) export const create = { - post: post2, + post: post6, } /** @@ -428,7 +728,7 @@ export const create = { * * @deprecated */ -export const post3 = oc +export const post7 = oc .route({ deprecated: true, description: @@ -442,14 +742,14 @@ export const post3 = oc .input(z.object({ body: zPostWorkspacesCurrentEndpointsDeleteBody })) .output(zPostWorkspacesCurrentEndpointsDeleteResponse) -export const delete_ = { - post: post3, +export const delete2 = { + post: post7, } /** * Disable a plugin endpoint */ -export const post4 = oc +export const post8 = oc .route({ description: 'Disable a plugin endpoint', inputStructure: 'detailed', @@ -462,13 +762,13 @@ export const post4 = oc .output(zPostWorkspacesCurrentEndpointsDisableResponse) export const disable = { - post: post4, + post: post8, } /** * Enable a plugin endpoint */ -export const post5 = oc +export const post9 = oc .route({ description: 'Enable a plugin endpoint', inputStructure: 'detailed', @@ -481,7 +781,7 @@ export const post5 = oc .output(zPostWorkspacesCurrentEndpointsEnableResponse) export const enable = { - post: post5, + post: post9, } /** @@ -491,7 +791,7 @@ export const enable = { * * @deprecated */ -export const get5 = oc +export const get9 = oc .route({ deprecated: true, description: @@ -506,7 +806,7 @@ export const get5 = oc .output(zGetWorkspacesCurrentEndpointsListPluginResponse) export const plugin = { - get: get5, + get: get9, } /** @@ -516,7 +816,7 @@ export const plugin = { * * @deprecated */ -export const get6 = oc +export const get10 = oc .route({ deprecated: true, description: @@ -531,7 +831,7 @@ export const get6 = oc .output(zGetWorkspacesCurrentEndpointsListResponse) export const list = { - get: get6, + get: get10, plugin, } @@ -542,7 +842,7 @@ export const list = { * * @deprecated */ -export const post6 = oc +export const post10 = oc .route({ deprecated: true, description: @@ -557,13 +857,13 @@ export const post6 = oc .output(zPostWorkspacesCurrentEndpointsUpdateResponse) export const update = { - post: post6, + post: post10, } /** * Delete a plugin endpoint */ -export const delete2 = oc +export const delete3 = oc .route({ description: 'Delete a plugin endpoint', inputStructure: 'detailed', @@ -582,7 +882,7 @@ export const delete2 = oc * * @deprecated */ -export const patch = oc +export const patch2 = oc .route({ deprecated: true, description: @@ -602,8 +902,8 @@ export const patch = oc .output(zPatchWorkspacesCurrentEndpointsByIdResponse) export const byId = { - delete: delete2, - patch, + delete: delete3, + patch: patch2, } /** @@ -613,7 +913,7 @@ export const byId = { * * @deprecated */ -export const post7 = oc +export const post11 = oc .route({ deprecated: true, description: @@ -628,9 +928,9 @@ export const post7 = oc .output(zPostWorkspacesCurrentEndpointsResponse) export const endpoints = { - post: post7, + post: post11, create, - delete: delete_, + delete: delete2, disable, enable, list, @@ -643,7 +943,7 @@ export const endpoints = { * * @deprecated */ -export const post8 = oc +export const post12 = oc .route({ deprecated: true, description: @@ -658,10 +958,10 @@ export const post8 = oc .output(zPostWorkspacesCurrentMembersInviteEmailResponse) export const inviteEmail = { - post: post8, + post: post12, } -export const post9 = oc +export const post13 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -673,10 +973,10 @@ export const post9 = oc .output(zPostWorkspacesCurrentMembersOwnerTransferCheckResponse) export const ownerTransferCheck = { - post: post9, + post: post13, } -export const post10 = oc +export const post14 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -688,7 +988,7 @@ export const post10 = oc .output(zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse) export const sendOwnerTransferConfirmEmail = { - post: post10, + post: post14, } /** @@ -696,7 +996,7 @@ export const sendOwnerTransferConfirmEmail = { * * @deprecated */ -export const post11 = oc +export const post15 = oc .route({ deprecated: true, description: @@ -716,7 +1016,7 @@ export const post11 = oc .output(zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse) export const ownerTransfer = { - post: post11, + post: post15, } /** @@ -752,7 +1052,7 @@ export const updateRole = { * * @deprecated */ -export const delete3 = oc +export const delete4 = oc .route({ deprecated: true, description: @@ -767,12 +1067,12 @@ export const delete3 = oc .output(zDeleteWorkspacesCurrentMembersByMemberIdResponse) export const byMemberId = { - delete: delete3, + delete: delete4, ownerTransfer, updateRole, } -export const get7 = oc +export const get11 = oc .route({ inputStructure: 'detailed', method: 'GET', @@ -783,7 +1083,7 @@ export const get7 = oc .output(zGetWorkspacesCurrentMembersResponse) export const members = { - get: get7, + get: get11, inviteEmail, ownerTransferCheck, sendOwnerTransferConfirmEmail, @@ -795,7 +1095,7 @@ export const members = { * * @deprecated */ -export const get8 = oc +export const get12 = oc .route({ deprecated: true, description: @@ -810,10 +1110,10 @@ export const get8 = oc .output(zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse) export const checkoutUrl = { - get: get8, + get: get12, } -export const post12 = oc +export const post16 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -830,7 +1130,7 @@ export const post12 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse) export const switch_ = { - post: post12, + post: post16, } /** @@ -838,7 +1138,7 @@ export const switch_ = { * * @deprecated */ -export const post13 = oc +export const post17 = oc .route({ deprecated: true, description: @@ -858,10 +1158,10 @@ export const post13 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse) export const validate = { - post: post13, + post: post17, } -export const delete4 = oc +export const delete5 = oc .route({ inputStructure: 'detailed', method: 'DELETE', @@ -883,7 +1183,7 @@ export const delete4 = oc * * @deprecated */ -export const get9 = oc +export const get13 = oc .route({ deprecated: true, description: @@ -907,7 +1207,7 @@ export const get9 = oc * * @deprecated */ -export const post14 = oc +export const post18 = oc .route({ deprecated: true, description: @@ -951,15 +1251,15 @@ export const put2 = oc .output(zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse) export const credentials = { - delete: delete4, - get: get9, - post: post14, + delete: delete5, + get: get13, + post: post18, put: put2, switch: switch_, validate, } -export const post15 = oc +export const post19 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -976,7 +1276,7 @@ export const post15 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse) export const switch2 = { - post: post15, + post: post19, } /** @@ -984,7 +1284,7 @@ export const switch2 = { * * @deprecated */ -export const post16 = oc +export const post20 = oc .route({ deprecated: true, description: @@ -1004,10 +1304,10 @@ export const post16 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse) export const validate2 = { - post: post16, + post: post20, } -export const delete5 = oc +export const delete6 = oc .route({ inputStructure: 'detailed', method: 'DELETE', @@ -1029,7 +1329,7 @@ export const delete5 = oc * * @deprecated */ -export const get10 = oc +export const get14 = oc .route({ deprecated: true, description: @@ -1053,7 +1353,7 @@ export const get10 = oc * * @deprecated */ -export const post17 = oc +export const post21 = oc .route({ deprecated: true, description: @@ -1097,15 +1397,15 @@ export const put3 = oc .output(zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse) export const credentials2 = { - delete: delete5, - get: get10, - post: post17, + delete: delete6, + get: get14, + post: post21, put: put3, switch: switch2, validate: validate2, } -export const patch2 = oc +export const patch3 = oc .route({ inputStructure: 'detailed', method: 'PATCH', @@ -1122,10 +1422,10 @@ export const patch2 = oc .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse) export const disable2 = { - patch: patch2, + patch: patch3, } -export const patch3 = oc +export const patch4 = oc .route({ inputStructure: 'detailed', method: 'PATCH', @@ -1142,7 +1442,7 @@ export const patch3 = oc .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse) export const enable2 = { - patch: patch3, + patch: patch4, } /** @@ -1150,7 +1450,7 @@ export const enable2 = { * * @deprecated */ -export const post18 = oc +export const post22 = oc .route({ deprecated: true, description: @@ -1174,7 +1474,7 @@ export const post18 = oc ) export const credentialsValidate = { - post: post18, + post: post22, } /** @@ -1182,7 +1482,7 @@ export const credentialsValidate = { * * @deprecated */ -export const post19 = oc +export const post23 = oc .route({ deprecated: true, description: @@ -1206,7 +1506,7 @@ export const post19 = oc ) export const credentialsValidate2 = { - post: post19, + post: post23, } export const byConfigId = { @@ -1223,7 +1523,7 @@ export const loadBalancingConfigs = { * * @deprecated */ -export const get11 = oc +export const get15 = oc .route({ deprecated: true, description: @@ -1243,10 +1543,10 @@ export const get11 = oc .output(zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse) export const parameterRules = { - get: get11, + get: get15, } -export const delete6 = oc +export const delete7 = oc .route({ inputStructure: 'detailed', method: 'DELETE', @@ -1268,7 +1568,7 @@ export const delete6 = oc * * @deprecated */ -export const get12 = oc +export const get16 = oc .route({ deprecated: true, description: @@ -1287,7 +1587,7 @@ export const get12 = oc * * @deprecated */ -export const post20 = oc +export const post24 = oc .route({ deprecated: true, description: @@ -1307,9 +1607,9 @@ export const post20 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderModelsResponse) export const models = { - delete: delete6, - get: get12, - post: post20, + delete: delete7, + get: get16, + post: post24, credentials: credentials2, disable: disable2, enable: enable2, @@ -1317,7 +1617,7 @@ export const models = { parameterRules, } -export const post21 = oc +export const post25 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -1334,7 +1634,7 @@ export const post21 = oc .output(zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse) export const preferredProviderType = { - post: post21, + post: post25, } export const byProvider = { @@ -1349,7 +1649,7 @@ export const byProvider = { * * @deprecated */ -export const get13 = oc +export const get17 = oc .route({ deprecated: true, description: @@ -1364,7 +1664,7 @@ export const get13 = oc .output(zGetWorkspacesCurrentModelProvidersResponse) export const modelProviders = { - get: get13, + get: get17, byProvider, } @@ -1373,7 +1673,7 @@ export const modelProviders = { * * @deprecated */ -export const get14 = oc +export const get18 = oc .route({ deprecated: true, description: @@ -1388,7 +1688,7 @@ export const get14 = oc .output(zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse) export const byModelType = { - get: get14, + get: get18, } export const modelTypes = { @@ -1404,7 +1704,7 @@ export const models2 = { * * Returns permission flags that control workspace features like member invitations and owner transfer. */ -export const get15 = oc +export const get19 = oc .route({ description: 'Returns permission flags that control workspace features like member invitations and owner transfer.', @@ -1418,217 +1718,9 @@ export const get15 = oc .output(zGetWorkspacesCurrentPermissionResponse) export const permission = { - get: get15, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get16 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginAsset', - path: '/workspaces/current/plugin/asset', - tags: ['console'], - }) - .input(z.object({ query: zGetWorkspacesCurrentPluginAssetQuery })) - .output(zGetWorkspacesCurrentPluginAssetResponse) - -export const asset = { - get: get16, -} - -export const get17 = oc - .route({ - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginDebuggingKey', - path: '/workspaces/current/plugin/debugging-key', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentPluginDebuggingKeyResponse) - -export const debuggingKey = { - get: get17, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get18 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginFetchManifest', - path: '/workspaces/current/plugin/fetch-manifest', - tags: ['console'], - }) - .input(z.object({ query: zGetWorkspacesCurrentPluginFetchManifestQuery })) - .output(zGetWorkspacesCurrentPluginFetchManifestResponse) - -export const fetchManifest = { - get: get18, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get19 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginIcon', - path: '/workspaces/current/plugin/icon', - tags: ['console'], - }) - .input(z.object({ query: zGetWorkspacesCurrentPluginIconQuery })) - .output(zGetWorkspacesCurrentPluginIconResponse) - -export const icon = { get: get19, } -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post22 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginInstallGithub', - path: '/workspaces/current/plugin/install/github', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginInstallGithubBody })) - .output(zPostWorkspacesCurrentPluginInstallGithubResponse) - -export const github = { - post: post22, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post23 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginInstallMarketplace', - path: '/workspaces/current/plugin/install/marketplace', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginInstallMarketplaceBody })) - .output(zPostWorkspacesCurrentPluginInstallMarketplaceResponse) - -export const marketplace = { - post: post23, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post24 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginInstallPkg', - path: '/workspaces/current/plugin/install/pkg', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginInstallPkgBody })) - .output(zPostWorkspacesCurrentPluginInstallPkgResponse) - -export const pkg = { - post: post24, -} - -export const install = { - github, - marketplace, - pkg, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post25 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginListInstallationsIds', - path: '/workspaces/current/plugin/list/installations/ids', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginListInstallationsIdsBody })) - .output(zPostWorkspacesCurrentPluginListInstallationsIdsResponse) - -export const ids = { - post: post25, -} - -export const installations = { - ids, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post26 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginListLatestVersions', - path: '/workspaces/current/plugin/list/latest-versions', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginListLatestVersionsBody })) - .output(zPostWorkspacesCurrentPluginListLatestVersionsResponse) - -export const latestVersions = { - post: post26, -} - /** * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. * @@ -1641,52 +1733,260 @@ export const get20 = oc 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', inputStructure: 'detailed', method: 'GET', - operationId: 'getWorkspacesCurrentPluginList', - path: '/workspaces/current/plugin/list', + operationId: 'getWorkspacesCurrentPluginAsset', + path: '/workspaces/current/plugin/asset', tags: ['console'], }) - .input(z.object({ query: zGetWorkspacesCurrentPluginListQuery.optional() })) - .output(zGetWorkspacesCurrentPluginListResponse) + .input(z.object({ query: zGetWorkspacesCurrentPluginAssetQuery })) + .output(zGetWorkspacesCurrentPluginAssetResponse) -export const list2 = { +export const asset = { get: get20, - installations, - latestVersions, } -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ export const get21 = oc .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', inputStructure: 'detailed', method: 'GET', - operationId: 'getWorkspacesCurrentPluginMarketplacePkg', - path: '/workspaces/current/plugin/marketplace/pkg', + operationId: 'getWorkspacesCurrentPluginDebuggingKey', + path: '/workspaces/current/plugin/debugging-key', tags: ['console'], }) - .input(z.object({ query: zGetWorkspacesCurrentPluginMarketplacePkgQuery })) - .output(zGetWorkspacesCurrentPluginMarketplacePkgResponse) + .output(zGetWorkspacesCurrentPluginDebuggingKeyResponse) -export const pkg2 = { +export const debuggingKey = { get: get21, } -export const marketplace2 = { - pkg: pkg2, -} - /** * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. * * @deprecated */ export const get22 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginFetchManifest', + path: '/workspaces/current/plugin/fetch-manifest', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentPluginFetchManifestQuery })) + .output(zGetWorkspacesCurrentPluginFetchManifestResponse) + +export const fetchManifest = { + get: get22, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get23 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginIcon', + path: '/workspaces/current/plugin/icon', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentPluginIconQuery })) + .output(zGetWorkspacesCurrentPluginIconResponse) + +export const icon = { + get: get23, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post26 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginInstallGithub', + path: '/workspaces/current/plugin/install/github', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginInstallGithubBody })) + .output(zPostWorkspacesCurrentPluginInstallGithubResponse) + +export const github = { + post: post26, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post27 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginInstallMarketplace', + path: '/workspaces/current/plugin/install/marketplace', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginInstallMarketplaceBody })) + .output(zPostWorkspacesCurrentPluginInstallMarketplaceResponse) + +export const marketplace = { + post: post27, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post28 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginInstallPkg', + path: '/workspaces/current/plugin/install/pkg', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginInstallPkgBody })) + .output(zPostWorkspacesCurrentPluginInstallPkgResponse) + +export const pkg = { + post: post28, +} + +export const install = { + github, + marketplace, + pkg, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post29 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginListInstallationsIds', + path: '/workspaces/current/plugin/list/installations/ids', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginListInstallationsIdsBody })) + .output(zPostWorkspacesCurrentPluginListInstallationsIdsResponse) + +export const ids = { + post: post29, +} + +export const installations = { + ids, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post30 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginListLatestVersions', + path: '/workspaces/current/plugin/list/latest-versions', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginListLatestVersionsBody })) + .output(zPostWorkspacesCurrentPluginListLatestVersionsResponse) + +export const latestVersions = { + post: post30, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get24 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginList', + path: '/workspaces/current/plugin/list', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentPluginListQuery.optional() })) + .output(zGetWorkspacesCurrentPluginListResponse) + +export const list2 = { + get: get24, + installations, + latestVersions, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get25 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginMarketplacePkg', + path: '/workspaces/current/plugin/marketplace/pkg', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentPluginMarketplacePkgQuery })) + .output(zGetWorkspacesCurrentPluginMarketplacePkgResponse) + +export const pkg2 = { + get: get25, +} + +export const marketplace2 = { + pkg: pkg2, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get26 = oc .route({ deprecated: true, description: @@ -1701,7 +2001,7 @@ export const get22 = oc .output(zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse) export const dynamicOptions = { - get: get22, + get: get26, } /** @@ -1711,7 +2011,7 @@ export const dynamicOptions = { * * @deprecated */ -export const post27 = oc +export const post31 = oc .route({ deprecated: true, description: @@ -1729,7 +2029,7 @@ export const post27 = oc .output(zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse) export const dynamicOptionsWithCredentials = { - post: post27, + post: post31, } export const parameters = { @@ -1737,7 +2037,7 @@ export const parameters = { dynamicOptionsWithCredentials, } -export const post28 = oc +export const post32 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -1749,212 +2049,212 @@ export const post28 = oc .output(zPostWorkspacesCurrentPluginPermissionChangeResponse) export const change = { - post: post28, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get23 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginPermissionFetch', - path: '/workspaces/current/plugin/permission/fetch', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentPluginPermissionFetchResponse) - -export const fetch_ = { - get: get23, -} - -export const permission2 = { - change, - fetch: fetch_, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post29 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginPreferencesAutoupgradeExclude', - path: '/workspaces/current/plugin/preferences/autoupgrade/exclude', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody })) - .output(zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse) - -export const exclude = { - post: post29, -} - -export const autoupgrade = { - exclude, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post30 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginPreferencesChange', - path: '/workspaces/current/plugin/preferences/change', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesChangeBody })) - .output(zPostWorkspacesCurrentPluginPreferencesChangeResponse) - -export const change2 = { - post: post30, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get24 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginPreferencesFetch', - path: '/workspaces/current/plugin/preferences/fetch', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentPluginPreferencesFetchResponse) - -export const fetch2 = { - get: get24, -} - -export const preferences = { - autoupgrade, - change: change2, - fetch: fetch2, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get25 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginReadme', - path: '/workspaces/current/plugin/readme', - tags: ['console'], - }) - .input(z.object({ query: zGetWorkspacesCurrentPluginReadmeQuery })) - .output(zGetWorkspacesCurrentPluginReadmeResponse) - -export const readme = { - get: get25, -} - -export const post31 = oc - .route({ - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginTasksDeleteAll', - path: '/workspaces/current/plugin/tasks/delete_all', - tags: ['console'], - }) - .output(zPostWorkspacesCurrentPluginTasksDeleteAllResponse) - -export const deleteAll = { - post: post31, -} - -export const post32 = oc - .route({ - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifier', - path: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}', - tags: ['console'], - }) - .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath })) - .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse) - -export const byIdentifier = { post: post32, } -export const post33 = oc - .route({ - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDelete', - path: '/workspaces/current/plugin/tasks/{task_id}/delete', - tags: ['console'], - }) - .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath })) - .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse) - -export const delete7 = { - post: post33, - byIdentifier, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get26 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentPluginTasksByTaskId', - path: '/workspaces/current/plugin/tasks/{task_id}', - tags: ['console'], - }) - .input(z.object({ params: zGetWorkspacesCurrentPluginTasksByTaskIdPath })) - .output(zGetWorkspacesCurrentPluginTasksByTaskIdResponse) - -export const byTaskId = { - get: get26, - delete: delete7, -} - /** * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. * * @deprecated */ export const get27 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginPermissionFetch', + path: '/workspaces/current/plugin/permission/fetch', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentPluginPermissionFetchResponse) + +export const fetch_ = { + get: get27, +} + +export const permission2 = { + change, + fetch: fetch_, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post33 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginPreferencesAutoupgradeExclude', + path: '/workspaces/current/plugin/preferences/autoupgrade/exclude', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody })) + .output(zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse) + +export const exclude = { + post: post33, +} + +export const autoupgrade = { + exclude, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post34 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginPreferencesChange', + path: '/workspaces/current/plugin/preferences/change', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesChangeBody })) + .output(zPostWorkspacesCurrentPluginPreferencesChangeResponse) + +export const change2 = { + post: post34, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get28 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginPreferencesFetch', + path: '/workspaces/current/plugin/preferences/fetch', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentPluginPreferencesFetchResponse) + +export const fetch2 = { + get: get28, +} + +export const preferences = { + autoupgrade, + change: change2, + fetch: fetch2, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get29 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginReadme', + path: '/workspaces/current/plugin/readme', + tags: ['console'], + }) + .input(z.object({ query: zGetWorkspacesCurrentPluginReadmeQuery })) + .output(zGetWorkspacesCurrentPluginReadmeResponse) + +export const readme = { + get: get29, +} + +export const post35 = oc + .route({ + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginTasksDeleteAll', + path: '/workspaces/current/plugin/tasks/delete_all', + tags: ['console'], + }) + .output(zPostWorkspacesCurrentPluginTasksDeleteAllResponse) + +export const deleteAll = { + post: post35, +} + +export const post36 = oc + .route({ + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifier', + path: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}', + tags: ['console'], + }) + .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath })) + .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse) + +export const byIdentifier = { + post: post36, +} + +export const post37 = oc + .route({ + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDelete', + path: '/workspaces/current/plugin/tasks/{task_id}/delete', + tags: ['console'], + }) + .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath })) + .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse) + +export const delete8 = { + post: post37, + byIdentifier, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get30 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentPluginTasksByTaskId', + path: '/workspaces/current/plugin/tasks/{task_id}', + tags: ['console'], + }) + .input(z.object({ params: zGetWorkspacesCurrentPluginTasksByTaskIdPath })) + .output(zGetWorkspacesCurrentPluginTasksByTaskIdResponse) + +export const byTaskId = { + get: get30, + delete: delete8, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get31 = oc .route({ deprecated: true, description: @@ -1969,12 +2269,12 @@ export const get27 = oc .output(zGetWorkspacesCurrentPluginTasksResponse) export const tasks = { - get: get27, + get: get31, deleteAll, byTaskId, } -export const post34 = oc +export const post38 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -1986,102 +2286,6 @@ export const post34 = oc .output(zPostWorkspacesCurrentPluginUninstallResponse) export const uninstall = { - post: post34, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post35 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginUpgradeGithub', - path: '/workspaces/current/plugin/upgrade/github', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeGithubBody })) - .output(zPostWorkspacesCurrentPluginUpgradeGithubResponse) - -export const github2 = { - post: post35, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post36 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginUpgradeMarketplace', - path: '/workspaces/current/plugin/upgrade/marketplace', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeMarketplaceBody })) - .output(zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse) - -export const marketplace3 = { - post: post36, -} - -export const upgrade = { - github: github2, - marketplace: marketplace3, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post37 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginUploadBundle', - path: '/workspaces/current/plugin/upload/bundle', - tags: ['console'], - }) - .output(zPostWorkspacesCurrentPluginUploadBundleResponse) - -export const bundle = { - post: post37, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post38 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentPluginUploadGithub', - path: '/workspaces/current/plugin/upload/github', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentPluginUploadGithubBody })) - .output(zPostWorkspacesCurrentPluginUploadGithubResponse) - -export const github3 = { post: post38, } @@ -2091,6 +2295,102 @@ export const github3 = { * @deprecated */ export const post39 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginUpgradeGithub', + path: '/workspaces/current/plugin/upgrade/github', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeGithubBody })) + .output(zPostWorkspacesCurrentPluginUpgradeGithubResponse) + +export const github2 = { + post: post39, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post40 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginUpgradeMarketplace', + path: '/workspaces/current/plugin/upgrade/marketplace', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeMarketplaceBody })) + .output(zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse) + +export const marketplace3 = { + post: post40, +} + +export const upgrade = { + github: github2, + marketplace: marketplace3, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post41 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginUploadBundle', + path: '/workspaces/current/plugin/upload/bundle', + tags: ['console'], + }) + .output(zPostWorkspacesCurrentPluginUploadBundleResponse) + +export const bundle = { + post: post41, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post42 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentPluginUploadGithub', + path: '/workspaces/current/plugin/upload/github', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentPluginUploadGithubBody })) + .output(zPostWorkspacesCurrentPluginUploadGithubResponse) + +export const github3 = { + post: post42, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post43 = oc .route({ deprecated: true, description: @@ -2104,7 +2404,7 @@ export const post39 = oc .output(zPostWorkspacesCurrentPluginUploadPkgResponse) export const pkg3 = { - post: post39, + post: post43, } export const upload = { @@ -2136,7 +2436,7 @@ export const plugin2 = { * * @deprecated */ -export const get28 = oc +export const get32 = oc .route({ deprecated: true, description: @@ -2150,168 +2450,6 @@ export const get28 = oc .output(zGetWorkspacesCurrentToolLabelsResponse) export const toolLabels = { - get: get28, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post40 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentToolProviderApiAdd', - path: '/workspaces/current/tool-provider/api/add', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiAddBody })) - .output(zPostWorkspacesCurrentToolProviderApiAddResponse) - -export const add = { - post: post40, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post41 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentToolProviderApiDelete', - path: '/workspaces/current/tool-provider/api/delete', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiDeleteBody })) - .output(zPostWorkspacesCurrentToolProviderApiDeleteResponse) - -export const delete8 = { - post: post41, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get29 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolProviderApiGet', - path: '/workspaces/current/tool-provider/api/get', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolProviderApiGetResponse) - -export const get30 = { - get: get29, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get31 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolProviderApiRemote', - path: '/workspaces/current/tool-provider/api/remote', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolProviderApiRemoteResponse) - -export const remote = { - get: get31, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post42 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentToolProviderApiSchema', - path: '/workspaces/current/tool-provider/api/schema', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiSchemaBody })) - .output(zPostWorkspacesCurrentToolProviderApiSchemaResponse) - -export const schema = { - post: post42, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const post43 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'POST', - operationId: 'postWorkspacesCurrentToolProviderApiTestPre', - path: '/workspaces/current/tool-provider/api/test/pre', - tags: ['console'], - }) - .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiTestPreBody })) - .output(zPostWorkspacesCurrentToolProviderApiTestPreResponse) - -export const pre = { - post: post43, -} - -export const test = { - pre, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get32 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolProviderApiTools', - path: '/workspaces/current/tool-provider/api/tools', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolProviderApiToolsResponse) - -export const tools = { get: get32, } @@ -2321,6 +2459,168 @@ export const tools = { * @deprecated */ export const post44 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentToolProviderApiAdd', + path: '/workspaces/current/tool-provider/api/add', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiAddBody })) + .output(zPostWorkspacesCurrentToolProviderApiAddResponse) + +export const add = { + post: post44, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post45 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentToolProviderApiDelete', + path: '/workspaces/current/tool-provider/api/delete', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiDeleteBody })) + .output(zPostWorkspacesCurrentToolProviderApiDeleteResponse) + +export const delete9 = { + post: post45, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get33 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolProviderApiGet', + path: '/workspaces/current/tool-provider/api/get', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolProviderApiGetResponse) + +export const get34 = { + get: get33, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get35 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolProviderApiRemote', + path: '/workspaces/current/tool-provider/api/remote', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolProviderApiRemoteResponse) + +export const remote = { + get: get35, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post46 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentToolProviderApiSchema', + path: '/workspaces/current/tool-provider/api/schema', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiSchemaBody })) + .output(zPostWorkspacesCurrentToolProviderApiSchemaResponse) + +export const schema = { + post: post46, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post47 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'POST', + operationId: 'postWorkspacesCurrentToolProviderApiTestPre', + path: '/workspaces/current/tool-provider/api/test/pre', + tags: ['console'], + }) + .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiTestPreBody })) + .output(zPostWorkspacesCurrentToolProviderApiTestPreResponse) + +export const pre = { + post: post47, +} + +export const test = { + pre, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get36 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolProviderApiTools', + path: '/workspaces/current/tool-provider/api/tools', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolProviderApiToolsResponse) + +export const tools = { + get: get36, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const post48 = oc .route({ deprecated: true, description: @@ -2335,13 +2635,13 @@ export const post44 = oc .output(zPostWorkspacesCurrentToolProviderApiUpdateResponse) export const update2 = { - post: post44, + post: post48, } export const api = { add, - delete: delete8, - get: get30, + delete: delete9, + get: get34, remote, schema, test, @@ -2354,7 +2654,7 @@ export const api = { * * @deprecated */ -export const post45 = oc +export const post49 = oc .route({ deprecated: true, description: @@ -2374,7 +2674,7 @@ export const post45 = oc .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse) export const add2 = { - post: post45, + post: post49, } /** @@ -2382,7 +2682,7 @@ export const add2 = { * * @deprecated */ -export const get33 = oc +export const get37 = oc .route({ deprecated: true, description: @@ -2397,7 +2697,7 @@ export const get33 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse) export const info = { - get: get33, + get: get37, } /** @@ -2405,7 +2705,7 @@ export const info = { * * @deprecated */ -export const get34 = oc +export const get38 = oc .route({ deprecated: true, description: @@ -2428,7 +2728,7 @@ export const get34 = oc ) export const byCredentialType = { - get: get34, + get: get38, } export const schema2 = { @@ -2445,7 +2745,7 @@ export const credential = { * * @deprecated */ -export const get35 = oc +export const get39 = oc .route({ deprecated: true, description: @@ -2460,7 +2760,7 @@ export const get35 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse) export const credentials3 = { - get: get35, + get: get39, } /** @@ -2468,7 +2768,7 @@ export const credentials3 = { * * @deprecated */ -export const post46 = oc +export const post50 = oc .route({ deprecated: true, description: @@ -2488,7 +2788,7 @@ export const post46 = oc .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse) export const defaultCredential = { - post: post46, + post: post50, } /** @@ -2496,7 +2796,7 @@ export const defaultCredential = { * * @deprecated */ -export const post47 = oc +export const post51 = oc .route({ deprecated: true, description: @@ -2515,8 +2815,8 @@ export const post47 = oc ) .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse) -export const delete9 = { - post: post47, +export const delete10 = { + post: post51, } /** @@ -2524,7 +2824,7 @@ export const delete9 = { * * @deprecated */ -export const get36 = oc +export const get40 = oc .route({ deprecated: true, description: @@ -2539,7 +2839,7 @@ export const get36 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse) export const icon2 = { - get: get36, + get: get40, } /** @@ -2547,7 +2847,7 @@ export const icon2 = { * * @deprecated */ -export const get37 = oc +export const get41 = oc .route({ deprecated: true, description: @@ -2562,7 +2862,7 @@ export const get37 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse) export const info2 = { - get: get37, + get: get41, } /** @@ -2570,7 +2870,7 @@ export const info2 = { * * @deprecated */ -export const get38 = oc +export const get42 = oc .route({ deprecated: true, description: @@ -2587,7 +2887,7 @@ export const get38 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse) export const clientSchema = { - get: get38, + get: get42, } /** @@ -2595,7 +2895,7 @@ export const clientSchema = { * * @deprecated */ -export const delete10 = oc +export const delete11 = oc .route({ deprecated: true, description: @@ -2618,7 +2918,7 @@ export const delete10 = oc * * @deprecated */ -export const get39 = oc +export const get43 = oc .route({ deprecated: true, description: @@ -2639,7 +2939,7 @@ export const get39 = oc * * @deprecated */ -export const post48 = oc +export const post52 = oc .route({ deprecated: true, description: @@ -2659,9 +2959,9 @@ export const post48 = oc .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse) export const customClient = { - delete: delete10, - get: get39, - post: post48, + delete: delete11, + get: get43, + post: post52, } export const oauth = { @@ -2674,7 +2974,7 @@ export const oauth = { * * @deprecated */ -export const get40 = oc +export const get44 = oc .route({ deprecated: true, description: @@ -2689,7 +2989,7 @@ export const get40 = oc .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse) export const tools2 = { - get: get40, + get: get44, } /** @@ -2697,7 +2997,7 @@ export const tools2 = { * * @deprecated */ -export const post49 = oc +export const post53 = oc .route({ deprecated: true, description: @@ -2717,7 +3017,7 @@ export const post49 = oc .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse) export const update3 = { - post: post49, + post: post53, } export const byProvider2 = { @@ -2725,7 +3025,7 @@ export const byProvider2 = { credential, credentials: credentials3, defaultCredential, - delete: delete9, + delete: delete10, icon: icon2, info: info2, oauth, @@ -2742,7 +3042,7 @@ export const builtin = { * * @deprecated */ -export const post50 = oc +export const post54 = oc .route({ deprecated: true, description: @@ -2757,7 +3057,7 @@ export const post50 = oc .output(zPostWorkspacesCurrentToolProviderMcpAuthResponse) export const auth = { - post: post50, + post: post54, } /** @@ -2765,7 +3065,7 @@ export const auth = { * * @deprecated */ -export const get41 = oc +export const get45 = oc .route({ deprecated: true, description: @@ -2780,7 +3080,7 @@ export const get41 = oc .output(zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse) export const byProviderId = { - get: get41, + get: get45, } export const tools3 = { @@ -2792,7 +3092,7 @@ export const tools3 = { * * @deprecated */ -export const get42 = oc +export const get46 = oc .route({ deprecated: true, description: @@ -2807,14 +3107,14 @@ export const get42 = oc .output(zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse) export const byProviderId2 = { - get: get42, + get: get46, } export const update4 = { byProviderId: byProviderId2, } -export const delete11 = oc +export const delete12 = oc .route({ inputStructure: 'detailed', method: 'DELETE', @@ -2830,7 +3130,7 @@ export const delete11 = oc * * @deprecated */ -export const post51 = oc +export const post55 = oc .route({ deprecated: true, description: @@ -2864,8 +3164,8 @@ export const put4 = oc .output(zPutWorkspacesCurrentToolProviderMcpResponse) export const mcp = { - delete: delete11, - post: post51, + delete: delete12, + post: post55, put: put4, auth, tools: tools3, @@ -2877,7 +3177,7 @@ export const mcp = { * * @deprecated */ -export const post52 = oc +export const post56 = oc .route({ deprecated: true, description: @@ -2892,7 +3192,7 @@ export const post52 = oc .output(zPostWorkspacesCurrentToolProviderWorkflowCreateResponse) export const create2 = { - post: post52, + post: post56, } /** @@ -2900,7 +3200,7 @@ export const create2 = { * * @deprecated */ -export const post53 = oc +export const post57 = oc .route({ deprecated: true, description: @@ -2914,8 +3214,8 @@ export const post53 = oc .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowDeleteBody })) .output(zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse) -export const delete12 = { - post: post53, +export const delete13 = { + post: post57, } /** @@ -2923,7 +3223,7 @@ export const delete12 = { * * @deprecated */ -export const get43 = oc +export const get47 = oc .route({ deprecated: true, description: @@ -2936,8 +3236,8 @@ export const get43 = oc }) .output(zGetWorkspacesCurrentToolProviderWorkflowGetResponse) -export const get44 = { - get: get43, +export const get48 = { + get: get47, } /** @@ -2945,7 +3245,7 @@ export const get44 = { * * @deprecated */ -export const get45 = oc +export const get49 = oc .route({ deprecated: true, description: @@ -2959,7 +3259,7 @@ export const get45 = oc .output(zGetWorkspacesCurrentToolProviderWorkflowToolsResponse) export const tools4 = { - get: get45, + get: get49, } /** @@ -2967,7 +3267,7 @@ export const tools4 = { * * @deprecated */ -export const post54 = oc +export const post58 = oc .route({ deprecated: true, description: @@ -2982,13 +3282,13 @@ export const post54 = oc .output(zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse) export const update5 = { - post: post54, + post: post58, } export const workflow = { create: create2, - delete: delete12, - get: get44, + delete: delete13, + get: get48, tools: tools4, update: update5, } @@ -3005,7 +3305,7 @@ export const toolProvider = { * * @deprecated */ -export const get46 = oc +export const get50 = oc .route({ deprecated: true, description: @@ -3019,110 +3319,110 @@ export const get46 = oc .output(zGetWorkspacesCurrentToolProvidersResponse) export const toolProviders = { - get: get46, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get47 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolsApi', - path: '/workspaces/current/tools/api', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolsApiResponse) - -export const api2 = { - get: get47, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get48 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolsBuiltin', - path: '/workspaces/current/tools/builtin', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolsBuiltinResponse) - -export const builtin2 = { - get: get48, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get49 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolsMcp', - path: '/workspaces/current/tools/mcp', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolsMcpResponse) - -export const mcp2 = { - get: get49, -} - -/** - * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. - * - * @deprecated - */ -export const get50 = oc - .route({ - deprecated: true, - description: - 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', - inputStructure: 'detailed', - method: 'GET', - operationId: 'getWorkspacesCurrentToolsWorkflow', - path: '/workspaces/current/tools/workflow', - tags: ['console'], - }) - .output(zGetWorkspacesCurrentToolsWorkflowResponse) - -export const workflow2 = { get: get50, } -export const tools5 = { - api: api2, - builtin: builtin2, - mcp: mcp2, - workflow: workflow2, -} - /** * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. * * @deprecated */ export const get51 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolsApi', + path: '/workspaces/current/tools/api', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolsApiResponse) + +export const api2 = { + get: get51, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get52 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolsBuiltin', + path: '/workspaces/current/tools/builtin', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolsBuiltinResponse) + +export const builtin2 = { + get: get52, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get53 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolsMcp', + path: '/workspaces/current/tools/mcp', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolsMcpResponse) + +export const mcp2 = { + get: get53, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get54 = oc + .route({ + deprecated: true, + description: + 'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.', + inputStructure: 'detailed', + method: 'GET', + operationId: 'getWorkspacesCurrentToolsWorkflow', + path: '/workspaces/current/tools/workflow', + tags: ['console'], + }) + .output(zGetWorkspacesCurrentToolsWorkflowResponse) + +export const workflow2 = { + get: get54, +} + +export const tools5 = { + api: api2, + builtin: builtin2, + mcp: mcp2, + workflow: workflow2, +} + +/** + * Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate. + * + * @deprecated + */ +export const get55 = oc .route({ deprecated: true, description: @@ -3137,7 +3437,7 @@ export const get51 = oc .output(zGetWorkspacesCurrentTriggerProviderByProviderIconResponse) export const icon3 = { - get: get51, + get: get55, } /** @@ -3147,7 +3447,7 @@ export const icon3 = { * * @deprecated */ -export const get52 = oc +export const get56 = oc .route({ deprecated: true, description: @@ -3163,7 +3463,7 @@ export const get52 = oc .output(zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse) export const info3 = { - get: get52, + get: get56, } /** @@ -3173,7 +3473,7 @@ export const info3 = { * * @deprecated */ -export const delete13 = oc +export const delete14 = oc .route({ deprecated: true, description: @@ -3195,7 +3495,7 @@ export const delete13 = oc * * @deprecated */ -export const get53 = oc +export const get57 = oc .route({ deprecated: true, description: @@ -3217,7 +3517,7 @@ export const get53 = oc * * @deprecated */ -export const post55 = oc +export const post59 = oc .route({ deprecated: true, description: @@ -3238,9 +3538,9 @@ export const post55 = oc .output(zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse) export const client = { - delete: delete13, - get: get53, - post: post55, + delete: delete14, + get: get57, + post: post59, } export const oauth2 = { @@ -3254,7 +3554,7 @@ export const oauth2 = { * * @deprecated */ -export const post56 = oc +export const post60 = oc .route({ deprecated: true, description: @@ -3279,7 +3579,7 @@ export const post56 = oc ) export const bySubscriptionBuilderId = { - post: post56, + post: post60, } export const build = { @@ -3293,7 +3593,7 @@ export const build = { * * @deprecated */ -export const post57 = oc +export const post61 = oc .route({ deprecated: true, description: @@ -3314,7 +3614,7 @@ export const post57 = oc .output(zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse) export const create3 = { - post: post57, + post: post61, } /** @@ -3324,7 +3624,7 @@ export const create3 = { * * @deprecated */ -export const get54 = oc +export const get58 = oc .route({ deprecated: true, description: @@ -3348,7 +3648,7 @@ export const get54 = oc ) export const bySubscriptionBuilderId2 = { - get: get54, + get: get58, } export const logs = { @@ -3362,7 +3662,7 @@ export const logs = { * * @deprecated */ -export const post58 = oc +export const post62 = oc .route({ deprecated: true, description: @@ -3387,7 +3687,7 @@ export const post58 = oc ) export const bySubscriptionBuilderId3 = { - post: post58, + post: post62, } export const update6 = { @@ -3401,7 +3701,7 @@ export const update6 = { * * @deprecated */ -export const post59 = oc +export const post63 = oc .route({ deprecated: true, description: @@ -3426,7 +3726,7 @@ export const post59 = oc ) export const bySubscriptionBuilderId4 = { - post: post59, + post: post63, } export const verifyAndUpdate = { @@ -3440,7 +3740,7 @@ export const verifyAndUpdate = { * * @deprecated */ -export const get55 = oc +export const get59 = oc .route({ deprecated: true, description: @@ -3464,7 +3764,7 @@ export const get55 = oc ) export const bySubscriptionBuilderId5 = { - get: get55, + get: get59, } export const builder = { @@ -3483,7 +3783,7 @@ export const builder = { * * @deprecated */ -export const get56 = oc +export const get60 = oc .route({ deprecated: true, description: @@ -3499,7 +3799,7 @@ export const get56 = oc .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse) export const list3 = { - get: get56, + get: get60, } /** @@ -3509,7 +3809,7 @@ export const list3 = { * * @deprecated */ -export const get57 = oc +export const get61 = oc .route({ deprecated: true, description: @@ -3529,7 +3829,7 @@ export const get57 = oc .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse) export const authorize = { - get: get57, + get: get61, } export const oauth3 = { @@ -3543,7 +3843,7 @@ export const oauth3 = { * * @deprecated */ -export const post60 = oc +export const post64 = oc .route({ deprecated: true, description: @@ -3568,7 +3868,7 @@ export const post60 = oc ) export const bySubscriptionId = { - post: post60, + post: post64, } export const verify = { @@ -3592,7 +3892,7 @@ export const byProvider3 = { /** * Delete a subscription instance */ -export const post61 = oc +export const post65 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -3608,8 +3908,8 @@ export const post61 = oc ) .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse) -export const delete14 = { - post: post61, +export const delete15 = { + post: post65, } /** @@ -3619,7 +3919,7 @@ export const delete14 = { * * @deprecated */ -export const post62 = oc +export const post66 = oc .route({ deprecated: true, description: @@ -3640,11 +3940,11 @@ export const post62 = oc .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse) export const update7 = { - post: post62, + post: post66, } export const subscriptions2 = { - delete: delete14, + delete: delete15, update: update7, } @@ -3664,7 +3964,7 @@ export const triggerProvider = { * * @deprecated */ -export const get58 = oc +export const get62 = oc .route({ deprecated: true, description: @@ -3679,10 +3979,10 @@ export const get58 = oc .output(zGetWorkspacesCurrentTriggersResponse) export const triggers = { - get: get58, + get: get62, } -export const post63 = oc +export const post67 = oc .route({ inputStructure: 'detailed', method: 'POST', @@ -3693,9 +3993,10 @@ export const post63 = oc .output(zPostWorkspacesCurrentResponse) export const current = { - post: post63, + post: post67, agentProvider, agentProviders, + customizedSnippets, datasetOperators, defaultModel, endpoints, @@ -3717,7 +4018,7 @@ export const current = { * * @deprecated */ -export const post64 = oc +export const post68 = oc .route({ deprecated: true, description: @@ -3731,7 +4032,7 @@ export const post64 = oc .output(zPostWorkspacesCustomConfigWebappLogoUploadResponse) export const upload2 = { - post: post64, + post: post68, } export const webappLogo = { @@ -3743,7 +4044,7 @@ export const webappLogo = { * * @deprecated */ -export const post65 = oc +export const post69 = oc .route({ deprecated: true, description: @@ -3758,7 +4059,7 @@ export const post65 = oc .output(zPostWorkspacesCustomConfigResponse) export const customConfig = { - post: post65, + post: post69, webappLogo, } @@ -3767,7 +4068,7 @@ export const customConfig = { * * @deprecated */ -export const post66 = oc +export const post70 = oc .route({ deprecated: true, description: @@ -3782,7 +4083,7 @@ export const post66 = oc .output(zPostWorkspacesInfoResponse) export const info4 = { - post: post66, + post: post70, } /** @@ -3790,7 +4091,7 @@ export const info4 = { * * @deprecated */ -export const post67 = oc +export const post71 = oc .route({ deprecated: true, description: @@ -3805,7 +4106,7 @@ export const post67 = oc .output(zPostWorkspacesSwitchResponse) export const switch3 = { - post: post67, + post: post71, } /** @@ -3813,7 +4114,7 @@ export const switch3 = { * * @deprecated */ -export const get59 = oc +export const get63 = oc .route({ deprecated: true, description: @@ -3828,7 +4129,7 @@ export const get59 = oc .output(zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse) export const byLang = { - get: get59, + get: get63, } export const byIconType = { @@ -3852,7 +4153,7 @@ export const byTenantId = { * * @deprecated */ -export const get60 = oc +export const get64 = oc .route({ deprecated: true, description: @@ -3866,7 +4167,7 @@ export const get60 = oc .output(zGetWorkspacesResponse) export const workspaces = { - get: get60, + get: get64, current, customConfig, info: info4, diff --git a/packages/contracts/generated/api/console/workspaces/types.gen.ts b/packages/contracts/generated/api/console/workspaces/types.gen.ts index 8336951b517..dd29605d68d 100644 --- a/packages/contracts/generated/api/console/workspaces/types.gen.ts +++ b/packages/contracts/generated/api/console/workspaces/types.gen.ts @@ -19,6 +19,68 @@ export type TenantInfoResponse = { trial_end_reason?: string | null } +export type SnippetPagination = { + data?: Array + has_more?: boolean + limit?: number + page?: number + total?: number +} + +export type CreateSnippetPayload = { + description?: string | null + graph?: { + [key: string]: unknown + } | null + icon_info?: IconInfo + input_fields?: Array | null + name: string + type?: 'group' | 'node' +} + +export type Snippet = { + created_at?: { + [key: string]: unknown + } + created_by?: AnonymousInlineModelB0Fd3F86D9D5 + description?: string + graph?: { + [key: string]: unknown + } + icon_info?: { + [key: string]: unknown + } + id?: string + input_fields?: { + [key: string]: unknown + } + is_published?: boolean + name?: string + tags?: Array + type?: string + updated_at?: { + [key: string]: unknown + } + updated_by?: AnonymousInlineModelB0Fd3F86D9D5 + use_count?: number + version?: number +} + +export type SnippetImportPayload = { + description?: string | null + mode: string + name?: string | null + snippet_id?: string | null + yaml_content?: string | null + yaml_url?: string | null +} + +export type UpdateSnippetPayload = { + description?: string | null + icon_info?: IconInfo + name?: string | null +} + export type AccountWithRoleList = { accounts: Array } @@ -504,6 +566,59 @@ export type WorkspaceCustomConfigResponse = { replace_webapp_logo?: string | null } +export type AnonymousInlineModel7B67Ac8A4Db8 = { + author_name?: string + created_at?: { + [key: string]: unknown + } + created_by?: string + description?: string + icon_info?: { + [key: string]: unknown + } + id?: string + is_published?: boolean + name?: string + tags?: Array + type?: string + updated_at?: { + [key: string]: unknown + } + updated_by?: string + use_count?: number + version?: number +} + +export type IconInfo = { + icon?: string | null + icon_background?: string | null + icon_type?: 'emoji' | 'image' | null + icon_url?: string | null +} + +export type InputFieldDefinition = { + default?: string | null + hint?: boolean | null + label?: string | null + max_length?: number | null + options?: Array | null + placeholder?: string | null + required?: boolean | null + type?: string | null +} + +export type AnonymousInlineModelB0Fd3F86D9D5 = { + email?: string + id?: string + name?: string +} + +export type AnonymousInlineModel7B8B49Ca164e = { + id?: string + name?: string + type?: string +} + export type AccountWithRole = { avatar?: string | null created_at?: number | null @@ -629,6 +744,266 @@ export type GetWorkspacesCurrentAgentProvidersResponses = { export type GetWorkspacesCurrentAgentProvidersResponse = GetWorkspacesCurrentAgentProvidersResponses[keyof GetWorkspacesCurrentAgentProvidersResponses] +export type GetWorkspacesCurrentCustomizedSnippetsData = { + body?: never + path?: never + query?: { + creators?: Array | null + is_published?: boolean | null + keyword?: string | null + limit?: number + page?: number + tag_ids?: Array | null + } + url: '/workspaces/current/customized-snippets' +} + +export type GetWorkspacesCurrentCustomizedSnippetsResponses = { + 200: SnippetPagination +} + +export type GetWorkspacesCurrentCustomizedSnippetsResponse + = GetWorkspacesCurrentCustomizedSnippetsResponses[keyof GetWorkspacesCurrentCustomizedSnippetsResponses] + +export type PostWorkspacesCurrentCustomizedSnippetsData = { + body: CreateSnippetPayload + path?: never + query?: never + url: '/workspaces/current/customized-snippets' +} + +export type PostWorkspacesCurrentCustomizedSnippetsErrors = { + 400: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsError + = PostWorkspacesCurrentCustomizedSnippetsErrors[keyof PostWorkspacesCurrentCustomizedSnippetsErrors] + +export type PostWorkspacesCurrentCustomizedSnippetsResponses = { + 201: Snippet +} + +export type PostWorkspacesCurrentCustomizedSnippetsResponse + = PostWorkspacesCurrentCustomizedSnippetsResponses[keyof PostWorkspacesCurrentCustomizedSnippetsResponses] + +export type PostWorkspacesCurrentCustomizedSnippetsImportsData = { + body: SnippetImportPayload + path?: never + query?: never + url: '/workspaces/current/customized-snippets/imports' +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsErrors = { + 400: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsError + = PostWorkspacesCurrentCustomizedSnippetsImportsErrors[keyof PostWorkspacesCurrentCustomizedSnippetsImportsErrors] + +export type PostWorkspacesCurrentCustomizedSnippetsImportsResponses = { + 200: { + [key: string]: unknown + } + 202: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsResponse + = PostWorkspacesCurrentCustomizedSnippetsImportsResponses[keyof PostWorkspacesCurrentCustomizedSnippetsImportsResponses] + +export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmData = { + body?: never + path: { + import_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/imports/{import_id}/confirm' +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmErrors = { + 400: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmError + = PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmErrors[keyof PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmErrors] + +export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse + = PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses[keyof PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses] + +export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}' +} + +export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdError + = DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors[keyof DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors] + +export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = { + 204: { + [key: string]: never + } +} + +export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse + = DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}' +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdError + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = { + 200: Snippet +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses] + +export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdData = { + body: UpdateSnippetPayload + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}' +} + +export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = { + 400: { + [key: string]: unknown + } + 404: { + [key: string]: unknown + } +} + +export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdError + = PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors[keyof PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors] + +export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = { + 200: Snippet +} + +export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse + = PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}/check-dependencies' +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesError + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesErrors[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesErrors] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses = { + 200: { + [key: string]: unknown + } +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}/export' +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportErrors = { + 404: { + [key: string]: unknown + } +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportError + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportErrors[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportErrors] + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses = { + 200: { + [key: string]: unknown + } +} + +export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse + = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses] + +export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementData = { + body?: never + path: { + snippet_id: string + } + query?: never + url: '/workspaces/current/customized-snippets/{snippet_id}/use-count/increment' +} + +export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementErrors = { + 404: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementError + = PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementErrors[keyof PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementErrors] + +export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses = { + 200: { + [key: string]: unknown + } +} + +export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse + = PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses[keyof PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses] + export type GetWorkspacesCurrentDatasetOperatorsData = { body?: never path?: never diff --git a/packages/contracts/generated/api/console/workspaces/zod.gen.ts b/packages/contracts/generated/api/console/workspaces/zod.gen.ts index a6f133a3498..eb93856b370 100644 --- a/packages/contracts/generated/api/console/workspaces/zod.gen.ts +++ b/packages/contracts/generated/api/console/workspaces/zod.gen.ts @@ -2,6 +2,20 @@ import * as z from 'zod' +/** + * SnippetImportPayload + * + * Payload for importing snippet from DSL. + */ +export const zSnippetImportPayload = z.object({ + description: z.string().nullish(), + mode: z.string(), + name: z.string().nullish(), + snippet_id: z.string().nullish(), + yaml_content: z.string().nullish(), + yaml_url: z.string().nullish(), +}) + /** * SimpleResultResponse */ @@ -463,6 +477,114 @@ export const zTenantInfoResponse = z.object({ trial_end_reason: z.string().nullish(), }) +/** + * IconInfo + * + * Icon information model. + */ +export const zIconInfo = z.object({ + icon: z.string().nullish(), + icon_background: z.string().nullish(), + icon_type: z.enum(['emoji', 'image']).nullish(), + icon_url: z.string().nullish(), +}) + +/** + * UpdateSnippetPayload + * + * Payload for updating a snippet. + */ +export const zUpdateSnippetPayload = z.object({ + description: z.string().max(2000).nullish(), + icon_info: zIconInfo.optional(), + name: z.string().min(1).max(255).nullish(), +}) + +/** + * InputFieldDefinition + * + * Input field definition for snippet parameters. + */ +export const zInputFieldDefinition = z.object({ + default: z.string().nullish(), + hint: z.boolean().nullish(), + label: z.string().nullish(), + max_length: z.int().nullish(), + options: z.array(z.string()).nullish(), + placeholder: z.string().nullish(), + required: z.boolean().nullish(), + type: z.string().nullish(), +}) + +/** + * CreateSnippetPayload + * + * Payload for creating a new snippet. + */ +export const zCreateSnippetPayload = z.object({ + description: z.string().max(2000).nullish(), + graph: z.record(z.string(), z.unknown()).nullish(), + icon_info: zIconInfo.optional(), + input_fields: z.array(zInputFieldDefinition).nullish(), + name: z.string().min(1).max(255), + type: z.enum(['group', 'node']).optional().default('node'), +}) + +export const zAnonymousInlineModelB0Fd3F86D9D5 = z.object({ + email: z.string().optional(), + id: z.string().optional(), + name: z.string().optional(), +}) + +export const zAnonymousInlineModel7B8B49Ca164e = z.object({ + id: z.string().optional(), + name: z.string().optional(), + type: z.string().optional(), +}) + +export const zSnippet = z.object({ + created_at: z.record(z.string(), z.unknown()).optional(), + created_by: zAnonymousInlineModelB0Fd3F86D9D5.optional(), + description: z.string().optional(), + graph: z.record(z.string(), z.unknown()).optional(), + icon_info: z.record(z.string(), z.unknown()).optional(), + id: z.string().optional(), + input_fields: z.record(z.string(), z.unknown()).optional(), + is_published: z.boolean().optional(), + name: z.string().optional(), + tags: z.array(zAnonymousInlineModel7B8B49Ca164e).optional(), + type: z.string().optional(), + updated_at: z.record(z.string(), z.unknown()).optional(), + updated_by: zAnonymousInlineModelB0Fd3F86D9D5.optional(), + use_count: z.int().optional(), + version: z.int().optional(), +}) + +export const zAnonymousInlineModel7B67Ac8A4Db8 = z.object({ + author_name: z.string().optional(), + created_at: z.record(z.string(), z.unknown()).optional(), + created_by: z.string().optional(), + description: z.string().optional(), + icon_info: z.record(z.string(), z.unknown()).optional(), + id: z.string().optional(), + is_published: z.boolean().optional(), + name: z.string().optional(), + tags: z.array(zAnonymousInlineModel7B8B49Ca164e).optional(), + type: z.string().optional(), + updated_at: z.record(z.string(), z.unknown()).optional(), + updated_by: z.string().optional(), + use_count: z.int().optional(), + version: z.int().optional(), +}) + +export const zSnippetPagination = z.object({ + data: z.array(zAnonymousInlineModel7B67Ac8A4Db8).optional(), + has_more: z.boolean().optional(), + limit: z.int().optional(), + page: z.int().optional(), + total: z.int().optional(), +}) + /** * AccountWithRole */ @@ -809,6 +931,112 @@ export const zGetWorkspacesCurrentAgentProvidersResponse = z.array( z.record(z.string(), z.unknown()), ) +export const zGetWorkspacesCurrentCustomizedSnippetsQuery = z.object({ + creators: z.array(z.string()).nullish(), + is_published: z.boolean().nullish(), + keyword: z.string().nullish(), + limit: z.int().gte(1).lte(100).optional().default(20), + page: z.int().gte(1).lte(99999).optional().default(1), + tag_ids: z.array(z.string()).nullish(), +}) + +/** + * Snippets retrieved successfully + */ +export const zGetWorkspacesCurrentCustomizedSnippetsResponse = zSnippetPagination + +export const zPostWorkspacesCurrentCustomizedSnippetsBody = zCreateSnippetPayload + +/** + * Snippet created successfully + */ +export const zPostWorkspacesCurrentCustomizedSnippetsResponse = zSnippet + +export const zPostWorkspacesCurrentCustomizedSnippetsImportsBody = zSnippetImportPayload + +export const zPostWorkspacesCurrentCustomizedSnippetsImportsResponse = z.union([ + z.record(z.string(), z.unknown()), + z.record(z.string(), z.unknown()), +]) + +export const zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath = z.object({ + import_id: z.string(), +}) + +/** + * Import confirmed successfully + */ +export const zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse = z.record( + z.string(), + z.unknown(), +) + +export const zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Snippet deleted successfully + */ +export const zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse = z.record( + z.string(), + z.never(), +) + +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Snippet retrieved successfully + */ +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse = zSnippet + +export const zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody = zUpdateSnippetPayload + +export const zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Snippet updated successfully + */ +export const zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse = zSnippet + +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Dependencies checked successfully + */ +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse = z.record( + z.string(), + z.unknown(), +) + +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Snippet exported successfully + */ +export const zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse = z.record( + z.string(), + z.unknown(), +) + +export const zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath = z.object({ + snippet_id: z.string(), +}) + +/** + * Use count incremented successfully + */ +export const zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse + = z.record(z.string(), z.unknown()) + /** * Success */